[Commits] [SCM] claws branch, gtk3, updated. 3.16.0-431-ga630926

ticho at claws-mail.org ticho at claws-mail.org
Sun Oct 28 12:16:01 CET 2018


The branch, gtk3 has been updated
       via  a630926120196aee930c15c0100b027fb4792025 (commit)
       via  04dd31ff09139aba69a7ed926ce56128fd3e8608 (commit)
      from  3380ec271ac263c795d42f53a5076a4366157b03 (commit)

Summary of changes:
 src/compose.c      |   22 +++++++++++-----------
 src/gtk/gtkutils.c |    2 +-
 src/textview.c     |   40 ++++++++++++++++++++--------------------
 3 files changed, 32 insertions(+), 32 deletions(-)


- Log -----------------------------------------------------------------
commit a630926120196aee930c15c0100b027fb4792025
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Sun Oct 28 12:14:45 2018 +0100

    Set correct color properties of GtkTextTag after move to GdkRGBA.

diff --git a/src/compose.c b/src/compose.c
index 5e65255..7537a73 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -854,35 +854,35 @@ static void compose_create_tags(GtkTextView *text, Compose *compose)
 
 	if (prefs_common.enable_color && prefs_common.enable_bgcolor) {
 		compose->quote0_tag = gtk_text_buffer_create_tag(buffer, "quote0",
-					   "foreground-gdk", &quote_color1,
-					   "paragraph-background-gdk", &quote_bgcolor1,
+					   "foreground-rgba", &quote_color1,
+					   "paragraph-background-rgba", &quote_bgcolor1,
 					   NULL);
 		compose->quote1_tag = gtk_text_buffer_create_tag(buffer, "quote1",
-					   "foreground-gdk", &quote_color2,
-					   "paragraph-background-gdk", &quote_bgcolor2,
+					   "foreground-rgba", &quote_color2,
+					   "paragraph-background-rgba", &quote_bgcolor2,
 					   NULL);
 		compose->quote2_tag = gtk_text_buffer_create_tag(buffer, "quote2",
-					   "foreground-gdk", &quote_color3,
-					   "paragraph-background-gdk", &quote_bgcolor3,
+					   "foreground-rgba", &quote_color3,
+					   "paragraph-background-rgba", &quote_bgcolor3,
 					   NULL);
 	} else {
 		compose->quote0_tag = gtk_text_buffer_create_tag(buffer, "quote0",
-					   "foreground-gdk", &quote_color1,
+					   "foreground-rgba", &quote_color1,
 					   NULL);
 		compose->quote1_tag = gtk_text_buffer_create_tag(buffer, "quote1",
-					   "foreground-gdk", &quote_color2,
+					   "foreground-rgba", &quote_color2,
 					   NULL);
 		compose->quote2_tag = gtk_text_buffer_create_tag(buffer, "quote2",
-					   "foreground-gdk", &quote_color3,
+					   "foreground-rgba", &quote_color3,
 					   NULL);
 	}
 	
  	compose->signature_tag = gtk_text_buffer_create_tag(buffer, "signature",
-				   "foreground-gdk", &signature_color,
+				   "foreground-rgba", &signature_color,
 				   NULL);
  	
 	compose->uri_tag = gtk_text_buffer_create_tag(buffer, "link",
-					"foreground-gdk", &uri_color,
+					"foreground-rgba", &uri_color,
 					 NULL);
 	compose->no_wrap_tag = gtk_text_buffer_create_tag(buffer, "no_wrap", NULL);
 	compose->no_join_tag = gtk_text_buffer_create_tag(buffer, "no_join", NULL);
diff --git a/src/textview.c b/src/textview.c
index e5bbfc8..23c68fa 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -430,46 +430,46 @@ static void textview_create_tags(GtkTextView *text, TextView *textview)
 				   "font-desc", font_desc,
 				   "left-margin", 3,
 				   "left-margin-set", TRUE,
