From 785cb54dfb31b35431ed94c3507770d80f5bd8ce Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Sun, 4 Aug 2024 12:45:06 +0200 Subject: [PATCH] populating SYNTH view. Cette structure,... mais tellement souple et robuste... whaaaouh --- src/widget/data/measure.c | 2 +- src/widget/data/operations.c | 6 +++--- src/widget/rules/tree_tools/compare.c | 18 ++++++++++++++---- src/widget/synth/dispatch.c | 3 ++- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/widget/data/measure.c b/src/widget/data/measure.c index 789729e..d465b53 100644 --- a/src/widget/data/measure.c +++ b/src/widget/data/measure.c @@ -58,7 +58,7 @@ void *widget_get_measures_page () gtk_box_append (data_box, GTK_WIDGET (frame_rule_topic)); GtkWidget* frame_measures = gtk_frame_new ("measures"); - GtkBox *measures_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 8)); +// GtkBox *measures_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 8)); gtk_frame_set_child (GTK_FRAME (frame_measures), GTK_WIDGET (data_box)); // gtk_widget_set_size_request (GTK_WIDGET (data_box), 200, 0); diff --git a/src/widget/data/operations.c b/src/widget/data/operations.c index acd0d9f..a66a37c 100644 --- a/src/widget/data/operations.c +++ b/src/widget/data/operations.c @@ -36,11 +36,11 @@ void *widget_get_operations_on_results_page () { GtkWidget *btt_A = gtk_toggle_button_new (); gtk_button_set_icon_name (GTK_BUTTON (btt_A), "view-refresh-symbolic"); - GtkWidget *data_chart = GTK_WIDGET (gtk_picture_new_for_filename - ("/home/jean/Gem-Graph/gem-graph-client/data/image/data charts.png")); +// GtkWidget *data_chart = GTK_WIDGET (gtk_picture_new_for_filename +// ("/home/jean/Gem-Graph/gem-graph-client/data/image/data charts.png")); GtkWidget* frame_analysis = gtk_frame_new ("analysis"); - GtkBox *analysis_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 8)); +// GtkBox *analysis_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 8)); gtk_frame_set_child (GTK_FRAME (frame_analysis), GTK_WIDGET (btt_A)); // gtk_frame_set_child (GTK_FRAME (frame_analysis), GTK_WIDGET (data_chart)); diff --git a/src/widget/rules/tree_tools/compare.c b/src/widget/rules/tree_tools/compare.c index c7d6ea0..babc668 100644 --- a/src/widget/rules/tree_tools/compare.c +++ b/src/widget/rules/tree_tools/compare.c @@ -38,8 +38,9 @@ // ----------------------------------------------------------------------------- // Below is ^c^v from RMS C manual (p 77) 24 * 256 * 256 * 2 = 3 145 728 // +/* struct images_bff {GtkWidget *arr[MAX_SIZE]; int top;}; -static struct images_bff *my_list = NULL, *babar = NULL; +static struct images_bff *my_list = NULL;//, *babar = NULL; static struct images_bff *alloc_images_bff () { struct images_bff *p; @@ -63,7 +64,7 @@ static void free_intlist (struct images_bff *p) // TODO free_intlist (mylist); // TODO mylist = NULL; // TODO offsetof (type, field) -// +*/ // // ----------------------------------------------------------------------- // Below is ^c^v from https://www.geeksforgeeks.org/implement-stack-in-c/ @@ -191,7 +192,7 @@ void *widget_get_an_impression_of_what_a_rules_comparator_could_be(){ -static GtkWidget *do_rtfd (Stack stack) +static GtkWidget *do_rtfd (Stack stack) // TODO { GtkImage *image_insuline = GTK_IMAGE (gtk_image_new_from_resource ("/home/jean/Gem-Graph/gem-graph-client/data/image/insuline.png")); @@ -204,11 +205,20 @@ static GtkWidget *do_rtfd (Stack stack) // = gdk_paintable_get_current_image (GDK_PAINTABLE (image_insuline)); // Gdk-CRITICAL **: 06:20:06.154: gdk_paintable_get_current_image: // assertion 'GDK_IS_PAINTABLE (paintable)' failed - GIcon *hello_dream = G_ICON (image_insuline); +// +// it works !!! >>> GIcon *hello_dream = G_ICON (image_insuline); +// GtkWidget *widget_insuline = GTK_WIDGET (image_insuline); if (image_insuline_storage_type == GTK_IMAGE_ICON_NAME) printf("insuline image now at : %p storage_type : %s\n", &image_insuline, "GTK_IMAGE_ICON_NAME"); + + + push_images_onto_stack (stack); // totalement inutile ici + peek (NULL); // idem +// free_intlist (NULL); // idem +// add_to_mylist (0); // idem + return widget_insuline; } diff --git a/src/widget/synth/dispatch.c b/src/widget/synth/dispatch.c index 241f7df..da9498f 100644 --- a/src/widget/synth/dispatch.c +++ b/src/widget/synth/dispatch.c @@ -33,4 +33,5 @@ #include "../../../include/widget.h" -void *widget_get_synth_page() {return NULL;} +void *widget_get_synth_page() {return GTK_WIDGET (widget_get_space_view());} +