]> Pileus Git - ~andy/gtk/commitdiff
Give GtkToolButton the same treatment.
authorMatthias Clasen <mclasen@redhat.com>
Thu, 8 Jun 2006 13:59:34 +0000 (13:59 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 8 Jun 2006 13:59:34 +0000 (13:59 +0000)
2006-06-08  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtktoolbutton.c (gtk_tool_button_style_set): Give
GtkToolButton the same treatment.

ChangeLog
ChangeLog.pre-2-10
gtk/gtktoolbutton.c

index 31cb9c38ca960a593c60e3168ef11ba9e5e1d854..34b9db7ebc7013783ea6d9e46ccc68442ffe8e3b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2006-06-08  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktoolbutton.c (gtk_tool_button_style_set): Give
+       GtkToolButton the same treatment.
+
        * gtk/gtkbutton.c (gtk_button_style_set): Don't call
        construct_child here, since some apps make assumptions 
        about the lifecycle of the constructed label.  
index 31cb9c38ca960a593c60e3168ef11ba9e5e1d854..34b9db7ebc7013783ea6d9e46ccc68442ffe8e3b 100644 (file)
@@ -1,5 +1,8 @@
 2006-06-08  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktoolbutton.c (gtk_tool_button_style_set): Give
+       GtkToolButton the same treatment.
+
        * gtk/gtkbutton.c (gtk_button_style_set): Don't call
        construct_child here, since some apps make assumptions 
        about the lifecycle of the constructed label.  
index f52e23aac3dcd5d9e0a700d3d33ecf176a2c9fb5..ae9c7ad550482cbcce0426f2e57fb34db65d900f 100644 (file)
@@ -665,11 +665,27 @@ gtk_tool_button_toolbar_reconfigured (GtkToolItem *tool_item)
   gtk_tool_button_construct_contents (tool_item);
 }
 
+static void 
+gtk_tool_button_update_icon_spacing (GtkToolButton *button)
+{
+  GtkWidget *box;
+  guint spacing;
+
+  box = GTK_BIN (button->priv->button)->child;
+  if (GTK_IS_BOX (box))
+    {
+      gtk_widget_style_get (GTK_WIDGET (button), 
+                           "icon-spacing", &spacing,
+                           NULL);
+      gtk_box_set_spacing (GTK_BOX (box), spacing);      
+    }
+}
+
 static void
 gtk_tool_button_style_set (GtkWidget *widget,
                           GtkStyle  *prev_style)
 {
-  gtk_tool_button_construct_contents (GTK_TOOL_ITEM (widget));
+  gtk_tool_button_update_icon_spacing (GTK_TOOL_BUTTON (widget));
 }
 
 /**