aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-dbus.c
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <diegoe@svn.gnome.org>2007-01-03 16:08:12 +0800
committerDiego Escalante Urrelo <diegoe@src.gnome.org>2007-01-03 16:08:12 +0800
commitba82c09a4fad2c258eee6198c2c460fce28afd7b (patch)
treefbca03b2be9de64f2073ed154f184c798fac96c8 /src/ephy-dbus.c
parent6f06e1d567f30dc39347f8ce0f05ab16499aea7a (diff)
downloadgsoc2013-epiphany-ba82c09a4fad2c258eee6198c2c460fce28afd7b.tar
gsoc2013-epiphany-ba82c09a4fad2c258eee6198c2c460fce28afd7b.tar.gz
gsoc2013-epiphany-ba82c09a4fad2c258eee6198c2c460fce28afd7b.tar.bz2
gsoc2013-epiphany-ba82c09a4fad2c258eee6198c2c460fce28afd7b.tar.lz
gsoc2013-epiphany-ba82c09a4fad2c258eee6198c2c460fce28afd7b.tar.xz
gsoc2013-epiphany-ba82c09a4fad2c258eee6198c2c460fce28afd7b.tar.zst
gsoc2013-epiphany-ba82c09a4fad2c258eee6198c2c460fce28afd7b.zip
Utilize GLib's new g_timeout_add_seconds to reduce context switches and
2007-01-03 Diego Escalante Urrelo <diegoe@svn.gnome.org> * 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
Diffstat (limited to 'src/ephy-dbus.c')
-rw-r--r--src/ephy-dbus.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ephy-dbus.c b/src/ephy-dbus.c
index eb68dd049..c365d02d1 100644
--- a/src/ephy-dbus.c
+++ b/src/ephy-dbus.c
@@ -27,6 +27,7 @@
#include "ephy-debug.h"
#include "ephy-activation.h"
#include "ephy-dbus-server-bindings.h"
+#include "ephy-glib-compat.h"
#include <string.h>
#include <dbus/dbus-glib-bindings.h>
@@ -46,7 +47,7 @@
#define DBUS_EPHY_PATH "/org/gnome/Epiphany"
#define DBUS_EPHY_INTERFACE "org.gnome.Epiphany"
-#define RECONNECT_DELAY 3000
+#define RECONNECT_DELAY 3 /* seconds */
#define EPHY_DBUS_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_DBUS, EphyDbusPrivate))
@@ -149,7 +150,7 @@ session_filter_func (DBusConnection *connection,
/* try to reconnect later ... */
priv->session_reconnect_timeout_id =
- g_timeout_add (RECONNECT_DELAY,
+ g_timeout_add_seconds (RECONNECT_DELAY,
(GSourceFunc) ephy_dbus_connect_to_session_bus_cb,
ephy_dbus);
@@ -182,7 +183,7 @@ system_filter_func (DBusConnection *connection,
/* try to reconnect later ... */
priv->system_reconnect_timeout_id =
- g_timeout_add (RECONNECT_DELAY,
+ g_timeout_add_seconds (RECONNECT_DELAY,
(GSourceFunc) ephy_dbus_connect_to_system_bus_cb,
ephy_dbus);