[gtk+] testfilechooser: Add a --local-only flag
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] testfilechooser: Add a --local-only flag
- Date: Sat, 4 Jul 2015 04:43:32 +0000 (UTC)
commit 4a21c129e4d4583d6478a2e0f8bf0597dac0dc8a
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jul 3 09:51:38 2015 -0700
testfilechooser: Add a --local-only flag
This allows for easier testing of !local-only mode.
tests/testfilechooser.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/tests/testfilechooser.c b/tests/testfilechooser.c
index 0d8ff1c..72c0c5b 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]