Skip to content

Commit

Permalink
avoid deprecated 'gtk_widget_override_font'
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0w authored and lukefromdc committed Jun 5, 2018
1 parent 347e1f1 commit b0899ef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion eel/eel-gtk-extensions.c
Expand Up @@ -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);
}
Expand Down
8 changes: 7 additions & 1 deletion src/caja-sidebar-title.c
Expand Up @@ -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);
}

Expand Down

0 comments on commit b0899ef

Please sign in to comment.