summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/option.c16
-rw-r--r--src/tree.c3
-rw-r--r--src/zenity.h1
3 files changed, 20 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c
index 1bc2eafc..58ea5381 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;
diff --git a/src/tree.c b/src/tree.c
index da2cf474..f0fc1873 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -480,6 +480,9 @@ zenity_tree (ZenityData *data, ZenityTreeData *tree_data)
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (tree_view), TRUE);
+ if (tree_data->hide_header)
+ gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (tree_view), FALSE);
+
if (tree_data->radiobox || tree_data->checkbox) {
if (tree_data->data && *tree_data->data)
zenity_tree_fill_entries (GTK_TREE_VIEW (tree_view), tree_data->data, n_columns, TRUE, tree_data->editable);
diff --git a/src/zenity.h b/src/zenity.h
index 3248ad37..fa65b0c0 100644
--- a/src/zenity.h
+++ b/src/zenity.h
@@ -111,6 +111,7 @@ typedef struct {
GSList *columns;
gboolean checkbox;
gboolean radiobox;
+ gboolean hide_header;
gchar *separator;
gboolean multi;
gboolean editable;
bgstack15