summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-12-21 11:10:13 -0500
committerMatthias Clasen <mclasen@redhat.com>2017-12-21 11:13:08 -0500
commited0600e8c014371e6af22fe2ed4d2278d300c76a (patch)
tree818995e5ff59ce9c0925664184bf307f833e998e
parent0e338d31a422fe001e06f9bb1e2831f1297249ea (diff)
downloadgtk+-ed0600e8c014371e6af22fe2ed4d2278d300c76a.tar.gz
tests: Stop using gtk_font_button_get_font_name
We can instead use the GtkFontChooser::font property.
-rw-r--r--tests/print-editor.c3
-rw-r--r--tests/testcalendar.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/print-editor.c b/tests/print-editor.c
index fe67e51c87..54a71a78ed 100644
--- a/tests/print-editor.c
+++ b/tests/print-editor.c
@@ -343,7 +343,8 @@ custom_widget_apply (GtkPrintOperation *operation,
PrintData *data)
{
const char *selected_font;
- selected_font = gtk_font_button_get_font_name (GTK_FONT_BUTTON (data->font_button));
+ selected_font = gtk_font_chooser_get_font (GTK_FONT_CHOOSER (data->font_button));
+
g_free (data->font);
data->font = g_strdup (selected_font);
}
diff --git a/tests/testcalendar.c b/tests/testcalendar.c
index 16f04bf5d1..1ff7e2e67e 100644
--- a/tests/testcalendar.c
+++ b/tests/testcalendar.c
@@ -260,7 +260,7 @@ void calendar_select_font (GtkWidget *button,
gtk_style_context_add_provider (gtk_widget_get_style_context (calendar->window), GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_object_set_data_full (G_OBJECT (calendar->window), "css-provider", provider, g_object_unref);
}
- font = gtk_font_button_get_font_name (GTK_FONT_BUTTON (button));
+ font = gtk_font_chooser_get_font (GTK_FONT_CHOOSER (button));
data = g_strdup_printf ("GtkCalendar { font: %s; }", font);
gtk_css_provider_load_from_data (provider, data, -1, NULL);
g_free (data);