diff options
author | Kjartan Maraas <kmaraas@gnome.org> | 2008-05-07 10:25:21 +0000 |
---|---|---|
committer | Kjartan Maraas <kmaraas@src.gnome.org> | 2008-05-07 10:25:21 +0000 |
commit | 24bae6048fe7d1f732fb7cf411f5f69e7cf29f58 (patch) | |
tree | 8459c083ca12b78414b335194b8e42717e2c2b06 /gconf | |
parent | e1e27d5886e4e1c7f598ff7afd01120e988d3bdc (diff) | |
download | gconf-24bae6048fe7d1f732fb7cf411f5f69e7cf29f58.tar.gz |
Use new glib api to batch timeouts. Patch from Matthias Clasen. Closes bug
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.
svn path=/trunk/; revision=2586
Diffstat (limited to 'gconf')
-rw-r--r-- | gconf/gconf-database.c | 2 | ||||
-rw-r--r-- | gconf/gconfd.c | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/gconf/gconf-database.c b/gconf/gconf-database.c index 29e5d2e7..00560cf8 100644 --- a/gconf/gconf-database.c +++ b/gconf/gconf-database.c @@ -1008,7 +1008,7 @@ gconf_database_schedule_sync(GConfDatabase* db) 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); } } diff --git a/gconf/gconfd.c b/gconf/gconfd.c index 676681b8..f5028879 100644 --- a/gconf/gconfd.c +++ b/gconf/gconfd.c @@ -847,12 +847,12 @@ gconf_main(void) 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 @@ open_append_handle (GError **err) { - 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); } } |