diff --git a/src/main.c b/src/main.c index 8254e07..c5941c4 100644 --- a/src/main.c +++ b/src/main.c @@ -32,26 +32,11 @@ int main(int argc, char **argv) { - GtkWidget *window; - GtkWidget *view; - gtk_init(); - // window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - // g_signal_connect(window, "delete_event", gtk_main_quit, NULL); /* dirty */ - g_signal_connect(window, "delete_event", NULL, NULL); /* dirty */ - // view = create_view_and_model(); - // gtk_container_add(GTK_CONTAINER(window), view); - // gtk_widget_show_all(window); - // gtk_main(); - tree_c_test(); g_autoptr(GemGraphClientApplication) app = NULL; int res; - // bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); - // bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); - // textdomain (GETTEXT_PACKAGE); - app = gem_graph_client_application_new("org.alec.gemgraph", G_APPLICATION_DEFAULT_FLAGS); diff --git a/src/ui/gemgraph.ui b/src/ui/gemgraph.ui index 551619d..5bab8c7 100644 --- a/src/ui/gemgraph.ui +++ b/src/ui/gemgraph.ui @@ -73,6 +73,27 @@ + + + runlib_objects + Objects + True + + + vertical + + + center + <b>Here must be a label (then a tree)</b> + True + 50 + 50 + + + + + + runlib_conditions_and_rules @@ -89,27 +110,6 @@ - - - runlib_objects - Objects - True - - - vertical - - - center - <b>runlib_objects</b> - True - 50 - 50 - - - - - - runlib_states diff --git a/src/ui/tree.c b/src/ui/tree.c index 7fe5d1b..b3968d1 100644 --- a/src/ui/tree.c +++ b/src/ui/tree.c @@ -176,22 +176,16 @@ tree_c_test(void) static void tree_c_printing_test(void) { printf("tree_c_printing_test() \ -------------------------------------------------------------------\n\ -(https://en.wikibooks.org/wiki/GTK (modulo) 2B_By_Example/Tree_View/Columns_and_Renderer)\n\ -Trying to adapt the first example of this tuto to display a simple tree view in our window.\n\ -Can't use :\n\ - - gtk_init(&argc, &argv);\n\ - - window = gtk_tree_view_new(GTK_WINDOW_TOPLEVEL);\n\ - - g_signal_connect(window, 'delete_event', gtk_main_quit, NULL);\n\ - - tree_c_test(); (or : create_view_and_model() or some equivalent tree description)\n\ - - gtk_container_add(GTK_CONTAINER(window), view);\n\ - - gtk_widget_show_all(window);\n\ - - gtk_main();\n\ -(see main.c lines 35-44)\n\ +-----------------------------------\n\ +Changement de cap : comment mettre un label (puis un arbre)\n\ + dans la GtkBox *runlib_objects; de windows.c (ligne 61)\n\ + ?\n\ "); } // https://en.wikibooks.org/wiki/GTK%2B_By_Example/Tree_View/Tree_Models +// https://stackoverflow.com/questions/74556059/how-to-build-a-tree-in-gtk4-4-10 +// /* https://stackoverflow.com/questions/51002454/how-to-list-all-the-rows-of-a-gtk-treeview @@ -328,3 +322,18 @@ public class SharpApp : Window } */ + + +/* +(https://en.wikibooks.org/wiki/GTK%2B_By_Example/Tree_View/Columns_and_Renderer)\n\ +Trying to adapt the first example of this tuto to display a simple tree view in our window.\n\ +Can't use :\n\ + - gtk_init(&argc, &argv);\n\ + - window = gtk_tree_view_new(GTK_WINDOW_TOPLEVEL);\n\ + - g_signal_connect(window, 'delete_event', gtk_main_quit, NULL);\n\ + - tree_c_test(); (or : create_view_and_model() or some equivalent tree description)\n\ + - gtk_container_add(GTK_CONTAINER(window), view);\n\ + - gtk_widget_show_all(window);\n\ + - gtk_main();\n\ +(see main.c lines 35-44)\n\ +*/