[Commits] [SCM] claws branch, gtk3, updated. 3.16.0-428-gd2d11e2

ticho at claws-mail.org ticho at claws-mail.org
Sun Oct 28 11:42:00 CET 2018


The branch, gtk3 has been updated
       via  d2d11e22e3c903815a4ef26710c949c6aad7a28e (commit)
      from  4b8281ea03489809ac02e601a092c1b94de2f4af (commit)

Summary of changes:
 src/common/defs.h                              |    2 +-
 src/compose.c                                  |  118 ++++++++++--------------
 src/folder_item_prefs.c                        |    1 -
 src/folder_item_prefs.h                        |    2 +-
 src/foldersel.c                                |   11 +--
 src/folderview.c                               |   40 ++++----
 src/folderview.h                               |    6 +-
 src/gtk/about.c                                |   18 ++--
 src/gtk/colorlabel.c                           |   99 +++++++-------------
 src/gtk/colorlabel.h                           |    4 +-
 src/gtk/colorsel.c                             |    8 +-
 src/gtk/colorsel.h                             |    2 +-
 src/gtk/gtkaspell.c                            |   38 +++-----
 src/gtk/gtkaspell.h                            |    4 +-
 src/gtk/gtkutils.c                             |   44 ++++-----
 src/gtk/gtkutils.h                             |   29 +++++-
 src/gtk/logwindow.c                            |   69 ++++----------
 src/gtk/logwindow.h                            |   16 ++--
 src/gtk/quicksearch.c                          |   16 ++--
 src/gtk/spell_entry.c                          |   34 ++-----
 src/mainwindow.c                               |   27 +-----
 src/plugins/notification/notification_banner.c |    6 +-
 src/plugins/notification/notification_popup.c  |    4 +-
 src/plugins/notification/notification_prefs.c  |   45 ++++-----
 src/plugins/notification/notification_prefs.h  |    8 +-
 src/plugins/vcalendar/vcalendar.c              |   10 +-
 src/prefs_account.c                            |   24 +----
 src/prefs_common.h                             |    2 +-
 src/prefs_filtering_action.c                   |    1 -
 src/prefs_folder_item.c                        |   34 ++-----
 src/prefs_gtk.c                                |   18 ++--
 src/prefs_msg_colors.c                         |   39 ++++----
 src/prefs_msg_colors.h                         |    2 +-
 src/prefs_spelling.c                           |    4 +-
 src/summaryview.c                              |   31 ++++---
 src/summaryview.h                              |    4 +-
 src/textview.c                                 |  118 ++++++++----------------
 37 files changed, 358 insertions(+), 580 deletions(-)


- Log -----------------------------------------------------------------
commit d2d11e22e3c903815a4ef26710c949c6aad7a28e
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Sun Oct 28 00:00:22 2018 +0200

    Use GdkRGBA instead of deprecated GdkColor where possible, and also instead of internal unsigned long representation.
    
    The internal representation was buggy anyway, converting
    to and from GdkColor improperly, changing slightly RGB values.
    I guess nobody ever noticed slight hue changes.
    
    GdkColor is still used when setting widget colors with (also
    deprecated) GtkStyle, and when using other deprecated
    functions, which will eventually be replaced.

diff --git a/src/common/defs.h b/src/common/defs.h
index d115b5e..2816f83 100644
--- a/src/common/defs.h
+++ b/src/common/defs.h
@@ -150,7 +150,7 @@
 #define CTREE_INDENT			18
 #define FOLDER_SPACING			4
 #define MAX_ENTRY_LENGTH		8191
-#define COLOR_DIM			35000
+#define COLOR_DIM			((gdouble)35000 / 65535)
 #define UI_REFRESH_INTERVAL		50000	/* usec */
 #define FOLDER_UPDATE_INTERVAL		1500	/* msec */
 #define PROGRESS_UPDATE_INTERVAL	200	/* msec */
diff --git a/src/compose.c b/src/compose.c
index 5156c72..5e65255 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -194,19 +194,11 @@ typedef enum {
 #define COMPOSE_DRAFT_TIMEOUT_UNSET -1
 #define COMPOSE_DRAFT_TIMEOUT_FORBIDDEN -2
 
-static GdkColor default_header_bgcolor = {
-	(gulong)0,
-	(gushort)0,
-	(gushort)0,
-	(gushort)0
-};
+static GdkRGBA default_header_bgcolor =
+	{0, 0, 0, 1};
 
-static GdkColor default_header_color = {
-	(gulong)0,
-	(gushort)0,
-	(gushort)0,
-	(gushort)0
-};
+static GdkRGBA default_header_color =
+	{0, 0, 0, 1};
 
 static GList *compose_list = NULL;
 static GSList *extra_headers = NULL;
@@ -818,59 +810,43 @@ static gboolean compose_put_existing_to_front(MsgInfo *info)
 	return FALSE;
 }
 
-static GdkColor quote_color1 = 
-	{(gulong)0, (gushort)0, (gushort)0, (gushort)0};
-static GdkColor quote_color2 = 
-	{(gulong)0, (gushort)0, (gushort)0, (gushort)0};
-static GdkColor quote_color3 = 
-	{(gulong)0, (gushort)0, (gushort)0, (gushort)0};
-
-static GdkColor quote_bgcolor1 = 
-	{(gulong)0, (gushort)0, (gushort)0, (gushort)0};
-static GdkColor quote_bgcolor2 = 
-	{(gulong)0, (gushort)0, (gushort)0, (gushort)0};
-static GdkColor quote_bgcolor3 = 
-	{(gulong)0, (gushort)0, (gushort)0, (gushort)0};
-
-static GdkColor signature_color = {
-	(gulong)0,
-	(gushort)0x7fff,
-	(gushort)0x7fff,
-	(gushort)0x7fff
-};
+static GdkRGBA quote_color1 =
+	{0, 0, 0, 1};
+static GdkRGBA quote_color2 =
+	{0, 0, 0, 1};
+static GdkRGBA quote_color3 =
+	{0, 0, 0, 1};
 
-static GdkColor uri_color = {
-	(gulong)0,
-	(gushort)0,
-	(gushort)0,
-	(gushort)0
-};
+static GdkRGBA quote_bgcolor1 =
+	{0, 0, 0, 1};
+static GdkRGBA quote_bgcolor2 =
+	{0, 0, 0, 1};
+static GdkRGBA quote_bgcolor3 =
+	{0, 0, 0, 1};
+
+static GdkRGBA signature_color =
+	{0.5, 0.5, 0.5, 1};
+
+static GdkRGBA uri_color =
+	{0, 0, 0, 1};
 
 static void compose_create_tags(GtkTextView *text, Compose *compose)
 {
 	GtkTextBuffer *buffer;
-	GdkColor black = {(gulong)0, (gushort)0, (gushort)0, (gushort)0};
+	GdkRGBA black = { 0, 0, 0, 1 };
 
 	buffer = gtk_text_view_get_buffer(text);
 
 	if (prefs_common.enable_color) {
 		/* grab the quote colors, converting from an int to a GdkColor */
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_QUOTE_LEVEL1],
-					       &quote_color1);
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_QUOTE_LEVEL2],
-					       &quote_color2);
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_QUOTE_LEVEL3],
-					       &quote_color3);
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_QUOTE_LEVEL1_BG],
-					       &quote_bgcolor1);
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_QUOTE_LEVEL2_BG],
-					       &quote_bgcolor2);
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_QUOTE_LEVEL3_BG],
-					       &quote_bgcolor3);
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_SIGNATURE],
-					       &signature_color);
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_URI],
-					       &uri_color);
+		quote_color1 = prefs_common.color[COL_QUOTE_LEVEL1];
+		quote_color2 = prefs_common.color[COL_QUOTE_LEVEL2];
+		quote_color3 = prefs_common.color[COL_QUOTE_LEVEL3];
+		quote_bgcolor1 = prefs_common.color[COL_QUOTE_LEVEL1_BG];
+		quote_bgcolor2 = prefs_common.color[COL_QUOTE_LEVEL2_BG];
+		quote_bgcolor3 = prefs_common.color[COL_QUOTE_LEVEL3_BG];
+		signature_color = prefs_common.color[COL_SIGNATURE];
+		uri_color = prefs_common.color[COL_URI];
 	} else {
 		signature_color = quote_color1 = quote_color2 = quote_color3 = 
 			quote_bgcolor1 = quote_bgcolor2 = quote_bgcolor3 = uri_color = black;
@@ -2712,17 +2688,23 @@ static void compose_entry_indicate(Compose *compose, const gchar *mailto)
 {
 	GSList *h_list;
 	GtkEntry *entry;
+	GdkColor color;
 		
 	for (h_list = compose->header_list; h_list != NULL; h_list = h_list->next) {
 		entry = GTK_ENTRY(((ComposeHeaderEntry *)h_list->data)->entry);
 		if (gtk_entry_get_text(entry) && 
 		    !g_utf8_collate(gtk_entry_get_text(entry), mailto)) {
-				gtk_widget_modify_base(
-					GTK_WIDGET(((ComposeHeaderEntry *)h_list->data)->entry),
-					GTK_STATE_NORMAL, &default_header_bgcolor);
-				gtk_widget_modify_text(
-					GTK_WIDGET(((ComposeHeaderEntry *)h_list->data)->entry),
-					GTK_STATE_NORMAL, &default_header_color);
+			/* Modify background color */
+			GTKUT_GDKRGBA_TO_GDKCOLOR(default_header_bgcolor, color);
+			gtk_widget_modify_base(
+				GTK_WIDGET(((ComposeHeaderEntry *)h_list->data)->entry),
+				GTK_STATE_NORMAL, &color);
+
+			/* Modify foreground color */
+			GTKUT_GDKRGBA_TO_GDKCOLOR(default_header_color, color);
+			gtk_widget_modify_text(
+				GTK_WIDGET(((ComposeHeaderEntry *)h_list->data)->entry),
+				GTK_STATE_NORMAL, &color);
 		}
 	}
 }
@@ -7770,10 +7752,8 @@ static Compose *compose_create(PrefsAccount *account,
 
 	cm_return_val_if_fail(account != NULL, NULL);
 
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_DEFAULT_HEADER_BG],
-					   &default_header_bgcolor);
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_DEFAULT_HEADER],
-					   &default_header_color);
+	default_header_bgcolor = prefs_common.color[COL_DEFAULT_HEADER_BG],
+	default_header_color = prefs_common.color[COL_DEFAULT_HEADER],
 
 	debug_print("Creating compose window...\n");
 	compose = g_new0(Compose, 1);
@@ -8424,12 +8404,16 @@ static GtkWidget *compose_account_option_menu_create(Compose *compose)
 				gtk_entry_set_text(GTK_ENTRY(from_name), from);
 			}
 			if (cur_account != compose->account) {
+				GdkColor color;
+
+				GTKUT_GDKRGBA_TO_GDKCOLOR(default_header_bgcolor, color);
 				gtk_widget_modify_base(
 					GTK_WIDGET(from_name),
-					GTK_STATE_NORMAL, &default_header_bgcolor);
+					GTK_STATE_NORMAL, &color);
+				GTKUT_GDKRGBA_TO_GDKCOLOR(default_header_color, color);
 				gtk_widget_modify_text(
 					GTK_WIDGET(from_name),
-					GTK_STATE_NORMAL, &default_header_color);
+					GTK_STATE_NORMAL, &color);
 			}
 		}
 		COMBOBOX_ADD(menu, name, ac->account_id);
diff --git a/src/folder_item_prefs.c b/src/folder_item_prefs.c
index 874f18d..4c65b48 100644
--- a/src/folder_item_prefs.c
+++ b/src/folder_item_prefs.c
@@ -205,7 +205,6 @@ static FolderItemPrefs *folder_item_prefs_clear(FolderItemPrefs *prefs)
 	prefs->always_sign = SIGN_OR_ENCRYPT_DEFAULT;
 	prefs->always_encrypt = SIGN_OR_ENCRYPT_DEFAULT;
 	prefs->save_copy_to_folder = FALSE;
-	prefs->color = 0;
 
 	prefs->enable_processing = FALSE;
 	prefs->enable_processing_when_opening = FALSE;
