Skip to content


dictionary: Replace deprecated GtkFontButton accessors
Browse files Browse the repository at this point in the history
Use the equivalent GtkFontChooser ones.

origin commit:
  • Loading branch information
ebassi authored and raveit65 committed Sep 23, 2018
1 parent 1a5e0dd commit c0800ef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mate-dictionary/src/gdict-pref-dialog.c
Expand Up @@ -459,13 +459,13 @@ static void
font_button_font_set_cb (GtkWidget *font_button,
GdictPrefDialog *dialog)
const gchar *font;
const char *font;

font = gtk_font_button_get_font_name (GTK_FONT_BUTTON (font_button));
font = gtk_font_chooser_get_font (GTK_FONT_CHOOSER (font_button));
if (!font || font[0] == '\0')

if (dialog->print_font && (strcmp (dialog->print_font, font) == 0))
if (g_strcmp0 (dialog->print_font, font) == 0)

g_free (dialog->print_font);
Expand Down Expand Up @@ -657,7 +657,7 @@ gdict_pref_dialog_init (GdictPrefDialog *dialog)

font = g_settings_get_string (dialog->settings, GDICT_SETTINGS_PRINT_FONT_KEY);
dialog->font_button = GTK_WIDGET (gtk_builder_get_object (dialog->builder, "print_font_button"));
gtk_font_button_set_font_name (GTK_FONT_BUTTON (dialog->font_button), font);
gtk_font_chooser_set_font (GTK_FONT_CHOOSER (dialog->font_button), font);
gtk_widget_set_tooltip_text (dialog->font_button,
_("Set the font used for printing the definitions"));
g_signal_connect (dialog->font_button, "font-set",
Expand Down

0 comments on commit c0800ef

Please sign in to comment.