summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui/simple-greeter/gdm-languages.c8
-rw-r--r--gui/simple-greeter/gdm-languages.h2
2 files changed, 8 insertions, 2 deletions
diff --git a/gui/simple-greeter/gdm-languages.c b/gui/simple-greeter/gdm-languages.c
index aae345a3..a7fa2ae5 100644
--- a/gui/simple-greeter/gdm-languages.c
+++ b/gui/simple-greeter/gdm-languages.c
@@ -115,7 +115,7 @@ normalize_codeset (const char *codeset)
* locale names are of the form:
* [language[_territory][.codeset][@modifier]]
*/
-void
+gboolean
gdm_parse_language_name (const char *name,
char **language_codep,
char **territory_codep,
@@ -128,8 +128,10 @@ gdm_parse_language_name (const char *name,
GError *error;
gchar *normalized_codeset = NULL;
gchar *normalized_name = NULL;
+ gboolean retval;
match_info = NULL;
+ retval = FALSE;
error = NULL;
re = g_regex_new ("^(?P<language>[^_.@[:space:]]+)"
@@ -154,6 +156,8 @@ gdm_parse_language_name (const char *name,
goto out;
}
+ retval = TRUE;
+
if (language_codep != NULL) {
*language_codep = g_match_info_fetch_named (match_info, "language");
}
@@ -207,6 +211,8 @@ gdm_parse_language_name (const char *name,
out:
g_match_info_free (match_info);
g_regex_unref (re);
+
+ return retval;
}
static char *
diff --git a/gui/simple-greeter/gdm-languages.h b/gui/simple-greeter/gdm-languages.h
index ab716620..5b4560fd 100644
--- a/gui/simple-greeter/gdm-languages.h
+++ b/gui/simple-greeter/gdm-languages.h
@@ -29,7 +29,7 @@ G_BEGIN_DECLS
char * gdm_get_language_from_name (const char *name,
const char *locale);
char ** gdm_get_all_language_names (void);
-void gdm_parse_language_name (const char *name,
+gboolean gdm_parse_language_name (const char *name,
char **language_codep,
char **territory_codep,
char **codesetp,