aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-shell.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-04-19 17:37:13 +0800
committerChristian Persch <chpe@src.gnome.org>2005-04-19 17:37:13 +0800
commit033f0ac34a64aebbfb42878d0243b08c631e8042 (patch)
treec9e41430b221714311cc1155d97520b86cc49a28 /src/ephy-shell.c
parent4811c10fff061605fbb8b99a2b535250530eea9f (diff)
downloadgsoc2013-epiphany-033f0ac34a64aebbfb42878d0243b08c631e8042.tar
gsoc2013-epiphany-033f0ac34a64aebbfb42878d0243b08c631e8042.tar.gz
gsoc2013-epiphany-033f0ac34a64aebbfb42878d0243b08c631e8042.tar.bz2
gsoc2013-epiphany-033f0ac34a64aebbfb42878d0243b08c631e8042.tar.lz
gsoc2013-epiphany-033f0ac34a64aebbfb42878d0243b08c631e8042.tar.xz
gsoc2013-epiphany-033f0ac34a64aebbfb42878d0243b08c631e8042.tar.zst
gsoc2013-epiphany-033f0ac34a64aebbfb42878d0243b08c631e8042.zip
A src/ephy-action-helper.c: A src/ephy-action-helper.h: A
2005-04-19 Christian Persch <chpe@cvs.gnome.org> * lib/ephy-prefs.h: * src/Makefile.am: A src/ephy-action-helper.c: A src/ephy-action-helper.h: A src/ephy-lockdown.c: A src/ephy-lockdown.h: * src/ephy-shell.c: (ephy_shell_finalize), (ephy_shell_get_lockdown), (ephy_shell_get_extensions_manager): * src/ephy-tab.c: (ephy_tab_set_location): * src/ephy-toolbar.c: (ephy_toolbar_set_window), (ephy_toolbar_set_navigation_actions), (ephy_toolbar_finalize): * src/ephy-window.c: (sync_tab_document_type), (sync_tab_navigation), (sync_tab_load_status), (show_embed_popup), (update_tabs_menu_sensitivity), (ephy_window_set_is_popup), (ephy_window_dispose), (ephy_window_state_event), (ephy_window_class_init), (ephy_window_init), (ephy_window_constructor): * src/popup-commands.c: Move lockdown from EphyWindow into an internal extension.
Diffstat (limited to 'src/ephy-shell.c')
-rw-r--r--src/ephy-shell.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 807faff3b..6d3c57969 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -38,6 +38,7 @@
#include "ephy-debug.h"
#include "ephy-extensions-manager.h"
#include "ephy-session.h"
+#include "ephy-lockdown.h"
#include "downloader-view.h"
#include "egg-toolbars-model.h"
#include "ephy-toolbars-model.h"
@@ -70,6 +71,7 @@ struct _EphyShellPrivate
{
BonoboGenericFactory *automation_factory;
EphySession *session;
+ GObject *lockdown;
EphyBookmarks *bookmarks;
EggToolbarsModel *toolbars_model;
EggToolbarsModel *fs_toolbars_model;
@@ -543,6 +545,12 @@ ephy_shell_finalize (GObject *object)
g_object_unref (shell->priv->session);
}
+ LOG ("Unref lockdown controller");
+ if (shell->priv->lockdown)
+ {
+ g_object_unref (shell->priv->lockdown);
+ }
+
LOG ("Unref toolbars model");
if (shell->priv->toolbars_model)
{
@@ -798,6 +806,34 @@ ephy_shell_get_session (EphyShell *shell)
return G_OBJECT (shell->priv->session);
}
+/**
+ * ephy_shell_get_lockdown:
+ * @shell: the #EphyShell
+ *
+ * Returns the lockdown controller.
+ *
+ * Return value: the lockdown controller
+ **/
+static GObject *
+ephy_shell_get_lockdown (EphyShell *shell)
+{
+ g_return_val_if_fail (EPHY_IS_SHELL (shell), NULL);
+
+ if (shell->priv->lockdown == NULL)
+ {
+ EphyExtensionsManager *manager;
+
+ shell->priv->lockdown = g_object_new (EPHY_TYPE_LOCKDOWN, NULL);
+
+ manager = EPHY_EXTENSIONS_MANAGER
+ (ephy_shell_get_extensions_manager (shell));
+ ephy_extensions_manager_register (manager,
+ G_OBJECT (shell->priv->lockdown));
+ }
+
+ return G_OBJECT (shell->priv->session);
+}
+
EphyBookmarks *
ephy_shell_get_bookmarks (EphyShell *shell)
{
@@ -869,6 +905,9 @@ ephy_shell_get_extensions_manager (EphyShell *es)
g_object_new (EPHY_TYPE_EXTENSIONS_MANAGER, NULL);
ephy_extensions_manager_startup (es->priv->extensions_manager);
+
+ /* FIXME */
+ ephy_shell_get_lockdown (es);
}
return G_OBJECT (es->priv->extensions_manager);