From bbac7d71da9f7b1ac677f5dfe88af8019fe5d5d8 Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Sat, 8 Jun 2024 15:59:09 +0200 Subject: [PATCH] WIP: secure before a little bit tricky touchy point... --- contain.c | 33 +++++++++++++++++++++++---------- contain.h | 1 + 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/contain.c b/contain.c index 01ea074..bc52738 100644 --- a/contain.c +++ b/contain.c @@ -2,6 +2,7 @@ #include #include "callback.h" +#include "in_depth.h" #include "display.h" #include "tree.h" #include "texts.h" @@ -139,14 +140,16 @@ GtkWidget *get_SPACE_VIEW_box(){ return GTK_WIDGET (middle_box); } -GtkWidget *get_space_page_new(){ - GtkBox *page_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); - gtk_box_append (page_box, GTK_WIDGET (get_OBJECTS_and_SITUATIONS())); - gtk_box_append (page_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); - gtk_box_append (page_box, GTK_WIDGET (get_SPACE_VIEW_box())); - gtk_box_append (page_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); - gtk_box_append (page_box, GTK_WIDGET (get_TIME_EXEC_controls_box())); - return GTK_WIDGET (page_box); +GtkWidget *get_SPACE_EDIT_controls_box() { + GtkWidget *label_ad_hoc = gtk_label_new ("_____________\n\ + SPACE EDIT\n controls\n_____________"); + return GTK_WIDGET (label_ad_hoc); +} + + +void window_main_child_bottom (GtkBox *page_box){ + if (get_exec_edit_mode ()) gtk_box_append (page_box, GTK_WIDGET (get_TIME_EXEC_controls_box())); + else gtk_box_append (page_box, GTK_WIDGET (get_SPACE_EDIT_controls_box())); } static void icons_for_fun (GtkHeaderBar *header_bar); @@ -186,13 +189,23 @@ void window_header_bar (GtkWindow *window, char *title){ void window_main_child (GtkWindow *main_window, int selected_page){ // in_depth.c : enum { STATE, RULES, MEASURE, OBSERVE, INTERPRET, HELP, CONFIGURE }; switch (selected_page) { - case (0) : gtk_window_set_child (main_window, GTK_WIDGET (get_space_page_new())); break; + case (0) : // STATE + GtkBox *page_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2)); + gtk_box_append (page_box, GTK_WIDGET (get_OBJECTS_and_SITUATIONS())); + gtk_box_append (page_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); + gtk_box_append (page_box, GTK_WIDGET (get_SPACE_VIEW_box())); + gtk_box_append (page_box, GTK_WIDGET (gtk_separator_new (GTK_ORIENTATION_HORIZONTAL))); + window_main_child_bottom (page_box); +// if (get_exec_edit_mode ()) gtk_box_append (page_box, GTK_WIDGET (get_TIME_EXEC_controls_box())); +// else gtk_box_append (page_box, GTK_WIDGET (get_SPACE_EDIT_controls_box())); + gtk_window_set_child (main_window, GTK_WIDGET (page_box)); + break; case (1) : gtk_window_set_child (main_window, GTK_WIDGET (get_rules_page_new())); break; case (2) : gtk_window_set_child (main_window, GTK_WIDGET (get_measures_page_new())); break; case (3) : gtk_window_set_child (main_window, GTK_WIDGET (get_results_page_new())); break; case (4) : gtk_window_set_child (main_window, GTK_WIDGET (get_discuss_page_new())); break; case (5) : gtk_window_set_child (main_window, GTK_WIDGET (get_help_page_new())); break; - default : gtk_window_set_child (main_window, GTK_WIDGET (get_space_page_new())); + default : gtk_window_set_child (main_window, GTK_WIDGET (get_SPACE_VIEW_box())); // + un "help message" } } diff --git a/contain.h b/contain.h index 698991d..91f5419 100644 --- a/contain.h +++ b/contain.h @@ -35,4 +35,5 @@ void window_main_child (GtkWindow *window, int selected_page); void two_notebooks_in_two_panes (GtkWindow *window); GtkWidget *get_selected_rules_vpaned_new(); GtkFrame *get_frame_with_label(); +void window_main_child_bottom (GtkBox *page_box);