[gtk+/wip/baedert/box: 224/234] toolbar: Remove max-child-expand child property



commit 9fedc592a758c41df8749c6df7b1d33b47023ee3
Author: Timm Bäder <mail baedert org>
Date:   Sat Oct 15 21:34:32 2016 +0200

    toolbar: Remove max-child-expand child property

 gtk/gtktoolbar.c |   27 ---------------------------
 1 files changed, 0 insertions(+), 27 deletions(-)
---
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index 80cd7cf..eae2079 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -276,8 +276,6 @@ static gboolean   gtk_toolbar_render               (GtkCssGadget *gadget,
                                                     int           height,
                                                     gpointer      data);
 
-static gint                 get_max_child_expand (GtkToolbar *toolbar);
-
 /* methods on ToolbarContent 'class' */
 static ToolbarContent *toolbar_content_new_tool_item        (GtkToolbar          *toolbar,
                                                             GtkToolItem         *item,
@@ -589,15 +587,6 @@ gtk_toolbar_class_init (GtkToolbarClass *klass)
                                                                    FALSE,
                                                                    GTK_PARAM_READWRITE));
 
-  gtk_widget_class_install_style_property (widget_class,
-                                           g_param_spec_int ("max-child-expand",
-                                                             P_("Maximum child expand"),
-                                                             P_("Maximum amount of space an expandable item 
will be given"),
-                                                             0,
-                                                             G_MAXINT,
-                                                             G_MAXINT,
-                                                             GTK_PARAM_READABLE));
-
   binding_set = gtk_binding_set_by_class (klass);
   
   add_arrow_bindings (binding_set, GDK_KEY_Left, GTK_DIR_LEFT);
@@ -1573,7 +1562,6 @@ gtk_toolbar_allocate (GtkCssGadget        *gadget,
    */
   if (!overflowing)
     {
-      gint max_child_expand;
       n_expand_items = 0;
 
       for (i = 0, list = priv->content; list != NULL; list = list->next, ++i)
@@ -1584,7 +1572,6 @@ gtk_toolbar_allocate (GtkCssGadget        *gadget,
             n_expand_items++;
         }
 
-      max_child_expand = get_max_child_expand (toolbar);
       for (list = priv->content, i = 0; list != NULL; list = list->next, ++i)
         {
           ToolbarContent *content = list->data;
@@ -1595,9 +1582,6 @@ gtk_toolbar_allocate (GtkCssGadget        *gadget,
               if (size % n_expand_items != 0)
                 extra++;
 
-              if (extra > max_child_expand)
-                extra = max_child_expand;
-
               allocations[i].width += extra;
               size -= extra;
               n_expand_items--;
@@ -3434,17 +3418,6 @@ toolbar_content_show_all (ToolbarContent  *content)
     gtk_widget_show_all (widget);
 }
 
-static gint
-get_max_child_expand (GtkToolbar *toolbar)
-{
-  gint mexpand = G_MAXINT;
-
-  gtk_widget_style_get (GTK_WIDGET (toolbar),
-                        "max-child-expand", &mexpand,
-                        NULL);
-  return mexpand;
-}
-
 /* GTK+ internal methods */
 gchar *
 _gtk_toolbar_elide_underscores (const gchar *original)


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