From 0706aac1d3da2dd8c3a65573b2aebd03f242b670 Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Thu, 13 Jun 2024 09:35:36 +0200 Subject: [PATCH] WIP: the btt_toggle_STATE_RULES_DATA switches between : 'rules', 'state' and 'analyse' --- callback.c | 12 +++++++----- contain.c | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/callback.c b/callback.c index fba6dec..53877c9 100644 --- a/callback.c +++ b/callback.c @@ -190,12 +190,14 @@ void on_toggle_STATE_RULES_DATA (GtkWidget *btt_toggle_STATE_RULES_DATA, gpointe // if (! strcmp (current_label, "rules")) printf ("callback.c (line 190) - strcomp +\n"); // else printf ("callback.c (line 191) - strcomp -\n"); - if (! strcmp (current_label, "rules")) gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), "state"); - else gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), "rules"); +// if (! strcmp (current_label, "rules")) gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), "state"); +// else gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), "rules"); -// if (! strcmp (current_label, " rules ")) gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), " state "); -// else if (! strcmp (current_label, " state ")) gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), "analyse"); -// else if (! strcmp (current_label, "analyse")) gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), " rules "); + if (0) printf ("callback.c (line 191) - current_label = %s\n", current_label); + + if (! strcmp (current_label, " rules ")) gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), " state "); + else if (! strcmp (current_label, " state ")) gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), "analyse"); + else gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), " rules "); // gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), "state"); diff --git a/contain.c b/contain.c index d8104f1..f2ba5fc 100644 --- a/contain.c +++ b/contain.c @@ -177,7 +177,7 @@ void window_header_bar (GtkWindow *window, char *title){ GtkButton *run_stop_model_exec = GTK_BUTTON (gtk_button_new_with_label (" run ")); g_signal_connect (run_stop_model_exec, "clicked", G_CALLBACK (on_toggle_model_exec), no_local_data); - GtkButton *btt_toggle_STATE_RULES_DATA = GTK_BUTTON (gtk_button_new_with_label ("rules")); + GtkButton *btt_toggle_STATE_RULES_DATA = GTK_BUTTON (gtk_button_new_with_label (" rules ")); g_signal_connect (btt_toggle_STATE_RULES_DATA, "clicked", G_CALLBACK (on_toggle_STATE_RULES_DATA), no_local_data); // GtkButton *observ_interpret = GTK_BUTTON (gtk_button_new_with_label ("data analysis"));