aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-shell.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-01-10 07:11:36 +0800
committerChristian Persch <chpe@src.gnome.org>2005-01-10 07:11:36 +0800
commitc841a4c82601d795e75dfec0007eb9e0e3580f53 (patch)
treec20b33ec9af8b3b05109976d0944989e73a67b7a /src/ephy-shell.c
parentf7c90cf8b4189935d69b2ad6a67f3708b4afe4bd (diff)
downloadgsoc2013-epiphany-c841a4c82601d795e75dfec0007eb9e0e3580f53.tar
gsoc2013-epiphany-c841a4c82601d795e75dfec0007eb9e0e3580f53.tar.gz
gsoc2013-epiphany-c841a4c82601d795e75dfec0007eb9e0e3580f53.tar.bz2
gsoc2013-epiphany-c841a4c82601d795e75dfec0007eb9e0e3580f53.tar.lz
gsoc2013-epiphany-c841a4c82601d795e75dfec0007eb9e0e3580f53.tar.xz
gsoc2013-epiphany-c841a4c82601d795e75dfec0007eb9e0e3580f53.tar.zst
gsoc2013-epiphany-c841a4c82601d795e75dfec0007eb9e0e3580f53.zip
A lib/ephy-dbus.c: A lib/ephy-dbus.h:
2005-01-10 Christian Persch <chpe@cvs.gnome.org> * configure.ac: * lib/Makefile.am: A lib/ephy-dbus.c: A lib/ephy-dbus.h: * lib/ephy-marshal.list: * src/Makefile.am: * src/ephy-shell.c: (ephy_shell_finalize), (ephy_shell_get_dbus_service): * src/ephy-shell.h: Add experimental dbus service, disabled by default. Configure with --enable-dbus to enable.
Diffstat (limited to 'src/ephy-shell.c')
-rw-r--r--src/ephy-shell.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 3ff22355d..333213721 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -44,6 +44,10 @@
#include "ephy-automation.h"
#include "print-dialog.h"
+#ifdef ENABLE_DBUS
+#include "ephy-dbus.h"
+#endif
+
#include <string.h>
#include <bonobo/bonobo-main.h>
#include <glib/gi18n.h>
@@ -67,6 +71,7 @@ struct _EphyShellPrivate
EggToolbarsModel *toolbars_model;
EggToolbarsModel *fs_toolbars_model;
EphyExtensionsManager *extensions_manager;
+ GObject *dbus_service;
GtkWidget *bme;
GtkWidget *history_window;
GObject *pdm_dialog;
@@ -413,6 +418,14 @@ ephy_shell_finalize (GObject *object)
g_object_unref (shell->priv->extensions_manager);
}
+#ifdef ENABLE_DBUS
+ LOG ("Shutting down DBUS service")
+ if (shell->priv->dbus_service)
+ {
+ g_object_unref (shell->priv->dbus_service);
+ }
+#endif
+
LOG ("Unref session manager")
if (shell->priv->session)
{
@@ -805,3 +818,19 @@ ephy_shell_get_print_setup_dialog (EphyShell *shell)
return shell->priv->print_setup_dialog;
}
+
+#ifdef ENABLE_DBUS
+GObject *
+ephy_shell_get_dbus_service (EphyShell *shell)
+{
+ g_return_val_if_fail (EPHY_IS_SHELL (shell), NULL);
+
+ if (shell->priv->dbus_service == NULL)
+ {
+ shell->priv->dbus_service = g_object_new (EPHY_TYPE_DBUS, NULL);
+ ephy_dbus_startup (EPHY_DBUS (shell->priv->dbus_service));
+ }
+
+ return G_OBJECT (shell->priv->dbus_service);
+}
+#endif