summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-12-21 20:57:28 -0500
committerMatthias Clasen <mclasen@redhat.com>2019-12-25 09:47:22 -0500
commit29e1dac1ff82dc293fc5e9d13e446a34f2c6921a (patch)
tree85f16b236e9b80eb35ace36d9d89b5d70cd2a1ba /tests
parent3af8a658a7dea35caebaad8828b1eafd4641b4bc (diff)
downloadgtk+-29e1dac1ff82dc293fc5e9d13e446a34f2c6921a.tar.gz
testfilechooser: Test the choice apis
Diffstat (limited to 'tests')
-rw-r--r--tests/testfilechooser.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/testfilechooser.c b/tests/testfilechooser.c
index d7a3562ae3..2141994275 100644
--- a/tests/testfilechooser.c
+++ b/tests/testfilechooser.c
@@ -522,7 +522,6 @@ main (int argc, char **argv)
GtkWidget *vbbox;
GtkWidget *button;
GtkWidget *dialog;
- GtkWidget *extra;
GtkFileFilter *filter;
gboolean force_rtl = FALSE;
gboolean multiple = FALSE;
@@ -677,9 +676,11 @@ main (int argc, char **argv)
/* Extra widget */
- extra = gtk_check_button_new_with_mnemonic ("Lar_t whoever asks about this button");
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (extra), TRUE);
- gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (dialog), extra);
+ gtk_file_chooser_add_choice (GTK_FILE_CHOOSER (dialog), "choice1",
+ "Choose one:",
+ (const char *[]){"one", "two", "three", NULL},
+ (const char *[]){"One", "Two", "Three", NULL});
+ gtk_file_chooser_set_choice (GTK_FILE_CHOOSER (dialog), "choice1", "two");
/* Shortcuts */