gconf r2586 - in trunk: . backends gconf
- From: kmaraas svn gnome org
- To: svn-commits-list gnome org
- Subject: gconf r2586 - in trunk: . backends gconf
- Date: Wed, 7 May 2008 11:25:21 +0100 (BST)
Author: kmaraas
Date: Wed May 7 10:25:21 2008
New Revision: 2586
URL: http://svn.gnome.org/viewvc/gconf?rev=2586&view=rev
Log:
2008-05-07 Kjartan Maraas <kmaraas gnome org>
* backends/markup-backend.c: (cleanup_timeout), (ms_new):
* gconf/gconf-database.c: (gconf_database_schedule_sync):
* gconf/gconfd.c: (gconf_main), (open_append_handle):
Use new glib api to batch timeouts. Patch from Matthias
Clasen. Closes bug #531063.
Modified:
trunk/ChangeLog
trunk/backends/markup-backend.c
trunk/gconf/gconf-database.c
trunk/gconf/gconfd.c
Modified: trunk/backends/markup-backend.c
==============================================================================
--- trunk/backends/markup-backend.c (original)
+++ trunk/backends/markup-backend.c Wed May 7 10:25:21 2008
@@ -878,17 +878,17 @@
/* This timeout periodically unloads
* data that hasn't been used in a while.
*/
+#if 0
static gboolean
cleanup_timeout (gpointer data)
{
-#if 0
MarkupSource* ms = (MarkupSource*)data;
cache_clean(ms->cache, 60*5 /* 5 minutes */);
-#endif
return TRUE;
}
+#endif
static MarkupSource*
ms_new (const char* root_dir,
@@ -903,9 +903,11 @@
ms = g_new0(MarkupSource, 1);
+#if 0
ms->timeout_id = g_timeout_add (1000*60*5, /* 1 sec * 60 s/min * 5 min */
cleanup_timeout,
ms);
+#endif
ms->root_dir = g_strdup (root_dir);
Modified: trunk/gconf/gconf-database.c
==============================================================================
--- trunk/gconf/gconf-database.c (original)
+++ trunk/gconf/gconf-database.c Wed May 7 10:25:21 2008
@@ -1008,7 +1008,7 @@
else
{
/* 1 minute timeout */
- db->sync_timeout = g_timeout_add(60000, (GSourceFunc)gconf_database_sync_timeout, db);
+ db->sync_timeout = g_timeout_add_seconds(60, (GSourceFunc)gconf_database_sync_timeout, db);
}
}
Modified: trunk/gconf/gconfd.c
==============================================================================
--- trunk/gconf/gconfd.c (original)
+++ trunk/gconf/gconfd.c Wed May 7 10:25:21 2008
@@ -847,12 +847,12 @@
if (main_loops == NULL)
{
- gulong timeout_len = 1000*60*0.5; /* 1 sec * 60 s/min * .5 min */
+ gulong timeout_len = 60*0.5; /* 60 s/min * .5 min */
g_assert(timeout_id == 0);
- timeout_id = g_timeout_add (timeout_len,
- periodic_cleanup_timeout,
- NULL);
+ timeout_id = g_timeout_add_seconds (timeout_len,
+ periodic_cleanup_timeout,
+ NULL);
}
@@ -1384,14 +1384,14 @@
{
- const gulong timeout_len = 1000*60*0.5; /* 1 sec * 60 s/min * 0.5 min */
+ const gulong timeout_len = 60*0.5; /* 60 s/min * 0.5 min */
if (append_handle_timeout != 0)
g_source_remove (append_handle_timeout);
- append_handle_timeout = g_timeout_add (timeout_len,
- close_append_handle_timeout,
- NULL);
+ append_handle_timeout = g_timeout_add_seconds (timeout_len,
+ close_append_handle_timeout,
+ NULL);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]