[gnome-control-center/wip/region-panel] common: Disregard being an initial language for sorting
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/region-panel] common: Disregard being an initial language for sorting
- Date: Tue, 5 Feb 2013 00:55:56 +0000 (UTC)
commit 281ae89c472aad92569119298536b468a16d1f02
Author: Rui Matos <tiagomatos gmail com>
Date: Tue Feb 5 00:21:40 2013 +0100
common: Disregard being an initial language for sorting
Otherwise all the initial languages would show up grouped at the end
of the list when showing all entries.
panels/common/cc-language-chooser.c | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
---
diff --git a/panels/common/cc-language-chooser.c b/panels/common/cc-language-chooser.c
index f491d4c..b080ee5 100644
--- a/panels/common/cc-language-chooser.c
+++ b/panels/common/cc-language-chooser.c
@@ -95,8 +95,6 @@ sort_languages (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;
@@ -108,14 +106,7 @@ sort_languages (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]