aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-shell.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-04-25 23:23:09 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-04-25 23:23:09 +0800
commit7fcf1690b730892033993c1001c08666448f90b1 (patch)
treee1080fc2e0b87abacd9fee7aec64d377ab525bdf /src/ephy-shell.c
parent33a47e1d4cc08edd1006d3bfd85b7a15d350119d (diff)
downloadgsoc2013-epiphany-7fcf1690b730892033993c1001c08666448f90b1.tar
gsoc2013-epiphany-7fcf1690b730892033993c1001c08666448f90b1.tar.gz
gsoc2013-epiphany-7fcf1690b730892033993c1001c08666448f90b1.tar.bz2
gsoc2013-epiphany-7fcf1690b730892033993c1001c08666448f90b1.tar.lz
gsoc2013-epiphany-7fcf1690b730892033993c1001c08666448f90b1.tar.xz
gsoc2013-epiphany-7fcf1690b730892033993c1001c08666448f90b1.tar.zst
gsoc2013-epiphany-7fcf1690b730892033993c1001c08666448f90b1.zip
Get back toolbar editing functionalities. More work on the bookmarks
2003-04-25 Marco Pesenti Gritti <marco@it.gnome.org> * data/ui/epiphany-toolbar.xml.in: * data/ui/epiphany-ui.xml.in: * lib/egg/egg-editable-toolbar.c: (egg_editable_toolbar_hide), (egg_editable_toolbar_set_drag_dest): * lib/egg/egg-editable-toolbar.h: * src/bookmarks/ephy-topic-action.c: (create_tool_item): * src/ephy-shell.c: (save_toolbars), (ephy_shell_finalize), (ephy_shell_get_toolbars_model): * src/ephy-toolbars-model.c: (impl_add_item), (ephy_toolbars_model_class_init): * src/ephy-toolbars-model.h: * src/ephy-window.c: (ephy_window_set_chrome): * src/toolbar.c: (ensure_bookmark_action), (toolbar_ensure_action), (action_added_cb), (init_bookmarks_toolbar), (toolbar_set_window), (toolbar_new), (toolbar_set_visibility): * src/toolbar.h: * src/window-commands.c: (toolbar_editor_destroy_cb), (window_cmd_edit_toolbar): Get back toolbar editing functionalities. More work on the bookmarks toolbars implementation. The toolbars context menus are regressed but it's not my fault :/ The signal on EggToolbar is borked.
Diffstat (limited to 'src/ephy-shell.c')
-rw-r--r--src/ephy-shell.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 9d71bfcef..2f21091ac 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -294,6 +294,18 @@ ephy_shell_init (EphyShell *gs)
}
static void
+save_toolbars (EggToolbarsModel *model)
+{
+ char *xml_file;
+
+ xml_file = g_build_filename (ephy_dot_dir (),
+ "toolbar.xml",
+ NULL);
+ egg_toolbars_model_save (model, xml_file);
+ g_free (xml_file);
+}
+
+static void
ephy_shell_finalize (GObject *object)
{
EphyShell *gs;
@@ -307,6 +319,13 @@ ephy_shell_finalize (GObject *object)
g_assert (ephy_shell == NULL);
+ LOG ("Unref toolbars model")
+ if (gs->priv->toolbars_model)
+ {
+ save_toolbars (EGG_TOOLBARS_MODEL (gs->priv->toolbars_model));
+ g_object_unref (G_OBJECT (gs->priv->toolbars_model));
+ }
+
LOG ("Unref session")
if (gs->priv->session)
{
@@ -648,8 +667,6 @@ ephy_shell_get_toolbars_model (EphyShell *gs)
if (gs->priv->toolbars_model == NULL)
{
gs->priv->toolbars_model = ephy_toolbars_model_new ();
- egg_toolbars_model_load (EGG_TOOLBARS_MODEL (gs->priv->toolbars_model),
- ephy_file ("epiphany-toolbar.xml"));
}
return gs->priv->toolbars_model;