aboutsummaryrefslogtreecommitdiffstats
path: root/lib/widgets/ephy-toolbars-group.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-02-20 23:47:25 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-02-20 23:47:25 +0800
commit443bb3dcad6c71a4d847091e5655d66e475742bd (patch)
treeee914900a0aa5c9a20282c3fa6020f5e57bed8ef /lib/widgets/ephy-toolbars-group.c
parentaadbd414cacd3cd88c3e5fdded7dcf8387533b70 (diff)
downloadgsoc2013-epiphany-443bb3dcad6c71a4d847091e5655d66e475742bd.tar
gsoc2013-epiphany-443bb3dcad6c71a4d847091e5655d66e475742bd.tar.gz
gsoc2013-epiphany-443bb3dcad6c71a4d847091e5655d66e475742bd.tar.bz2
gsoc2013-epiphany-443bb3dcad6c71a4d847091e5655d66e475742bd.tar.lz
gsoc2013-epiphany-443bb3dcad6c71a4d847091e5655d66e475742bd.tar.xz
gsoc2013-epiphany-443bb3dcad6c71a4d847091e5655d66e475742bd.tar.zst
gsoc2013-epiphany-443bb3dcad6c71a4d847091e5655d66e475742bd.zip
Fix this crazy bug with toolbar buttons doing two actions after having
2003-02-20 Marco Pesenti Gritti <marco@it.gnome.org> * lib/widgets/ephy-toolbars-group.c: (ephy_toolbars_group_to_string), (ephy_toolbars_group_remove_toolbar), (ephy_toolbars_group_remove_item), (ephy_toolbars_group_get_path): Fix this crazy bug with toolbar buttons doing two actions after having edited them. Save toolbar editor also after removing items.
Diffstat (limited to 'lib/widgets/ephy-toolbars-group.c')
-rwxr-xr-xlib/widgets/ephy-toolbars-group.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/widgets/ephy-toolbars-group.c b/lib/widgets/ephy-toolbars-group.c
index 8cdcfd55f..753aca4a1 100755
--- a/lib/widgets/ephy-toolbars-group.c
+++ b/lib/widgets/ephy-toolbars-group.c
@@ -352,16 +352,16 @@ ephy_toolbars_group_to_string (EphyToolbarsGroup *t)
{
g_string_append_printf
(s, "<placeholder name=\"PlaceHolder%d-%d\">"
- "<separator name=\"ToolSeparator\"/>"
+ "<separator name=\"TS\"/>"
"</placeholder>\n", i, k);
}
else
{
g_string_append_printf
(s, "<placeholder name=\"PlaceHolder%d-%d\">"
- "<toolitem name=\"ToolItem\" verb=\"%s\"/>"
+ "<toolitem name=\"TI%s\" verb=\"%s\"/>"
"</placeholder>\n",
- i, k, item->action);
+ i, k, item->action, item->action);
}
i++;
}
@@ -459,6 +459,8 @@ ephy_toolbars_group_remove_toolbar (EphyToolbarsGroup *t,
free_toolbar_node (node->data);
g_node_destroy (node);
+ toolbars_group_save (t);
+
g_signal_emit (G_OBJECT (t), ephy_toolbars_group_signals[CHANGED], 0);
}
@@ -472,6 +474,8 @@ ephy_toolbars_group_remove_item (EphyToolbarsGroup *t,
free_toolbar_node (node->data);
g_node_destroy (node);
+ toolbars_group_save (t);
+
g_signal_emit (G_OBJECT (t), ephy_toolbars_group_signals[CHANGED], 0);
}
@@ -561,8 +565,10 @@ ephy_toolbars_group_get_path (EphyToolbarsGroup *t,
{
GNode *node;
char *path = NULL;
+ EphyToolbarsItem *titem;
node = g_node_find (t->priv->toolbars, G_IN_ORDER, G_TRAVERSE_ALL, item);
+ titem = (EphyToolbarsItem *)node->data;
switch (g_node_depth (node))
{
@@ -572,12 +578,12 @@ ephy_toolbars_group_get_path (EphyToolbarsGroup *t,
break;
case 3:
path = g_strdup_printf
- ("/Toolbar%d/PlaceHolder%d-%d/%s",
+ ("/Toolbar%d/PlaceHolder%d-%d/%s%s",
g_node_child_position (node->parent->parent, node->parent),
g_node_child_position (node->parent, node),
g_node_child_position (node->parent->parent, node->parent),
- ((EphyToolbarsItem *)node->data)->separator ?
- "ToolSeparator" : "ToolItem");
+ titem->separator ? "TS" : "TI",
+ titem->separator ? "" : titem->action);
break;
default:
g_assert_not_reached ();