Skip to content

Commit ca00615

Browse files
sc0wvkareh
authored andcommitted
pluma-view: Fix bold and italic fonts in menus
1 parent eb7a39b commit ca00615

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pluma/pluma-view.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -667,15 +667,15 @@ static PangoFontDescription* get_system_font (void)
667667
}
668668

669669
static void
670-
contextmenu_font_changed_cb (GSettings *settings,
671-
gchar *key,
672-
gpointer user_data)
670+
system_font_changed_cb (GSettings *settings,
671+
gchar *key,
672+
gpointer user_data)
673673
{
674674
PangoFontDescription *sys_font_desc = NULL;
675675
sys_font_desc = get_system_font ();
676676
if (sys_font_desc)
677677
{
678-
pluma_override_font (".context-menu", NULL, sys_font_desc);
678+
pluma_override_font ("label", NULL, sys_font_desc);
679679
pango_font_description_free (sys_font_desc);
680680
}
681681
}
@@ -714,9 +714,9 @@ pluma_override_font (const gchar *item,
714714

715715
prov_str = gtk_css_provider_to_string (provider);
716716

717-
if (g_str_has_prefix (prov_str, "textview") && g_str_has_prefix (item, ".context-menu"))
717+
if (g_str_has_prefix (prov_str, "textview") && g_str_has_prefix (item, "label"))
718718
{
719-
if (strstr (prov_str, ".context-menu"))
719+
if (strstr (prov_str, "label"))
720720
{
721721
g_strdelimit (prov_str, "}", '\0');
722722
gchar *prov_new_str = g_strdup_printf ("%s}", prov_str);
@@ -737,7 +737,7 @@ pluma_override_font (const gchar *item,
737737
settings = g_settings_new ("org.mate.interface");
738738
g_signal_connect (settings,
739739
"changed::" "font-name",
740-
G_CALLBACK (contextmenu_font_changed_cb), NULL);
740+
G_CALLBACK (system_font_changed_cb), NULL);
741741

742742
gtk_style_context_add_provider_for_screen (gtk_widget_get_screen (widget),
743743
GTK_STYLE_PROVIDER (provider),
@@ -795,7 +795,7 @@ pluma_view_set_font (PlumaView *view,
795795

796796
sys_font_desc = get_system_font ();
797797
if (sys_font_desc) {
798-
pluma_override_font (".context-menu", GTK_WIDGET (view), sys_font_desc);
798+
pluma_override_font ("label", GTK_WIDGET (view), sys_font_desc);
799799
pango_font_description_free (sys_font_desc);
800800
}
801801

0 commit comments

Comments
 (0)