diff options
-rw-r--r-- | pluma/pluma-view.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pluma/pluma-view.c b/pluma/pluma-view.c index 7aec69e3..28b39fe4 100644 --- a/pluma/pluma-view.c +++ b/pluma/pluma-view.c @@ -686,7 +686,7 @@ pluma_override_font (const gchar *item, PangoFontDescription *font) { static gboolean provider_added = FALSE; - GtkCssProvider *provider; + static GtkCssProvider *provider; /*We need to keep this as long as Pluma is running*/ gchar *prov_str; gchar *css; gchar *family; @@ -709,7 +709,8 @@ pluma_override_font (const gchar *item, 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 (); prov_str = gtk_css_provider_to_string (provider); @@ -729,7 +730,7 @@ pluma_override_font (const gchar *item, if (!provider_added) { - GSettings *settings; + static GSettings *settings; /*We need this for the life of the provider and program*/ settings = g_settings_new ("org.mate.interface"); g_signal_connect (settings, "changed::" "font-name", |