summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2008-08-01 16:44:04 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2008-08-01 16:44:04 +0000
commitda368d87370de3827f3987934f3ff7259607a922 (patch)
tree01d8078cbe60b1a1ecbecd914aa70c446d92572a /gui
parentbda9036c6f98f048724aeb1713fee3c891c2f93c (diff)
downloadgdm-da368d87370de3827f3987934f3ff7259607a922.tar.gz
Use simpler territory names
svn path=/trunk/; revision=6346
Diffstat (limited to 'gui')
-rw-r--r--gui/simple-greeter/gdm-languages.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gui/simple-greeter/gdm-languages.c b/gui/simple-greeter/gdm-languages.c
index 179cdba4..af5fd88e 100644
--- a/gui/simple-greeter/gdm-languages.c
+++ b/gui/simple-greeter/gdm-languages.c
@@ -735,6 +735,7 @@ territories_parse_start_tag (GMarkupParseContext *ctx,
const char *acode_2;
const char *acode_3;
const char *ncode;
+ const char *territory_common_name;
const char *territory_name;
if (! g_str_equal (element_name, "iso_3166_entry") || attr_names == NULL || attr_values == NULL) {
@@ -744,6 +745,7 @@ territories_parse_start_tag (GMarkupParseContext *ctx,
acode_2 = NULL;
acode_3 = NULL;
ncode = NULL;
+ territory_common_name = NULL;
territory_name = NULL;
while (*attr_names && *attr_values) {
@@ -771,6 +773,11 @@ territories_parse_start_tag (GMarkupParseContext *ctx,
}
ncode = *attr_values;
}
+ } else if (g_str_equal (*attr_names, "common_name")) {
+ /* skip if empty */
+ if (**attr_values) {
+ territory_common_name = *attr_values;
+ }
} else if (g_str_equal (*attr_names, "name")) {
territory_name = *attr_values;
}
@@ -779,6 +786,10 @@ territories_parse_start_tag (GMarkupParseContext *ctx,
++attr_values;
}
+ if (territory_common_name != NULL) {
+ territory_name = territory_common_name;
+ }
+
if (territory_name == NULL) {
return;
}