diff --git a/src/folder_item_prefs.h b/src/folder_item_prefs.h
index aa649c4..d870f42 100644
--- a/src/folder_item_prefs.h
+++ b/src/folder_item_prefs.h
@@ -75,7 +75,7 @@ struct _FolderItemPrefs {
 	SignOrEncryptType always_sign;
 	SignOrEncryptType always_encrypt;
 	gboolean save_copy_to_folder;
-	guint color;
+	GdkRGBA color;
 
 	gboolean compose_with_format;
 	gchar *compose_override_from_format;
diff --git a/src/foldersel.c b/src/foldersel.c
index 21cd279..38181e1 100644
--- a/src/foldersel.c
+++ b/src/foldersel.c
@@ -327,7 +327,7 @@ static void foldersel_create(const gchar *title)
 	gtk_tree_view_column_set_attributes
 		(column, renderer,
 		 "text", FOLDERSEL_FOLDERNAME,
-		 "foreground-gdk", FOLDERSEL_FOREGROUND,
+		 "foreground-rgba", FOLDERSEL_FOREGROUND,
 		 "weight", FOLDERSEL_BOLD,
 		 NULL);
 	g_object_set(G_OBJECT(renderer), "weight", PANGO_WEIGHT_BOLD, NULL);
@@ -397,11 +397,8 @@ static void foldersel_append_item(GtkTreeStore *store, FolderItem *item,
 	GdkPixbuf *pixbuf, *pixbuf_open;
 	gboolean use_color;
 	PangoWeight weight = PANGO_WEIGHT_NORMAL;
-	GdkColor *foreground = NULL;
-	static GdkColor color_noselect = {0, COLOR_DIM, COLOR_DIM, COLOR_DIM};
-	static GdkColor color_new;
-
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_NEW], &color_new);
+	GdkRGBA *foreground = NULL;
+	GdkRGBA color_noselect = {COLOR_DIM, COLOR_DIM, COLOR_DIM, 1.0};
 
 	name = folder_item_get_name(item);
 
@@ -436,7 +433,7 @@ static void foldersel_append_item(GtkTreeStore *store, FolderItem *item,
 	if (item->no_select)
 		foreground = &color_noselect;
 	else if (use_color)
-		foreground = &color_new;
+		foreground = &prefs_common.color[COL_NEW];
 
 	/* insert this node */
 	gtk_tree_store_append(store, iter, parent);
diff --git a/src/folderview.c b/src/folderview.c
index 8f53795..8bea5fe 100644
--- a/src/folderview.c
+++ b/src/folderview.c
@@ -658,12 +658,13 @@ static void folderview_set_fonts(FolderView *folderview)
 			}
 		}
 
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_NEW], &gdk_color);
+		GTKUT_GDKRGBA_TO_GDKCOLOR(prefs_common.color[COL_NEW], gdk_color);
 		bold_color_style = gtk_style_copy(bold_style);
 		bold_color_style->text[GTK_STATE_NORMAL] = gdk_color;
 
+		GTKUT_GDKRGBA_TO_GDKCOLOR(folderview->color_op, gdk_color);
 		bold_tgtfold_style = gtk_style_copy(bold_style);
-		bold_tgtfold_style->text[GTK_STATE_NORMAL] = folderview->color_op;
+		bold_tgtfold_style->text[GTK_STATE_NORMAL] = gdk_color;
 	}
 }
 
@@ -1491,7 +1492,7 @@ static void folderview_update_node(FolderView *folderview, GtkCMCTreeNode *node)
 	GtkCMCTree *ctree = GTK_CMCTREE(folderview->ctree);
 	GtkStyle *style = NULL;
 	GtkStyle *color_style = NULL;
-	GtkStyle *ctree_style, *prev_style;
+	GtkStyle *ctree_style;
 	FolderItem *item;
 	GdkColor gdk_color;
 	GdkPixbuf *xpm, *openxpm;
@@ -1708,16 +1709,17 @@ static void folderview_update_node(FolderView *folderview, GtkCMCTreeNode *node)
 	gtk_cmctree_node_set_foreground(ctree, node, NULL);
 
 	if (use_bold) {
-		if (item->prefs->color > 0 && !use_color) {
-			gtkut_convert_int_to_gdk_color(item->prefs->color, &gdk_color);
+		if (!use_color) {
+			GTKUT_GDKRGBA_TO_GDKCOLOR(item->prefs->color, gdk_color);
 			color_style = gtk_style_copy(bold_style);
 			color_style->text[GTK_STATE_NORMAL] = gdk_color;
 			color_style->text[GTK_STATE_SELECTED] = gdk_color;
 			style = gtk_style_copy(color_style);
 		} else if (use_color) {
+			GTKUT_GDKRGBA_TO_GDKCOLOR(folderview->color_new, gdk_color);
 			style = gtk_style_copy(bold_color_style);
-			style->text[GTK_STATE_NORMAL] = folderview->color_new;
-			style->text[GTK_STATE_SELECTED] = folderview->color_new;
+			style->text[GTK_STATE_NORMAL] = gdk_color;
+			style->text[GTK_STATE_SELECTED] = gdk_color;
 		} else if (item->op_count > 0) {
 			style = gtk_style_copy(bold_tgtfold_style);
 		} else {
@@ -1729,18 +1731,17 @@ static void folderview_update_node(FolderView *folderview, GtkCMCTreeNode *node)
 			style->text[GTK_STATE_SELECTED] = gdk_color;
 		}
 	} else if (use_color) {
-		style = gtk_style_copy(gtk_widget_get_style(ctree));
-		style->text[GTK_STATE_NORMAL] = folderview->color_new;
-		style->text[GTK_STATE_SELECTED] = folderview->color_new;
+		GTKUT_GDKRGBA_TO_GDKCOLOR(folderview->color_new, gdk_color);
+		style = gtk_style_copy(gtk_widget_get_style(GTK_WIDGET(ctree)));
+		style->text[GTK_STATE_NORMAL] = gdk_color;
+		style->text[GTK_STATE_SELECTED] = gdk_color;
 	} else if (item->op_count > 0) {
 		style = gtk_style_copy(bold_tgtfold_style);
-	} else if (item->prefs->color > 0) {
-		gtkut_convert_int_to_gdk_color(item->prefs->color, &gdk_color);
-		style = gtk_style_copy(gtk_widget_get_style(ctree));
+	} else {
+		GTKUT_GDKRGBA_TO_GDKCOLOR(item->prefs->color, gdk_color);
+		style = gtk_style_copy(gtk_widget_get_style(GTK_WIDGET(ctree)));
 		style->text[GTK_STATE_NORMAL] = gdk_color;
 		style->text[GTK_STATE_SELECTED] = gdk_color;
-	} else {
-		style = NULL;
 	}
 
 	gtk_cmctree_node_set_row_style(ctree, node, style);
@@ -2736,18 +2737,19 @@ static void folderview_processing_cb(GtkAction *action, gpointer data)
 	g_free (title);
 }
 
-void folderview_set_target_folder_color(gint color_op) 
+void folderview_set_target_folder_color(GdkRGBA color_op)
 {
 	gint firstone = 1;
 	GList *list;
 	FolderView *folderview;
+	GdkColor gdk_color;
 
 	for (list = folderview_list; list != NULL; list = list->next) {
 		folderview = (FolderView *)list->data;
-		gtkut_convert_int_to_gdk_color(color_op, &folderview->color_op);
+		folderview->color_op = color_op;
+		GTKUT_GDKRGBA_TO_GDKCOLOR(color_op, gdk_color);
 		if (firstone) {
-			bold_tgtfold_style->text[GTK_STATE_NORMAL] =
-				folderview->color_op;
+			bold_tgtfold_style->text[GTK_STATE_NORMAL] = gdk_color;
 			firstone = 0;
 		}
 	}
diff --git a/src/folderview.h b/src/folderview.h
index 68bb2e8..1f68c07 100644
--- a/src/folderview.h
+++ b/src/folderview.h
@@ -59,8 +59,8 @@ struct _FolderView
 
 	gboolean open_folder;
 
-	GdkColor color_new;
-	GdkColor color_op;
+	GdkRGBA color_new;
+	GdkRGBA color_op;
 
 	MainWindow   *mainwin;
 	SummaryView  *summaryview;
@@ -131,7 +131,7 @@ void folderview_move_folder		(FolderView 	*folderview,
 					 FolderItem 	*to_folder,
 					 gboolean	 copy);
 
-void folderview_set_target_folder_color (gint		color_op);
+void folderview_set_target_folder_color (GdkRGBA		color_op);
 
 void folderview_reinit_fonts		(FolderView *folderview);
 
diff --git a/src/gtk/about.c b/src/gtk/about.c
index e9ed132..687d44d 100644
--- a/src/gtk/about.c
+++ b/src/gtk/about.c
@@ -93,7 +93,7 @@ static GtkWidget *about_create_child_page_info(void)
 	GtkWidget *text;
 	GtkTextBuffer *buffer;
 	GtkTextIter iter;
-	GdkColor uri_color;
+	GdkRGBA uri_color;
 	gchar buf[1024];
 	GtkTextTag *tag;
 #if HAVE_SYS_UTSNAME_H
@@ -120,14 +120,13 @@ static GtkWidget *about_create_child_page_info(void)
 	gtk_text_buffer_get_iter_at_offset(buffer, &iter, 0);
 
 	/* textview link style (based upon main prefs) */
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_URI],
-				(GdkColor*)&uri_color);
+	uri_color = prefs_common.color[COL_URI];
 	tag = gtk_text_buffer_create_tag(buffer, "link",
-				"foreground-gdk", &uri_color,
+				"foreground-rgba", &uri_color,
 				"wrap-mode", GTK_WRAP_NONE,
 				NULL);
 	gtk_text_buffer_create_tag(buffer, "link-hover",
-				"foreground-gdk", &uri_color,
+				"foreground-rgba", &uri_color,
 				"underline", PANGO_UNDERLINE_SINGLE,
 				NULL);
 
@@ -538,7 +537,7 @@ static GtkWidget *about_create_child_page_license(void)
 	GtkWidget *text;
 	GtkTextBuffer *buffer;
 	GtkTextIter iter;
-	GdkColor uri_color;
+	GdkRGBA uri_color;
 	GtkTextTag *tag;
 
 	scrolledwin = gtk_scrolled_window_new(NULL, NULL);
@@ -574,14 +573,13 @@ static GtkWidget *about_create_child_page_license(void)
 	ADD_TEXT("\n\n");
 
 	/* textview link style (based upon main prefs) */
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_URI],
-			(GdkColor*)&uri_color);
+	uri_color = prefs_common.color[COL_URI];
 
 	tag = gtk_text_buffer_create_tag(buffer, "link",
-		"foreground-gdk", &uri_color,
+		"foreground-rgba", &uri_color,
 		NULL);
 	gtk_text_buffer_create_tag(buffer, "link-hover",
-		"foreground-gdk", &uri_color,
+		"foreground-rgba", &uri_color,
 		"underline", PANGO_UNDERLINE_SINGLE,
 		NULL);
 
diff --git a/src/gtk/colorlabel.c b/src/gtk/colorlabel.c
index e51b783..b1a5c4e 100644
--- a/src/gtk/colorlabel.c
+++ b/src/gtk/colorlabel.c
@@ -51,22 +51,23 @@ static gchar *labels[COLORLABELS] = {
 	N_("Magenta")
 };
 
