diff options
author | Emmanuele Bassi <[email protected]> | 2018-05-01 20:31:29 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-09-23 16:32:48 +0200 |
commit | c0800eff5739c3891375d5c4d1db62720fd877cd (patch) | |
tree | 5d9c3b3728b0950c828b8981f19bf8b75845773c /mate-dictionary/src | |
parent | 1a5e0dd111c30a5ead53f42984e212c7634c5428 (diff) | |
download | mate-utils-c0800eff5739c3891375d5c4d1db62720fd877cd.tar.bz2 mate-utils-c0800eff5739c3891375d5c4d1db62720fd877cd.tar.xz |
dictionary: Replace deprecated GtkFontButton accessors
Use the equivalent GtkFontChooser ones.
origin commit:
https://gitlab.gnome.org/GNOME/gnome-dictionary/commit/d575146
Diffstat (limited to 'mate-dictionary/src')
-rw-r--r-- | mate-dictionary/src/gdict-pref-dialog.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mate-dictionary/src/gdict-pref-dialog.c b/mate-dictionary/src/gdict-pref-dialog.c index ddf80f0e..5b8a6de7 100644 --- a/mate-dictionary/src/gdict-pref-dialog.c +++ b/mate-dictionary/src/gdict-pref-dialog.c @@ -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') return; - if (dialog->print_font && (strcmp (dialog->print_font, font) == 0)) + if (g_strcmp0 (dialog->print_font, font) == 0) return; g_free (dialog->print_font); @@ -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", |