aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@gnome-db.org>2011-10-24 17:30:20 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-10-24 17:30:20 +0800
commitbd149b27954af20cf3f860164486191b0e879e89 (patch)
tree323c26ba15a7e15242c2749b391b5ffa59762fed /e-util
parent3b32549c69267295a9a7b482e4a6ca2db9e6c73f (diff)
parent8c67e84f9bf1803108f7a004513e37c6ef22d41f (diff)
downloadgsoc2013-evolution-bd149b27954af20cf3f860164486191b0e879e89.tar
gsoc2013-evolution-bd149b27954af20cf3f860164486191b0e879e89.tar.gz
gsoc2013-evolution-bd149b27954af20cf3f860164486191b0e879e89.tar.bz2
gsoc2013-evolution-bd149b27954af20cf3f860164486191b0e879e89.tar.lz
gsoc2013-evolution-bd149b27954af20cf3f860164486191b0e879e89.tar.xz
gsoc2013-evolution-bd149b27954af20cf3f860164486191b0e879e89.tar.zst
gsoc2013-evolution-bd149b27954af20cf3f860164486191b0e879e89.zip
Merge branch 'master' into wip/gsettings
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-signature-list.c3
-rw-r--r--e-util/e-util.c16
-rw-r--r--e-util/gconf-bridge.c1
3 files changed, 17 insertions, 3 deletions
diff --git a/e-util/e-signature-list.c b/e-util/e-signature-list.c
index 1f03cd3305..037db0fa63 100644
--- a/e-util/e-signature-list.c
+++ b/e-util/e-signature-list.c
@@ -203,6 +203,9 @@ gconf_signatures_changed (GConfClient *client,
g_free (uid);
}
+ g_slist_foreach (list, (GFunc) g_free, NULL);
+ g_slist_free (list);
+
if (!have_autogen) {
new_sigs = add_autogen (signature_list, new_sigs);
resave = TRUE;
diff --git a/e-util/e-util.c b/e-util/e-util.c
index cd489849e4..cda17cbbc9 100644
--- a/e-util/e-util.c
+++ b/e-util/e-util.c
@@ -1390,9 +1390,19 @@ e_binding_transform_color_to_string (GBinding *binding,
g_return_val_if_fail (G_IS_BINDING (binding), FALSE);
color = g_value_get_boxed (source_value);
- string = gdk_color_to_string (color);
- g_value_set_string (target_value, string);
- g_free (string);
+ if (!color) {
+ g_value_set_string (target_value, "");
+ } else {
+ /* encode color manually, because css styles expect colors in #rrggbb,
+ not in #rrrrggggbbbb, which is a result of gdk_color_to_string()
+ */
+ string = g_strdup_printf ("#%02x%02x%02x",
+ (gint) color->red * 256 / 65536,
+ (gint) color->green * 256 / 65536,
+ (gint) color->blue * 256 / 65536);
+ g_value_set_string (target_value, string);
+ g_free (string);
+ }
return TRUE;
}
diff --git a/e-util/gconf-bridge.c b/e-util/gconf-bridge.c
index 3de48b6e01..7f479acf67 100644
--- a/e-util/gconf-bridge.c
+++ b/e-util/gconf-bridge.c
@@ -1042,6 +1042,7 @@ list_store_binding_sync_store_to_pref (ListStoreBinding *binding)
tmp_value = gconf_value_new (GCONF_VALUE_STRING);
gconf_value_set_string (tmp_value, string);
+ g_free (string);
list = g_slist_append (list, tmp_value);