diff options
Diffstat (limited to 'src/ephy-shell.c')
-rw-r--r-- | src/ephy-shell.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c index 6a246ee76..7c6f6d6c8 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -72,6 +72,7 @@ struct _EphyShellPrivate EggToolbarsModel *toolbars_model; EggToolbarsModel *fs_toolbars_model; EphyExtensionsManager *extensions_manager; + EphyApplication *application; #ifdef ENABLE_NETWORK_MANAGER EphyNetworkManager *nm_proxy; #endif @@ -212,6 +213,8 @@ ephy_shell_init (EphyShell *shell) ephy_shell = shell; g_object_add_weak_pointer (G_OBJECT(ephy_shell), (gpointer *)ptr); + + shell->priv->application = ephy_application_new (); } static void @@ -304,6 +307,13 @@ ephy_shell_dispose (GObject *object) } #endif /* ENABLE_NETWORK_MANAGER */ + if (priv->application != NULL) + { + LOG ("Unref application"); + g_object_unref (priv->application); + priv->application = NULL; + } + G_OBJECT_CLASS (ephy_shell_parent_class)->dispose (object); } @@ -805,6 +815,22 @@ ephy_shell_get_prefs_dialog (EphyShell *shell) return shell->priv->prefs_dialog; } +/** + * ephy_shell_get_application: + * @shell: A #EphyApplication + * + * Gets the #EphyApplication for @shell + * + * Returns: (transfer none): a #EphyApplication + **/ +EphyApplication * +ephy_shell_get_application (EphyShell *shell) +{ + g_return_val_if_fail (EPHY_IS_SHELL (shell), NULL); + + return shell->priv->application; +} + void _ephy_shell_create_instance (void) { |