[Commits] [SCM] claws branch, gtk3, updated. 3.16.0-77-g2e73f73

ticho at claws-mail.org ticho at claws-mail.org
Wed Feb 14 22:58:38 CET 2018


The branch, gtk3 has been updated
       via  2e73f732059937e719536b730da899e3441b5eba (commit)
      from  b56d0f12e3410696c9ec3b72da18cd609cc25c2a (commit)

Summary of changes:
 src/folderview.c     |   12 ++++++------
 src/gtk/gtkcmclist.c |    6 +++---
 src/gtk/gtkcmctree.c |    6 +++---
 src/summaryview.c    |   20 ++++++++++----------
 4 files changed, 22 insertions(+), 22 deletions(-)


- Log -----------------------------------------------------------------
commit 2e73f732059937e719536b730da899e3441b5eba
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Tue Feb 13 23:50:15 2018 +0100

    Make GtkCMCList/Tree use "text", not "fg" rc property for text color.
    
    Closes bug #3880.

diff --git a/src/folderview.c b/src/folderview.c
index 8a7383a..d807486 100644
--- a/src/folderview.c
+++ b/src/folderview.c
@@ -709,7 +709,7 @@ void folderview_init(FolderView *folderview)
 		}
 		gtkut_convert_int_to_gdk_color(prefs_common.color[COL_NEW], &gdk_color);
 		normal_color_style = gtk_style_copy(normal_style);
-		normal_color_style->fg[GTK_STATE_NORMAL] = gdk_color;
+		normal_color_style->text[GTK_STATE_NORMAL] = gdk_color;
 	}
 
 	if (!bold_style) {
@@ -735,10 +735,10 @@ void folderview_init(FolderView *folderview)
 			}
 		}
 		bold_color_style = gtk_style_copy(bold_style);
-		bold_color_style->fg[GTK_STATE_NORMAL] = gdk_color;
+		bold_color_style->text[GTK_STATE_NORMAL] = gdk_color;
 
 		bold_tgtfold_style = gtk_style_copy(bold_style);
-		bold_tgtfold_style->fg[GTK_STATE_NORMAL] = folderview->color_op;
+		bold_tgtfold_style->text[GTK_STATE_NORMAL] = folderview->color_op;
 	}
 }
 
