[gnome-calendar] window: remove queued event on finalize
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] window: remove queued event on finalize
- Date: Thu, 18 Feb 2016 17:39:23 +0000 (UTC)
commit 079750561a147354d7b3431ffc6ceb2fed244bd3
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Feb 18 15:36:56 2016 -0200
window: remove queued event on finalize
When the user removes an event, we first hide it and,
after a timeout, we remove it. The problem is that if
the user closes the window before the timeout is fired,
the event never gets deleted.
Fix that by deleting the event on finalize if there's
any event queued.
https://bugzilla.gnome.org/show_bug.cgi?id=762284
src/gcal-window.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-window.c b/src/gcal-window.c
index 83ba1a0..db56c0b 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -1390,6 +1390,13 @@ gcal_window_finalize (GObject *object)
window->save_geometry_timeout_id = 0;
}
+ /* If we have a queued event to delete, remove it now */
+ if (window->event_to_delete)
+ {
+ gcal_manager_remove_event (window->manager, window->event_to_delete);
+ g_clear_object (&window->event_to_delete);
+ }
+
g_clear_object (&window->manager);
g_clear_object (&window->views_switcher);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]