aboutsummaryrefslogtreecommitdiffstats
path: root/modules/settings/e-settings-mail-formatter.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-04-23 20:59:09 +0800
committerMilan Crha <mcrha@redhat.com>2013-04-23 20:59:09 +0800
commitb064d64be7e2e9444721beb7a02038f638edab4c (patch)
tree35183e5a83eb22078db23835538ea9e07b4b6d2a /modules/settings/e-settings-mail-formatter.c
parentbd48b0a0f42696d2e8cb5eba10a3e0c123e9395d (diff)
downloadgsoc2013-evolution-b064d64be7e2e9444721beb7a02038f638edab4c.tar.gz
gsoc2013-evolution-b064d64be7e2e9444721beb7a02038f638edab4c.tar.zst
gsoc2013-evolution-b064d64be7e2e9444721beb7a02038f638edab4c.zip
[EMailFormatter] Use GdkRGBA and GtkStyleContext to get theme colors
It could happen that header text color had been picked white one time, but the other time black as expected (for me usually when I started Evolution in Calendar and moved to Mail view, the header text color was white, while when starting in Mail view it was black). The change to use GtkStyleContext is there only as a cleanup from deprecated GtkStyle, and to make things easier too, because both GtkStyle and the GtkStyleContext had set white color for some reason.
Diffstat (limited to 'modules/settings/e-settings-mail-formatter.c')
-rw-r--r--modules/settings/e-settings-mail-formatter.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/settings/e-settings-mail-formatter.c b/modules/settings/e-settings-mail-formatter.c
index e98bf42ec5..aa8c4325a1 100644
--- a/modules/settings/e-settings-mail-formatter.c
+++ b/modules/settings/e-settings-mail-formatter.c
@@ -51,17 +51,17 @@ settings_mail_formatter_get_extensible (ESettingsMailFormatter *extension)
}
static gboolean
-settings_mail_formatter_map_string_to_color (GValue *value,
- GVariant *variant,
- gpointer user_data)
+settings_mail_formatter_map_string_to_rgba (GValue *value,
+ GVariant *variant,
+ gpointer user_data)
{
- GdkColor color;
+ GdkRGBA rgba;
const gchar *string;
gboolean success = FALSE;
string = g_variant_get_string (variant, NULL);
- if (gdk_color_parse (string, &color)) {
- g_value_set_boxed (value, &color);
+ if (gdk_rgba_parse (&rgba, string)) {
+ g_value_set_boxed (value, &rgba);
success = TRUE;
}
@@ -138,7 +138,7 @@ settings_mail_formatter_constructed (GObject *object)
settings, "citation-color",
formatter, "citation-color",
G_SETTINGS_BIND_GET,
- settings_mail_formatter_map_string_to_color,
+ settings_mail_formatter_map_string_to_rgba,
(GSettingsBindSetMapping) NULL,
NULL, (GDestroyNotify) NULL);