aboutsummaryrefslogtreecommitdiffstats
path: root/lib/egg/egg-toolbars-model.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-05-06 00:08:04 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-05-06 00:08:04 +0800
commit7457f676155191be13664f62ccbe2e1fcb184de4 (patch)
tree9016424e330af2cbda9c28872d178848d3da60e3 /lib/egg/egg-toolbars-model.c
parent781a2569005c985af2ac82f329fc35d9e0e5d268 (diff)
downloadgsoc2013-epiphany-7457f676155191be13664f62ccbe2e1fcb184de4.tar
gsoc2013-epiphany-7457f676155191be13664f62ccbe2e1fcb184de4.tar.gz
gsoc2013-epiphany-7457f676155191be13664f62ccbe2e1fcb184de4.tar.bz2
gsoc2013-epiphany-7457f676155191be13664f62ccbe2e1fcb184de4.tar.lz
gsoc2013-epiphany-7457f676155191be13664f62ccbe2e1fcb184de4.tar.xz
gsoc2013-epiphany-7457f676155191be13664f62ccbe2e1fcb184de4.tar.zst
gsoc2013-epiphany-7457f676155191be13664f62ccbe2e1fcb184de4.zip
Update (removing toolbars with context menu works again).
2003-05-05 Marco Pesenti Gritti <marco@it.gnome.org> * lib/egg/egg-editable-toolbar.c: * lib/egg/egg-toolbar-editor.c: * lib/egg/egg-toolbar-editor.h: * lib/egg/egg-toolbars-model.c: * lib/egg/egg-toolbars-model.h: Update (removing toolbars with context menu works again). * src/window-commands.c: (toolbar_editor_help_cb), (window_cmd_edit_toolbar): Build the tbe dialog, update for new egg api. Fix position of new toolbars to be before bookmarks toolbar.
Diffstat (limited to 'lib/egg/egg-toolbars-model.c')
-rwxr-xr-xlib/egg/egg-toolbars-model.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/egg/egg-toolbars-model.c b/lib/egg/egg-toolbars-model.c
index e2a8ce9fb..94a89ba27 100755
--- a/lib/egg/egg-toolbars-model.c
+++ b/lib/egg/egg-toolbars-model.c
@@ -299,16 +299,22 @@ parse_item_list (EggToolbarsModel *t,
}
int
-egg_toolbars_model_add_toolbar (EggToolbarsModel *t, const char *name)
+egg_toolbars_model_add_toolbar (EggToolbarsModel *t,
+ int position,
+ const char *name)
{
GNode *node;
+ int real_position;
g_return_val_if_fail (IS_EGG_TOOLBARS_MODEL (t), -1);
node = g_node_new (toolbars_toolbar_new (name));
- g_node_insert (t->priv->toolbars, -1, node);
+ g_node_insert (t->priv->toolbars, position, node);
+
+ real_position = g_node_child_position (t->priv->toolbars, node);
- g_signal_emit (G_OBJECT (t), egg_toolbars_model_signals[TOOLBAR_ADDED], 0);
+ g_signal_emit (G_OBJECT (t), egg_toolbars_model_signals[TOOLBAR_ADDED],
+ 0, real_position);
return g_node_child_position (t->priv->toolbars, node);
}
@@ -325,7 +331,7 @@ parse_toolbars (EggToolbarsModel *t,
int position;
name = xmlGetProp (child, "name");
- position = egg_toolbars_model_add_toolbar (t, name);
+ position = egg_toolbars_model_add_toolbar (t, -1, name);
xmlFree (name);
parse_item_list (t, child->children, position);