summaryrefslogtreecommitdiff
path: root/src/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tree.c')
-rw-r--r--src/tree.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/tree.c b/src/tree.c
index b50a755b..e60e262f 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -354,8 +354,17 @@ zenity_tree (ZenityData *data, ZenityTreeData *tree_data)
gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), GTK_TREE_MODEL (model));
- gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view)),
- GTK_SELECTION_MULTIPLE);
+ if (!(tree_data->radiobox || tree_data->checkbox)) {
+ if (tree_data->multi)
+ gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view)),
+ GTK_SELECTION_MULTIPLE);
+ else
+ gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view)),
+ GTK_SELECTION_SINGLE);
+ }
+ else
+ gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view)),
+ GTK_SELECTION_NONE);
column_index = 0;
bgstack15