WIP: Un tas de briques n'est pas une maison... (H. Poincarré)

This commit is contained in:
Jean Sirmai 2024-01-13 15:55:56 +01:00
parent 154caf878a
commit ca2a4e332d
Signed by: jean
GPG Key ID: FB3115C340E057E3
1 changed files with 11 additions and 13 deletions

View File

@ -60,18 +60,18 @@ static TreeItem R[] = {{"A", A}, {"B", B}, {"C", C}, {NULL}};
static TreeItem O[] = {{"ROOT", R}, {NULL}}; // Artefact added for symmetry
/* static void */
/* bind_listitem_cb_complex (GtkListItemFactory *factory, */
/* GtkListItem *list_item) */
/* { */
/* GtkWidget *label; */
/* TreeItem *obj; */
static void
bind_listitem_cb_complex (GtkListItemFactory *factory,
GtkListItem *list_item)
{
GtkWidget *label;
TreeItem *obj;
/* label = gtk_list_item_get_child (list_item); */
/* obj = gtk_list_item_get_item (list_item); */
/* gtk_label_set_label (GTK_LABEL (label), */
/* my_object_get_string (obj)); */
/* } */
label = gtk_list_item_get_child (list_item);
obj = gtk_list_item_get_item (list_item);
gtk_label_set_label (GTK_LABEL (label),
my_object_get_string (obj));
}
static GtkWidget *my_tree_view;
static GListModel *my_Glist_model = NULL;
@ -248,12 +248,10 @@ user_function (GListModel *list,
// https://docs.gtk.org/gtk4/class.ListItemFactory.html <<<
// https://www.typeerror.org/docs/gtk~4.0/gtksignallistitemfactory
// https://developer-old.gnome.org/gtk4/stable/GtkListView.html <<< copy that !
// https://docs.gtk.org/gtk4/class.ListItem.html
// https://docs.gtk.org/gtk4/ctor.TreeListModel.new.html ***
// https://blog.gtk.org/2020/06/08/more-on-lists-in-gtk-4/ ***
// https://gitlab.gnome.org/GNOME/gtk/-/blob/main/demos/gtk-demo/listview_settings.c GtkBuilder *builder; (line 216)
// https://discourse.gnome.org/t/how-can-i-get-the-expanded-collapsed-items-in-the-new-gtktreelistmodel-implementation/16824
// https://developer-old.gnome.org/gtk4/stable/GtkSignalListItemFactory.html