From ce531ce280e6f34c223b976d54cb7a354a22e62f Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 26 Mar 2023 00:50:45 +0100 Subject: [PATCH] listview: Add GtkListItem::focusable property This makes the question if a listitem can be focused or not an explicit decision by application developers. Previously an item could be focused if it was selectable and no child or grandchild was focusable - so if you put a label and icon into it, the item was focusable, but if you put a GtkTreeExpander or a GtkButton into it, the item wasn't. This needs to be decided explicitly now. Technically this is an API break, because the previous behavior does not exist anymore. But I really don't want to make this a tristate (focusable, not focusable, automatic), because then binding it to other things gets hard, and because all the other focusable proeprties are booleans, too, and working with them gets a lot harder. Related: #3910 --- demos/gtk-demo/main-listitem.ui | 1 + gtk/gtklistitem.c | 75 +++++++++++++++++++++++++++++ gtk/gtklistitem.h | 5 ++ gtk/gtklistitemprivate.h | 1 + gtk/gtklistitemwidget.c | 85 ++++++++++++++++++--------------- 5 files changed, 129 insertions(+), 38 deletions(-) diff --git a/demos/gtk-demo/main-listitem.ui b/demos/gtk-demo/main-listitem.ui index aab22e3e20..b3427611ed 100644 --- a/demos/gtk-demo/main-listitem.ui +++ b/demos/gtk-demo/main-listitem.ui @@ -1,6 +1,7 @@