[gtk] stack sidebar: Fix sorting



commit 63a8bd06a696753c02e858c2ee3ec1c6610790bd
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Feb 19 11:22:33 2019 -0500

    stack sidebar: Fix sorting
    
    Fix sorting, by not sorting.

 gtk/gtkstacksidebar.c | 24 ------------------------
 1 file changed, 24 deletions(-)
---
diff --git a/gtk/gtkstacksidebar.c b/gtk/gtkstacksidebar.c
index 4ac5c7f713..29b39f3d90 100644
--- a/gtk/gtkstacksidebar.c
+++ b/gtk/gtkstacksidebar.c
@@ -125,29 +125,6 @@ update_header (GtkListBoxRow *row,
     }
 }
 
-static gint
-sort_list (GtkListBoxRow *row1,
-           GtkListBoxRow *row2,
-           gpointer       userdata)
-{
-  gint left = 0; gint right = 0;
-
-
-  if (row1)
-    left = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (row1), "child-index"));
-
-  if (row2)
-    right = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (row2), "child-index"));
-
-  if (left < right)
-    return  -1;
-
-  if (left == right)
-    return 0;
-
-  return 1;
-}
-
 static void
 gtk_stack_sidebar_row_selected (GtkListBox    *box,
                                 GtkListBoxRow *row,
@@ -185,7 +162,6 @@ gtk_stack_sidebar_init (GtkStackSidebar *sidebar)
   gtk_container_add (GTK_CONTAINER (sw), GTK_WIDGET (priv->list));
 
   gtk_list_box_set_header_func (priv->list, update_header, sidebar, NULL);
-  gtk_list_box_set_sort_func (priv->list, sort_list, sidebar, NULL);
 
   g_signal_connect (priv->list, "row-selected",
                     G_CALLBACK (gtk_stack_sidebar_row_selected), sidebar);


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