[gnome-calendar] source-dialog: clear previously unsaved calendars



commit 0415d2272b63feac73267be85a89531d8bce90c5
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Feb 10 14:07:49 2015 -0200

    source-dialog: clear previously unsaved calendars

 src/gcal-source-dialog.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index ec5a406..b9b01e6 100644
--- a/src/gcal-source-dialog.c
+++ b/src/gcal-source-dialog.c
@@ -341,6 +341,13 @@ select_calendar_file (GtkButton *button,
       file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
 
       /**
+       * Remove any reminescent ESources
+       * cached before.
+       */
+      if (priv->local_source != NULL)
+        g_clear_pointer (&(priv->local_source), g_object_unref);
+
+      /**
        * Since we cannot guarantee that the
        * type system registered ESourceLocal,
        * it must be ensured at least here.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]