[gnome-calendar] manager: keep the Shell's activated event alive
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] manager: keep the Shell's activated event alive
- Date: Thu, 30 Jun 2016 03:02:55 +0000 (UTC)
commit 58b193f88638c01efbbe4264e6d3d8855417f7b0
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Jun 29 23:57:00 2016 -0300
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.
src/gcal-manager.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/gcal-manager.c b/src/gcal-manager.c
index d790529..635457d 100644
--- a/src/gcal-manager.c
+++ b/src/gcal-manager.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]