summaryrefslogtreecommitdiff
path: root/src/option.c
diff options
context:
space:
mode:
authorBryce Harrington <bryce@canonical.com>2009-08-10 04:10:53 +0100
committerLucas Rocha <lucasr@gnome.org>2009-08-10 04:10:53 +0100
commit8e190dbb1f39eae31210f7d4c97a4c5ebb496907 (patch)
tree0e8a3ff8e7f7a9756e0a4462bf98024397b9d3b8 /src/option.c
parent171e59e3eae4ff183d690c460f99eea788b70be8 (diff)
Bug 552971 - Add a hide-header option to list dialog
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c
index 1bc2eaf..58ea538 100644
--- a/src/option.c
+++ b/src/option.c
@@ -74,6 +74,7 @@ static gboolean zenity_list_checklist;
static gboolean zenity_list_radiolist;
static gchar *zenity_list_print_column;
static gchar *zenity_list_hide_column;
+static gchar *zenity_list_hide_header;
/* Notification Dialog Options */
static gboolean zenity_notification_active;
@@ -502,6 +503,15 @@ static GOptionEntry list_options[] = {
N_("Hide a specific column"),
N_("NUMBER")
},
+ {
+ "hide-header",
+ '\0',
+ G_OPTION_FLAG_NOALIAS,
+ G_OPTION_ARG_NONE,
+ &zenity_list_hide_header,
+ N_("Hides the column headers"),
+ NULL
+ },
{
NULL
}
@@ -1010,6 +1020,7 @@ zenity_list_pre_callback (GOptionContext *context,
zenity_list_columns = NULL;
zenity_list_checklist = FALSE;
zenity_list_radiolist = FALSE;
+ zenity_list_hide_header = FALSE;
zenity_list_print_column = NULL;
zenity_list_hide_column = NULL;
@@ -1294,6 +1305,7 @@ zenity_list_post_callback (GOptionContext *context,
results->tree_data->editable = zenity_general_editable;
results->tree_data->print_column = zenity_list_print_column;
results->tree_data->hide_column = zenity_list_hide_column;
+ results->tree_data->hide_header = zenity_list_hide_header;
results->tree_data->separator = zenity_general_separator;
} else {
if (zenity_list_columns)
@@ -1315,6 +1327,10 @@ zenity_list_post_callback (GOptionContext *context,
if (zenity_list_hide_column)
zenity_option_error (zenity_option_get_name (list_options, &zenity_list_hide_column),
ERROR_SUPPORT);
+
+ if (zenity_list_hide_header)
+ zenity_option_error (zenity_option_get_name (list_options, &zenity_list_hide_header),
+ ERROR_SUPPORT);
}
return TRUE;