aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ephy-shell.c')
-rw-r--r--src/ephy-shell.c43
1 files changed, 34 insertions, 9 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 7e29fd293..2be34fdf6 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -69,6 +69,7 @@ struct EphyShellPrivate
EphyAutocompletion *autocompletion;
EphyBookmarks *bookmarks;
EphyToolbarsModel *toolbars_model;
+ EggToolbarsModel *fs_toolbars_model;
GtkWidget *bme;
GtkWidget *history_window;
GList *plugins;
@@ -204,6 +205,7 @@ ephy_shell_init (EphyShell *gs)
gs->priv->bme = NULL;
gs->priv->history_window = NULL;
gs->priv->toolbars_model = NULL;
+ gs->priv->fs_toolbars_model = NULL;
gs->priv->plugins = NULL;
ephy_shell = gs;
@@ -263,6 +265,12 @@ ephy_shell_finalize (GObject *object)
g_object_unref (G_OBJECT (gs->priv->toolbars_model));
}
+ LOG ("Unref fullscreen toolbars model")
+ if (gs->priv->fs_toolbars_model)
+ {
+ g_object_unref (G_OBJECT (gs->priv->fs_toolbars_model));
+ }
+
LOG ("Unref session")
if (gs->priv->session)
{
@@ -563,21 +571,38 @@ ephy_shell_get_bookmarks (EphyShell *gs)
}
GObject *
-ephy_shell_get_toolbars_model (EphyShell *gs)
+ephy_shell_get_toolbars_model (EphyShell *gs, gboolean fullscreen)
{
- if (gs->priv->toolbars_model == NULL)
+ if (fullscreen)
{
- EphyBookmarks *bookmarks;
-
- bookmarks = ephy_shell_get_bookmarks (gs);
+ if (gs->priv->fs_toolbars_model == NULL)
+ {
+ const char *xml;
- gs->priv->toolbars_model = ephy_toolbars_model_new (bookmarks);
+ gs->priv->fs_toolbars_model = egg_toolbars_model_new ();
+ xml = ephy_file ("epiphany-fs-toolbar.xml");
+ egg_toolbars_model_load (gs->priv->fs_toolbars_model, xml);
+ }
- g_object_set (bookmarks, "toolbars_model",
- gs->priv->toolbars_model, NULL);
+ return G_OBJECT (gs->priv->fs_toolbars_model);
}
+ else
+ {
+ if (gs->priv->toolbars_model == NULL)
+ {
+ EphyBookmarks *bookmarks;
+
+ bookmarks = ephy_shell_get_bookmarks (gs);
- return G_OBJECT (gs->priv->toolbars_model);
+ gs->priv->toolbars_model = ephy_toolbars_model_new (bookmarks);
+
+ g_object_set (bookmarks, "toolbars_model",
+ gs->priv->toolbars_model, NULL);
+ }
+
+
+ return G_OBJECT (gs->priv->toolbars_model);
+ }
}
static void