From ba82c09a4fad2c258eee6198c2c460fce28afd7b Mon Sep 17 00:00:00 2001 From: Diego Escalante Urrelo Date: Wed, 3 Jan 2007 08:08:12 +0000 Subject: Utilize GLib's new g_timeout_add_seconds to reduce context switches and 2007-01-03 Diego Escalante Urrelo * embed/ephy-favicon-cache.c: (ephy_favicon_cache_init): * embed/ephy-history.c: (ephy_history_init): * lib/Makefile.am: * lib/ephy-glib-compat.h: * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_save_delayed): * src/ephy-dbus.c: (session_filter_func), (system_filter_func): * src/ephy-extensions-manager.c: (reload_cb): * src/ephy-session.c: (confirm_shutdown_cb): Utilize GLib's new g_timeout_add_seconds to reduce context switches and improve CPU/power efficiency. Patch by Chris Wilson. svn path=/trunk/; revision=6783 --- src/ephy-session.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ephy-session.c') diff --git a/src/ephy-session.c b/src/ephy-session.c index 1214d9e07..b8493abdd 100644 --- a/src/ephy-session.c +++ b/src/ephy-session.c @@ -35,6 +35,7 @@ #include "ephy-gui.h" #include "ephy-debug.h" #include "ephy-stock-icons.h" +#include "ephy-glib-compat.h" #include #include @@ -293,7 +294,7 @@ confirm_shutdown_cb (GnomeClient *client, data->key = key; /* This isn't very exact, but it's good enough here */ - data->timeout_id = g_timeout_add (1000, + data->timeout_id = g_timeout_add_seconds (1, (GSourceFunc) confirm_shutdown_dialog_tick_cb, data); data->ticks = 60; -- cgit v1.2.3