aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2014-02-11 21:37:09 +0800
committerMatthew Barnes <mbarnes@redhat.com>2014-02-11 21:39:16 +0800
commit052bfc93fe1f76584b213759f4087dc452ece60b (patch)
tree86ecf14cfad7e8f124d3af36377ab63d9e1a525a
parent2759aaea7183e124d3a90564e6a48d3dd1a4142a (diff)
downloadgsoc2013-evolution-052bfc93fe1f76584b213759f4087dc452ece60b.tar
gsoc2013-evolution-052bfc93fe1f76584b213759f4087dc452ece60b.tar.gz
gsoc2013-evolution-052bfc93fe1f76584b213759f4087dc452ece60b.tar.bz2
gsoc2013-evolution-052bfc93fe1f76584b213759f4087dc452ece60b.tar.lz
gsoc2013-evolution-052bfc93fe1f76584b213759f4087dc452ece60b.tar.xz
gsoc2013-evolution-052bfc93fe1f76584b213759f4087dc452ece60b.tar.zst
gsoc2013-evolution-052bfc93fe1f76584b213759f4087dc452ece60b.zip
Fix a runtime warning on startup.
Calling g_source_remove() on a saved source ID but not resetting the source ID to zero.
-rw-r--r--e-util/e-misc-utils.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/e-util/e-misc-utils.c b/e-util/e-misc-utils.c
index 7aec5938f8..cf6425f88e 100644
--- a/e-util/e-misc-utils.c
+++ b/e-util/e-misc-utils.c
@@ -143,8 +143,10 @@ window_state_event_cb (GtkWindow *window,
{
gboolean window_was_unmaximized;
- if (data->timeout_id > 0)
+ if (data->timeout_id > 0) {
g_source_remove (data->timeout_id);
+ data->timeout_id = 0;
+ }
window_was_unmaximized =
((event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) != 0) &&
@@ -175,8 +177,10 @@ static gboolean
window_unmap_cb (GtkWindow *window,
WindowData *data)
{
- if (data->timeout_id > 0)
+ if (data->timeout_id > 0) {
g_source_remove (data->timeout_id);
+ data->timeout_id = 0;
+ }
/* Reset the flags so the window position and size are not
* accidentally reverted to their default value at the next run. */