diff options
author | Matthias Clasen <mclasen@redhat.com> | 2007-01-28 03:16:30 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2007-01-28 03:16:30 +0000 |
commit | d465fbeda745525485098815a5a702d7d6b031d7 (patch) | |
tree | 143f19f67ca1ff1ecf768e8ebd031168d584481a /gtk/gtkaction.c | |
parent | 0030448e265e50dea73a772e61f558183519fbf7 (diff) | |
download | gtk+-d465fbeda745525485098815a5a702d7d6b031d7.tar.gz |
Rearrange things so that setting multiple properties causes not more than
2007-01-27 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktoolbar.c:
* gtk/gtktoolitem.c:
* gtk/gtktoolbutton.c: Rearrange things so that setting
multiple properties causes not more than a single
reconstruction of the contents.
* gtk/gtkaction.c (connect_proxy): Set all tool button
properties in one go.
svn path=/trunk/; revision=17227
Diffstat (limited to 'gtk/gtkaction.c')
-rw-r--r-- | gtk/gtkaction.c | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/gtk/gtkaction.c b/gtk/gtkaction.c index 5307363db2..5962828406 100644 --- a/gtk/gtkaction.c +++ b/gtk/gtkaction.c @@ -739,26 +739,13 @@ connect_proxy (GtkAction *action, } else if (GTK_IS_TOOL_ITEM (proxy)) { - /* toolbar item specific synchronisers ... */ - - g_object_set (proxy, - "visible-horizontal", action->private_data->visible_horizontal, - "visible-vertical", action->private_data->visible_vertical, - "is-important", action->private_data->is_important, - NULL); - - gtk_action_sync_tooltip (action, proxy); - - g_signal_connect_object (proxy, "create_menu_proxy", - G_CALLBACK (gtk_action_create_menu_proxy), - action, 0); - - gtk_tool_item_rebuild_menu (GTK_TOOL_ITEM (proxy)); - /* toolbar button specific synchronisers ... */ if (GTK_IS_TOOL_BUTTON (proxy)) { g_object_set (proxy, + "visible-horizontal", action->private_data->visible_horizontal, + "visible-vertical", action->private_data->visible_vertical, + "is-important", action->private_data->is_important, "label", action->private_data->short_label, "use-underline", TRUE, "stock-id", action->private_data->stock_id, @@ -768,7 +755,23 @@ connect_proxy (GtkAction *action, g_signal_connect_object (proxy, "clicked", G_CALLBACK (gtk_action_activate), action, G_CONNECT_SWAPPED); - } + } + else + { + g_object_set (proxy, + "visible-horizontal", action->private_data->visible_horizontal, + "visible-vertical", action->private_data->visible_vertical, + "is-important", action->private_data->is_important, + NULL); + } + + gtk_action_sync_tooltip (action, proxy); + + g_signal_connect_object (proxy, "create_menu_proxy", + G_CALLBACK (gtk_action_create_menu_proxy), + action, 0); + + gtk_tool_item_rebuild_menu (GTK_TOOL_ITEM (proxy)); } else if (GTK_IS_BUTTON (proxy)) { |