diff options
author | Pablo Barciela <[email protected]> | 2019-08-16 04:49:18 +0200 |
---|---|---|
committer | ZenWalker <[email protected]> | 2019-08-16 12:54:20 +0200 |
commit | 950caf8a0cce531b01c152bc8de8ab11ac011aab (patch) | |
tree | a3fb2d59ce6b1307518b915056a8ee9f43cd4a02 | |
parent | 60c14740efc90306707987907d26912adb7ef76a (diff) | |
download | mate-panel-950caf8a0cce531b01c152bc8de8ab11ac011aab.tar.bz2 mate-panel-950caf8a0cce531b01c152bc8de8ab11ac011aab.tar.xz |
panel-toplevel: avoid deprecated 'gtk_css_provider_get_default'
-rw-r--r-- | mate-panel/panel-toplevel.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mate-panel/panel-toplevel.c b/mate-panel/panel-toplevel.c index 46077ffd..c217c907 100644 --- a/mate-panel/panel-toplevel.c +++ b/mate-panel/panel-toplevel.c @@ -1269,13 +1269,14 @@ static void panel_toplevel_update_buttons_showing(PanelToplevel* toplevel) static void panel_toplevel_update_hide_buttons_size(GtkWidget* button, int panel_size) { + static GtkCssProvider *css_provider = NULL; GtkStyleContext *context = NULL; + context = gtk_widget_get_style_context(button); gtk_style_context_add_class(context, "panel-button"); - /* memory is managed by gtk */ - GtkCssProvider *css_provider = NULL; - css_provider = gtk_css_provider_get_default (); + if (css_provider == NULL) + css_provider = gtk_css_provider_new (); /* get arrow image */ GtkWidget *arrow = NULL; |