diff options
author | Logan Rathbone <poprocks@gmail.com> | 2023-08-10 11:29:13 -0400 |
---|---|---|
committer | Logan Rathbone <poprocks@gmail.com> | 2023-08-10 11:29:13 -0400 |
commit | 0de4da6691c526f761a7dcdfb50bac053f03b8ee (patch) | |
tree | bd6bdbc3e525b1ee989dffc191983e6741904227 /src | |
parent | 3.44.1 (diff) | |
download | zenity-0de4da6691c526f761a7dcdfb50bac053f03b8ee.tar.gz zenity-0de4da6691c526f761a7dcdfb50bac053f03b8ee.tar.bz2 zenity-0de4da6691c526f761a7dcdfb50bac053f03b8ee.zip |
tree: Set search column to 1 for check/radiolists
We expand 91a6c185 to apply to check/radiolists as the first column
(ie, true/false) gets selected as the search column by default unless it
is explicitly set.
nb: Although acc. to the GtkTreeView docs, the default property for
'search-column' is -1 (ie, disable search) it seems that gtktreeview.c
will auotmatically select the first available column as being searchable
(ie, 0) so it is not necessary to explicitly set this property to 0 in
other non-image/radio/checklist cases.
Fixes #49
Diffstat (limited to 'src')
-rw-r--r-- | src/tree.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -642,10 +642,10 @@ zenity_tree (ZenityData *data, ZenityTreeData *tree_data) { tree_data->editable); } - /* GTK will automatically pick the image column as the search column - * despite it not containing any user readable text. - * Set it to second column instead if it exists. */ - if (tree_data->imagebox && n_columns > 1) { + /* GTK will automatically pick the image/checkbox/radiobox column as the + * search column despite it not containing any user readable text. + * Set it to second column instead if any of the above exists. */ + if ((tree_data->imagebox || tree_data->radiobox || tree_data->checkbox) && n_columns > 1) { gtk_tree_view_set_search_column (GTK_TREE_VIEW (tree_view), 1); } |