[gtk+] menubar: Only query ipadding when we actually need it



commit 4c9b8e0fcd05cec82f42d62c05e77f441b56b0ff
Author: Benjamin Otte <otte redhat com>
Date:   Sun May 1 05:38:47 2011 +0200

    menubar: Only query ipadding when we actually need it

 gtk/gtkmenubar.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c
index a50a25c..de2ef8f 100644
--- a/gtk/gtkmenubar.c
+++ b/gtk/gtkmenubar.c
@@ -487,10 +487,10 @@ gtk_menu_bar_size_allocate (GtkWidget     *widget,
 			    allocation->x, allocation->y,
 			    allocation->width, allocation->height);
 
-  gtk_widget_style_get (widget, "internal-padding", &ipadding, NULL);
-  
   if (menu_shell->priv->children)
     {
+      gtk_widget_style_get (widget, "internal-padding", &ipadding, NULL);
+  
       border_width = gtk_container_get_border_width (GTK_CONTAINER (menu_bar));
       child_allocation.x = (border_width +
 			    ipadding + 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]