gnome-terminal r2699 - trunk/src
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-terminal r2699 - trunk/src
- Date: Thu, 29 May 2008 19:46:19 +0000 (UTC)
Author: chpe
Date: Thu May 29 19:46:19 2008
New Revision: 2699
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=2699&view=rev
Log:
Remove some debug spew.
If we encounter an invalid value, force a writeback so gconf gets a valid value.
Modified:
trunk/src/terminal-profile.c
Modified: trunk/src/terminal-profile.c
==============================================================================
--- trunk/src/terminal-profile.c (original)
+++ trunk/src/terminal-profile.c Thu May 29 19:46:19 2008
@@ -282,7 +282,6 @@
G_DEFINE_TYPE (TerminalProfile, terminal_profile, G_TYPE_OBJECT);
-
static gboolean
palette_cmp (const GdkColor *ca,
const GdkColor *cb)
@@ -311,7 +310,6 @@
return pspec;
}
-
static const GValue *
get_prop_value_from_prop_name (TerminalProfile *profile,
const char *prop_name)
@@ -527,6 +525,7 @@
GParamSpec *pspec;
GValue value = { 0, };
gboolean equal;
+ gboolean force_write = FALSE;
// FIXMEchpe!!! guard against recursion from saving the properties!
// FIXMEchpe;
@@ -642,7 +641,6 @@
if (gconf_value->type != GCONF_VALUE_STRING)
goto out;
- g_print ("palette string %s\n", gconf_value_get_string (gconf_value));
color_strings = g_strsplit (gconf_value_get_string (gconf_value), ":", -1);
if (!color_strings)
goto out;
@@ -656,8 +654,6 @@
}
g_strfreev (color_strings);
- g_print ("parser palette string OK\n");
-
/* We continue even with a palette size != TERMINAL_PALETTE_SIZE,
* so we can change the palette size in future versions without
* causing too many issues.
@@ -666,10 +662,17 @@
g_free (colors);
}
else
- g_print ("Unhandled value type %s\n", g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)));
+ {
+ g_print ("Unhandled value type %s of pspec %s\n", g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)), pspec->name);
+ goto out;
+ }
if (g_param_value_validate (pspec, &value))
- g_warning ("Invalid value in gconf for key %s, was changed to comply with pspec %s\n", gconf_entry_get_key (entry), pspec->name);
+ {
+ g_warning ("Invalid value in gconf for key %s was changed to comply with pspec %s\n",
+ gconf_entry_get_key (entry), pspec->name);
+ force_write = TRUE;
+ }
/* Only set the property if the value is different than our current value,
* so we don't go into an infinite loop.
@@ -685,7 +688,7 @@
if (!equal)
{
- if (priv->initialising)
+ if (!force_write && priv->initialising)
terminal_profile_set_property (G_OBJECT (profile), pspec->param_id, &value, pspec);
else
g_object_set_property (G_OBJECT (profile), pspec->name, &value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]