diff options
author | lukefromdc <[email protected]> | 2018-07-20 15:19:50 -0400 |
---|---|---|
committer | lukefromdc <[email protected]> | 2018-07-20 15:19:50 -0400 |
commit | f1b205b3afe4ad7801a265bafbd4ff69b34fd167 (patch) | |
tree | 831889b4b96acb5535134d1abb34c3a00fbacb61 /mateweather | |
parent | 43b16f78ab5fe08c8d2b8997d94c6aec5f1a36da (diff) | |
download | mate-applets-f1b205b3afe4ad7801a265bafbd4ff69b34fd167.tar.bz2 mate-applets-f1b205b3afe4ad7801a265bafbd4ff69b34fd167.tar.xz |
Avoid newly deprecated gtk_css_provider_get_default
This works the exact same way gtk_css_provider_get_default works internally, except that we handle a static cssprovider ourselves
Diffstat (limited to 'mateweather')
-rw-r--r-- | mateweather/mateweather-dialog.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mateweather/mateweather-dialog.c b/mateweather/mateweather-dialog.c index a206c032..4d1ff522 100644 --- a/mateweather/mateweather-dialog.c +++ b/mateweather/mateweather-dialog.c @@ -511,7 +511,7 @@ override_widget_font (GtkWidget *widget, PangoFontDescription *font) { static gboolean provider_added = FALSE; - GtkCssProvider *provider; + static GtkCssProvider *provider; gchar *css; gchar *family; gchar *weight; @@ -532,8 +532,8 @@ override_widget_font (GtkWidget *widget, size = g_strdup_printf ("font-size: %d%s;", pango_font_description_get_size (font) / PANGO_SCALE, pango_font_description_get_size_is_absolute (font) ? "px" : "pt"); - - provider = gtk_css_provider_get_default (); + if (!provider_added) + provider = gtk_css_provider_new (); gtk_widget_set_name(GTK_WIDGET(widget), "MateWeatherAppletTextView"); css = g_strdup_printf ("#MateWeatherAppletTextView { %s %s %s %s }", family, weight, style, size); |