diff options
author | Milan Crha <mcrha@redhat.com> | 2009-05-28 20:47:27 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-05-28 20:47:27 +0800 |
commit | b33ce8f2a6dfab4a17eacd15e296035b4e2cfa49 (patch) | |
tree | 833922285e72c6ad219027cec83feac6cb300c9f | |
parent | b9149e4e89d6fc56505b75de1e3e0c13dada4b3e (diff) | |
download | gsoc2013-evolution-b33ce8f2a6dfab4a17eacd15e296035b4e2cfa49.tar.gz gsoc2013-evolution-b33ce8f2a6dfab4a17eacd15e296035b4e2cfa49.tar.zst gsoc2013-evolution-b33ce8f2a6dfab4a17eacd15e296035b4e2cfa49.zip |
Bug #535516 - Crash in GConf Bridge while replying
A test patch, maybe not fixing the bug fully, but let's try it.
-rw-r--r-- | e-util/gconf-bridge.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/e-util/gconf-bridge.c b/e-util/gconf-bridge.c index ff880a12bd..ca130ee2a3 100644 --- a/e-util/gconf-bridge.c +++ b/e-util/gconf-bridge.c @@ -649,16 +649,16 @@ window_binding_configure_event_cb (GtkWindow *window, GdkEventConfigure *event, WindowBinding *binding) { - /* Schedule a sync */ - if (binding->sync_timeout_id == 0) { - binding->sync_timeout_id = - g_timeout_add_seconds (WINDOW_BINDING_SYNC_DELAY, - (GSourceFunc) - window_binding_perform_scheduled_sync, - binding); - } + /* re-postpone by cancel of the previous request */ + if (binding->sync_timeout_id > 0) + g_source_remove (binding->sync_timeout_id); - return FALSE; + /* Schedule a sync */ + binding->sync_timeout_id = g_timeout_add_seconds (WINDOW_BINDING_SYNC_DELAY, + (GSourceFunc) window_binding_perform_scheduled_sync, + binding); + + return FALSE; } /* Called when the window state is being changed */ @@ -667,6 +667,9 @@ window_binding_state_event_cb (GtkWindow *window, GdkEventWindowState *event, WindowBinding *binding) { + if (binding->sync_timeout_id > 0) + g_source_remove (binding->sync_timeout_id); + window_binding_perform_scheduled_sync (binding); return FALSE; @@ -696,7 +699,10 @@ window_binding_window_destroyed (gpointer user_data, binding = (WindowBinding *) user_data; binding->window = NULL; /* Don't do anything with the window at unbind() */ - + + if (binding->sync_timeout_id > 0) + g_source_remove (binding->sync_timeout_id); + g_hash_table_remove (bridge->bindings, GUINT_TO_POINTER (binding->id)); } |