aboutsummaryrefslogtreecommitdiffstats
path: root/src
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
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')
-rw-r--r--src/Makefile.am8
-rw-r--r--src/ephy-shell.c29
-rw-r--r--src/ephy-shell.h2
3 files changed, 39 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 1d6f3c65d..d865eec3d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -106,6 +106,10 @@ libephymain_la_CFLAGS = \
$(EPIPHANY_DEPENDENCY_CFLAGS) \
$(AM_CFLAGS)
+if ENABLE_DBUS
+libephymain_la_CFLAGS += $(DBUS_CFLAGS)
+endif
+
epiphany_SOURCES = ephy-main.c
epiphany_CPPFLAGS = \
@@ -135,6 +139,10 @@ epiphany_LDADD = \
$(EPIPHANY_DEPENDENCY_LIBS) \
$(INTLLIBS)
+if ENABLE_DBUS
+epiphany_LDADD += $(DBUS_LIBS)
+endif
+
BUILT_SOURCES = \
$(CORBA_SOURCE) \
$(TYPES_SOURCE)
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
diff --git a/src/ephy-shell.h b/src/ephy-shell.h
index d807cd139..a9867fe97 100644
--- a/src/ephy-shell.h
+++ b/src/ephy-shell.h
@@ -139,6 +139,8 @@ GObject *ephy_shell_get_prefs_dialog (EphyShell *shell);
GObject *ephy_shell_get_print_setup_dialog (EphyShell *shell);
+GObject *ephy_shell_get_dbus_service (EphyShell *shell);
+
G_END_DECLS
#endif