summaryrefslogtreecommitdiff
path: root/src/option.c
diff options
context:
space:
mode:
authorArx Cruz <arxcruz@gnome.org>2011-10-13 15:21:32 -0300
committerArx Cruz <arxcruz@gnome.org>2011-10-13 15:21:32 -0300
commitde352548229f60940ed9cc09bcedc883d104f311 (patch)
tree0780f9550e242f195174b37469b63ca3faf0071e /src/option.c
parentInitial support for list/tree on --forms option Added zenity --add-list and -... (diff)
downloadzenity-de352548229f60940ed9cc09bcedc883d104f311.tar.gz
zenity-de352548229f60940ed9cc09bcedc883d104f311.tar.bz2
zenity-de352548229f60940ed9cc09bcedc883d104f311.zip
Revert "Initial support for list/tree on --forms option Added zenity --add-list and --list-values on --forms option. This is an initial support. Next steps add support to multiple selections and multiple columns"
This reverts commit ed825cf92b9d786b9b13361db4a0e696af347a59.
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c43
1 files changed, 4 insertions, 39 deletions
diff --git a/src/option.c b/src/option.c
index 8cfed08b..e9d370d0 100644
--- a/src/option.c
+++ b/src/option.c
@@ -129,7 +129,6 @@ static gboolean zenity_password_show_username;
/* Forms Dialog Options */
static gboolean zenity_forms_active;
static gchar *zenity_forms_date_format;
-static gchar **zenity_forms_list_values;
/* Miscelaneus Options */
static gboolean zenity_misc_about;
@@ -958,24 +957,6 @@ static GOptionEntry forms_dialog_options[] = {
N_("Calendar field name")
},
{
- "add-list",
- '\0',
- 0,
- G_OPTION_ARG_CALLBACK,
- zenity_forms_callback,
- N_("Add a new List in forms dialog"),
- N_("List field and header name")
- },
- {
- "list-values",
- '\0',
- 0,
- G_OPTION_ARG_STRING_ARRAY,
- &zenity_forms_list_values,
- N_("List of values for List"),
- N_("List of values separated by |")
- },
- {
"text",
'\0',
G_OPTION_FLAG_NOALIAS,
@@ -1136,8 +1117,6 @@ zenity_option_free (void) {
if (zenity_forms_date_format)
g_free (zenity_forms_date_format);
- if (zenity_forms_list_values)
- g_strfreev (zenity_forms_list_values);
if (zenity_entry_entry_text)
g_free (zenity_entry_entry_text);
@@ -1194,17 +1173,13 @@ zenity_forms_callback (const gchar *option_name,
GError **error)
{
ZenityFormsValue *forms_value = g_new0 (ZenityFormsValue, 1);
-
- forms_value->option_value = g_strdup (value);
-
- if (g_strcmp0 (option_name, "--add-entry") == 0)
+ forms_value->option_value = g_strdup(value);
+ if (g_strcmp0(option_name, "--add-entry") == 0)
forms_value->type = ZENITY_FORMS_ENTRY;
- else if (g_strcmp0 (option_name, "--add-calendar") == 0)
+ else if (g_strcmp0(option_name, "--add-calendar") == 0)
forms_value->type = ZENITY_FORMS_CALENDAR;
- else if (g_strcmp0 (option_name, "--add-password") == 0)
+ else if (g_strcmp0(option_name, "--add-password") == 0)
forms_value->type = ZENITY_FORMS_PASSWORD;
- else if (g_strcmp0 (option_name, "--add-list") == 0)
- forms_value->type = ZENITY_FORMS_LIST;
results->forms_data->list = g_slist_append(results->forms_data->list, forms_value);
@@ -1858,20 +1833,10 @@ zenity_forms_post_callback (GOptionContext *context,
gpointer data,
GError **error)
{
- gchar *values;
- int i = 0;
-
zenity_option_set_dialog_mode (zenity_forms_active, MODE_FORMS);
if (results->mode == MODE_FORMS) {
results->forms_data->dialog_text = zenity_general_dialog_text;
results->forms_data->separator = zenity_general_separator;
- if (zenity_forms_list_values) {
- values = zenity_forms_list_values[0];
- while (values != NULL) {
- results->forms_data->list_values = g_slist_append (results->forms_data->list_values, values);
- values = zenity_forms_list_values[++i];
- }
- }
if (zenity_forms_date_format)
results->forms_data->date_format = zenity_forms_date_format;
else
bgstack15