diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-02-26 20:26:47 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-02-26 20:26:47 +0800 |
commit | 3b67321d5cfb618a93720567db9291a712cff5d6 (patch) | |
tree | 0763718a1b8b188978269595eee0a4bed64ef2b8 /lib/widgets/ephy-toolbars-group.c | |
parent | 534e068d3e702d23643f8a0bc7d84e3b3e0b990f (diff) | |
download | gsoc2013-epiphany-3b67321d5cfb618a93720567db9291a712cff5d6.tar gsoc2013-epiphany-3b67321d5cfb618a93720567db9291a712cff5d6.tar.gz gsoc2013-epiphany-3b67321d5cfb618a93720567db9291a712cff5d6.tar.bz2 gsoc2013-epiphany-3b67321d5cfb618a93720567db9291a712cff5d6.tar.lz gsoc2013-epiphany-3b67321d5cfb618a93720567db9291a712cff5d6.tar.xz gsoc2013-epiphany-3b67321d5cfb618a93720567db9291a712cff5d6.tar.zst gsoc2013-epiphany-3b67321d5cfb618a93720567db9291a712cff5d6.zip |
Remove also the toolbar when removing the last item
2003-02-26 Marco Pesenti Gritti <marco@it.gnome.org>
* lib/widgets/ephy-toolbars-group.c:
(ephy_toolbars_group_remove_item):
Remove also the toolbar when removing the last item
Diffstat (limited to 'lib/widgets/ephy-toolbars-group.c')
-rwxr-xr-x | lib/widgets/ephy-toolbars-group.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/widgets/ephy-toolbars-group.c b/lib/widgets/ephy-toolbars-group.c index 3711efe2d..da8ef8f38 100755 --- a/lib/widgets/ephy-toolbars-group.c +++ b/lib/widgets/ephy-toolbars-group.c @@ -511,15 +511,23 @@ ephy_toolbars_group_remove_item (EphyToolbarsGroup *t, EphyToolbarsItem *item) { GNode *node; + GNode *toolbar; g_return_if_fail (IS_EPHY_TOOLBARS_GROUP (t)); g_return_if_fail (item != NULL); node = g_node_find (t->priv->toolbars, G_IN_ORDER, G_TRAVERSE_ALL, item); g_return_if_fail (node != NULL); + toolbar = node->parent; free_toolbar_node (node->data); g_node_destroy (node); + if (g_node_n_children (toolbar) == 0) + { + free_toolbar_node (toolbar->data); + g_node_destroy (toolbar); + } + toolbars_group_save (t); g_signal_emit (G_OBJECT (t), ephy_toolbars_group_signals[CHANGED], 0); |