@@ -1729,7 +1729,7 @@ static void folderview_update_node(FolderView *folderview, GtkCMCTreeNode *node)
 		if (item->prefs->color > 0 && !use_color) {
 			gtkut_convert_int_to_gdk_color(item->prefs->color, &gdk_color);
 			color_style = gtk_style_copy(bold_style);
-			color_style->fg[GTK_STATE_NORMAL] = gdk_color;
+			color_style->text[GTK_STATE_NORMAL] = gdk_color;
 			style = color_style;
 		} else if (use_color) {
 			style = bold_color_style;
@@ -1748,7 +1748,7 @@ static void folderview_update_node(FolderView *folderview, GtkCMCTreeNode *node)
 		GdkColor gdk_color;
 		gtkut_convert_int_to_gdk_color(item->prefs->color, &gdk_color);
 		color_style = gtk_style_copy(normal_style);
-		color_style->fg[GTK_STATE_NORMAL] = gdk_color;
+		color_style->text[GTK_STATE_NORMAL] = gdk_color;
 		style = color_style;
 	} else {
 		style = normal_style;
@@ -2752,7 +2752,7 @@ void folderview_set_target_folder_color(gint color_op)
 		folderview = (FolderView *)list->data;
 		gtkut_convert_int_to_gdk_color(color_op, &folderview->color_op);
 		if (firstone) {
-			bold_tgtfold_style->fg[GTK_STATE_NORMAL] =
+			bold_tgtfold_style->text[GTK_STATE_NORMAL] =
 				folderview->color_op;
 			firstone = 0;
 		}
diff --git a/src/gtk/gtkcmclist.c b/src/gtk/gtkcmclist.c
index 1610ff5..604b77e 100644
--- a/src/gtk/gtkcmclist.c
+++ b/src/gtk/gtkcmclist.c
@@ -5983,7 +5983,7 @@ draw_row (GtkCMCList     *clist,
 	  if (layout)
 	    {
 	      gint row_center_offset = (clist->row_height - logical_rect.height - 1) / 2;
-	      gdk_cairo_set_source_color(cr, clist_row->fg_set ? &clist_row->foreground : &style->fg[state]);
+	      gdk_cairo_set_source_color(cr, clist_row->fg_set ? &clist_row->foreground : &style->text[state]);
 	      cairo_move_to(cr, offset, row_rectangle.y + row_center_offset + clist_row->cell[i].vertical);
 	      pango_cairo_show_layout(cr, layout);
               g_object_unref (G_OBJECT (layout));
@@ -6004,7 +6004,7 @@ draw_row (GtkCMCList     *clist,
       if (!area) {
 	cairo_rectangle(cr, row_rectangle.x, row_rectangle.y,
 			    row_rectangle.width + 1, row_rectangle.height);
-	gdk_cairo_set_source_color(cr, &style->fg[GTK_STATE_NORMAL]);
+	gdk_cairo_set_source_color(cr, &style->text[GTK_STATE_NORMAL]);
 	cairo_stroke(cr);
       }
       else if (gdk_rectangle_intersect (area, &row_rectangle,
@@ -6012,7 +6012,7 @@ draw_row (GtkCMCList     *clist,
 	{
 	  cairo_rectangle(cr, row_rectangle.x, row_rectangle.y,
 			    row_rectangle.width + 1, row_rectangle.height);
-	  gdk_cairo_set_source_color(cr, &style->fg[GTK_STATE_NORMAL]);
+	  gdk_cairo_set_source_color(cr, &style->text[GTK_STATE_NORMAL]);
 	  cairo_stroke(cr);
 	}
     }
diff --git a/src/gtk/gtkcmctree.c b/src/gtk/gtkcmctree.c
index d1d587d..0046b38 100644
--- a/src/gtk/gtkcmctree.c
+++ b/src/gtk/gtkcmctree.c
@@ -445,7 +445,7 @@ draw_expander (GtkCMCTree     *ctree,
   /* pixel offsets +/- 1 or +/- justification_factor here and there ..
    * to fill correctly, somewhat ... what do I do wrong?
    */
-  gdk_cairo_set_source_color(cr, &gtk_widget_get_style(GTK_WIDGET(ctree))->fg[GTK_STATE_NORMAL]);
+  gdk_cairo_set_source_color(cr, &gtk_widget_get_style(GTK_WIDGET(ctree))->text[GTK_STATE_NORMAL]);
   if (ctree_row->expanded)
   {
     gint tmp3 = PM_SIZE / 2;
@@ -670,7 +670,7 @@ draw_row (GtkCMCList     *clist,
   if (clist_row->fg_set && state != GTK_STATE_SELECTED)
 	fgcolor = &clist_row->foreground;
   else
-	fgcolor = &style->fg[clist_row->state];
+	fgcolor = &style->text[clist_row->state];
   /* draw the cell borders */
   if (area)
     {
@@ -927,7 +927,7 @@ draw_row (GtkCMCList     *clist,
 	{
 	    cairo_set_line_width(cr, 1.0);
 	    cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE);
-	    gdk_cairo_set_source_color(cr, &style->fg[GTK_STATE_NORMAL]);
+	    gdk_cairo_set_source_color(cr, &style->text[GTK_STATE_NORMAL]);
 	    cairo_move_to (cr, row_rectangle.x, row_rectangle.y + 0.5);
 	    cairo_line_to (cr, row_rectangle.x + row_rectangle.width, row_rectangle.y + 0.5);
 	    cairo_move_to (cr, row_rectangle.x, row_rectangle.y + row_rectangle.height - 0.5);
diff --git a/src/summaryview.c b/src/summaryview.c
index ce7062b..60938ef 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -886,10 +886,10 @@ static void summary_set_fonts(SummaryView *summaryview)
 			}
 		}
 		bold_marked_style = gtk_style_copy(bold_style);
-		bold_marked_style->fg[GTK_STATE_NORMAL] =
+		bold_marked_style->text[GTK_STATE_NORMAL] =
 			summaryview->color_marked;
 		bold_deleted_style = gtk_style_copy(bold_style);
-		bold_deleted_style->fg[GTK_STATE_NORMAL] =
+		bold_deleted_style->text[GTK_STATE_NORMAL] =
 			summaryview->color_dim;
 	}
 
@@ -5877,22 +5877,22 @@ void summary_set_colorlabel_color(GtkCMCTree *ctree, GtkCMCTreeNode *node,
 	if (color_index < 0 || color_index >= N_COLOR_LABELS) {
 		if (!prev_style) return;
 		style = gtk_style_copy(prev_style);
-		color = ctree_style->fg[GTK_STATE_NORMAL];
-		style->fg[GTK_STATE_NORMAL] = color;
-		color = ctree_style->fg[GTK_STATE_SELECTED];
-		style->fg[GTK_STATE_SELECTED] = color;
+		color = ctree_style->text[GTK_STATE_NORMAL];
+		style->text[GTK_STATE_NORMAL] = color;
+		color = ctree_style->text[GTK_STATE_SELECTED];
+		style->text[GTK_STATE_SELECTED] = color;
 	} else {
 		if (prev_style)
 			style = gtk_style_copy(prev_style);
 		else
 			style = gtk_style_copy(ctree_style);
 		color = colorlabel_get_color(color_index);
-		style->fg[GTK_STATE_NORMAL] = color;
+		style->text[GTK_STATE_NORMAL] = color;
 		/* get the average of label color and selected fg color
 		   for visibility */
-		style->fg[GTK_STATE_SELECTED].red   = (color.red   + 3*ctree_style->fg[GTK_STATE_SELECTED].red  ) / 4;
-		style->fg[GTK_STATE_SELECTED].green = (color.green + 3*ctree_style->fg[GTK_STATE_SELECTED].green) / 4;
-		style->fg[GTK_STATE_SELECTED].blue  = (color.blue  + 3*ctree_style->fg[GTK_STATE_SELECTED].blue ) / 4;
+		style->text[GTK_STATE_SELECTED].red   = (color.red   + 3*ctree_style->text[GTK_STATE_SELECTED].red  ) / 4;
+		style->text[GTK_STATE_SELECTED].green = (color.green + 3*ctree_style->text[GTK_STATE_SELECTED].green) / 4;
+		style->text[GTK_STATE_SELECTED].blue  = (color.blue  + 3*ctree_style->text[GTK_STATE_SELECTED].blue ) / 4;
 	}
 
 	gtk_cmctree_node_set_row_style(ctree, node, style);

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list