Revision: 5657 http://geany.svn.sourceforge.net/geany/?rev=5657&view=rev Author: colombanw Date: 2011-03-30 14:59:25 +0000 (Wed, 30 Mar 2011)
Log Message: ----------- Properly use 0 as the invalid timeout source ID, rather than G_MAXUINT
Modified Paths: -------------- trunk/ChangeLog trunk/plugins/saveactions.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-03-30 13:09:27 UTC (rev 5656) +++ trunk/ChangeLog 2011-03-30 14:59:25 UTC (rev 5657) @@ -23,6 +23,8 @@ Use new plugin_idle_add(), preventing an unlikely crash. * doc/pluginsymbols.c, src/sciwrappers.c: Fix a few Doxygen warnings. + * plugins/saveactions.c: + Properly use 0 as the invalid timeout source ID.
2011-03-29 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/plugins/saveactions.c =================================================================== --- trunk/plugins/saveactions.c 2011-03-30 13:09:27 UTC (rev 5656) +++ trunk/plugins/saveactions.c 2011-03-30 14:59:25 UTC (rev 5657) @@ -74,7 +74,7 @@ static gint autosave_interval; static gboolean autosave_print_msg; static gboolean autosave_save_all; -static guint autosave_src_id = G_MAXUINT; +static guint autosave_src_id = 0;
static gchar *instantsave_default_ft;
@@ -321,7 +321,7 @@ if (! enable_autosave) return;
- if (autosave_src_id != G_MAXUINT) + if (autosave_src_id != 0) g_source_remove(autosave_src_id); autosave_src_id = g_timeout_add(autosave_interval * 1000, (GSourceFunc) auto_save, NULL); } @@ -347,7 +347,7 @@ instantsave_default_ft = utils_get_setting_string(config, "instantsave", "default_ft", filetypes[GEANY_FILETYPES_NONE]->name);
- autosave_src_id = G_MAXUINT; /* mark as invalid */ + autosave_src_id = 0; /* mark as invalid */ autosave_interval = utils_get_setting_integer(config, "autosave", "interval", 300); autosave_print_msg = utils_get_setting_boolean(config, "autosave", "print_messages", FALSE); autosave_save_all = utils_get_setting_boolean(config, "autosave", "save_all", FALSE); @@ -719,7 +719,7 @@
void plugin_cleanup(void) { - if (autosave_src_id != G_MAXUINT) + if (autosave_src_id != 0) g_source_remove(autosave_src_id);
g_free(instantsave_default_ft);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.