diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-04-01 03:22:58 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-04-01 03:22:58 +0800 |
commit | 7f0ed6fc4aa39684c079b391b28840cfdfacc7af (patch) | |
tree | 9f00ef9f7190dc1a541205df5cf320198a7fbf45 /lib/widgets/ephy-toolbars-group.c | |
parent | 8c10e78e46c4427326cc9cb7162aa65346048102 (diff) | |
download | gsoc2013-epiphany-7f0ed6fc4aa39684c079b391b28840cfdfacc7af.tar gsoc2013-epiphany-7f0ed6fc4aa39684c079b391b28840cfdfacc7af.tar.gz gsoc2013-epiphany-7f0ed6fc4aa39684c079b391b28840cfdfacc7af.tar.bz2 gsoc2013-epiphany-7f0ed6fc4aa39684c079b391b28840cfdfacc7af.tar.lz gsoc2013-epiphany-7f0ed6fc4aa39684c079b391b28840cfdfacc7af.tar.xz gsoc2013-epiphany-7f0ed6fc4aa39684c079b391b28840cfdfacc7af.tar.zst gsoc2013-epiphany-7f0ed6fc4aa39684c079b391b28840cfdfacc7af.zip |
Use the new EggToolbar apis. Better drop feedback, separators drag and
2003-03-31 Marco Pesenti Gritti <marco@it.gnome.org>
* lib/egg/eggtoolbar.c: (egg_toolbar_class_init),
(egg_toolbar_init), (egg_toolbar_unrealize), (egg_toolbar_expose),
(egg_toolbar_size_allocate), (find_drop_pos),
(egg_toolbar_drag_leave), (egg_toolbar_drag_motion),
(egg_toolbar_get_item_index), (egg_toolbar_get_show_arrow),
(egg_toolbar_get_drop_index):
* lib/egg/eggtoolbar.h:
* lib/egg/eggtoolitem.c: (egg_tool_item_get_type),
(egg_tool_item_class_init), (create_drag_window),
(egg_tool_item_realize), (egg_tool_item_unrealize),
(egg_tool_item_map), (egg_tool_item_unmap),
(egg_tool_item_size_allocate), (egg_tool_item_set_tooltip),
(egg_tool_item_set_use_drag_window):
* lib/egg/eggtoolitem.h:
* lib/widgets/ephy-editable-toolbar.c: (drag_data_received_cb),
(drag_data_get_cb), (connect_item_drag_source),
(disconnect_item_drag_source), (popup_toolbar_context_menu),
(setup_toolbar), (do_merge), (ephy_editable_toolbar_init),
(hide_editor), (update_editor_sheet), (show_editor):
* lib/widgets/ephy-toolbars-group.c: (add_action),
(ephy_toolbars_group_add_item), (parse_item_list):
* lib/widgets/ephy-toolbars-group.h:
Use the new EggToolbar apis. Better drop feedback,
separators drag and code cleanups.
Diffstat (limited to 'lib/widgets/ephy-toolbars-group.c')
-rwxr-xr-x | lib/widgets/ephy-toolbars-group.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/lib/widgets/ephy-toolbars-group.c b/lib/widgets/ephy-toolbars-group.c index 0a11b6285..9a1d47528 100755 --- a/lib/widgets/ephy-toolbars-group.c +++ b/lib/widgets/ephy-toolbars-group.c @@ -179,7 +179,7 @@ free_item_node (EphyToolbarsItem *item) static void add_action (EphyToolbarsGroup *t, GNode *parent, - GNode *sibling, + int pos, const char *name) { EphyToolbarsItem *item; @@ -193,17 +193,16 @@ add_action (EphyToolbarsGroup *t, item->parent = parent->data; node = g_node_new (item); - g_node_insert_before (parent, sibling, node); + g_node_insert (parent, pos, node); } void ephy_toolbars_group_add_item (EphyToolbarsGroup *t, EphyToolbarsToolbar *parent, - EphyToolbarsItem *sibling, + int pos, const char *name) { GNode *parent_node; - GNode *sibling_node = NULL; g_return_if_fail (IS_EPHY_TOOLBARS_GROUP (t)); g_return_if_fail (parent != NULL); @@ -211,14 +210,7 @@ ephy_toolbars_group_add_item (EphyToolbarsGroup *t, parent_node = g_node_find (t->priv->toolbars, G_IN_ORDER, G_TRAVERSE_ALL, parent); - if (sibling) - { - sibling_node = g_node_find (t->priv->toolbars, G_IN_ORDER, - G_TRAVERSE_ALL, sibling); - g_return_if_fail (sibling_node != NULL); - } - - add_action (t, parent_node, sibling_node, name); + add_action (t, parent_node, pos, name); toolbars_group_save (t); @@ -237,13 +229,13 @@ parse_item_list (EphyToolbarsGroup *t, xmlChar *verb; verb = xmlGetProp (child, "verb"); - add_action (t, parent, NULL, verb); + add_action (t, parent, -1, verb); xmlFree (verb); } else if (xmlStrEqual (child->name, "separator")) { - add_action (t, parent, NULL, "separator"); + add_action (t, parent, -1, "separator"); } child = child->next; |