-static GdkColor default_colors[COLORLABELS] = {
-	{ 0, 0xffff, (0x99 << 8), 0x0 },
-	{ 0, 0xffff, 0x0, 0x0 },
-	{ 0, 0xffff, (0x66 << 8), 0xffff },
-	{ 0, 0x0, (0xcc << 8), 0xffff },
-	{ 0, 0x0, 0x0, 0xffff },
-	{ 0, 0x0, (0x99 << 8), 0x0 },
-	{ 0, (0x66 << 8), (0x33 << 8), (0x33 << 8) },
-	{ 0, (0xaa << 8), (0xaa << 8), (0xaa << 8) },
-	{ 0, (0xc0 << 8), (0x72 << 8), (0x54 << 8) },
-	{ 0, (0xc0 << 8), 0x0, 0x0 },
-	{ 0, (0xcc << 8), (0x10 << 8), (0x74 << 8) },
-	{ 0, (0x50 << 8), (0x94 << 8), (0xcd << 8) },
-	{ 0, 0xffff, (0xd5 << 8), 0x0 },
-	{ 0, 0x0, (0xd8 << 8), 0x0 },
-	{ 0, (0xc0 << 8), (0x60 << 8), (0xc0 << 8) }
+#define CL(x) ((gdouble)x / 65535)
+static GdkRGBA default_colors[COLORLABELS] = {
+	{ CL(65535), CL(39168), CL(0),     1.0 },
+	{ CL(65535), CL(0),     CL(0),     1.0 },
+	{ CL(65535), CL(26112), CL(65535), 1.0 },
+	{ CL(0),     CL(52224), CL(65535), 1.0 },
+	{ CL(0),     CL(0),     CL(65535), 1.0 },
+	{ CL(0),     CL(39168), CL(0),     1.0 },
+	{ CL(26112), CL(13056), CL(13056), 1.0 },
+	{ CL(43520), CL(43520), CL(43520), 1.0 },
+	{ CL(49152), CL(29184), CL(21504), 1.0 },
+	{ CL(49152), CL(0),     CL(0),     1.0 },
+	{ CL(52224), CL(4096),  CL(29696), 1.0 },
+	{ CL(20480), CL(37888), CL(52480), 1.0 },
+	{ CL(65535), CL(54528), CL(0),     1.0 },
+	{ CL(0),     CL(55296), CL(0),     1.0 },
+	{ CL(49152), CL(24576), CL(49152), 1.0 }
 };
 
 	
@@ -82,7 +83,7 @@ static struct
 {
 	LabelColorChangeFlags	changed; 
 	/* color here is initialized from default_colors[] at startup */
-	GdkColor		color;
+	GdkRGBA		color;
 
 	/* XXX: note that the label member is supposed to be dynamically 
 	 * allocated and freed */
@@ -133,11 +134,6 @@ static struct
 		return val;				    	\
 	} while(0)
 
-#define INTCOLOR_TO_GDKCOLOR(intcolor, gdkcolor) \
-	gdkcolor.red   = ((intcolor >> 16UL) & 0xFFUL) << 8UL; \
-	gdkcolor.green = ((intcolor >>  8UL) & 0xFFUL) << 8UL; \
-	gdkcolor.blue  = ((intcolor)         & 0xFFUL) << 8UL;
-
 static void colorlabel_recreate        (gint);
 static void colorlabel_recreate_label  (gint);
 
@@ -147,8 +143,7 @@ void colorlabel_update_colortable_from_prefs(void)
 
 	for (i = 0; i < NUM_MENUS; i++) {
 		for (c = 0; c < COLORLABELS; c++) {
-			INTCOLOR_TO_GDKCOLOR(prefs_common.custom_colorlabel[c].color,
-					label_colors[i][c].color);
+			label_colors[i][c].color = prefs_common.custom_colorlabel[c].color;
 			g_free(label_colors[i][c].label);
 			label_colors[i][c].label =
 					g_strdup(prefs_common.custom_colorlabel[c].label);
@@ -162,18 +157,18 @@ gint colorlabel_get_color_count(void)
 	return LABEL_COLORS_ELEMS;
 }
 
-GdkColor colorlabel_get_color(gint color_index)
+GdkRGBA colorlabel_get_color(gint color_index)
 {
-	GdkColor invalid = { 0 };
+	GdkRGBA invalid = { 0 };
 
 	G_RETURN_VAL_IF_INVALID_COLOR(color_index, invalid);
 
 	return label_colors[0][color_index].color;
 }
 
-GdkColor colorlabel_get_default_color(gint color_index)
+GdkRGBA colorlabel_get_default_color(gint color_index)
 {
-	GdkColor invalid = { 0 };
+	GdkRGBA invalid = { 0 };
 
 	G_RETURN_VAL_IF_INVALID_COLOR(color_index, invalid);
 
@@ -188,26 +183,11 @@ gchar *colorlabel_get_color_default_text(gint color_index)
 }
 
 static gboolean colorlabel_drawing_area_expose_event_cb
-#if !GTK_CHECK_VERSION(3, 0, 0)
-	(GtkWidget *widget, GdkEventExpose *expose, gpointer data)
-#else
 	(GtkWidget *widget, cairo_t *cr, gpointer data)
-#endif
 {
-#if !GTK_CHECK_VERSION(3, 0, 0)
-	cairo_t *cr;
-	GdkWindow *drawable = gtk_widget_get_window(widget);
-#endif
+	GdkRGBA *color = (GdkRGBA *)data;
 	GtkAllocation allocation;
-	gulong c = (gulong) GPOINTER_TO_INT(data);
-	GdkColor color;
-
-	INTCOLOR_TO_GDKCOLOR(c, color)
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
-	gdk_colormap_alloc_color(gtk_widget_get_colormap(widget), &color, FALSE, TRUE);
-	cr = gdk_cairo_create(drawable);
-#endif
 	gtk_widget_get_allocation(widget, &allocation);
 
 	cairo_set_source_rgb(cr, 0., 0., 0.);
@@ -215,19 +195,17 @@ static gboolean colorlabel_drawing_area_expose_event_cb
 	    allocation.width - 1,
 	    allocation.height - 1);
 	cairo_stroke(cr);
-	gdk_cairo_set_source_color(cr, &color);
+
+	gdk_cairo_set_source_rgba(cr, color);
 	cairo_rectangle(cr, 1, 1,
 	    allocation.width - 2,
 	    allocation.height - 2);
 	cairo_fill(cr);
-#if !GTK_CHECK_VERSION(3, 0, 0)
-	cairo_destroy(cr);
-#endif
 	
 	return FALSE;
 }
 
-static GtkWidget *colorlabel_create_color_widget(GdkColor color)
+static GtkWidget *colorlabel_create_color_widget(GdkRGBA *color)
 {
 	GtkWidget *widget;
 
@@ -235,24 +213,9 @@ static GtkWidget *colorlabel_create_color_widget(GdkColor color)
 	gtk_widget_set_size_request(widget, LABEL_COLOR_WIDTH - 2, 
 				    LABEL_COLOR_HEIGHT - 4);
 
-#define CL(x)		(((gulong) (x) >> (gulong) 8) & 0xFFUL)	
-#define CR(r, g, b)	((CL(r) << (gulong) 16) | \
-			 (CL(g) << (gulong)  8) | \
-			 (CL(b)))
-
-#if !GTK_CHECK_VERSION(3, 0, 0)
-	g_signal_connect(G_OBJECT(widget), "expose_event", 
-			 G_CALLBACK
-			   	(colorlabel_drawing_area_expose_event_cb),
-			 GINT_TO_POINTER
-			   	((gint)CR(color.red, color.green, color.blue)));
-#else
 	g_signal_connect(G_OBJECT(widget), "draw", 
-			 G_CALLBACK
-			   	(colorlabel_drawing_area_expose_event_cb),
-			 GINT_TO_POINTER
-			   	((gint)CR(color.red, color.green, color.blue)));
-#endif
+			G_CALLBACK(colorlabel_drawing_area_expose_event_cb),
+			color);
 
 	return widget;
 }
@@ -269,7 +232,7 @@ static void colorlabel_recreate_color(gint color)
 		if (!(label_colors[i][color].changed & LCCF_COLOR))
 			continue;
 
-		widget = colorlabel_create_color_widget(label_colors[i][color].color);
+		widget = colorlabel_create_color_widget(&label_colors[i][color].color);
 		cm_return_if_fail(widget);
 
 		if (label_colors[i][color].widget) 
@@ -413,7 +376,7 @@ GtkWidget *colorlabel_create_color_menu(void)
 		gtk_widget_show(vbox);
 		gtk_container_set_border_width(GTK_CONTAINER(vbox), 1);
 
-		widget = colorlabel_create_color_widget(label_colors[0][i].color);
+		widget = colorlabel_create_color_widget(&label_colors[0][i].color);
 		gtk_widget_show(widget);
 		gtk_box_pack_start(GTK_BOX(vbox), widget, FALSE, FALSE, 0);
 
diff --git a/src/gtk/colorlabel.h b/src/gtk/colorlabel.h
index 939f2cd..d28deef 100644
--- a/src/gtk/colorlabel.h
+++ b/src/gtk/colorlabel.h
@@ -32,8 +32,8 @@
 
 void colorlabel_update_colortable_from_prefs(void);
 gint colorlabel_get_color_count			(void);
-GdkColor colorlabel_get_color			(gint		 color_index);
-GdkColor colorlabel_get_default_color	(gint		 color_index);
+GdkRGBA colorlabel_get_color			(gint		 color_index);
+GdkRGBA colorlabel_get_default_color	(gint		 color_index);
 gchar *colorlabel_get_color_default_text	(gint		 color_index);
 GtkImage *colorlabel_create_color_pixmap	(GdkColor	 color);
 GtkWidget *colorlabel_create_check_color_menu_item
diff --git a/src/gtk/colorsel.c b/src/gtk/colorsel.c
index 45897d5..d1c6af1 100644
--- a/src/gtk/colorsel.c
+++ b/src/gtk/colorsel.c
@@ -52,7 +52,7 @@ static gboolean quote_colors_set_dialog_key_pressed(GtkWidget *widget,
 	return FALSE;
 }
 
-gint colorsel_select_color_rgb(gchar *title, gint rgbvalue)
+GdkRGBA colorsel_select_color_rgb(gchar *title, GdkRGBA rgba)
 {
 	GdkColor color;
 	GtkColorSelectionDialog *color_dialog;
@@ -79,7 +79,7 @@ gint colorsel_select_color_rgb(gchar *title, gint rgbvalue)
 			 G_CALLBACK(quote_colors_set_dialog_key_pressed), &result);
 
 	/* preselect the previous color in the color selection dialog */
-	gtkut_convert_int_to_gdk_color(rgbvalue, &color);
+	GTKUT_GDKRGBA_TO_GDKCOLOR(rgba, color);
 	gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(
 		gtk_color_selection_dialog_get_color_selection(color_dialog)), &color);
 
@@ -89,11 +89,11 @@ gint colorsel_select_color_rgb(gchar *title, gint rgbvalue)
 	if (result == 0) {
 		gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(
 			gtk_color_selection_dialog_get_color_selection(color_dialog)), &color);
-		rgbvalue = gtkut_convert_gdk_color_to_int(&color);
+		GTKUT_GDKCOLOR_TO_GDKRGBA(color, rgba);
 	}
 
 	gtk_widget_destroy(GTK_WIDGET(color_dialog));
 
-	return rgbvalue;
+	return rgba;
 }
 
diff --git a/src/gtk/colorsel.h b/src/gtk/colorsel.h
index 72331b1..87f5f89 100644
--- a/src/gtk/colorsel.h
+++ b/src/gtk/colorsel.h
@@ -20,6 +20,6 @@
 #ifndef COLORSEL_H
 #define COLORSEL_H
 
-gint colorsel_select_color_rgb(gchar *title, gint rgbvalue);
+GdkRGBA colorsel_select_color_rgb(gchar *title, GdkRGBA rgba);
 
 #endif /* COLORSEL_H */
diff --git a/src/gtk/gtkaspell.c b/src/gtk/gtkaspell.c
index 7129987..83830fe 100644
--- a/src/gtk/gtkaspell.c
+++ b/src/gtk/gtkaspell.c
@@ -179,12 +179,12 @@ static gboolean 	get_word_from_pos		(GtkAspell *gtkaspell,
 							 gint *pstart, 
 							 gint *pend);
 static void 		allocate_color			(GtkAspell *gtkaspell,
-							 gint rgbvalue);
+							 GdkRGBA rgbvalue);
 static void 		change_color			(GtkAspell *gtkaspell, 
 			 				 gint start, 
 							 gint end, 
 							 gchar *newtext,
-							 GdkColor *color);
+							 gboolean colorize);
 static gint 		compare_dict			(Dictionary *a, 
 							 Dictionary *b);
 static void 		dictionary_delete		(Dictionary *dict);
@@ -319,7 +319,7 @@ void gtkaspell_checkers_reset_error(void)
 GtkAspell *gtkaspell_new(const gchar *dictionary, 
 			 const gchar *alt_dictionary, 
 			 const gchar *encoding, /* unused */
-			 gint  misspelled_color,
+			 GdkRGBA misspelled_color,
 			 gboolean check_while_typing,
 			 gboolean recheck_when_changing_dict,
 			 gboolean use_alternate,
@@ -968,10 +968,10 @@ static gboolean check_at(GtkAspell *gtkaspell, gint from_pos)
 		gtkaspell->end_pos    = end;
 		gtkaspell_free_suggestions_list(gtkaspell);
 
-		change_color(gtkaspell, start, end, (gchar *)buf, &(gtkaspell->highlight));
+		change_color(gtkaspell, start, end, (gchar *)buf, TRUE);
 		return TRUE;
 	} else {
-		change_color(gtkaspell, start, end, (gchar *)buf, NULL);
+		change_color(gtkaspell, start, end, (gchar *)buf, FALSE);
 		return FALSE;
 	}
 }
@@ -2259,33 +2259,21 @@ static void set_point_continue(GtkAspell *gtkaspell)
 		gtkaspell->continue_check((gpointer *) gtkaspell->ctx.data);
 }
 
