[gtk+] combobox: Don't special-case RTL child positions anymore



commit cf712c462d766e32840da21a67708bbf2cbb25a6
Author: Benjamin Otte <otte redhat com>
Date:   Tue Dec 18 18:23:07 2012 +0100

    combobox: Don't special-case RTL child positions anymore
    
    If you want to get rounded corners on an hbox, instead of
      :first-child {
        border-top-left-radius: 5px;
        border-bottom-left-radius: 5px;
      }
      :last-child {
        border-top-right-radius: 5px;
        border-bottom-right-radius: 5px;
      }
    you now need to write:
      :first-child, :last-child:dir(rtl) {
        border-top-left-radius: 5px;
        border-bottom-left-radius: 5px;
      }
      :last-child, :first-child:dir(rtl)
      {
        border-top-right-radius: 5px;
        border-bottom-right-radius: 5px;
      }

 gtk/gtkcombobox.c |   27 ---------------------------
 1 files changed, 0 insertions(+), 27 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index e7ef489..246516f 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -468,8 +468,6 @@ static void     gtk_combo_box_get_preferred_height_for_width (GtkWidget    *widg
                                                               gint         *natural_size);
 static GtkWidgetPath *gtk_combo_box_get_path_for_child       (GtkContainer *container,
                                                               GtkWidget    *child);
-static void     gtk_combo_box_direction_changed              (GtkWidget    *widget,
-                                                              GtkTextDirection  previous_direction);
 
 G_DEFINE_TYPE_WITH_CODE (GtkComboBox, gtk_combo_box, GTK_TYPE_BIN,
                          G_IMPLEMENT_INTERFACE (GTK_TYPE_CELL_LAYOUT,
@@ -510,7 +508,6 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
   widget_class->get_preferred_height_for_width = gtk_combo_box_get_preferred_height_for_width;
   widget_class->get_preferred_width_for_height = gtk_combo_box_get_preferred_width_for_height;
   widget_class->destroy = gtk_combo_box_destroy;
-  widget_class->direction_changed = gtk_combo_box_direction_changed;
 
   object_class = (GObjectClass *)klass;
   object_class->constructor = gtk_combo_box_constructor;
@@ -1382,27 +1379,6 @@ gtk_combo_box_button_state_flags_changed (GtkWidget     *widget,
   gtk_widget_queue_draw (widget);
 }
 
-static void
-gtk_combo_box_invalidate_order_foreach (GtkWidget *widget)
-{
-  _gtk_widget_invalidate_style_context (widget, GTK_CSS_CHANGE_POSITION | GTK_CSS_CHANGE_SIBLING_POSITION);
-}
-
-static void
-gtk_combo_box_invalidate_order (GtkComboBox *combo_box)
-{
-  gtk_container_forall (GTK_CONTAINER (combo_box),
-                        (GtkCallback) gtk_combo_box_invalidate_order_foreach,
-                        NULL);
-}
-
-static void
-gtk_combo_box_direction_changed (GtkWidget        *widget,
-                                 GtkTextDirection  previous_direction)
-{
-  gtk_combo_box_invalidate_order (GTK_COMBO_BOX (widget));
-}
-
 static GtkWidgetPath *
 gtk_combo_box_get_path_for_child (GtkContainer *container,
                                   GtkWidget    *child)
@@ -1431,9 +1407,6 @@ gtk_combo_box_get_path_for_child (GtkContainer *container,
       if (widget && gtk_widget_get_visible (widget))
         visible_children = g_list_prepend (visible_children, widget);
 
-      if (gtk_widget_get_direction (GTK_WIDGET (container)) == GTK_TEXT_DIR_RTL)
-        visible_children = g_list_reverse (visible_children);
-
       pos = 0;
 
       for (l = visible_children; l; l = l->next)



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