manager: keep the Shell's activated event alive

Currently, the user performs a search in Shell and activates
the result. That should show the edit dialog with the event
being edited, but it's not happening correctly.

Debugging the warnings generated, it was found that the event
was being unref()d and, obviously, that was not what we wanted.

Fix that by only unref()ing the events we don't want, and keeping
the wanted event alive.
This commit is contained in:
Georges Basile Stavracas Neto
2016-06-30 00:01:06 -03:00
parent 9c61fe54b5
commit 58b193f886
+4 -5
View File
@@ -1594,12 +1594,11 @@ gcal_manager_get_event_from_shell_search (GcalManager *manager,
event = l->data;
/* Found the event */
if (g_strcmp0 (gcal_event_get_uid (event), uuid) == 0)
{
new_event = event;
}
g_object_unref (event);
new_event = event;
else
g_object_unref (event);
}
g_list_free (list);