summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-07-03 09:51:38 -0700
committerMatthias Clasen <mclasen@redhat.com>2015-07-04 00:29:26 -0400
commit4a21c129e4d4583d6478a2e0f8bf0597dac0dc8a (patch)
tree55ff3396f5a95308c58f046601814ade719f7d3e /tests
parent29abbdd3e3aa59cd1f3986eabbfeafa19aaa4195 (diff)
downloadgtk+-4a21c129e4d4583d6478a2e0f8bf0597dac0dc8a.tar.gz
testfilechooser: Add a --local-only flag
This allows for easier testing of !local-only mode.
Diffstat (limited to 'tests')
-rw-r--r--tests/testfilechooser.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/testfilechooser.c b/tests/testfilechooser.c
index 0d8ff1c036..72c0c5b337 100644
--- a/tests/testfilechooser.c
+++ b/tests/testfilechooser.c
@@ -523,13 +523,15 @@ main (int argc, char **argv)
GtkWidget *preview_vbox;
gboolean force_rtl = FALSE;
gboolean multiple = FALSE;
+ gboolean local_only = FALSE;
char *action_arg = NULL;
char *initial_filename = NULL;
char *initial_folder = NULL;
GError *error = NULL;
GOptionEntry options[] = {
{ "action", 'a', 0, G_OPTION_ARG_STRING, &action_arg, "Filechooser action", "ACTION" },
- { "multiple", 'm', 0, G_OPTION_ARG_NONE, &multiple, "Select-multiple", NULL },
+ { "multiple", 'm', 0, G_OPTION_ARG_NONE, &multiple, "Select multiple", NULL },
+ { "local-only", 'l', 0, G_OPTION_ARG_NONE, &local_only, "Local only", NULL },
{ "right-to-left", 'r', 0, G_OPTION_ARG_NONE, &force_rtl, "Force right-to-left layout.", NULL },
{ "initial-filename", 'f', 0, G_OPTION_ARG_FILENAME, &initial_filename, "Initial filename to select", "FILENAME" },
{ "initial-folder", 'F', 0, G_OPTION_ARG_FILENAME, &initial_folder, "Initial folder to show", "FILENAME" },
@@ -576,6 +578,7 @@ main (int argc, char **argv)
dialog = g_object_new (GTK_TYPE_FILE_CHOOSER_DIALOG,
"action", action,
"select-multiple", multiple,
+ "local-only", local_only,
NULL);
switch (action)