summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2016-02-11 07:36:06 +0100
committerWolfgang Ulbrich <[email protected]>2016-02-12 07:04:30 +0100
commit9357915cd8152da3945be48cf01f5b8499153003 (patch)
tree004187706fe064746f5c25a9aade40494ecd15d1
parent34e7aab28c26aae136be2cbf1df6b48ea24e9bcc (diff)
downloadmate-panel-9357915cd8152da3945be48cf01f5b8499153003.tar.bz2
mate-panel-9357915cd8152da3945be48cf01f5b8499153003.tar.xz
GTK+3 panel-frame: do not use deprecated get_background_color
taken from: https://git.gnome.org/browse/gnome-panel/commit/?id=3cb7bc
-rw-r--r--mate-panel/panel-frame.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/mate-panel/panel-frame.c b/mate-panel/panel-frame.c
index ba6237bb..1b3c4480 100644
--- a/mate-panel/panel-frame.c
+++ b/mate-panel/panel-frame.c
@@ -236,7 +236,8 @@ panel_frame_draw (GtkWidget *widget,
#if GTK_CHECK_VERSION (3, 0, 0)
GtkStyleContext *context;
GtkStateFlags state;
- GdkRGBA bg, dark, light;
+ GdkRGBA *bg;
+ GdkRGBA dark, light;
GtkSymbolicColor *c1, *c2;
GtkBorder padding;
#else
@@ -260,7 +261,9 @@ panel_frame_draw (GtkWidget *widget,
width = gtk_widget_get_allocated_width (widget);
height = gtk_widget_get_allocated_height (widget);
- gtk_style_context_get_background_color (context, state, &bg);
+ gtk_style_context_get (context, state,
+ "background-color", &bg,
+ NULL);
c1 = gtk_symbolic_color_new_literal (&bg);
@@ -344,7 +347,7 @@ panel_frame_draw (GtkWidget *widget,
cairo_stroke (cr);
if (padding.top > 1) {
- gdk_cairo_set_source_rgba (cr, &bg);
+ gdk_cairo_set_source_rgba (cr, bg);
cairo_move_to (cr, x + .5, y + 1 + .5);
cairo_line_to (cr, x + width - 1 - .5, y + 1 + .5);
cairo_stroke (cr);
@@ -358,7 +361,7 @@ panel_frame_draw (GtkWidget *widget,
cairo_stroke (cr);
if (padding.left > 1) {
- gdk_cairo_set_source_rgba (cr, &bg);
+ gdk_cairo_set_source_rgba (cr, bg);
cairo_move_to (cr, x + 1 + .5, y + .5);
cairo_line_to (cr, x + 1 + .5, y + height - 1 - .5);
cairo_stroke (cr);