[gnome-calendar] Fixed bug on location change notification.



commit 14fe503ece1c15b03e6e6737c083d351c23b696e
Author: Erick PÃrez Castellanos <erick red gmail com>
Date:   Thu Nov 22 21:28:31 2012 -0500

    Fixed bug on location change notification.

 src/gcal-edit-dialog.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/gcal-edit-dialog.c b/src/gcal-edit-dialog.c
index eda0c86..e50aef1 100644
--- a/src/gcal-edit-dialog.c
+++ b/src/gcal-edit-dialog.c
@@ -976,7 +976,7 @@ gcal_edit_dialog_set_event (GcalEditDialog *dialog,
                                                 priv->event_uid);
   gtk_entry_set_text (GTK_ENTRY (priv->location_entry),
                       const_text != NULL ? const_text : "");
-  priv->ev_store->location = g_strdup (const_text);
+  priv->ev_store->location = const_text != NULL ? g_strdup (const_text) : "";
 
   /* notes */
   priv->ev_store->description =
@@ -1154,6 +1154,9 @@ gcal_edit_dialog_get_modified_properties (GcalEditDialog *dialog)
   if (g_strcmp0 (priv->ev_store->location,
                  gtk_entry_get_text (GTK_ENTRY (priv->location_entry))) != 0)
     {
+      g_debug ("old Location: %s", priv->ev_store->location);
+      g_debug ("new Location: %s",
+               gtk_entry_get_text (GTK_ENTRY (priv->location_entry)));
       res = g_list_append (res, GINT_TO_POINTER (EVENT_LOCATION));
     }
 



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