File tree 1 file changed +4
-3
lines changed
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,
686
686
PangoFontDescription * font )
687
687
{
688
688
static gboolean provider_added = FALSE;
689
- GtkCssProvider * provider ;
689
+ static GtkCssProvider * provider ; /*We need to keep this as long as Pluma is running*/
690
690
gchar * prov_str ;
691
691
gchar * css ;
692
692
gchar * family ;
@@ -709,7 +709,8 @@ pluma_override_font (const gchar *item,
709
709
pango_font_description_get_size (font ) / PANGO_SCALE ,
710
710
pango_font_description_get_size_is_absolute (font ) ? "px" : "pt" );
711
711
712
- provider = gtk_css_provider_get_default ();
712
+ if (!provider_added )
713
+ provider = gtk_css_provider_new ();
713
714
714
715
prov_str = gtk_css_provider_to_string (provider );
715
716
@@ -729,7 +730,7 @@ pluma_override_font (const gchar *item,
729
730
730
731
if (!provider_added )
731
732
{
732
- GSettings * settings ;
733
+ static GSettings * settings ; /*We need this for the life of the provider and program*/
733
734
settings = g_settings_new ("org.mate.interface" );
734
735
g_signal_connect (settings ,
735
736
"changed::" "font-name" ,
You can’t perform that action at this time.
0 commit comments