[Xfce4-commits] <xfce4-settings:nick/mime-settings> Remove unneeded sort function.

Nick Schermer noreply at xfce.org
Sat Jan 21 16:30:01 CET 2012


Updating branch refs/heads/nick/mime-settings
         to e05e18ec66723d2f2558704e9d1d7190843c176d (commit)
       from 426a60283168d0c61e17ebe1ca101b858a17de86 (commit)

commit e05e18ec66723d2f2558704e9d1d7190843c176d
Author: Nick Schermer <nick at xfce.org>
Date:   Sat Jan 21 16:23:17 2012 +0100

    Remove unneeded sort function.
    
    Gtk has a function for strings by default that works the same.

 .../xfce-settings-manager-dialog.c                 |   30 --------------------
 1 files changed, 0 insertions(+), 30 deletions(-)

diff --git a/xfce4-settings-manager/xfce-settings-manager-dialog.c b/xfce4-settings-manager/xfce-settings-manager-dialog.c
index 26ac58b..14be963 100644
--- a/xfce4-settings-manager/xfce-settings-manager-dialog.c
+++ b/xfce4-settings-manager/xfce-settings-manager-dialog.c
@@ -357,33 +357,6 @@ xfce_settings_manager_dialog_reset_view(XfceSettingsManagerDialog *dialog,
     }
 }
 
-static gint
-xfce_settings_manager_dialog_sort_icons(GtkTreeModel *model,
-                                        GtkTreeIter *a,
-                                        GtkTreeIter *b,
-                                        gpointer user_data)
-{
-    gchar *namea = NULL, *nameb = NULL;
-    gint ret;
-
-    gtk_tree_model_get(model, a, COL_NAME, &namea, -1);
-    gtk_tree_model_get(model, b, COL_NAME, &nameb, -1);
-
-    if(!namea && !nameb)
-        ret = 0;
-    else if(!namea)
-        ret = -1;
-    else if(!nameb)
-        ret = 1;
-    else
-        ret = g_utf8_collate(namea, nameb);
-
-    g_free(namea);
-    g_free(nameb);
-
-    return ret;
-}
-
 static void
 xfce_settings_manager_dialog_create_liststore(XfceSettingsManagerDialog *dialog)
 {
@@ -527,9 +500,6 @@ xfce_settings_manager_dialog_create_liststore(XfceSettingsManagerDialog *dialog)
 
     g_strfreev(dirs);
 
-    gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(dialog->ls), COL_NAME,
-                                    xfce_settings_manager_dialog_sort_icons,
-                                    dialog, NULL);
     gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(dialog->ls),
                                          COL_NAME, GTK_SORT_ASCENDING);
 


More information about the Xfce4-commits mailing list