gnome-terminal r3188 - trunk/src



Author: chpe
Date: Tue Oct 21 19:45:02 2008
New Revision: 3188
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=3188&view=rev

Log:
Make sure to reset the properties to their default when encountering an
invalid gconf configuration.

Modified:
   trunk/src/terminal-app.c

Modified: trunk/src/terminal-app.c
==============================================================================
--- trunk/src/terminal-app.c	(original)
+++ trunk/src/terminal-app.c	Tue Oct 21 19:45:02 2008
@@ -1016,10 +1016,12 @@
     return;
 
   gconf_value = gconf_entry_get_value (entry);
-  if (!gconf_value || gconf_value->type != GCONF_VALUE_BOOL)
-    return;
+  if (gconf_value &&
+      gconf_value->type == GCONF_VALUE_BOOL)
+    enable = gconf_value_get_bool (gconf_value);
+  else
+    enable = TRUE;
 
-  enable = gconf_value_get_bool (gconf_value);
   if (enable == app->enable_mnemonics)
     return;
 
@@ -1041,10 +1043,12 @@
     return;
 
   gconf_value = gconf_entry_get_value (entry);
-  if (!gconf_value || gconf_value->type != GCONF_VALUE_BOOL)
-    return;
+  if (gconf_value &&
+      gconf_value->type == GCONF_VALUE_BOOL)
+    enable = gconf_value_get_bool (gconf_value);
+  else
+    enable = TRUE;
 
-  enable = gconf_value_get_bool (gconf_value);
   if (enable == app->enable_menu_accels)
     return;
 



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