-				   "foreground-gdk", &uri_color,
+				   "foreground-rgba", &uri_color,
 				   NULL);
 	g_signal_connect(G_OBJECT(tag), "event",
                          G_CALLBACK(textview_uri_button_pressed), textview);
 	if (prefs_common.enable_bgcolor) {
 		gtk_text_buffer_create_tag(buffer, "quote0",
-				"foreground-gdk", &quote_colors[0],
-				"paragraph-background-gdk", &quote_bgcolors[0],
+				"foreground-rgba", &quote_colors[0],
+				"paragraph-background-rgba", &quote_bgcolors[0],
 				NULL);
 		gtk_text_buffer_create_tag(buffer, "quote1",
-				"foreground-gdk", &quote_colors[1],
-				"paragraph-background-gdk", &quote_bgcolors[1],
+				"foreground-rgba", &quote_colors[1],
+				"paragraph-background-rgba", &quote_bgcolors[1],
 				NULL);
 		gtk_text_buffer_create_tag(buffer, "quote2",
-				"foreground-gdk", &quote_colors[2],
-				"paragraph-background-gdk", &quote_bgcolors[2],
+				"foreground-rgba", &quote_colors[2],
+				"paragraph-background-rgba", &quote_bgcolors[2],
 				NULL);
 	} else {
 		gtk_text_buffer_create_tag(buffer, "quote0",
-				"foreground-gdk", &quote_colors[0],
+				"foreground-rgba", &quote_colors[0],
 				NULL);
 		gtk_text_buffer_create_tag(buffer, "quote1",
-				"foreground-gdk", &quote_colors[1],
+				"foreground-rgba", &quote_colors[1],
 				NULL);
 		gtk_text_buffer_create_tag(buffer, "quote2",
-				"foreground-gdk", &quote_colors[2],
+				"foreground-rgba", &quote_colors[2],
 				NULL);
 	}
 	gtk_text_buffer_create_tag(buffer, "tags",
-			"foreground-gdk", &tags_color,
-			"paragraph-background-gdk", &tags_bgcolor,
+			"foreground-rgba", &tags_color,
+			"paragraph-background-rgba", &tags_bgcolor,
 			NULL);
 	gtk_text_buffer_create_tag(buffer, "emphasis",
-			"foreground-gdk", &emphasis_color,
+			"foreground-rgba", &emphasis_color,
 			NULL);
 	gtk_text_buffer_create_tag(buffer, "signature",
-			"foreground-gdk", &signature_color,
+			"foreground-rgba", &signature_color,
 			NULL);
 	tag = gtk_text_buffer_create_tag(buffer, "link",
-			"foreground-gdk", &uri_color,
+			"foreground-rgba", &uri_color,
 			NULL);
 	qtag = gtk_text_buffer_create_tag(buffer, "qlink",
 			NULL);
@@ -477,21 +477,21 @@ static void textview_create_tags(GtkTextView *text, TextView *textview)
 			"underline", PANGO_UNDERLINE_SINGLE,
 			NULL);
 	gtk_text_buffer_create_tag(buffer, "diff-add",
-			"foreground-gdk", &diff_added_color,
+			"foreground-rgba", &diff_added_color,
 			NULL);
 	gtk_text_buffer_create_tag(buffer, "diff-del",
-			"foreground-gdk", &diff_deleted_color,
+			"foreground-rgba", &diff_deleted_color,
 			NULL);
 	gtk_text_buffer_create_tag(buffer, "diff-add-file",
-			"foreground-gdk", &diff_added_color,
+			"foreground-rgba", &diff_added_color,
 			"weight", PANGO_WEIGHT_BOLD,
 			NULL);
 	gtk_text_buffer_create_tag(buffer, "diff-del-file",
-			"foreground-gdk", &diff_deleted_color,
+			"foreground-rgba", &diff_deleted_color,
 			"weight", PANGO_WEIGHT_BOLD,
 			NULL);
 	gtk_text_buffer_create_tag(buffer, "diff-hunk",
-			"foreground-gdk", &diff_hunk_color,
+			"foreground-rgba", &diff_hunk_color,
 			"weight", PANGO_WEIGHT_BOLD,
 			NULL);
 	g_signal_connect(G_OBJECT(qtag), "event",

commit 04dd31ff09139aba69a7ed926ce56128fd3e8608
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Sun Oct 28 12:13:53 2018 +0100

    Fix gtkut_gdk_rgba_to_string().
    
    Math is hard.

diff --git a/src/gtk/gtkutils.c b/src/gtk/gtkutils.c
index d5d579a..bf8f369 100644
--- a/src/gtk/gtkutils.c
+++ b/src/gtk/gtkutils.c
@@ -2122,7 +2122,7 @@ void gtk_calendar_select_today(GtkCalendar *calendar)
 }
 
 
-#define RGBA_ELEMENT_TO_BYTE(x) (int)((gdouble)x * 65535 / 255)
+#define RGBA_ELEMENT_TO_BYTE(x) (int)((gdouble)x * 255)
 gchar *gtkut_gdk_rgba_to_string(GdkRGBA *rgba)
 {
 	gchar *str = g_strdup_printf("#%02x%02x%02x",

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list