aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-dbus.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-06-06 00:43:23 +0800
committerChristian Persch <chpe@src.gnome.org>2005-06-06 00:43:23 +0800
commit0fe212827ac0460e7ebe9bc982302fe7a34bc0bf (patch)
tree74697ea2d270165516b4504fe8b48388bcdda9e5 /lib/ephy-dbus.c
parent38eba2850bea786a4b99c14a07f638f0e6f94e3f (diff)
downloadgsoc2013-epiphany-0fe212827ac0460e7ebe9bc982302fe7a34bc0bf.tar
gsoc2013-epiphany-0fe212827ac0460e7ebe9bc982302fe7a34bc0bf.tar.gz
gsoc2013-epiphany-0fe212827ac0460e7ebe9bc982302fe7a34bc0bf.tar.bz2
gsoc2013-epiphany-0fe212827ac0460e7ebe9bc982302fe7a34bc0bf.tar.lz
gsoc2013-epiphany-0fe212827ac0460e7ebe9bc982302fe7a34bc0bf.tar.xz
gsoc2013-epiphany-0fe212827ac0460e7ebe9bc982302fe7a34bc0bf.tar.zst
gsoc2013-epiphany-0fe212827ac0460e7ebe9bc982302fe7a34bc0bf.zip
Fix compilation with DBUS 0.3x. Patch by Raphaël Slinckx, fixes bug
2005-06-05 Christian Persch <chpe@cvs.gnome.org> * lib/ephy-dbus.c: (ephy_dbus_connect_to_system_bus), (ephy_dbus_connect_to_session_bus), (ephy_dbus_disconnect_bus): Fix compilation with DBUS 0.3x. Patch by Raphaël Slinckx, fixes bug #306565.
Diffstat (limited to 'lib/ephy-dbus.c')
-rw-r--r--lib/ephy-dbus.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/ephy-dbus.c b/lib/ephy-dbus.c
index b1f15a7ec..9ac7354ca 100644
--- a/lib/ephy-dbus.c
+++ b/lib/ephy-dbus.c
@@ -188,11 +188,7 @@ ephy_dbus_connect_to_system_bus (EphyDbus *dbus)
dbus_connection_set_exit_on_disconnect (bus, FALSE);
dbus_connection_setup_with_g_main (bus, NULL);
-#ifdef HAVE_NEW_DBUS
- dbus_bus_request_name (bus, epiphany_dbus_service, 0, &error);
-#else
dbus_connection_add_filter (bus, system_filter_func, dbus, NULL);
-#endif
dbus_bus_add_match (bus,
"type='signal',interface='org.freedesktop.NetworkManager'",
@@ -224,6 +220,8 @@ ephy_dbus_connect_to_session_bus (EphyDbus *dbus)
dbus_error_free (&error);
return;
}
+ dbus_connection_set_exit_on_disconnect (bus, FALSE);
+ dbus_connection_setup_with_g_main (bus, NULL);
dbus_connection_add_filter (bus, session_filter_func, dbus, NULL);
@@ -243,11 +241,6 @@ ephy_dbus_connect_to_session_bus (EphyDbus *dbus)
epiphany_dbus_object_path,
&call_vtable, dbus);
- dbus_bus_acquire_service (bus, epiphany_dbus_service, 0, NULL);
-
- dbus_connection_set_exit_on_disconnect (bus, FALSE);
- dbus_connection_setup_with_g_main (bus, NULL);
-
dbus->priv->session_bus = bus;
g_signal_emit (dbus, signals[CONNECTED], 0, EPHY_DBUS_SESSION);
@@ -257,8 +250,11 @@ static void
ephy_dbus_disconnect_bus (DBusConnection *bus)
{
if (bus != NULL) {
-
+#ifdef HAVE_NEW_DBUS
+ dbus_connection_close (bus);
+#else
dbus_connection_disconnect (bus);
+#endif
dbus_connection_unref (bus);
}
}