gdm r5855 - in trunk: . gui/simple-greeter
- From: halfline svn gnome org
- To: svn-commits-list gnome org
- Subject: gdm r5855 - in trunk: . gui/simple-greeter
- Date: Mon, 25 Feb 2008 21:18:17 +0000 (GMT)
Author: halfline
Date: Mon Feb 25 21:18:16 2008
New Revision: 5855
URL: http://svn.gnome.org/viewvc/gdm?rev=5855&view=rev
Log:
2008-02-25 Ray Strode <rstrode redhat com>
* gui/simple-greeter/gdm-language-option-widget.c
(gdm_language_option_widget_set_current_language_name):
Normalize language name before adding to the list, so
we don't end up with duplicate entries for the same
locale
Modified:
trunk/ChangeLog
trunk/gui/simple-greeter/gdm-language-option-widget.c
Modified: trunk/gui/simple-greeter/gdm-language-option-widget.c
==============================================================================
--- trunk/gui/simple-greeter/gdm-language-option-widget.c (original)
+++ trunk/gui/simple-greeter/gdm-language-option-widget.c Mon Feb 25 21:18:16 2008
@@ -237,17 +237,25 @@
void
gdm_language_option_widget_set_current_language_name (GdmLanguageOptionWidget *widget,
- const char *lang_name)
+ const char *language_name)
{
+ char *normalized_language_name;
+
g_return_if_fail (GDM_IS_LANGUAGE_OPTION_WIDGET (widget));
- if (lang_name == NULL) {
- gdm_option_widget_set_active_item (GDM_OPTION_WIDGET (widget), GDM_LANGUAGE_OPTION_WIDGET_LAST_LANGUAGE);
- } else if (!gdm_option_widget_lookup_item (GDM_OPTION_WIDGET (widget), lang_name,
- NULL, NULL, NULL)) {
- gdm_recent_option_widget_add_item (GDM_RECENT_OPTION_WIDGET (widget),
- lang_name);
+ if (language_name != NULL) {
+ normalized_language_name = gdm_normalize_language_name (language_name);
} else {
- gdm_option_widget_set_active_item (GDM_OPTION_WIDGET (widget), lang_name);
+ normalized_language_name = NULL;
+ }
+
+ if (normalized_language_name != NULL &&
+ !gdm_option_widget_lookup_item (GDM_OPTION_WIDGET (widget),
+ normalized_language_name, NULL, NULL, NULL)) {
+ gdm_recent_option_widget_add_item (GDM_RECENT_OPTION_WIDGET (widget),
+ normalized_language_name);
}
+
+ gdm_option_widget_set_active_item (GDM_OPTION_WIDGET (widget), normalized_language_name);
+ g_free (normalized_language_name);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]