-static void allocate_color(GtkAspell *gtkaspell, gint rgbvalue)
+static void allocate_color(GtkAspell *gtkaspell, GdkRGBA rgba)
 {
 	GtkTextBuffer *buffer = gtk_text_view_get_buffer(gtkaspell->gtktext);
-	GdkColor *color = &(gtkaspell->highlight);
-
-	/* Shameless copy from Sylpheed's gtkutils.c */
-	color->pixel = 0L;
-	color->red   = (int) (((gdouble)((rgbvalue & 0xff0000) >> 16) / 255.0)
-			* 65535.0);
-	color->green = (int) (((gdouble)((rgbvalue & 0x00ff00) >>  8) / 255.0)
-			* 65535.0);
-	color->blue  = (int) (((gdouble) (rgbvalue & 0x0000ff)        / 255.0)
-			* 65535.0);
-
-	if (rgbvalue != 0)
-		gtk_text_buffer_create_tag(buffer, "misspelled",
-				   "foreground-gdk", color, NULL);
-	else
-		gtk_text_buffer_create_tag(buffer, "misspelled",
-				   "underline", PANGO_UNDERLINE_ERROR, NULL);
+
+	gtkaspell->highlight = rgba;
+
+	gtk_text_buffer_create_tag(buffer, "misspelled",
+			   "foreground-rgba", gtkaspell->highlight, NULL);
 
 }
 
 static void change_color(GtkAspell * gtkaspell, 
 			 gint start, gint end,
 			 gchar *newtext,
-                         GdkColor *color) 
+			 gboolean colorize)
 {
 	GtkTextView *gtktext;
 	GtkTextBuffer *buffer;
@@ -2299,7 +2287,7 @@ static void change_color(GtkAspell * gtkaspell,
 	buffer = gtk_text_view_get_buffer(gtktext);
 	gtk_text_buffer_get_iter_at_offset(buffer, &startiter, start);
 	gtk_text_buffer_get_iter_at_offset(buffer, &enditer, end);
-	if (color)
+	if (colorize)
 		gtk_text_buffer_apply_tag_by_name(buffer, "misspelled",
 						  &startiter, &enditer);
 	else {
diff --git a/src/gtk/gtkaspell.h b/src/gtk/gtkaspell.h
index 53599f9..fef5d4f 100644
--- a/src/gtk/gtkaspell.h
+++ b/src/gtk/gtkaspell.h
@@ -92,7 +92,7 @@ struct _GtkAspell
 	GList		*suggestions_list;
 
 	GtkTextView	*gtktext;
-	GdkColor 	 highlight;
+	GdkRGBA 	 highlight;
 	GtkAccelGroup	*accel_group;
 	void		(*dict_changed_cb)(void *data);
 	void 		(*menu_changed_cb)(void *data);
@@ -115,7 +115,7 @@ void 		gtkaspell_checkers_reset_error	(void);
 GtkAspell*	gtkaspell_new			(const gchar *dictionary, 
 						 const gchar *alt_dictionary, 
 						 const gchar *encoding,
-						 gint  misspelled_color,
+						 GdkRGBA misspelled_color,
 						 gboolean check_while_typing,
 						 gboolean recheck_when_changing_dict,
 						 gboolean use_alternate,  
diff --git a/src/gtk/gtkutils.c b/src/gtk/gtkutils.c
index efed2d2..d5d579a 100644
--- a/src/gtk/gtkutils.c
+++ b/src/gtk/gtkutils.c
@@ -98,27 +98,6 @@ void gtkut_widget_set_small_font_size(GtkWidget *widget)
 	}
 }
 
-void gtkut_convert_int_to_gdk_color(gint rgbvalue, GdkColor *color)
-{
-	cm_return_if_fail(color != NULL);
-
-	color->pixel = 0L;
-	color->red   = (int) (((gdouble)((rgbvalue & 0xff0000) >> 16) / 255.0) * 65535.0);
-	color->green = (int) (((gdouble)((rgbvalue & 0x00ff00) >>  8) / 255.0) * 65535.0);
-	color->blue  = (int) (((gdouble) (rgbvalue & 0x0000ff)        / 255.0) * 65535.0);
-}
-
-#define CL(x)	(((gulong) (x) >> (gulong) 8) & 0xFFUL)
-#define RGB_FROM_GDK_COLOR(c) \
-	((CL(c->red)   << (gulong) 16) | \
-	 (CL(c->green) << (gulong)  8) | \
-	 (CL(c->blue)))
-
-gint gtkut_convert_gdk_color_to_int(GdkColor *color)
-{
-	return RGB_FROM_GDK_COLOR(color);
-}
-
 void gtkut_stock_button_add_help(GtkWidget *bbox, GtkWidget **help_btn)
 {
 	cm_return_if_fail(bbox != NULL);
@@ -851,12 +830,12 @@ GtkWidget *gtkut_account_menu_new(GList			*ac_list,
 	return optmenu;
 }
 
-void gtkut_set_widget_bgcolor_rgb(GtkWidget *widget, guint rgbvalue)
+void gtkut_set_widget_bgcolor_rgb(GtkWidget *widget, GdkRGBA rgba)
 {
 	GtkStyle *newstyle;
 	GdkColor gdk_color;
 
-	gtkut_convert_int_to_gdk_color(rgbvalue, &gdk_color);
+	GTKUT_GDKRGBA_TO_GDKCOLOR(rgba, gdk_color);
 	newstyle = gtk_style_copy(gtk_widget_get_default_style());
 	newstyle->bg[GTK_STATE_NORMAL]   = gdk_color;
 	newstyle->bg[GTK_STATE_PRELIGHT] = gdk_color;
@@ -1233,10 +1212,8 @@ GtkWidget *gtkut_get_link_btn(GtkWidget *window, const gchar *url, const gchar *
 	if (!url)
 		return NULL;
 
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_URI],
-					       &uri_color[0]);
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_URI],
-					       &uri_color[1]);
+	GTKUT_GDKRGBA_TO_GDKCOLOR(prefs_common.color[COL_URI], uri_color[0])
+	GTKUT_GDKRGBA_TO_GDKCOLOR(prefs_common.color[COL_URI], uri_color[1])
 
 	btn = gtk_button_new_with_label(label?label:url);
 	gtk_button_set_relief(GTK_BUTTON(btn), GTK_RELIEF_NONE);
@@ -2143,3 +2120,16 @@ void gtk_calendar_select_today(GtkCalendar *calendar)
 	gtk_calendar_select_day(calendar, lt->tm_mday);
 	gtk_calendar_select_month(calendar, lt->tm_mon, lt->tm_year + 1900);
 }
+
+
+#define RGBA_ELEMENT_TO_BYTE(x) (int)((gdouble)x * 65535 / 255)
+gchar *gtkut_gdk_rgba_to_string(GdkRGBA *rgba)
+{
+	gchar *str = g_strdup_printf("#%02x%02x%02x",
+			RGBA_ELEMENT_TO_BYTE(rgba->red),
+			RGBA_ELEMENT_TO_BYTE(rgba->green),
+			RGBA_ELEMENT_TO_BYTE(rgba->blue));
+
+	return str;
+}
+#undef RGBA_ELEMENT_TO_BYTE
diff --git a/src/gtk/gtkutils.h b/src/gtk/gtkutils.h
index 6018019..38ffe95 100644
--- a/src/gtk/gtkutils.h
+++ b/src/gtk/gtkutils.h
@@ -59,14 +59,33 @@
 #define GTKUT_COLOR_BUTTON() \
 	gtk_button_new_with_label("\x20\xE2\x80\x83\x20")
 
+/* Set "color" to the same color as "rgba" */
+#define GTKUT_GDKRGBA_TO_GDKCOLOR(rgba, color) { \
+	color.pixel = 0; \
+	color.red   = (guint16)(rgba.red * 65535); \
+	color.green = (guint16)(rgba.green * 65535); \
+	color.blue  = (guint16)(rgba.blue * 65535); \
+}
+
+/* Set "rgba" to the same color as "color" */
+#define GTKUT_GDKCOLOR_TO_GDKRGBA(color, rgba) { \
+	rgba.red   = (gdouble)color.red / 65535; \
+	rgba.green = (gdouble)color.green / 65535; \
+	rgba.blue  = (gdouble)color.blue / 65535; \
+	rgba.alpha = 1.0; \
+}
+
+/* Since GDK's gdk_rgba_to_string() produces a string
+ * representation unsuitable for us, we have to have
+ * our own function to produce a "#rrggbb" string from
+ * a GdkRGBA.
+ * The returned string has to be freed by the caller. */
+gchar *gtkut_gdk_rgba_to_string(GdkRGBA *rgba);
+
 gboolean gtkut_get_font_size		(GtkWidget	*widget,
 					 gint		*width,
 					 gint		*height);
 
-void gtkut_convert_int_to_gdk_color	(gint		 rgbvalue,
-					 GdkColor	*color);
-gint gtkut_convert_gdk_color_to_int	(GdkColor 	*color);
-
 void gtkut_stock_button_add_help(GtkWidget *bbox, GtkWidget **help_btn);
 
 void gtkut_stock_button_set_create_with_help(GtkWidget **bbox,
@@ -145,7 +164,7 @@ GtkWidget *gtkut_account_menu_new	(GList			*ac_list,
 					 gpointer		 data);
 
 void gtkut_set_widget_bgcolor_rgb	(GtkWidget 	*widget,
-					 guint 		 rgbvalue);
+					 GdkRGBA 		 rgbvalue);
 
 void gtkut_widget_set_small_font_size(GtkWidget *widget);
 GtkWidget *gtkut_get_focused_child	(GtkContainer 	*parent);
diff --git a/src/gtk/logwindow.c b/src/gtk/logwindow.c
index 47ff1c8..bf43704 100644
--- a/src/gtk/logwindow.c
+++ b/src/gtk/logwindow.c
@@ -156,75 +156,40 @@ LogWindow *log_window_create(LogInstance instance)
 void log_window_init(LogWindow *logwin)
 {
 	GtkTextBuffer *buffer;
-#if !GTK_CHECK_VERSION(3, 0, 0)
-	GdkColormap *colormap;
-	gboolean success[LOG_COLORS];
-#endif
-	GdkColor color[LOG_COLORS];
-	gint i;
-
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_LOG_MSG], &color[0]);
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_LOG_WARN], &color[1]);
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_LOG_ERROR], &color[2]);
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_LOG_IN], &color[3]);
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_LOG_OUT], &color[4]);
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_LOG_STATUS_OK], &color[5]);
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_LOG_STATUS_NOK], &color[6]);
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_LOG_STATUS_SKIP], &color[7]);
-
-	logwin->msg_color = color[0];
-	logwin->warn_color = color[1];
-	logwin->error_color = color[2];
-	logwin->in_color = color[3];
-	logwin->out_color = color[4];
-	logwin->status_ok_color = color[5];
-	logwin->status_nok_color = color[6];
-	logwin->status_skip_color = color[7];
-
-#if !GTK_CHECK_VERSION(3, 0, 0)
-	colormap = gdk_drawable_get_colormap(gtk_widget_get_window(logwin->window));
-	gdk_colormap_alloc_colors(colormap, color, LOG_COLORS, FALSE, TRUE, success);
-
-	for (i = 0; i < LOG_COLORS; i++) {
-		if (success[i] == FALSE) {
-			GtkStyle *style;
-
-			g_warning("LogWindow: color allocation failed");
-			style = gtk_widget_get_style(logwin->window);
-			logwin->msg_color = logwin->warn_color =
-					logwin->error_color = logwin->in_color =
-					logwin->out_color = logwin->status_ok_color =
-					logwin->status_nok_color = logwin->status_skip_color =
-					style->black;
-			break;
-		}
-	}
-#endif
+
+	logwin->msg_color = &prefs_common.color[COL_LOG_MSG];
+	logwin->warn_color = &prefs_common.color[COL_LOG_WARN];
+	logwin->error_color = &prefs_common.color[COL_LOG_ERROR];
+	logwin->in_color = &prefs_common.color[COL_LOG_IN];
+	logwin->out_color = &prefs_common.color[COL_LOG_OUT];
+	logwin->status_ok_color = &prefs_common.color[COL_LOG_STATUS_OK];
+	logwin->status_nok_color = &prefs_common.color[COL_LOG_STATUS_NOK];
+	logwin->status_skip_color = &prefs_common.color[COL_LOG_STATUS_SKIP];
 
 	buffer = logwin->buffer;
 	gtk_text_buffer_create_tag(buffer, "message",
-				   "foreground-gdk", &logwin->msg_color,
+				   "foreground-rgba", logwin->msg_color,
 				   NULL);
 	gtk_text_buffer_create_tag(buffer, "warn",
-				   "foreground-gdk", &logwin->warn_color,
+				   "foreground-rgba", logwin->warn_color,
 				   NULL);
 	logwin->error_tag = gtk_text_buffer_create_tag(buffer, "error",
-				   "foreground-gdk", &logwin->error_color,
+				   "foreground-rgba", logwin->error_color,
 				   NULL);
 	gtk_text_buffer_create_tag(buffer, "input",
-				   "foreground-gdk", &logwin->in_color,
+				   "foreground-rgba", logwin->in_color,
 				   NULL);
 	gtk_text_buffer_create_tag(buffer, "output",
-				   "foreground-gdk", &logwin->out_color,
+				   "foreground-rgba", logwin->out_color,
 				   NULL);
 	gtk_text_buffer_create_tag(buffer, "status_ok",
-				   "foreground-gdk", &logwin->status_ok_color,
+				   "foreground-rgba", logwin->status_ok_color,
 				   NULL);
 	gtk_text_buffer_create_tag(buffer, "status_nok",
-				   "foreground-gdk", &logwin->status_nok_color,
+				   "foreground-rgba", logwin->status_nok_color,
 				   NULL);
 	gtk_text_buffer_create_tag(buffer, "status_skip",
-				   "foreground-gdk", &logwin->status_skip_color,
+				   "foreground-rgba", logwin->status_skip_color,
 				   NULL);
 }
 
