File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -686,7 +686,7 @@ pluma_override_font (const gchar *item,
686686 PangoFontDescription * font )
687687{
688688 static gboolean provider_added = FALSE;
689- GtkCssProvider * provider ;
689+ static GtkCssProvider * provider ; /*We need to keep this as long as Pluma is running*/
690690 gchar * prov_str ;
691691 gchar * css ;
692692 gchar * family ;
@@ -709,7 +709,8 @@ pluma_override_font (const gchar *item,
709709 pango_font_description_get_size (font ) / PANGO_SCALE ,
710710 pango_font_description_get_size_is_absolute (font ) ? "px" : "pt" );
711711
712- provider = gtk_css_provider_get_default ();
712+ if (!provider_added )
713+ provider = gtk_css_provider_new ();
713714
714715 prov_str = gtk_css_provider_to_string (provider );
715716
@@ -729,7 +730,7 @@ pluma_override_font (const gchar *item,
729730
730731 if (!provider_added )
731732 {
732- GSettings * settings ;
733+ static GSettings * settings ; /*We need this for the life of the provider and program*/
733734 settings = g_settings_new ("org.mate.interface" );
734735 g_signal_connect (settings ,
735736 "changed::" "font-name" ,
You can’t perform that action at this time.
0 commit comments