Skip to content

Commit c0800ef

Browse files
ebassiraveit65
authored andcommitted
dictionary: Replace deprecated GtkFontButton accessors
Use the equivalent GtkFontChooser ones. origin commit: https://gitlab.gnome.org/GNOME/gnome-dictionary/commit/d575146
1 parent 1a5e0dd commit c0800ef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mate-dictionary/src/gdict-pref-dialog.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,13 +459,13 @@ static void
459459
font_button_font_set_cb (GtkWidget *font_button,
460460
GdictPrefDialog *dialog)
461461
{
462-
const gchar *font;
462+
const char *font;
463463

464-
font = gtk_font_button_get_font_name (GTK_FONT_BUTTON (font_button));
464+
font = gtk_font_chooser_get_font (GTK_FONT_CHOOSER (font_button));
465465
if (!font || font[0] == '\0')
466466
return;
467467

468-
if (dialog->print_font && (strcmp (dialog->print_font, font) == 0))
468+
if (g_strcmp0 (dialog->print_font, font) == 0)
469469
return;
470470

471471
g_free (dialog->print_font);
@@ -657,7 +657,7 @@ gdict_pref_dialog_init (GdictPrefDialog *dialog)
657657

658658
font = g_settings_get_string (dialog->settings, GDICT_SETTINGS_PRINT_FONT_KEY);
659659
dialog->font_button = GTK_WIDGET (gtk_builder_get_object (dialog->builder, "print_font_button"));
660-
gtk_font_button_set_font_name (GTK_FONT_BUTTON (dialog->font_button), font);
660+
gtk_font_chooser_set_font (GTK_FONT_CHOOSER (dialog->font_button), font);
661661
gtk_widget_set_tooltip_text (dialog->font_button,
662662
_("Set the font used for printing the definitions"));
663663
g_signal_connect (dialog->font_button, "font-set",

0 commit comments

Comments
 (0)