[gnome-panel] panel-widget: don't use deprecated ...get_background_color



commit 539ecc45b7555ed225a55a178fe2a797ff776ee3
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Nov 20 22:21:41 2014 +0200

    panel-widget: don't use deprecated ...get_background_color

 gnome-panel/panel-widget.c |   24 +++++++++++++-----------
 1 files changed, 13 insertions(+), 11 deletions(-)
---
diff --git a/gnome-panel/panel-widget.c b/gnome-panel/panel-widget.c
index 76d6305..b114f1e 100644
--- a/gnome-panel/panel-widget.c
+++ b/gnome-panel/panel-widget.c
@@ -1536,24 +1536,26 @@ panel_widget_set_background_default_style (GtkWidget *widget)
 {
        GtkStyleContext *context;
        GtkStateFlags    state;
-        GdkRGBA          bg_color;
-        cairo_pattern_t *bg_image;
+       GdkRGBA         *bg_color;
+       cairo_pattern_t *bg_image;
+       PanelBackground *background;
 
        if (gtk_widget_get_realized (widget)) {
                context = gtk_widget_get_style_context (widget);
                state = gtk_widget_get_state_flags (widget);
+               background = &PANEL_WIDGET (widget)->background;
 
-                gtk_style_context_get_background_color (context, state, &bg_color);
-                gtk_style_context_get (context, state,
-                                       "background-image", &bg_image,
-                                       NULL);
+               gtk_style_context_get (context, state,
+                                      "background-color", &bg_color,
+                                      "background-image", &bg_image,
+                                      NULL);
 
-               panel_background_set_default_style (
-                       &PANEL_WIDGET (widget)->background,
-                       &bg_color, bg_image);
+               panel_background_set_default_style (background,
+                                                   bg_color,
+                                                   bg_image);
 
-                if (bg_image)
-                        cairo_pattern_destroy (bg_image);
+               if (bg_image)
+                       cairo_pattern_destroy (bg_image);
        }
 }
 


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