[gnome-control-center/wip/region-panel: 31/42] region: Disregard being an initial region for sorting



commit b24073efefb1aed904b2c0bea30ecc5695d8debb
Author: Rui Matos <tiagomatos gmail com>
Date:   Tue Feb 5 17:53:09 2013 +0100

    region: Disregard being an initial region for sorting
    
    Otherwise all the initial regions would show up grouped at the end of
    the list when showing all entries.

 panels/region/cc-format-chooser.c |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)
---
diff --git a/panels/region/cc-format-chooser.c b/panels/region/cc-format-chooser.c
index d213a16..5b386fe 100644
--- a/panels/region/cc-format-chooser.c
+++ b/panels/region/cc-format-chooser.c
@@ -188,8 +188,6 @@ sort_regions (gconstpointer a,
 {
         const gchar *la;
         const gchar *lb;
-        gboolean iea;
-        gboolean ieb;
 
         if (g_object_get_data (G_OBJECT (a), "locale-id") == NULL) {
                 return 1;
@@ -201,14 +199,7 @@ sort_regions (gconstpointer a,
         la = g_object_get_data (G_OBJECT (a), "locale-name");
         lb = g_object_get_data (G_OBJECT (b), "locale-name");
 
-        iea = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (a), "is-extra"));
-        ieb = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (b), "is-extra"));
-
-        if (iea != ieb) {
-                return ieb - iea;
-        } else {
-                return strcmp (la, lb);
-        }
+        return g_strcmp0 (la, lb);
 }
 
 static GtkWidget *


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