[gtk+] Fix order of pack-end widgets



commit b39f094b21c51c44f702f7337ee191054ef54e95
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jan 6 23:33:39 2014 -0500

    Fix order of pack-end widgets
    
    https://bugzilla.gnome.org/show_bug.cgi?id=721665

 gtk/gtkactionbar.c |   18 +++---------------
 1 files changed, 3 insertions(+), 15 deletions(-)
---
diff --git a/gtk/gtkactionbar.c b/gtk/gtkactionbar.c
index 02d3cdf..527a04c 100644
--- a/gtk/gtkactionbar.c
+++ b/gtk/gtkactionbar.c
@@ -509,18 +509,9 @@ gtk_action_bar_size_allocate (GtkWidget     *widget,
       else
         x = allocation->x + allocation->width - end_width - css_borders.right;
 
-      if (packing == GTK_PACK_START)
-        {
-          l = priv->children;
-          i = 0;
-        }
-      else
-        {
-          l = g_list_last (priv->children);
-          i = nvis_children - 1;
-        }
+      i = 0;
 
-      for (; l != NULL; (packing == GTK_PACK_START) ? (l = l->next) : (l = l->prev))
+      for (l = priv->children; l != NULL; l = l->next)
         {
           child = l->data;
           if (!gtk_widget_get_visible (child->widget))
@@ -554,10 +545,7 @@ gtk_action_bar_size_allocate (GtkWidget     *widget,
           gtk_widget_size_allocate (child->widget, &child_allocation);
 
         next:
-          if (packing == GTK_PACK_START)
-            i++;
-          else
-            i--;
+          i++;
         }
     }
 


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