From a8477025fe85fc87cb00b8bcb9ad2a212d53342e Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Fri, 16 Feb 2024 09:05:41 +0100 Subject: [PATCH] =?UTF-8?q?WIP:=20Ok=20(cleaned)=20mais=20erreur=20de=20se?= =?UTF-8?q?gmentation=20=C3=A0=20la=20fermeture=20de=20la=20fen=C3=AAtre?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gtk_treeview_example | Bin 28976 -> 28936 bytes main.c | 28 +++++++++++++++------------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/gtk_treeview_example b/gtk_treeview_example index 4163322f91c4911ddfe7dbdc48619e028d25666a..a124d1aef6c2db6c9199d61216b374edd7978016 100755 GIT binary patch delta 10553 zcmZvC1z1$g_x~}5`#3V&RNhv{6Xs_&;UqG05}Ck6)5VQKz~z7<5X6Z>&q!D3 zaXQ2bed3Tf=``7aG))H4BE?B#@ejmUd`KH9PJ%vmAeulS$PF$_$pgt!5`}9V@!SJ7 zBDW+B?<5iM3#dlBa}@fiQI&`iOxciL`)D9F&gp%b$~blIRp2X1e0{)Q+eCE*k1Q>ba%6G zb+@r~fojilLRJ(~C3zGb_)rLq0F*#O4&{RyOGBrL58T56Ac5;45C9xHTuKv@K}`6F zsY9JFizApN9%32Da9Pns;W!*PB}75Xh!ig2qt!(ssY-m07a)W!`@&AH2(NT~t zFEK4O4hFo%XkuY^D|?V5ZoPZH9*AZC>UV~qskBCatG=fLKwgUvGXyI zU4&&~SjK}?fGh^fq_8{zSpu0HmdRnc77F2GP@n$|WJ*}h0xjU63pf}64h9Y#e1ZYg zFyQt9pye=vBfxWLh))jr0HWm=!`N>F8;4Uc1MPWa!k^57souh(n>9Cas~36;i}1OC z!^WV9f!`H$=&comk8};(jeP_g0<)dx29OnW3^ia!OEI~Ha{{y|uv&)$eft4|5I~x- zbN2<9kPjhd0S>xtTw0s4(g)_o(J=(}&;xJt(loE$ArUT5Jn$K5&pg z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WtWpQEYa~uh(np~n6R1%Z6{cvp&M^WNqzPYM-bYpMh z-sE~>``g56Ee^U`Wc?I1N#W#EVXP#?IPeYF6IxeE*?;J-`Sy9m_icyYL(Pj6KApp* z?M`$N91rj;IdQJ47s>;s6r8Jr$==P^!vI&TDlz^?ttP(h=c|QhVJ2wTxnuWF2KK(-=<99-&UJk7IpZ z7rA#HF>=(LT_~98ZtiG+E?(IVqQ<>-Jjk(`!gP(iuUNIbe-Q12N=Zl;L!CcVHU9Or z%lXHg()GSq)hZRElzL(o=baP^6=QnMCW6wamE)pMy=x5{aMcrI`*}E6i&0W^+Th!H z*{@sGi)*IRyv$D{WDQKZ47YE~*oA$Jn{3MBEThzOm3SIEP9?ip`qrW=SYqtb;ae5) z%A^(d+81qpE`)8#e0`ZwGyY5KKDABtbcp!7d@IEs&ha}b?<*hKrl29L-8k9^60#R3 z-~aB%1zFllWA?xDVZn=kxY$8O_TrfRZ-HgtZ-a1Ygyuji_^yX&ZhPvg4gv6|K}Yf5e^g!K*) #include +#define verb 0 + // Simplified TreeNode structure for demonstration purposes struct TreeNode_t { @@ -48,7 +50,7 @@ void add_child_node (struct TreeNode_t *parent, struct TreeNode_t *child) } } -static insert_data() // (TreeNode_t *root) +static void insert_data (struct TreeNode_t *root) { struct TreeNode_t *A = create_tree_node("A"); add_child_node(root, A); struct TreeNode_t *B = create_tree_node("B"); add_child_node(A, B); @@ -89,7 +91,7 @@ GListModel* get_children_model (struct TreeNode_t *parent) GtkStringList *list = NULL; if (parent) { - printf("[get_children_model] here is %s content : ", parent->text); + if (verb) printf("[get_children_model] here is %s content : ", parent->text); child = parent->child; @@ -98,11 +100,11 @@ GListModel* get_children_model (struct TreeNode_t *parent) } while(child) { gtk_string_list_append(list, child->text); - printf("%s ", child->text); + if (verb) printf("%s ", child->text); child = child->next; } } - printf("\n"); + if (verb) printf("\n"); return G_LIST_MODEL(list); } @@ -114,11 +116,11 @@ GListModel* create_model_func(GObject *item, gpointer user_data) struct TreeNode_t *parent = NULL; struct TreeNode_t *res = NULL; - gchar *string = gtk_string_object_get_string(GTK_STRING_OBJECT(item)); + const char* string = gtk_string_object_get_string(GTK_STRING_OBJECT(item)); parent = root; while (cur) { - if (strcmp(string, cur->text) == NULL) { + if (! strcmp(string, cur->text)) { res = cur; break; } @@ -130,7 +132,7 @@ GListModel* create_model_func(GObject *item, gpointer user_data) } } - printf("[create_model_func] here is %s item\n", string); + if (verb) printf("[create_model_func] here is %s item\n", string); return get_children_model(cur); } @@ -148,7 +150,7 @@ void on_setup_factory (GtkListItemFactory *factory, GtkListItem *list_item, gpoi { GtkWidget* expander = gtk_expander_new (NULL); gtk_list_item_set_child (list_item, expander); - printf("[on_setup_factory] here is an expander\n"); + if (verb) printf("[on_setup_factory] here is an expander\n"); } void on_bind_factory (GtkListItemFactory *factory, GtkListItem *list_item, gpointer user_data) @@ -172,14 +174,14 @@ void on_bind_factory (GtkListItemFactory *factory, GtkListItem *list_item, gpoin gboolean is_expanded = gtk_tree_list_row_get_expanded(row); //gtk_tree_list_row_set_expanded(row, !is_expanded); } else { - printf("[on_bind_factory] here is NON %s content\n", text); + if (verb) printf("[on_bind_factory] here is NON %s content\n", text); } } void on_selection_changed (GtkSelectionModel* self, guint position, guint n_items, gpointer user_data) { - printf("Cc\n"); + if (verb) printf("Cc\n"); } // Application activation callback @@ -207,7 +209,7 @@ void app_activate (GApplication *app, gpointer user_data) (GDestroyNotify)g_object_unref //(GDestroyNotify)free_tree_node ); - GtkSingleSelection *selection_model = gtk_single_selection_new ( + GtkSingleSelection *selection_model = gtk_single_selection_new ( // GtkSelectionModel G_LIST_MODEL (tree_model)); gtk_single_selection_set_autoselect(selection_model, FALSE); @@ -215,7 +217,7 @@ void app_activate (GApplication *app, gpointer user_data) g_signal_connect (selection_model, "selection-changed", G_CALLBACK(on_selection_changed), NULL); - GtkWidget *list_view = gtk_list_view_new (selection_model, factory); + GtkWidget *list_view = gtk_list_view_new (GTK_SELECTION_MODEL(selection_model), factory); gtk_window_set_child(GTK_WINDOW(window), list_view); @@ -226,7 +228,7 @@ int main (int argc, char **argv) { // Create a simple tree structure root = create_tree_node("Root"); - insert_data(); + insert_data(root); GtkApplication *app = gtk_application_new("org.gtk.example", G_APPLICATION_FLAGS_NONE); g_signal_connect(app, "activate", G_CALLBACK(app_activate), NULL);