summaryrefslogtreecommitdiff
path: root/libcaja-private
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-05-05 20:52:06 +0200
committerPablo Barciela <[email protected]>2018-05-05 21:52:40 +0200
commite88c26a010b0e3b06317680cdce397ef77c137d4 (patch)
tree215c12eb159cc5a4ab5d4ce5d1c5656a601ec446 /libcaja-private
parentdf750ae2c2def80ff24b989c7f43e64a43f635aa (diff)
downloadcaja-e88c26a010b0e3b06317680cdce397ef77c137d4.tar.bz2
caja-e88c26a010b0e3b06317680cdce397ef77c137d4.tar.xz
avoid deprecated 'gtk_style_context_get_background_color'
Diffstat (limited to 'libcaja-private')
-rw-r--r--libcaja-private/caja-icon-canvas-item.c12
-rw-r--r--libcaja-private/caja-icon-container.c8
2 files changed, 17 insertions, 3 deletions
diff --git a/libcaja-private/caja-icon-canvas-item.c b/libcaja-private/caja-icon-canvas-item.c
index 6751628b..8f0630a9 100644
--- a/libcaja-private/caja-icon-canvas-item.c
+++ b/libcaja-private/caja-icon-canvas-item.c
@@ -1701,6 +1701,7 @@ real_map_surface (CajaIconCanvasItem *icon_item)
int emblem_size;
GtkStyleContext *style;
GdkRGBA color;
+ GdkRGBA *c;
cairo_surface_t *surface;
temp_pixbuf = icon_item->details->pixbuf;
@@ -1768,11 +1769,18 @@ real_map_surface (CajaIconCanvasItem *icon_item)
style = gtk_widget_get_style_context (GTK_WIDGET (canvas));
if (gtk_widget_has_focus (GTK_WIDGET (canvas))) {
- gtk_style_context_get_background_color (style, GTK_STATE_FLAG_SELECTED, &color);
+ gtk_style_context_get (style, GTK_STATE_FLAG_SELECTED,
+ GTK_STYLE_PROPERTY_BACKGROUND_COLOR,
+ &c, NULL);
} else {
- gtk_style_context_get_background_color (style, GTK_STATE_FLAG_ACTIVE, &color);
+ gtk_style_context_get (style, GTK_STATE_FLAG_ACTIVE,
+ GTK_STYLE_PROPERTY_BACKGROUND_COLOR,
+ &c, NULL);
}
+ color = *c;
+ gdk_rgba_free (c);
+
old_pixbuf = temp_pixbuf;
temp_pixbuf = eel_create_colorized_pixbuf (temp_pixbuf, &color);
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c
index cae3af44..17e671a0 100644
--- a/libcaja-private/caja-icon-container.c
+++ b/libcaja-private/caja-icon-container.c
@@ -2865,6 +2865,7 @@ start_rubberbanding (CajaIconContainer *container,
CajaIconContainerDetails *details;
CajaIconRubberbandInfo *band_info;
GdkRGBA bg_color, border_color;
+ GdkRGBA *c;
GList *p;
CajaIcon *icon;
GtkStyleContext *context;
@@ -2888,7 +2889,12 @@ start_rubberbanding (CajaIconContainer *container,
gtk_style_context_save (context);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_RUBBERBAND);
- gtk_style_context_get_background_color (context, GTK_STATE_FLAG_NORMAL, &bg_color);
+ gtk_style_context_get (context, GTK_STATE_FLAG_NORMAL,
+ GTK_STYLE_PROPERTY_BACKGROUND_COLOR,
+ &c, NULL);
+ bg_color = *c;
+ gdk_rgba_free (c);
+
gtk_style_context_get_border_color (context, GTK_STATE_FLAG_NORMAL, &border_color);
gtk_style_context_restore (context);