gnome-terminal r2806 - trunk/src
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-terminal r2806 - trunk/src
- Date: Thu, 29 May 2008 19:56:00 +0000 (UTC)
Author: chpe
Date: Thu May 29 19:56:00 2008
New Revision: 2806
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=2806&view=rev
Log:
Store the colours with 4 hex digits per component (like gdk_color_to_string), not just 2. This avoids getting a notification from gconf with a value that's different than the one we have in our property, after saving that property to gconf.
Use g_message, not g_warning.
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:56:00 2008
@@ -672,7 +672,7 @@
if (g_param_value_validate (pspec, &value))
{
- NOTE (g_warning ("Invalid value in gconf for key %s was changed to comply with pspec %s\n",
+ NOTE (g_message ("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;
}
@@ -773,10 +773,11 @@
if (!color)
return;
- g_snprintf (str, sizeof (str), "#%02X%02X%02X",
- color->red / 256,
- color->green / 256,
- color->blue / 256);
+ g_snprintf (str, sizeof (str),
+ "#%04X%04X%04X",
+ color->red,
+ color->green,
+ color->blue);
gconf_change_set_set_string (changeset, key, str);
}
@@ -869,7 +870,7 @@
if (!gconf_client_commit_change_set (priv->conf, changeset, TRUE, &error))
{
- g_warning ("Failed to commit the changeset to gconf: %s", error->message);
+ g_message ("Failed to commit the changeset to gconf: %s", error->message);
g_error_free (error);
}
@@ -896,7 +897,7 @@
g_assert (pspec != NULL);
if (priv->in_notification_count > 0)
- g_warning ("Scheduling save from gconf notify!\n");
+ g_message ("Scheduling save from gconf notify!\n");
if (!g_slist_find (priv->dirty_pspecs, pspec))
priv->dirty_pspecs = g_slist_prepend (priv->dirty_pspecs, pspec);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]