r23334 - gnucash/trunk/src/gnome-utils - Fix save count down timer on Windows
Geert Janssens
gjanssens at code.gnucash.org
Fri Oct 25 16:53:32 EDT 2013
Author: gjanssens
Date: 2013-10-25 16:53:31 -0400 (Fri, 25 Oct 2013)
New Revision: 23334
Trac: http://svn.gnucash.org/trac/changeset/23334
Modified:
gnucash/trunk/src/gnome-utils/gnc-main-window.c
Log:
Fix save count down timer on Windows
Modified: gnucash/trunk/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-main-window.c 2013-10-25 20:34:10 UTC (rev 23333)
+++ gnucash/trunk/src/gnome-utils/gnc-main-window.c 2013-10-25 20:53:31 UTC (rev 23334)
@@ -118,7 +118,7 @@
static GList *active_windows = NULL;
/** Count down timer for the save changes dialog. If the timer reaches zero
* any changes will be saved and the save dialog closed automatically */
-static uint secs_to_save = 0;
+static guint secs_to_save = 0;
#define MSG_AUTO_SAVE _("Changes will be saved automatically in %d seconds")
@@ -1136,17 +1136,17 @@
{
PWARN ("Count down aborted - timer reached a negative value.\n"
"This is probably because the timer was improperly initialized.");
- return G_SOURCE_REMOVE;
+ return FALSE; /* remove timer */
}
/* Stop count down if user closed the dialog since the last time we were called */
if (!GTK_IS_DIALOG (dialog))
- return G_SOURCE_REMOVE;
+ return FALSE; /* remove timer */
/* Stop count down if count down text can't be updated */
label = GTK_WIDGET (g_object_get_data (G_OBJECT (dialog), "count-down-label"));
if (!GTK_IS_LABEL (label))
- return G_SOURCE_REMOVE;
+ return FALSE; /* remove timer */
secs_to_save--;
DEBUG ("Counting down: %d seconds", secs_to_save);
@@ -1159,11 +1159,11 @@
if (!secs_to_save)
{
gtk_dialog_response (GTK_DIALOG(dialog), GTK_RESPONSE_APPLY);
- return G_SOURCE_REMOVE;
+ return FALSE; /* remove timer */
}
/* Run another cycle */
- return G_SOURCE_CONTINUE;
+ return TRUE;
}
More information about the gnucash-changes
mailing list