[giggle] Get the background color instead the foreground one



commit 98e6931e4123ff25530029020c7203577cd6ffca
Author: Javier Jardón <jjardon gnome org>
Date:   Mon Feb 28 00:04:50 2011 +0000

    Get the background color instead the foreground one

 src/giggle-avatar-image.c |    2 +-
 src/giggle-diff-view.c    |    2 +-
 src/giggle-file-list.c    |    4 ++--
 src/giggle-view-file.c    |    2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/giggle-avatar-image.c b/src/giggle-avatar-image.c
index 4643a5d..65f96c4 100644
--- a/src/giggle-avatar-image.c
+++ b/src/giggle-avatar-image.c
@@ -373,7 +373,7 @@ avatar_image_draw (GtkWidget  *widget,
 		cairo_fill_preserve (cr);
 	}
 
-	gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, &rgba);
+	gtk_style_context_get_background_color (context, GTK_STATE_FLAG_NORMAL, &rgba);
 	gdk_cairo_set_source_rgba (cr, &rgba);
 	cairo_set_line_width (cr, 1);
 	cairo_stroke (cr);
diff --git a/src/giggle-diff-view.c b/src/giggle-diff-view.c
index 562aa5a..5a53929 100644
--- a/src/giggle-diff-view.c
+++ b/src/giggle-diff-view.c
@@ -299,7 +299,7 @@ diff_view_style_updated (GtkWidget *widget)
 		error_color = gdk_color_copy (&red);
 
 	context = gtk_widget_get_style_context (widget);
-	gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, &rgba);
+	gtk_style_context_get_background_color (context, GTK_STATE_FLAG_NORMAL, &rgba);
 
 	color.red = rgba.red * 65535;
 	color.green = rgba.green * 65535;
diff --git a/src/giggle-file-list.c b/src/giggle-file-list.c
index 3458ccf..e6860b5 100644
--- a/src/giggle-file-list.c
+++ b/src/giggle-file-list.c
@@ -1279,7 +1279,7 @@ file_list_cell_data_background_func (GtkCellLayout   *cell_layout,
 	priv = GET_PRIV (file_list);
 
 	context = gtk_widget_get_style_context (GTK_WIDGET (file_list));
-	gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, &rgba);
+	gtk_style_context_get_background_color (context, GTK_STATE_FLAG_NORMAL, &rgba);
 
 	gtk_tree_model_get (tree_model, iter,
 			    COL_REL_PATH, &rel_path,
@@ -1338,7 +1338,7 @@ file_list_cell_data_sensitive_func (GtkCellLayout   *layout,
 	if (GTK_IS_CELL_RENDERER_TEXT (renderer)) {
 		state = (value) ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE;
 		context = gtk_widget_get_style_context (GTK_WIDGET (list));
-		gtk_style_context_get_color (context, state, &rgba);
+		gtk_style_context_get_background_color (context, state, &rgba);
 		g_object_set (renderer, "foreground-rgba", &rgba, NULL);
 	} else {
 		g_object_set (renderer, "sensitive", value, NULL);
diff --git a/src/giggle-view-file.c b/src/giggle-view-file.c
index 4494b33..f715841 100644
--- a/src/giggle-view-file.c
+++ b/src/giggle-view-file.c
@@ -635,7 +635,7 @@ source_view_draw_cb (GtkTextView    *text_view,
 			GdkColor color;
 
 			context = gtk_widget_get_style_context (priv->source_view);
-			gtk_style_context_get_color (context, GTK_STATE_FLAG_SELECTED, &rgba);
+			gtk_style_context_get_background_color (context, GTK_STATE_FLAG_SELECTED, &rgba);
 
 			color.red = rgba.red * 65535;
 			color.green = rgba.green * 65535;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]