[gnome-photos] properties-dialog: Hold a reference and disconnect the timeout



commit e1407b18e2954916bba1b821de1e813d685a2bed
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Nov 20 02:39:05 2012 +0100

    properties-dialog: Hold a reference and disconnect the timeout

 src/photos-properties-dialog.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-properties-dialog.c b/src/photos-properties-dialog.c
index 98f6406..3e708b1 100644
--- a/src/photos-properties-dialog.c
+++ b/src/photos-properties-dialog.c
@@ -69,6 +69,9 @@ photos_properties_dialog_title_entry_timeout (gpointer user_data)
   priv->title_entry_timeout = 0;
   new_title = gtk_entry_get_text (GTK_ENTRY (priv->title_entry));
   photos_utils_set_edited_name (priv->urn, new_title);
+
+  g_object_unref (self);
+  return G_SOURCE_REMOVE;
 }
 
 
@@ -86,7 +89,7 @@ photos_properties_dialog_title_entry_changed (GtkEditable *editable, gpointer us
 
   priv->title_entry_timeout = g_timeout_add (TITLE_ENTRY_TIMEOUT,
                                              photos_properties_dialog_title_entry_timeout,
-                                             self);
+                                             g_object_ref (self));
 }
 
 



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