[evolution] Fix a runtime warning on startup.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Fix a runtime warning on startup.
- Date: Tue, 11 Feb 2014 13:38:04 +0000 (UTC)
commit 052bfc93fe1f76584b213759f4087dc452ece60b
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Feb 11 08:37:09 2014 -0500
Fix a runtime warning on startup.
Calling g_source_remove() on a saved source ID but not resetting the
source ID to zero.
e-util/e-misc-utils.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/e-util/e-misc-utils.c b/e-util/e-misc-utils.c
index 7aec593..cf6425f 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. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]