diff options
author | Pablo Barciela <[email protected]> | 2018-06-01 11:55:22 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2018-06-05 17:54:27 -0400 |
commit | b0899efae287fd7b04024dc5465163c54aa16db0 (patch) | |
tree | c6c964afe846c0856de8f14afde06a957e1dcec9 | |
parent | 347e1f170005496ce1bf3e672f46419dca6b558e (diff) | |
download | caja-b0899efae287fd7b04024dc5465163c54aa16db0.tar.bz2 caja-b0899efae287fd7b04024dc5465163c54aa16db0.tar.xz |
avoid deprecated 'gtk_widget_override_font'
-rw-r--r-- | eel/eel-gtk-extensions.c | 6 | ||||
-rw-r--r-- | src/caja-sidebar-title.c | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/eel/eel-gtk-extensions.c b/eel/eel-gtk-extensions.c index e68242af..9b50e42e 100644 --- a/eel/eel-gtk-extensions.c +++ b/eel/eel-gtk-extensions.c @@ -357,7 +357,11 @@ eel_gtk_label_make_bold (GtkLabel *label) * theme or user prefs, since the font desc only has the * weight flag turned on. */ - gtk_widget_override_font (GTK_WIDGET (label), font_desc); + PangoAttrList *attrs = pango_attr_list_new (); + PangoAttribute *font_desc_attr = pango_attr_font_desc_new (font_desc); + pango_attr_list_insert (attrs, font_desc_attr); + gtk_label_set_attributes (label, attrs); + pango_attr_list_unref (attrs); pango_font_description_free (font_desc); } diff --git a/src/caja-sidebar-title.c b/src/caja-sidebar-title.c index 516a58e4..fc40659f 100644 --- a/src/caja-sidebar-title.c +++ b/src/caja-sidebar-title.c @@ -478,7 +478,13 @@ update_title_font (CajaSidebarTitle *sidebar_title) pango_font_description_set_size (title_font, max_fit_font_size * PANGO_SCALE); pango_font_description_set_weight (title_font, PANGO_WEIGHT_BOLD); - gtk_widget_override_font (sidebar_title->details->title_label, title_font); + + PangoAttrList *attrs = pango_attr_list_new (); + PangoAttribute *font_desc_attr = pango_attr_font_desc_new (title_font); + pango_attr_list_insert (attrs, font_desc_attr); + gtk_label_set_attributes (GTK_LABEL (sidebar_title->details->title_label), attrs); + pango_attr_list_unref (attrs); + pango_font_description_free (title_font); } |