summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Pulkkinen <janne.pulkkinen@protonmail.com>2021-07-24 22:01:54 +0300
committerJanne Pulkkinen <janne.pulkkinen@protonmail.com>2021-07-24 22:01:54 +0300
commit91a6c185e9fbf03bf79e8559c3e225a8bf7afaf9 (patch)
treedf2835e1aecf2414b0d76f7800976a6e095ede35
parentabout: Remove Zen wisdom of the ancients (diff)
downloadzenity-91a6c185e9fbf03bf79e8559c3e225a8bf7afaf9.tar.gz
zenity-91a6c185e9fbf03bf79e8559c3e225a8bf7afaf9.tar.bz2
zenity-91a6c185e9fbf03bf79e8559c3e225a8bf7afaf9.zip
Fix search column selection with --imagelist
When --imagelist is in use, use the second column as the search column, as is already the case with --checklist and --radiolist. Any searches until now would only match image path names from the first column.
-rw-r--r--src/tree.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tree.c b/src/tree.c
index d94ce7e8..634ccbf5 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -635,6 +635,14 @@ 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_tree_view_set_search_column (GTK_TREE_VIEW (tree_view),
+ 1);
+ }
+
zenity_util_show_dialog (dialog, data->attach);
if (tree_data->mid_search)
bgstack15