From 80bde12a8407745b64cbca225f14a04c81fd877d Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Fri, 21 Jun 2024 23:51:15 +0200 Subject: [PATCH] =?UTF-8?q?WIP:=20plusieurs=20probl=C3=A8mes=20identifi?= =?UTF-8?q?=C3=A9s=20(=C3=A0=20r=C3=A9soudre)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- callback.c | 7 ++++++- contain.c | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/callback.c b/callback.c index 414dc9a..bbc79ab 100644 --- a/callback.c +++ b/callback.c @@ -187,7 +187,12 @@ void on_toggle_EXEC_EDIT (GtkWidget *btt_XOR_EXEC_EDIT, GtkWidget *btt_MODEL_RUN void on_open_STATE (GtkWidget *btt_open_STATE, gpointer data) { printf("on_open_STATE status = %d\n", get_status ()); - window_main_child (main_window, STATE); + printf("gtk_check_button_get_active > after = %d, %d, %d from callback : on_open_STATE()\n",\ + gtk_check_button_get_active (get_GtkButton ("state")), // (GTK_CHECK_BUTTON (btt_open_STATE)), + gtk_check_button_get_active (get_GtkButton ("rules")), // (GTK_CHECK_BUTTON (btt_open_RULES)), + gtk_check_button_get_active (get_GtkButton ("data analysis"))); // (GTK_CHECK_BUTTON (btt_open_DATA))); + + if (! gtk_check_button_get_active (get_GtkButton ("state"))) window_main_child (main_window, STATE); }// SWITCH_TO (STATE);} void on_open_RULES (GtkWidget *btt_open_RULES, gpointer data) { diff --git a/contain.c b/contain.c index 5bc5d18..f01eb0d 100644 --- a/contain.c +++ b/contain.c @@ -218,12 +218,12 @@ void window_header_bar (GtkWindow *window, char *title){ gtk_check_button_get_active (GTK_CHECK_BUTTON (btt_open_RULES)), gtk_check_button_get_active (GTK_CHECK_BUTTON (btt_open_DATA))); - gtk_check_button_set_active (GTK_CHECK_BUTTON (btt_open_STATE), TRUE); +// gtk_check_button_set_active (GTK_CHECK_BUTTON (get_GtkButton ("state")), TRUE); printf("gtk_check_button_get_active > after = %d, %d, %d\n",\ - gtk_check_button_get_active (GTK_CHECK_BUTTON (btt_open_STATE)), - gtk_check_button_get_active (GTK_CHECK_BUTTON (btt_open_RULES)), - gtk_check_button_get_active (GTK_CHECK_BUTTON (btt_open_DATA))); + gtk_check_button_get_active (get_GtkButton ("state")), // (GTK_CHECK_BUTTON (btt_open_STATE)), + gtk_check_button_get_active (get_GtkButton ("rules")), // (GTK_CHECK_BUTTON (btt_open_RULES)), + gtk_check_button_get_active (get_GtkButton ("data analysis"))); // (GTK_CHECK_BUTTON (btt_open_DATA))); gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_XOR_EXEC_EDIT)); gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_MODEL_RUN_STOP));