aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-shell.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-09-19 16:50:56 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-09-19 16:50:56 +0800
commite886e958845ad243debf35139ffa81be9aad3088 (patch)
treef34abd6e2d5a11a346d59b0584e25a0900e7e127 /src/ephy-shell.c
parent3d4cc4657225dcd214857e2c6d9798d881d00623 (diff)
downloadgsoc2013-epiphany-e886e958845ad243debf35139ffa81be9aad3088.tar
gsoc2013-epiphany-e886e958845ad243debf35139ffa81be9aad3088.tar.gz
gsoc2013-epiphany-e886e958845ad243debf35139ffa81be9aad3088.tar.bz2
gsoc2013-epiphany-e886e958845ad243debf35139ffa81be9aad3088.tar.lz
gsoc2013-epiphany-e886e958845ad243debf35139ffa81be9aad3088.tar.xz
gsoc2013-epiphany-e886e958845ad243debf35139ffa81be9aad3088.tar.zst
gsoc2013-epiphany-e886e958845ad243debf35139ffa81be9aad3088.zip
Do not use .in for not to translate files.
2003-09-19 Marco Pesenti Gritti <marco@gnome.org> * data/ui/Makefile.am: * data/ui/epiphany-bookmark-editor-ui.xml.in: * data/ui/epiphany-fs-toolbar.xml: * data/ui/epiphany-history-window-ui.xml.in: * data/ui/epiphany-toolbar.xml.in: * data/ui/epiphany-ui.xml.in: Do not use .in for not to translate files. * lib/egg/egg-editable-toolbar.c: (create_toolbar), (toolbars_clean), (egg_editable_toolbar_construct), (egg_editable_toolbar_set_model), (egg_editable_toolbar_set_merge): * lib/egg/egg-toolbars-model.c: (parse_toolbars): Handle change of properties correctly. Add a toolbar style property in the xml. * src/bookmarks/ephy-bookmark-properties.c: (ephy_bookmark_properties_init): * src/bookmarks/ephy-bookmarks-editor.c: (ephy_bookmarks_editor_init): * src/ephy-shell.c: (ephy_shell_init), (ephy_shell_finalize), (ephy_shell_get_toolbars_model): * src/ephy-shell.h: * src/ephy-window.c: (ephy_window_fullscreen), (ephy_window_unfullscreen): * src/toolbar.c: (bookmark_destroy_cb), (toolbar_ensure_action), (init_bookmarks_toolbar), (init_normal_mode), (init_fullscreen_mode), (window_state_event_cb), (toolbar_set_window), (toolbar_set_visibility): * src/toolbar.h: * src/window-commands.c: (toolbar_editor_response_cb), (window_cmd_edit_toolbar): Special, more compact, toolbar layout for fullscreen.
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