From b064d64be7e2e9444721beb7a02038f638edab4c Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 23 Apr 2013 14:59:09 +0200 Subject: [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. --- e-util/e-misc-utils.c | 4 ++-- e-util/e-misc-utils.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'e-util') diff --git a/e-util/e-misc-utils.c b/e-util/e-misc-utils.c index 97e5c2d37e..59e6e67eb2 100644 --- a/e-util/e-misc-utils.c +++ b/e-util/e-misc-utils.c @@ -1149,7 +1149,7 @@ e_int_compare (gconstpointer x, * Returns: a 24-bit color value **/ guint32 -e_color_to_value (GdkColor *color) +e_color_to_value (const GdkColor *color) { GdkRGBA rgba; @@ -1173,7 +1173,7 @@ e_color_to_value (GdkColor *color) * Returns: a 24-bit color value **/ guint32 -e_rgba_to_value (GdkRGBA *rgba) +e_rgba_to_value (const GdkRGBA *rgba) { guint16 red; guint16 green; diff --git a/e-util/e-misc-utils.h b/e-util/e-misc-utils.h index d7dea7afc3..1493d12d65 100644 --- a/e-util/e-misc-utils.h +++ b/e-util/e-misc-utils.h @@ -108,9 +108,9 @@ gint e_collate_compare (gconstpointer x, gconstpointer y); gint e_int_compare (gconstpointer x, gconstpointer y); -guint32 e_color_to_value (GdkColor *color); +guint32 e_color_to_value (const GdkColor *color); -guint32 e_rgba_to_value (GdkRGBA *rgba); +guint32 e_rgba_to_value (const GdkRGBA *rgba); /* This only makes a filename safe for usage as a filename. * It still may have shell meta-characters in it. */ -- cgit v1.2.3