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.
This commit is contained in:
Rui Matos 2013-02-05 00:21:40 +01:00
parent 864b98e141
commit 0b2b0284fe

View file

@ -94,8 +94,6 @@ sort_languages (gconstpointer a,
{ {
const gchar *la; const gchar *la;
const gchar *lb; const gchar *lb;
gboolean iea;
gboolean ieb;
if (g_object_get_data (G_OBJECT (a), "locale-id") == NULL) { if (g_object_get_data (G_OBJECT (a), "locale-id") == NULL) {
return 1; return 1;
@ -107,14 +105,7 @@ sort_languages (gconstpointer a,
la = g_object_get_data (G_OBJECT (a), "locale-name"); la = g_object_get_data (G_OBJECT (a), "locale-name");
lb = g_object_get_data (G_OBJECT (b), "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")); return g_strcmp0 (la, lb);
ieb = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (b), "is-extra"));
if (iea != ieb) {
return ieb - iea;
} else {
return strcmp (la, lb);
}
} }
static GtkWidget * static GtkWidget *