diff options
author | Brian Tarricone <brian@tarricone.org> | 2008-10-12 07:45:20 +0000 |
---|---|---|
committer | Brian Tarricone <brian@tarricone.org> | 2008-10-12 07:45:20 +0000 |
commit | a93dd6f40add263b52f178a8b587089bd4b56c07 (patch) | |
tree | 0ce0f22c32049fb6be4970aba2f0d27de0a28d5e /xfconf-query | |
parent | 39e1e9b24d096e26569ad143914159eae1afad71 (diff) | |
download | xfconf-a93dd6f40add263b52f178a8b587089bd4b56c07.tar.gz |
add option to force creation of array prop even if only one value
(Old svn revision: 28160)
Diffstat (limited to 'xfconf-query')
-rw-r--r-- | xfconf-query/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xfconf-query/main.c b/xfconf-query/main.c index 8a8bd73..fa7b655 100644 --- a/xfconf-query/main.c +++ b/xfconf-query/main.c @@ -65,6 +65,7 @@ static gboolean verbose = FALSE; static gboolean create = FALSE; static gboolean reset = FALSE; static gboolean recursive = FALSE; +static gboolean force_array = FALSE; static gchar *channel_name = NULL; static gchar *property_name = NULL; static gchar **set_value = NULL; @@ -179,6 +180,10 @@ static GOptionEntry entries[] = N_("Recursive (use with -r)"), NULL }, + { "force-array", 'a', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &force_array, + N_("Force array even if only one element"), + NULL + }, { "export", 'x', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING, &export_file, N_("Export channel"), NULL, @@ -344,7 +349,7 @@ main(int argc, char **argv) } } - if(!set_value[1]) + if(!set_value[1] && !force_array) { /* not an array */ GType gtype = G_TYPE_INVALID; |