diff --git a/src/gtk/logwindow.h b/src/gtk/logwindow.h
index f47cb2f..7c83b4a 100644
--- a/src/gtk/logwindow.h
+++ b/src/gtk/logwindow.h
@@ -33,14 +33,14 @@ struct _LogWindow
 	GtkWidget *scrolledwin;
 	GtkWidget *text;
 
-	GdkColor msg_color;
-	GdkColor warn_color;
-	GdkColor error_color;
-	GdkColor in_color;
-	GdkColor out_color;
-	GdkColor status_ok_color;
-	GdkColor status_nok_color;
-	GdkColor status_skip_color;
+	GdkRGBA *msg_color;
+	GdkRGBA *warn_color;
+	GdkRGBA *error_color;
+	GdkRGBA *in_color;
+	GdkRGBA *out_color;
+	GdkRGBA *status_ok_color;
+	GdkRGBA *status_nok_color;
+	GdkRGBA *status_skip_color;
 
 	gboolean clip;
 	guint	 clip_length;
diff --git a/src/gtk/quicksearch.c b/src/gtk/quicksearch.c
index 5b90615..10700f1 100644
--- a/src/gtk/quicksearch.c
+++ b/src/gtk/quicksearch.c
@@ -944,14 +944,14 @@ QuickSearch *quicksearch_new()
 	
 	update_extended_buttons(quicksearch);
 
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_QS_ACTIVE_BG],
-					   &qs_active_bgcolor);
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_QS_ACTIVE],
-					   &qs_active_color);
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_QS_ERROR_BG],
-					   &qs_error_bgcolor);
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_QS_ERROR],
-					   &qs_error_color);
+	GTKUT_GDKRGBA_TO_GDKCOLOR(prefs_common.color[COL_QS_ACTIVE_BG],
+					   qs_active_bgcolor);
+	GTKUT_GDKRGBA_TO_GDKCOLOR(prefs_common.color[COL_QS_ACTIVE],
+					   qs_active_color);
+	GTKUT_GDKRGBA_TO_GDKCOLOR(prefs_common.color[COL_QS_ERROR_BG],
+					   qs_error_bgcolor);
+	GTKUT_GDKRGBA_TO_GDKCOLOR(prefs_common.color[COL_QS_ERROR],
+					   qs_error_color);
 
 	select_correct_combobox_menuitem(quicksearch);
 
diff --git a/src/gtk/spell_entry.c b/src/gtk/spell_entry.c
index 07d4be6..98eaccc 100644
--- a/src/gtk/spell_entry.c
+++ b/src/gtk/spell_entry.c
@@ -362,33 +362,17 @@ static void entry_strsplit_utf8(GtkEntry *entry, gchar ***set, gint **starts, gi
 
 static void insert_misspelled_marker(ClawsSpellEntry *entry, guint start, guint end)
 {
-	guint16 red   = (guint16) (((gdouble)((prefs_common.color[COL_MISSPELLED] &
-					0xff0000) >> 16) / 255.0) * 65535.0);
-	guint16 green = (guint16) (((gdouble)((prefs_common.color[COL_MISSPELLED] &
-					0x00ff00) >> 8) / 255.0) * 65535.0);
-	guint16 blue  = (guint16) (((gdouble) (prefs_common.color[COL_MISSPELLED] &
-					0x0000ff) / 255.0) * 65535.0);
-	PangoAttribute *fcolor, *ucolor, *unline;
+	GdkRGBA *rgba = &prefs_common.color[COL_MISSPELLED];
+	guint16 red   = (guint16)(rgba->red * 65535);
+	guint16 green = (guint16)(rgba->green * 65535);
+	guint16 blue  = (guint16)(rgba->blue * 65535);
+	PangoAttribute *fcolor;
 	
-	if(prefs_common.color[COL_MISSPELLED] != 0) {
-		fcolor = pango_attr_foreground_new(red, green, blue);
-		fcolor->start_index = start;
-		fcolor->end_index = end;
+	fcolor = pango_attr_foreground_new(red, green, blue);
+	fcolor->start_index = start;
+	fcolor->end_index = end;
 		
-		pango_attr_list_insert(entry->priv->attr_list, fcolor);
-	} else {
-		ucolor = pango_attr_underline_color_new (65535, 0, 0);
-		unline = pango_attr_underline_new (PANGO_UNDERLINE_ERROR);
-
-		ucolor->start_index = start;
-		unline->start_index = start;
-
-		ucolor->end_index = end;
-		unline->end_index = end;
-
-		pango_attr_list_insert (entry->priv->attr_list, ucolor);
-		pango_attr_list_insert (entry->priv->attr_list, unline);
-	}
+	pango_attr_list_insert(entry->priv->attr_list, fcolor);
 }
 
 static gboolean check_word(ClawsSpellEntry *entry, int start, int end)
diff --git a/src/mainwindow.c b/src/mainwindow.c
index 1e7ae30..5f46043 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -1432,13 +1432,7 @@ MainWindow *main_window_create()
 	FolderView *folderview;
 	SummaryView *summaryview;
 	MessageView *messageview;
-#if !GTK_CHECK_VERSION(3, 0, 0)
-	GdkColormap *colormap;
-	gboolean success[4];
-#endif
-	GdkColor color[4];
 	GtkWidget *ac_menu;
-	gint i;
 
 	static GdkGeometry geometry;
 
@@ -2082,25 +2076,8 @@ MainWindow *main_window_create()
 	summaryview->color_dim.red = summaryview->color_dim.green =
 		summaryview->color_dim.blue = COLOR_DIM;
 
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_NEW],
-				       &folderview->color_new);
-
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_TGT_FOLDER],
-				       &folderview->color_op);
-
-	color[0] = summaryview->color_marked;
-	color[1] = summaryview->color_dim;
-	color[2] = folderview->color_new;
-	color[3] = folderview->color_op;
-
-#if !GTK_CHECK_VERSION(3, 0, 0)
-	colormap = gdk_drawable_get_colormap(gtk_widget_get_window(window));
-	gdk_colormap_alloc_colors(colormap, color, 4, FALSE, TRUE, success);
-	for (i = 0; i < 4; i++) {
-		if (success[i] == FALSE)
-			g_warning("MainWindow: color allocation %d failed", i);
-	}
-#endif
+	folderview->color_new = prefs_common.color[COL_NEW];
+	folderview->color_op = prefs_common.color[COL_TGT_FOLDER];
 
 	debug_print("done.\n");
 
diff --git a/src/plugins/notification/notification_banner.c b/src/plugins/notification/notification_banner.c
index 436207b..292a04e 100644
--- a/src/plugins/notification/notification_banner.c
+++ b/src/plugins/notification/notification_banner.c
@@ -179,7 +179,7 @@ static void notification_banner_create(GSList *msg_list)
 	banner.viewport = viewport;
 	gtk_container_add(GTK_CONTAINER(banner.scrolled_win),viewport);
 	if(notify_config.banner_enable_colors) {
-		gtkut_convert_int_to_gdk_color(notify_config.banner_color_bg,&bg);
+		GTKUT_GDKRGBA_TO_GDKCOLOR(notify_config.banner_color_bg,bg);
 		gtk_widget_modify_bg(viewport,GTK_STATE_NORMAL,&bg);
 	}
 
