gdm r6177 - in branches/gnome-2-20: . gui



Author: bcameron
Date: Tue Apr 29 01:08:54 2008
New Revision: 6177
URL: http://svn.gnome.org/viewvc/gdm?rev=6177&view=rev

Log:
2008-04-24 Brian Cameron <brian cameron sun com>

        * gui/gdmsetup.c:  Fix the 24HourClock setting so that
          we do not save translated strings as the configuration
          option.


Modified:
   branches/gnome-2-20/ChangeLog
   branches/gnome-2-20/gui/gdmsetup.c

Modified: branches/gnome-2-20/gui/gdmsetup.c
==============================================================================
--- branches/gnome-2-20/gui/gdmsetup.c	(original)
+++ branches/gnome-2-20/gui/gdmsetup.c	Tue Apr 29 01:08:54 2008
@@ -1525,10 +1525,23 @@
 		gchar *new_val;
 		
 		new_val = gtk_combo_box_get_active_text (GTK_COMBO_BOX (combo_box));
-		val = gdm_config_get_string ((gchar *)key);
-		if (new_val &&
-		    strcmp (ve_sure_string (val), ve_sure_string (new_val)) != 0) {			
-			gdm_setup_config_set_string (key, new_val);
+		val     = gdm_config_get_string ((gchar *)key);
+
+		if (new_val) {
+                    if (strcmp (_(new_val), _("auto"))) {
+                       if (strcasecmp (ve_sure_string (val), "auto") != 0)
+                          gdm_setup_config_set_string (key, "auto");
+                    }
+                    else if (strcmp (_(new_val), _("yes"))) {
+                       if (strcasecmp (ve_sure_string (val), "true") != 0 &&
+                           strcasecmp (ve_sure_string (val), "yes") != 0)
+                          gdm_setup_config_set_string (key, "true");
+                    }
+                    else {
+                       if (strcasecmp (ve_sure_string (val), "false") != 0 &&
+                           strcasecmp (ve_sure_string (val), "no") != 0) 
+                           gdm_setup_config_set_string (key, "false");
+		    }
 		}
 		g_free (new_val);
 		g_free (val);
@@ -7488,13 +7501,15 @@
 
 	user_24hr_clock = gdm_config_get_string (GDM_KEY_USE_24_CLOCK);
 	if (!ve_string_empty (user_24hr_clock)) {
-		if (strcasecmp (ve_sure_string (user_24hr_clock), _("auto")) == 0) {
+		if (strcasecmp (ve_sure_string (user_24hr_clock), "auto") == 0) {
 			gtk_combo_box_set_active (GTK_COMBO_BOX (clock_type_chooser), CLOCK_AUTO);
 		}
-		else if (strcasecmp (ve_sure_string (user_24hr_clock), _("yes")) == 0) {
+		else if (strcasecmp (ve_sure_string (user_24hr_clock), "yes") == 0 ||
+		         strcasecmp (ve_sure_string (user_24hr_clock), "true") == 0) {
 			gtk_combo_box_set_active (GTK_COMBO_BOX (clock_type_chooser), CLOCK_YES);
 		}
-		else if (strcasecmp (ve_sure_string (user_24hr_clock), _("no")) == 0) {	
+		else if (strcasecmp (ve_sure_string (user_24hr_clock), "no") == 0 ||
+		         strcasecmp (ve_sure_string (user_24hr_clock), "true") == 0) {
 			gtk_combo_box_set_active (GTK_COMBO_BOX (clock_type_chooser), CLOCK_NO);
 		}
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]