examples: playback: don't use deprecated font button API
authorTim-Philipp Müller <tim@centricular.com>
Mon, 8 Jan 2018 14:21:29 +0000 (14:21 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Mon, 8 Jan 2018 14:21:29 +0000 (14:21 +0000)
playback-test.c:2587:3: error: "gtk_font_button_get_font_name" is deprecated

tests/examples/playback/playback-test.c

index 08e83ff..e497597 100644 (file)
@@ -2582,10 +2582,11 @@ subtitle_encoding_activate_cb (GtkEntry * entry, PlaybackApp * app)
 static void
 subtitle_fontdesc_cb (GtkFontButton * button, PlaybackApp * app)
 {
-  const gchar *text;
+  gchar *text;
 
-  text = gtk_font_button_get_font_name (button);
+  text = gtk_font_chooser_get_font (GTK_FONT_CHOOSER (button));
   g_object_set (app->pipeline, "subtitle-font-desc", text, NULL);
+  g_free (text);
 }
 
 static void