@@ -297,8 +297,8 @@ static GtkWidget* create_entrybox(GSList *msg_list)
   list_length = g_slist_length(msg_list);
 
   if(notify_config.banner_enable_colors) {
-    gtkut_convert_int_to_gdk_color(notify_config.banner_color_bg,&bg);
-		gtkut_convert_int_to_gdk_color(notify_config.banner_color_fg,&fg);
+    GTKUT_GDKRGBA_TO_GDKCOLOR(notify_config.banner_color_bg,bg);
+		GTKUT_GDKRGBA_TO_GDKCOLOR(notify_config.banner_color_fg,fg);
   }
 
   if(banner.entries) {
diff --git a/src/plugins/notification/notification_popup.c b/src/plugins/notification/notification_popup.c
index 35ca9a6..0f26a98 100644
--- a/src/plugins/notification/notification_popup.c
+++ b/src/plugins/notification/notification_popup.c
@@ -629,8 +629,8 @@ static gboolean notification_popup_create(MsgInfo *msginfo)
 
   /* Color */
   if(notify_config.popup_enable_colors) {
-    gtkut_convert_int_to_gdk_color(notify_config.popup_color_bg,&bg);
-    gtkut_convert_int_to_gdk_color(notify_config.popup_color_fg,&fg);
+    GTKUT_GDKRGBA_TO_GDKCOLOR(notify_config.popup_color_bg,bg);
+    GTKUT_GDKRGBA_TO_GDKCOLOR(notify_config.popup_color_fg,fg);
     gtk_widget_modify_bg(ppopup->event_box,GTK_STATE_NORMAL,&bg);
     gtk_widget_modify_fg(ppopup->label1,GTK_STATE_NORMAL,&fg);
     gtk_widget_modify_fg(ppopup->label2,GTK_STATE_NORMAL,&fg);
diff --git a/src/plugins/notification/notification_prefs.c b/src/plugins/notification/notification_prefs.c
index 6fe06e6..1664100 100644
--- a/src/plugins/notification/notification_prefs.c
+++ b/src/plugins/notification/notification_prefs.c
@@ -750,8 +750,6 @@ static void notify_create_banner_page(PrefsPage *page, GtkWindow *window,
 	GtkWidget *label;
 	GtkWidget *slider;
 	GtkWidget *color_sel;
-	GdkColor bg;
-	GdkColor fg;
 
 	pvbox = gtk_vbox_new(FALSE, 20);
 	gtk_container_set_border_width(GTK_CONTAINER(pvbox), 10);
@@ -918,8 +916,8 @@ static void notify_create_banner_page(PrefsPage *page, GtkWindow *window,
 	gtk_box_pack_start(GTK_BOX(chbox), label, FALSE, FALSE, 0);
 	gtk_widget_show(label);
 	color_sel = gtk_color_button_new();
-	gtkut_convert_int_to_gdk_color(notify_config.banner_color_fg,&fg);
-	gtk_color_button_set_color(GTK_COLOR_BUTTON(color_sel),&fg);
+	gtk_color_button_set_rgba(GTK_COLOR_BUTTON(color_sel),
+			&notify_config.banner_color_fg);
 	gtk_color_button_set_title(GTK_COLOR_BUTTON(color_sel),_("Foreground color"));
 	gtk_box_pack_start(GTK_BOX(chbox), color_sel, FALSE, FALSE, 0);
 	gtk_widget_show(color_sel);
@@ -929,8 +927,8 @@ static void notify_create_banner_page(PrefsPage *page, GtkWindow *window,
 	gtk_box_pack_start(GTK_BOX(chbox), label, FALSE, FALSE, 0);
 	gtk_widget_show(label);
 	color_sel = gtk_color_button_new();
-	gtkut_convert_int_to_gdk_color(notify_config.banner_color_bg,&bg);
-	gtk_color_button_set_color(GTK_COLOR_BUTTON(color_sel),&bg);
+	gtk_color_button_set_rgba(GTK_COLOR_BUTTON(color_sel),
+			&notify_config.banner_color_bg);
 	gtk_color_button_set_title(GTK_COLOR_BUTTON(color_sel), _("Background color"));
 	gtk_box_pack_start(GTK_BOX(chbox), color_sel, FALSE, FALSE, 0);
 	gtk_widget_show(color_sel);
@@ -953,7 +951,6 @@ static void notify_destroy_banner_page(PrefsPage *page)
 static void notify_save_banner(PrefsPage *page)
 {
 	gdouble range_val;
-	GdkColor color;
 
 	notify_config.banner_show =
 		gtk_combo_box_get_active(GTK_COMBO_BOX(banner_page.banner_show));
@@ -980,12 +977,10 @@ static void notify_save_banner(PrefsPage *page)
 	(GTK_TOGGLE_BUTTON(banner_page.banner_enable_colors));
 
 	/* Color dialogs are a bit more complicated */
-	gtk_color_button_get_color(GTK_COLOR_BUTTON(banner_page.banner_color_fg),
-			&color);
-	notify_config.banner_color_fg = conv_color_to_int(&color);
-	gtk_color_button_get_color(GTK_COLOR_BUTTON(banner_page.banner_color_bg),
-			&color);
-	notify_config.banner_color_bg = conv_color_to_int(&color);
+	gtk_color_button_get_rgba(GTK_COLOR_BUTTON(banner_page.banner_color_fg),
+			&notify_config.banner_color_fg);
+	gtk_color_button_get_rgba(GTK_COLOR_BUTTON(banner_page.banner_color_bg),
+			&notify_config.banner_color_bg);
 
 	notification_banner_destroy();
 	notification_update_banner();
@@ -1033,8 +1028,6 @@ static void notify_create_popup_page(PrefsPage *page, GtkWindow *window,
 	GtkWidget *label;
 	GtkWidget *button;
 #ifndef HAVE_LIBNOTIFY
-	GdkColor bg;
-	GdkColor fg;
 	GtkWidget *table;
 	GtkWidget *color_sel;
 #endif /* !HAVE_LIBNOTIFY */
@@ -1137,8 +1130,8 @@ static void notify_create_popup_page(PrefsPage *page, GtkWindow *window,
 	gtk_table_attach_defaults(GTK_TABLE(table),label,0,1,0,1);
 	gtk_widget_show(label);
 	color_sel = gtk_color_button_new();
-	gtkut_convert_int_to_gdk_color(notify_config.popup_color_fg,&fg);
-	gtk_color_button_set_color(GTK_COLOR_BUTTON(color_sel),&fg);
+	gtk_color_button_set_rgba(GTK_COLOR_BUTTON(color_sel),
+			&notify_config.popup_color_fg);
 	gtk_color_button_set_title(GTK_COLOR_BUTTON(color_sel),_("Foreground color"));
 	gtk_table_attach_defaults(GTK_TABLE(table),color_sel,1,2,0,1);
 	gtk_widget_show(color_sel);
@@ -1148,8 +1141,8 @@ static void notify_create_popup_page(PrefsPage *page, GtkWindow *window,
 	gtk_table_attach_defaults(GTK_TABLE(table),label,0,1,1,2);
 	gtk_widget_show(label);
 	color_sel = gtk_color_button_new();
-	gtkut_convert_int_to_gdk_color(notify_config.popup_color_bg,&bg);
-	gtk_color_button_set_color(GTK_COLOR_BUTTON(color_sel),&bg);
+	gtk_color_button_set_rgba(GTK_COLOR_BUTTON(color_sel),
+			&notify_config.popup_color_bg);
 	gtk_color_button_set_title(GTK_COLOR_BUTTON(color_sel),_("Background color"));
 	gtk_table_attach_defaults(GTK_TABLE(table),color_sel,1,2,1,2);
 	gtk_widget_show(color_sel);
@@ -1187,10 +1180,6 @@ static void notify_save_popup(PrefsPage *page)
 {
 	gdouble timeout;
 
-#ifndef HAVE_LIBNOTIFY
-	GdkColor color;
-#endif /* !HAVE_LIBNOTIFY */
-
 	notify_config.popup_show =
 	gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(popup_page.popup_show));
 	timeout =
@@ -1208,12 +1197,10 @@ static void notify_save_popup(PrefsPage *page)
 	(GTK_TOGGLE_BUTTON(popup_page.popup_enable_colors));
 
 	/* Color dialogs are a bit more complicated */
-	gtk_color_button_get_color(GTK_COLOR_BUTTON(popup_page.popup_color_fg),
-			&color);
-	notify_config.popup_color_fg = conv_color_to_int(&color);
-	gtk_color_button_get_color(GTK_COLOR_BUTTON(popup_page.popup_color_bg),
-			&color);
-	notify_config.popup_color_bg = conv_color_to_int(&color);
+	gtk_color_button_get_rgba(GTK_COLOR_BUTTON(popup_page.popup_color_fg),
+			&notify_config.popup_color_fg);
+	gtk_color_button_get_rgba(GTK_COLOR_BUTTON(popup_page.popup_color_bg),
+			&notify_config.popup_color_bg);
 #else /* HAVE_LIBNOTIFY */
 	notify_config.popup_display_folder_name =
 	gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(popup_page.popup_display_folder_name));
diff --git a/src/plugins/notification/notification_prefs.h b/src/plugins/notification/notification_prefs.h
index 2234de0..cd7cdb4 100644
--- a/src/plugins/notification/notification_prefs.h
+++ b/src/plugins/notification/notification_prefs.h
@@ -57,8 +57,8 @@ typedef struct {
   gint             banner_root_y;
   gboolean         banner_folder_specific;
   gboolean         banner_enable_colors;
-  gulong           banner_color_bg;
-  gulong           banner_color_fg;
+  GdkRGBA          banner_color_bg;
+  GdkRGBA          banner_color_fg;
 	gint             banner_width;
 #endif
 #ifdef NOTIFICATION_POPUP
@@ -71,8 +71,8 @@ typedef struct {
   gint             popup_root_y;
   gint             popup_width;
   gboolean         popup_enable_colors;
-  gulong           popup_color_bg;
-  gulong           popup_color_fg;
+  GdkRGBA          popup_color_bg;
+  GdkRGBA          popup_color_fg;
 #else /* HAVE_LIBNOTIFY */
   gboolean         popup_display_folder_name;
 #endif /* HAVE_LIBNOTIFY */
diff --git a/src/plugins/vcalendar/vcalendar.c b/src/plugins/vcalendar/vcalendar.c
index bfe294d..e8c3d66 100644
--- a/src/plugins/vcalendar/vcalendar.c
+++ b/src/plugins/vcalendar/vcalendar.c
@@ -60,11 +60,8 @@ MimeViewerFactory vcal_viewer_factory;
 
 static void create_meeting_from_message_cb_ui(GtkAction *action, gpointer data);
 
-static GdkColor uri_color = {
-	(gulong)0,
-	(gushort)0,
-	(gushort)0,
-	(gushort)0
+static GdkRGBA uri_color = {
+	0, 0, 0, 1
 };
 
 struct _VCalViewer
@@ -1346,8 +1343,7 @@ void vcalendar_init(void)
 				(GSourceFunc)vcal_webcal_check, 
 				(gpointer)NULL);
 	if (prefs_common_get_prefs()->enable_color) {
-		gtkut_convert_int_to_gdk_color(prefs_common_get_prefs()->color[COL_URI],
-				       &uri_color);
+		uri_color = prefs_common_get_prefs()->color[COL_URI];
 	}
 
 	gtk_action_group_add_actions(mainwin->action_group, vcalendar_main_menu,
diff --git a/src/prefs_account.c b/src/prefs_account.c
index f530412..7adcc48 100644
--- a/src/prefs_account.c
+++ b/src/prefs_account.c
@@ -5421,38 +5421,24 @@ static void prefs_account_showpwd_checkbtn_toggled(GtkToggleButton *button,
 	gtk_entry_set_visibility(GTK_ENTRY(entry), active);
 }
 
+#define CL(x) ((gdouble)x / 65535)
+
 static void prefs_account_entry_changed_newline_check_cb(GtkWidget *entry,
 		gpointer user_data)
 {
-#if !GTK_CHECK_VERSION(3, 0, 0)
-	static GdkColor red;
-	static gboolean colors_initialised = FALSE;
-#else
 	static GdkColor red = { (guint32)0, (guint16)0xff, (guint16)0x70, (guint16)0x70 };
-#endif
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
 	if (strchr(gtk_entry_get_text(GTK_ENTRY(entry)), '\n') != NULL) {
 		/* Entry contains a newline, light it up. */
 		debug_print("found newline in string, painting entry red\n");
-		if (!colors_initialised) {
-			if (!gdk_color_parse("#ff7070", &red)) {
-				g_warning("color parse failed: red");
-				return;
-			}
-			colors_initialised = gdk_colormap_alloc_color(
-					gdk_colormap_get_system(), &red, FALSE, TRUE);
-		}
-
-		if (colors_initialised) {
-			gtk_widget_modify_base(entry, GTK_STATE_NORMAL, &red);
-		}
+		gtk_widget_modify_base(entry, GTK_STATE_NORMAL, &red);
 	} else {
 		gtk_widget_modify_base(entry, GTK_STATE_NORMAL, NULL);
 	}
-#endif
 }
 
+#undef CL
+
 static void prefs_account_filter_on_recv_toggled(GtkToggleButton *button,
 					  gpointer user_data)
 {
diff --git a/src/prefs_common.h b/src/prefs_common.h
index d53db9a..cdefcf2 100644
--- a/src/prefs_common.h
+++ b/src/prefs_common.h
@@ -240,7 +240,7 @@ struct _PrefsCommon
 	ColorlabelPrefs custom_colorlabel[COLORLABELS];
 
 	/* program colors */
-	gulong color[COL_LAST_COLOR_INDEX];
+	GdkRGBA color[COL_LAST_COLOR_INDEX];
 
 	/* image viewer */
 	gboolean display_img;
diff --git a/src/prefs_filtering_action.c b/src/prefs_filtering_action.c
index e0744bf..37b2121 100644
--- a/src/prefs_filtering_action.c
+++ b/src/prefs_filtering_action.c
@@ -1516,7 +1516,6 @@ static gboolean prefs_filtering_actions_selected
 	gint list_id;
 	GtkTreeIter iter;
 	gboolean is_valid;
-	GtkWidget *menu;
 
 	if (currently_selected)
 		return TRUE;
diff --git a/src/prefs_folder_item.c b/src/prefs_folder_item.c
index f04f908..c83bfbf 100644
--- a/src/prefs_folder_item.c
+++ b/src/prefs_folder_item.c
@@ -102,7 +102,7 @@ struct _FolderItemGeneralPage
 	GtkWidget *offlinesync_rec_checkbtn;
 	GtkWidget *promote_html_part_rec_checkbtn;
 
-	gint	   folder_color;
+	GdkRGBA folder_color;
 };
 
 struct _FolderItemComposePage
@@ -719,11 +719,11 @@ static void general_save_folder_prefs(FolderItem *folder, FolderItemGeneralPage
 	}
 
 	if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->folder_color_rec_checkbtn))) {
-		int old_color = prefs->color;
+		GdkRGBA old_color = prefs->color;
 		prefs->color = page->folder_color;
 	
 		/* update folder view */
-		if (prefs->color != old_color)
+		if (!gdk_rgba_equal(&prefs->color, &old_color))
 			folder_item_update(folder, F_ITEM_UPDATE_MSGCNT);
 	}
 
@@ -1761,7 +1761,7 @@ static gint prefs_folder_item_chmod_mode(gchar *folder_chmod)
 static void folder_color_set_dialog(GtkWidget *widget, gpointer data)
 {
 	FolderItemGeneralPage *page = (FolderItemGeneralPage *) data;
-	gint rgbcolor;
+	GdkRGBA rgbcolor;
 
 	rgbcolor = colorsel_select_color_rgb(_("Pick color for folder"), 
 					     page->folder_color);
@@ -1817,12 +1817,7 @@ static regex_t *summary_compile_simplify_regexp(gchar *simplify_subject_regexp)
 
 static void folder_regexp_test_cb(GtkWidget *widget, gpointer data)
 {
-#if !GTK_CHECK_VERSION(3, 0, 0)
-	static GdkColor red;
-	static gboolean colors_initialised = FALSE;
-#else
-	static GdkColor red = { (guint32)0, (guint16)0xff, (guint16)0x70, (guint16)0x70 };
-#endif
+	GdkColor red = { (guint32)0, (guint16)0xff, (guint16)0x70, (guint16)0x70 };
 	static gchar buf[BUFFSIZE];
 	FolderItemGeneralPage *page = (FolderItemGeneralPage *)data;
 	gchar *test_string, *regexp;
@@ -1848,23 +1843,10 @@ static void folder_regexp_test_cb(GtkWidget *widget, gpointer data)
 		return;
 	}
 
-#if !GTK_CHECK_VERSION(3, 0, 0)
-	if (!colors_initialised) {
-		if (!gdk_color_parse("#ff7070", &red)) {
-	        g_warning("color parse failed: red");
-					return;
-		}
-		colors_initialised = gdk_colormap_alloc_color(
-				gdk_colormap_get_system(), &red, FALSE, TRUE);
-	}
-#endif
-
 	preg = summary_compile_simplify_regexp(regexp);
-#if !GTK_CHECK_VERSION(3, 0, 0)
-	if (colors_initialised)
-		gtk_widget_modify_base(page->entry_simplify_subject,
-				GTK_STATE_NORMAL, preg ? NULL : &red);
-#endif
+
+	gtk_widget_modify_base(page->entry_simplify_subject,
+			GTK_STATE_NORMAL, preg ? NULL : &red);
 
 	if (preg != NULL) {
 		string_remove_match(buf, BUFFSIZE, test_string, preg);
diff --git a/src/prefs_gtk.c b/src/prefs_gtk.c
index b39bcbd..3d8a63f 100644
--- a/src/prefs_gtk.c
+++ b/src/prefs_gtk.c
@@ -143,7 +143,7 @@ static void prefs_config_parse_one_line(PrefParam *param, const gchar *buf)
 	gint i;
 	gint name_len;
 	const gchar *value;
-	GdkColor color;
+	GdkRGBA color;
 
 	for (i = 0; param[i].name != NULL; i++) {
 		name_len = strlen(param[i].name);
@@ -197,8 +197,8 @@ static void prefs_config_parse_one_line(PrefParam *param, const gchar *buf)
 				(gushort)atoi(value);
 			break;
 		case P_COLOR:
-			if (gdk_color_parse(value, &color)) {
-				*((gulong *)param[i].data) = RGB_FROM_GDK_COLOR(color); 
+			if (gdk_rgba_parse(&color, value)) {
+				*((GdkRGBA *)param[i].data) = color;
 			}
 			else 
 				/* be compatible and accept ints */
@@ -307,6 +307,7 @@ gint prefs_write_param(PrefParam *param, FILE *fp)
 {
 	gint i;
 	gchar buf[PREFSBUFSIZE] = "";
+	gchar *tmp;
 
 	for (i = 0; param[i].name != NULL; i++) {
 		switch (param[i].type) {
@@ -352,8 +353,9 @@ gint prefs_write_param(PrefParam *param, FILE *fp)
 				   *((gushort *)param[i].data));
 			break;
 		case P_COLOR:
-			g_snprintf(buf, sizeof buf,  "%s=#%6.6lx\n", param[i].name,
-				   *((gulong *) param[i].data));
+			tmp = gtkut_gdk_rgba_to_string((GdkRGBA *)param[i].data);
+			g_snprintf(buf, sizeof buf,  "%s=%s\n", param[i].name, tmp);
+			g_free(tmp);
 			break;
 		default:
 			/* unrecognized, fail */
@@ -375,7 +377,7 @@ gint prefs_write_param(PrefParam *param, FILE *fp)
 void prefs_set_default(PrefParam *param)
 {
 	gint i;
-	GdkColor color;
+	GdkRGBA color;
 
 	cm_return_if_fail(param != NULL);
 
@@ -455,8 +457,8 @@ void prefs_set_default(PrefParam *param)
 				*((gushort *)param[i].data) = 0;
 			break;
 		case P_COLOR:
-			if (param[i].defval != NULL && gdk_color_parse(param[i].defval, &color))
-				*((gulong *)param[i].data) = RGB_FROM_GDK_COLOR(color);
+			if (param[i].defval != NULL && gdk_rgba_parse(&color, param[i].defval))
+				*((GdkRGBA *)param[i].data) = color;
 			else if (param[i].defval)
 				/* be compatible and accept ints */
 				*((gulong *)param[i].data) = strtoul(param[i].defval, 0, 10); 
diff --git a/src/prefs_msg_colors.c b/src/prefs_msg_colors.c
index eb7cf94..352cd07 100644
--- a/src/prefs_msg_colors.c
+++ b/src/prefs_msg_colors.c
@@ -79,7 +79,7 @@ static gboolean quote_colors_set_dialog_key_pressed	(GtkWidget	*widget,
 						 GdkEventKey	*event,
 						 gpointer	 data);
 static void set_button_bg_color			(GtkWidget	*widget,
-						 gint		 color);
+						 GdkRGBA		 color);
 static void prefs_msg_colors_reset_custom_colors(GtkWidget *widget,
 						 gpointer	 data);
 
@@ -515,7 +515,7 @@ static void quote_color_set_dialog(GtkWidget *widget, gpointer data)
 	gchar *type = (gchar *)data;
 	gchar *title = NULL;
 	GdkColor color;
-	gint rgbvalue = 0;
+	GdkRGBA rgba;
 	GtkColorSelectionDialog *dialog;
 	GtkWidget *button_ok;
 	GtkWidget *button_cancel;
@@ -529,7 +529,7 @@ static void quote_color_set_dialog(GtkWidget *widget, gpointer data)
 			/* TRANSLATORS: 'color %d' refers to the filtering/processing 
 			   rule name and should not be translated */
 			title = g_strdup_printf(C_("Dialog title", "Pick color for 'color %d'"), c+1);
-			rgbvalue = prefs_common.custom_colorlabel[c].color;
+			rgba = prefs_common.custom_colorlabel[c].color;
 			break;
 		}
 	}
@@ -541,7 +541,7 @@ static void quote_color_set_dialog(GtkWidget *widget, gpointer data)
 		ctype -= COLORLABELS;
 		if (ctype < COL_LAST_COLOR_INDEX) {
 			title = g_strdup(color_dialog_title[ctype]);
-			rgbvalue = prefs_common.color[ctype];
+			rgba = prefs_common.color[ctype];
 		} else {
 			g_warning("Unrecognized datatype '%s' in quote_color_set_dialog", type);
 			return;
@@ -568,7 +568,7 @@ static void quote_color_set_dialog(GtkWidget *widget, gpointer data)
 
 	/* preselect the previous color in the color selection dialog */
 
-	gtkut_convert_int_to_gdk_color(rgbvalue, &color);
+	GTKUT_GDKRGBA_TO_GDKCOLOR(rgba, color);
 
 	dialog = GTK_COLOR_SELECTION_DIALOG(color_dialog);
 	gtk_color_selection_set_current_color
@@ -583,19 +583,19 @@ static void quote_colors_set_dialog_ok(GtkWidget *widget, gpointer data)
 		gtk_color_selection_dialog_get_color_selection
 						((GtkColorSelectionDialog *)color_dialog));
 	GdkColor color;
-	gint rgbvalue;
+	GdkRGBA rgba;
 	gchar *type = (gchar *)data;
 	gint c, ctype;
 
 	gtk_color_selection_get_current_color(colorsel, &color);
-	rgbvalue = gtkut_convert_gdk_color_to_int(&color);
+	GTKUT_GDKCOLOR_TO_GDKRGBA(color, rgba);
 
 	ctype = GPOINTER_TO_INT(type);
 	/* custom colors */
 	for (c = 0; c < COLORLABELS; c++) {
 		if (ctype == c) {
-			prefs_common.custom_colorlabel[c].color = rgbvalue;
-			set_button_bg_color(color_buttons.custom_color[c], rgbvalue);
+			prefs_common.custom_colorlabel[c].color = rgba;
+			set_button_bg_color(color_buttons.custom_color[c], rgba);
 			break;
 		}
 	}
@@ -603,8 +603,8 @@ static void quote_colors_set_dialog_ok(GtkWidget *widget, gpointer data)
 	if (c == COLORLABELS) {
 		ctype -= COLORLABELS;
 		if (ctype < COL_LAST_COLOR_INDEX) {
-			prefs_common.color[ctype] = rgbvalue;
-			set_button_bg_color(color_buttons.color[ctype], rgbvalue);
+			prefs_common.color[ctype] = rgba;
+			set_button_bg_color(color_buttons.color[ctype], rgba);
 			if (ctype == COL_TGT_FOLDER) {
 				folderview_set_target_folder_color(prefs_common.color[ctype]);
 			}
@@ -654,12 +654,12 @@ static gboolean quote_colors_set_dialog_key_pressed(GtkWidget *widget,
 	return FALSE;
 }
 
-static void set_button_bg_color(GtkWidget *widget, gint rgbvalue)
+static void set_button_bg_color(GtkWidget *widget, GdkRGBA rgbvalue)
 {
 	GtkStyle *newstyle;
 	GdkColor color;
 
-	gtkut_convert_int_to_gdk_color(rgbvalue, &color);
+	GTKUT_GDKRGBA_TO_GDKCOLOR(rgbvalue, color);
 	newstyle = gtk_style_copy(gtk_widget_get_default_style());
 	newstyle->bg[GTK_STATE_NORMAL]   = color;
 	newstyle->bg[GTK_STATE_PRELIGHT] = color;
@@ -695,26 +695,19 @@ static void prefs_msg_colors_save(PrefsPage *_page)
 
 static void prefs_msg_colors_reset_custom_colors(GtkWidget *widget, gpointer data)
 {
-#define CL(x)		(((gulong) (x) >> (gulong) 8) & 0xFFUL)	
-#define CR(r, g, b)	((CL(r) << (gulong) 16) | \
-			 (CL(g) << (gulong)  8) | \
-			 (CL(b)))
 	MsgColorsPage *page = (MsgColorsPage *) data;
-	GdkColor color;
+	GdkRGBA rgba;
 	gint c;
 
 	for (c = 0; c < COLORLABELS; c++) {
-		color = colorlabel_get_default_color(c);
-		prefs_common.custom_colorlabel[c].color =
-							(gint)CR(color.red, color.green, color.blue);
+		rgba = colorlabel_get_default_color(c);
+		prefs_common.custom_colorlabel[c].color = rgba;
 		set_button_bg_color(color_buttons.custom_color[c],
 							prefs_common.custom_colorlabel[c].color);
 		gtk_entry_set_text(GTK_ENTRY (page->entry_custom_colorlabel[c]),
 							gettext(SAFE_STRING (colorlabel_get_color_default_text(c))));
 	}
 
-#undef CR
-#undef CL
 }
 
 static void prefs_msg_colors_destroy_widget(PrefsPage *_page)
diff --git a/src/prefs_msg_colors.h b/src/prefs_msg_colors.h
index 39a40ce..f3ddac1 100644
--- a/src/prefs_msg_colors.h
+++ b/src/prefs_msg_colors.h
@@ -27,7 +27,7 @@ typedef struct _ColorlabelPrefsWidgets	ColorlabelPrefsWidgets;
 
 struct _ColorlabelPrefs
 {
-	gulong	 color;
+	GdkRGBA color;
 	gchar	*label;
 
 };
diff --git a/src/prefs_spelling.c b/src/prefs_spelling.c
index 8ec3223..efb1e19 100644
--- a/src/prefs_spelling.c
+++ b/src/prefs_spelling.c
@@ -68,14 +68,14 @@ typedef struct _SpellingPage
 	GtkWidget *misspelled_colorbtn;
 	GtkWidget *misspelled_useblack_label;
 
-	gint	   misspell_col;
+	GdkRGBA	   misspell_col;
 } SpellingPage;
 
 static void prefs_spelling_colorsel(GtkWidget *widget,
 				    gpointer data)
 {
 	SpellingPage *spelling = (SpellingPage *) data;
-	gint rgbcolor;
+	GdkRGBA rgbcolor;
 
 	rgbcolor = colorsel_select_color_rgb(_("Pick color for misspelled word"), 
 					     spelling->misspell_col);
diff --git a/src/summaryview.c b/src/summaryview.c
index 5375bc6..78ed887 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -868,6 +868,7 @@ static void summary_set_fonts(SummaryView *summaryview)
 {
 	PangoFontDescription *font_desc;
 	gint size;
+	GdkColor gdk_color;
 
 	font_desc = pango_font_description_from_string(NORMAL_FONT);
 	if (font_desc) {
@@ -894,12 +895,12 @@ static void summary_set_fonts(SummaryView *summaryview)
 				bold_style->font_desc = font_desc;
 			}
 		}
+		GTKUT_GDKRGBA_TO_GDKCOLOR(summaryview->color_marked, gdk_color);
 		bold_marked_style = gtk_style_copy(bold_style);
-		bold_marked_style->text[GTK_STATE_NORMAL] =
-			summaryview->color_marked;
+		bold_marked_style->text[GTK_STATE_NORMAL] = gdk_color;
+		GTKUT_GDKRGBA_TO_GDKCOLOR(summaryview->color_dim, gdk_color);
 		bold_deleted_style = gtk_style_copy(bold_style);
-		bold_deleted_style->text[GTK_STATE_NORMAL] =
-			summaryview->color_dim;
+		bold_deleted_style->text[GTK_STATE_NORMAL] = gdk_color;
 	}
 
 	if (prefs_common.derive_from_normal_font || !SMALL_FONT) {
@@ -3382,7 +3383,7 @@ static inline void summary_set_header(SummaryView *summaryview, gchar *text[],
 	gboolean small_layout = (prefs_common.layout_mode == SMALL_LAYOUT);
 	static const gchar *color_dim_rgb = NULL;
 	if (!color_dim_rgb)
-		color_dim_rgb = gdk_color_to_string(&summaryview->color_dim);
+		color_dim_rgb = gtkut_gdk_rgba_to_string(&summaryview->color_dim);
 	text[col_pos[S_COL_FROM]]   = "";
 	text[col_pos[S_COL_TO]]     = "";
 	text[col_pos[S_COL_SUBJECT]]= "";
@@ -3908,6 +3909,7 @@ static void summary_set_row_marks(SummaryView *summaryview, GtkCMCTreeNode *row)
 	MsgInfo *msginfo;
 	MsgFlags flags;
 	gint *col_pos = summaryview->col_pos;
+	GdkColor gdk_color;
 
 	msginfo = gtk_cmctree_node_get_row_data(ctree, row);
 	if (!msginfo) return;
@@ -3962,8 +3964,9 @@ static void summary_set_row_marks(SummaryView *summaryview, GtkCMCTreeNode *row)
 		else {
 			style = small_deleted_style;
 		}
+		GTKUT_GDKRGBA_TO_GDKCOLOR(summaryview->color_dim, gdk_color);
 			gtk_cmctree_node_set_foreground
-				(ctree, row, &summaryview->color_dim);
+				(ctree, row, &gdk_color);
 	} else if (MSG_IS_MARKED(flags)) {
 		gtk_cmctree_node_set_pixbuf(ctree, row, col_pos[S_COL_MARK],
 					  markxpm);
@@ -3977,16 +3980,16 @@ static void summary_set_row_marks(SummaryView *summaryview, GtkCMCTreeNode *row)
 			else {
 				style = small_marked_style;
 			}
-			gtk_cmctree_node_set_foreground
-				(ctree, row, &summaryview->color_marked);
+			GTKUT_GDKRGBA_TO_GDKCOLOR(summaryview->color_marked, gdk_color);
+			gtk_cmctree_node_set_foreground(ctree, row, &gdk_color);
 		} else {
 			if (style)
 				style = bold_deleted_style;
 			else {
 				style = small_deleted_style;
 			}
-				gtk_cmctree_node_set_foreground
-					(ctree, row, &summaryview->color_dim);
+			GTKUT_GDKRGBA_TO_GDKCOLOR(summaryview->color_dim, gdk_color);
+				gtk_cmctree_node_set_foreground(ctree, row, &gdk_color);
 		}
 	} else if (MSG_IS_COPY(flags)) {
 		gtk_cmctree_node_set_pixbuf(ctree, row, col_pos[S_COL_MARK],
@@ -3996,8 +3999,8 @@ static void summary_set_row_marks(SummaryView *summaryview, GtkCMCTreeNode *row)
 		else {
 			style = small_marked_style;
 		}
-			gtk_cmctree_node_set_foreground
-                        	(ctree, row, &summaryview->color_marked);
+		GTKUT_GDKRGBA_TO_GDKCOLOR(summaryview->color_marked, gdk_color);
+			gtk_cmctree_node_set_foreground(ctree, row, &gdk_color);
 	} else {
 		gtk_cmctree_node_set_text(ctree, row, col_pos[S_COL_MARK], "");
 	}
@@ -5936,6 +5939,7 @@ void summary_set_colorlabel_color(GtkCMCTree *ctree, GtkCMCTreeNode *node,
 				  guint labelcolor)
 {
 	GdkColor color;
+	GdkRGBA rgba;
 	GtkStyle *style, *prev_style, *ctree_style;
 	MsgInfo *msginfo;
 	gint color_index;
@@ -5959,7 +5963,8 @@ void summary_set_colorlabel_color(GtkCMCTree *ctree, GtkCMCTreeNode *node,
 			style = gtk_style_copy(prev_style);
 		else
 			style = gtk_style_copy(ctree_style);
-		color = colorlabel_get_color(color_index);
+		rgba = colorlabel_get_color(color_index);
+		GTKUT_GDKRGBA_TO_GDKCOLOR(rgba, color);
 		style->text[GTK_STATE_NORMAL] = color;
 		/* get the average of label color and selected fg color
 		   for visibility */
diff --git a/src/summaryview.h b/src/summaryview.h
index 5824761..2f6aa10 100644
--- a/src/summaryview.h
+++ b/src/summaryview.h
@@ -120,8 +120,8 @@ struct _SummaryView
 	SummaryColumnState col_state[N_SUMMARY_COLS];
 	gint col_pos[N_SUMMARY_COLS];
 
-	GdkColor color_marked;
-	GdkColor color_dim;
+	GdkRGBA color_marked;
+	GdkRGBA color_dim;
 
 	guint lock_count;
 
diff --git a/src/textview.c b/src/textview.c
index af97418..e5bbfc8 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -71,71 +71,47 @@
 #include "avatars.h"
 #include "file-utils.h"
 
-static GdkColor quote_colors[3] = {
-	{(gulong)0, (gushort)0, (gushort)0, (gushort)0},
-	{(gulong)0, (gushort)0, (gushort)0, (gushort)0},
-	{(gulong)0, (gushort)0, (gushort)0, (gushort)0}
+static GdkRGBA quote_colors[3] = {
+	{0, 0, 0, 1},
+	{0, 0, 0, 1},
+	{0, 0, 0, 1}
 };
 
-static GdkColor quote_bgcolors[3] = {
-	{(gulong)0, (gushort)0, (gushort)0, (gushort)0},
-	{(gulong)0, (gushort)0, (gushort)0, (gushort)0},
-	{(gulong)0, (gushort)0, (gushort)0, (gushort)0}
+static GdkRGBA quote_bgcolors[3] = {
+	{0, 0, 0, 1},
+	{0, 0, 0, 1},
+	{0, 0, 0, 1}
 };
-static GdkColor signature_color = {
-	(gulong)0,
-	(gushort)0x7fff,
-	(gushort)0x7fff,
-	(gushort)0x7fff
+static GdkRGBA signature_color = {
+	0.5, 0.5, 0.5, 1
 };
 	
-static GdkColor uri_color = {
-	(gulong)0,
-	(gushort)0,
-	(gushort)0,
-	(gushort)0
+static GdkRGBA uri_color = {
+	0, 0, 0, 1
 };
 
-static GdkColor emphasis_color = {
-	(gulong)0,
-	(gushort)0,
-	(gushort)0,
-	(gushort)0
+static GdkRGBA emphasis_color = {
+	0, 0, 0, 1
 };
 
-static GdkColor diff_added_color = {
-	(gulong)0,
-	(gushort)0,
-	(gushort)0,
-	(gushort)0
+static GdkRGBA diff_added_color = {
+	0, 0, 0, 1
 };
 
-static GdkColor diff_deleted_color = {
-	(gulong)0,
-	(gushort)0,
-	(gushort)0,
-	(gushort)0
+static GdkRGBA diff_deleted_color = {
+	0, 0, 0, 1
 };
 
-static GdkColor diff_hunk_color = {
-	(gulong)0,
-	(gushort)0,
-	(gushort)0,
-	(gushort)0
+static GdkRGBA diff_hunk_color = {
+	0, 0, 0, 1
 };
 
-static GdkColor tags_bgcolor = {
-	(gulong)0,
-	(gushort)0,
-	(gushort)0,
-	(gushort)0
+static GdkRGBA tags_bgcolor = {
+	0, 0, 0, 1
 };
 
-static GdkColor tags_color = {
-	(gulong)0,
-	(gushort)0,
-	(gushort)0,
-	(gushort)0
+static GdkRGBA tags_color = {
+	0, 0, 0, 1
 };
 
 static GdkCursor *hand_cursor = NULL;
@@ -548,12 +524,12 @@ void textview_init(TextView *textview)
  #define CHANGE_TAG_COLOR(tagname, colorfg, colorbg) { \
 	tag = gtk_text_tag_table_lookup(tags, tagname); \
 	if (tag) \
-		g_object_set(G_OBJECT(tag), "foreground-gdk", colorfg, "paragraph-background-gdk", colorbg, NULL); \
+		g_object_set(G_OBJECT(tag), "foreground-rgba", colorfg, "paragraph-background-rgba", colorbg, NULL); \
  }
 
 static void textview_update_message_colors(TextView *textview)
 {
-	GdkColor black = {0, 0, 0, 0};
+	GdkRGBA black = {0, 0, 0, 1};
 	GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview->text));
 
 	GtkTextTagTable *tags = gtk_text_buffer_get_tag_table(buffer);
@@ -567,32 +543,20 @@ static void textview_update_message_colors(TextView *textview)
 
 	if (prefs_common.enable_color) {
 		/* grab the quote colors, converting from an int to a GdkColor */
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_QUOTE_LEVEL1],
-					       &quote_colors[0]);
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_QUOTE_LEVEL2],
-					       &quote_colors[1]);
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_QUOTE_LEVEL3],
-					       &quote_colors[2]);
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_URI],
-					       &uri_color);
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_SIGNATURE],
-					       &signature_color);
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_EMPHASIS],
-					       &emphasis_color);
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_DIFF_ADDED],
-					       &diff_added_color);
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_DIFF_DELETED],
-					       &diff_deleted_color);
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_DIFF_HUNK],
-					       &diff_hunk_color);
+		quote_colors[0] = prefs_common.color[COL_QUOTE_LEVEL1];
+		quote_colors[1] = prefs_common.color[COL_QUOTE_LEVEL2];
+		quote_colors[2] = prefs_common.color[COL_QUOTE_LEVEL3];
+		uri_color = prefs_common.color[COL_URI];
+		signature_color = prefs_common.color[COL_SIGNATURE];
+		emphasis_color = prefs_common.color[COL_EMPHASIS];
+		diff_added_color = prefs_common.color[COL_DIFF_ADDED];
+		diff_deleted_color = prefs_common.color[COL_DIFF_DELETED];
+		diff_hunk_color = prefs_common.color[COL_DIFF_HUNK];
 	}
 	if (prefs_common.enable_color && prefs_common.enable_bgcolor) {
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_QUOTE_LEVEL1_BG],
-						   &quote_bgcolors[0]);
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_QUOTE_LEVEL2_BG],
-						   &quote_bgcolors[1]);
-		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_QUOTE_LEVEL3_BG],
-						   &quote_bgcolors[2]);
+		quote_bgcolors[0] = prefs_common.color[COL_QUOTE_LEVEL1_BG];
+		quote_bgcolors[1] = prefs_common.color[COL_QUOTE_LEVEL2_BG];
+		quote_bgcolors[2] = prefs_common.color[COL_QUOTE_LEVEL3_BG];
 		CHANGE_TAG_COLOR("quote0", &quote_colors[0], &quote_bgcolors[0]);
 		CHANGE_TAG_COLOR("quote1", &quote_colors[1], &quote_bgcolors[1]);
 		CHANGE_TAG_COLOR("quote2", &quote_colors[2], &quote_bgcolors[2]);
@@ -612,10 +576,8 @@ static void textview_update_message_colors(TextView *textview)
 	CHANGE_TAG_COLOR("diff-del-file", &diff_deleted_color, NULL);
 	CHANGE_TAG_COLOR("diff-hunk", &diff_hunk_color, NULL);
 
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_TAGS_BG],
-					   &tags_bgcolor);
-	gtkut_convert_int_to_gdk_color(prefs_common.color[COL_TAGS],
-					   &tags_color);
+	tags_bgcolor = prefs_common.color[COL_TAGS_BG];
+	tags_color = prefs_common.color[COL_TAGS];
 }
 #undef CHANGE_TAG_COLOR
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list