aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorJeff Cai <jeffcai@src.gnome.org>2006-08-20 19:50:16 +0800
committerJeff Cai <jeffcai@src.gnome.org>2006-08-20 19:50:16 +0800
commit71866ce5ca218fd207346900d431201426b53925 (patch)
tree1f5fed31e17fe41f1ba1365315dcc02acf9f2689 /widgets
parent5e68bec45991b38dc75df22ef47b81ffad36974a (diff)
downloadgsoc2013-evolution-71866ce5ca218fd207346900d431201426b53925.tar
gsoc2013-evolution-71866ce5ca218fd207346900d431201426b53925.tar.gz
gsoc2013-evolution-71866ce5ca218fd207346900d431201426b53925.tar.bz2
gsoc2013-evolution-71866ce5ca218fd207346900d431201426b53925.tar.lz
gsoc2013-evolution-71866ce5ca218fd207346900d431201426b53925.tar.xz
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')
-rw-r--r--widgets/ChangeLog7
-rw-r--r--widgets/e-timezone-dialog/e-timezone-dialog.c17
2 files changed, 24 insertions, 0 deletions
diff --git a/widgets/ChangeLog b/widgets/ChangeLog
index 0b349a6114..0f342e3c05 100644
--- a/widgets/ChangeLog
+++ b/widgets/ChangeLog
@@ -1,3 +1,10 @@
+2006-08-20 Jeff Cai <jeff.cai@sun.com>
+
+ * e-timezone-dialog/e-timezone-dialog.c:
+ (e_timezone_dialog_construct), (e_timezone_dialog_reparent),
+ (map_destroy_cb):
+ Fixes 350559. Disable timeout function when the map is destroyed.
+
2006-07-21 Hiroyuki Ikezoe <poincare@ikezoe.net>
** Fixes 342313.
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;
+}