diff options
author | Jeff Cai <jeffcai@src.gnome.org> | 2006-08-20 19:50:16 +0800 |
---|---|---|
committer | Jeff Cai <jeffcai@src.gnome.org> | 2006-08-20 19:50:16 +0800 |
commit | 71866ce5ca218fd207346900d431201426b53925 (patch) | |
tree | 1f5fed31e17fe41f1ba1365315dcc02acf9f2689 /widgets/e-timezone-dialog | |
parent | 5e68bec45991b38dc75df22ef47b81ffad36974a (diff) | |
download | gsoc2013-evolution-71866ce5ca218fd207346900d431201426b53925.tar.gz gsoc2013-evolution-71866ce5ca218fd207346900d431201426b53925.tar.zst gsoc2013-evolution-71866ce5ca218fd207346900d431201426b53925.zip |
Fixes 350559. Disable timeout function when the map is destroyed.
svn path=/trunk/; revision=32596
Diffstat (limited to 'widgets/e-timezone-dialog')
-rw-r--r-- | widgets/e-timezone-dialog/e-timezone-dialog.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c index fa2961530c..66bd67bc46 100644 --- a/widgets/e-timezone-dialog/e-timezone-dialog.c +++ b/widgets/e-timezone-dialog/e-timezone-dialog.c @@ -110,6 +110,8 @@ static void set_map_timezone (ETimezoneDialog *etd, icaltimezone *zone); static void on_combo_changed (GtkEditable *entry, ETimezoneDialog *etd); +static void map_destroy_cb (gpointer data, + GObject *where_object_was); G_DEFINE_TYPE (ETimezoneDialog, e_timezone_dialog, G_TYPE_OBJECT) @@ -268,6 +270,9 @@ e_timezone_dialog_construct (ETimezoneDialog *etd) priv->map = e_map_new (); map = GTK_WIDGET (priv->map); + + g_object_weak_ref(G_OBJECT(map), map_destroy_cb, priv); + gtk_widget_set_events (map, gtk_widget_get_events (map) | GDK_LEAVE_NOTIFY_MASK | GDK_VISIBILITY_NOTIFY_MASK); @@ -785,3 +790,15 @@ e_timezone_dialog_reparent (ETimezoneDialog *etd, gtk_widget_reparent (priv->table, new_parent); } + +static void +map_destroy_cb(gpointer data, GObject *where_object_was) +{ + + ETimezoneDialogPrivate *priv = data; + if (priv->timeout_id) { + g_source_remove(priv->timeout_id); + priv->timeout_id = 0; + } + return; +} |