aboutsummaryrefslogtreecommitdiffstats
path: root/src/toolbar.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-04-27 19:49:19 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-04-27 19:49:19 +0800
commit3d8e5e157f5a740d1f8005383597b13eca6725d4 (patch)
tree4f177ebc3431969e0a50ce2d3aab0ec6db79254a /src/toolbar.c
parent34c164d7175456a25362d00981d1cc38a339baf2 (diff)
downloadgsoc2013-epiphany-3d8e5e157f5a740d1f8005383597b13eca6725d4.tar
gsoc2013-epiphany-3d8e5e157f5a740d1f8005383597b13eca6725d4.tar.gz
gsoc2013-epiphany-3d8e5e157f5a740d1f8005383597b13eca6725d4.tar.bz2
gsoc2013-epiphany-3d8e5e157f5a740d1f8005383597b13eca6725d4.tar.lz
gsoc2013-epiphany-3d8e5e157f5a740d1f8005383597b13eca6725d4.tar.xz
gsoc2013-epiphany-3d8e5e157f5a740d1f8005383597b13eca6725d4.tar.zst
gsoc2013-epiphany-3d8e5e157f5a740d1f8005383597b13eca6725d4.zip
update
2003-04-27 Marco Pesenti Gritti <marco@it.gnome.org> * lib/egg/egg-editable-toolbar.c: * lib/egg/egg-editable-toolbar.h: * lib/egg/egg-toolbar-editor.c: * lib/egg/egg-toolbars-model.c: * lib/egg/egg-toolbars-model.h: * lib/egg/eggtoolbar.c: update * src/ephy-shell.c: (save_toolbars), (ephy_shell_get_toolbars_model): * src/ephy-toolbars-model.c: (impl_add_item), (ephy_toolbars_model_class_init): * src/ephy-toolbars-model.h: * src/toolbar.c: (action_request_cb), (init_bookmarks_toolbar), (toolbar_set_window): Load the toolbars model in EphyShell so bookmarks editor alone can use it. Update the actions on a new editable toolbar signal, actions are per toolbar, not per model.
Diffstat (limited to 'src/toolbar.c')
-rwxr-xr-xsrc/toolbar.c36
1 files changed, 11 insertions, 25 deletions
diff --git a/src/toolbar.c b/src/toolbar.c
index 4f4203874..631bc94c2 100755
--- a/src/toolbar.c
+++ b/src/toolbar.c
@@ -311,11 +311,11 @@ toolbar_setup_actions (Toolbar *t)
}
static void
-action_added_cb (EphyToolbarsModel *model,
- char *action_name,
- Toolbar *t)
+action_request_cb (EggEditableToolbar *etoolbar,
+ char *action_name,
+ gpointer data)
{
- toolbar_ensure_action (t, action_name);
+ toolbar_ensure_action (TOOLBAR (etoolbar), action_name);
}
static void
@@ -342,6 +342,9 @@ init_bookmarks_toolbar (Toolbar *t)
(EGG_EDITABLE_TOOLBAR (t),
drag_targets, n_drag_targets,
t_name);
+ egg_toolbars_model_set_flags
+ (EGG_TOOLBARS_MODEL (model),
+ i, EGG_TB_MODEL_NOT_REMOVABLE);
}
}
}
@@ -350,7 +353,6 @@ static void
toolbar_set_window (Toolbar *t, EphyWindow *window)
{
EphyToolbarsModel *model;
- char *xml_file;
g_return_if_fail (t->priv->window == NULL);
@@ -361,27 +363,11 @@ toolbar_set_window (Toolbar *t, EphyWindow *window)
egg_menu_merge_insert_action_group (t->priv->ui_merge,
t->priv->action_group, 1);
- model = ephy_shell_get_toolbars_model (ephy_shell);
- g_return_if_fail (model != NULL);
- g_signal_connect_object (model, "action_added",
- G_CALLBACK (action_added_cb),
- t, 0);
-
- xml_file = g_build_filename (ephy_dot_dir (),
- "toolbar.xml",
- NULL);
- if (g_file_test (xml_file, G_FILE_TEST_EXISTS))
- {
- egg_toolbars_model_load
- (EGG_TOOLBARS_MODEL (model), xml_file);
- }
- else
- {
- egg_toolbars_model_load (EGG_TOOLBARS_MODEL (model),
- ephy_file ("epiphany-toolbar.xml"));
- }
- g_free (xml_file);
+ g_signal_connect (t, "action_request",
+ G_CALLBACK (action_request_cb),
+ NULL);
+ model = ephy_shell_get_toolbars_model (ephy_shell);
g_object_set (G_OBJECT (t),
"ToolbarsModel", model,
"MenuMerge", t->priv->ui_merge,