WIP: simple, facile mais soit 'rules' soit 'state' n'apparait pas quand toggle data_analysis

This commit is contained in:
Jean Sirmai 2024-06-14 00:08:02 +02:00
parent 00f88d1c36
commit 83c3254732
Signed by: jean
GPG Key ID: FB3115C340E057E3
3 changed files with 20 additions and 19 deletions

View File

@ -175,25 +175,26 @@ void on_toggle_exec_edit (GtkWidget *btt_exec_xor_edit, GtkWidget *btt_run_stop_
} }
void on_toggle_STATE_RULES_DATA (GtkWidget *btt_toggle_STATE_RULES_DATA, gpointer data) void on_toggle_STATE_RULES (GtkWidget *btt_toggle_STATE_RULES, gpointer data)
{ {
const char* current_label = gtk_button_get_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA)); const char* current_label = gtk_button_get_label (GTK_BUTTON (btt_toggle_STATE_RULES));
if (0) printf ("callback.c (line 191) - current_label = %s\n", current_label); if (0) printf ("callback.c (line 191) - current_label = %s\n", current_label);
if (! strcmp (current_label, "analyse")) { if (! strcmp (current_label, "rules")) {
gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), " state "); gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES), "state");
window_main_child (main_window, 0);
}
else if (! strcmp (current_label, " state ")) {
gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), " rules ");
window_main_child (main_window, 1); window_main_child (main_window, 1);
} }
else { else if (! strcmp (current_label, "state")) {
gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES_DATA), "analyse"); gtk_button_set_label (GTK_BUTTON (btt_toggle_STATE_RULES), "rules");
window_main_child (main_window, 2); window_main_child (main_window, 0);
} }
} }
void on_toggle_ANALYSIS (GtkWidget *btt_toggle_ANALYSIS, gpointer data)
{
window_main_child (main_window, 2);
}
void on_SAVE_CURRENT_MODEL_BEFORE_EDITING (GtkWidget *btt_SAVE_CURRENT_MODEL, gpointer data) { void on_SAVE_CURRENT_MODEL_BEFORE_EDITING (GtkWidget *btt_SAVE_CURRENT_MODEL, gpointer data) {
gtk_widget_set_sensitive (GTK_WIDGET (data), TRUE); gtk_widget_set_sensitive (GTK_WIDGET (data), TRUE);
printf ("callback.c (line 201) - SAVE_CURRENT_MODEL_BEFORE_EDITING\n"); printf ("callback.c (line 201) - SAVE_CURRENT_MODEL_BEFORE_EDITING\n");

View File

@ -16,8 +16,8 @@ void on_axis_value_change (GtkAdjustment *adjustment, gpointer data);
void on_toggle_exec_edit (GtkWidget *btt_exec_xor_edit, GtkWidget *btt_run_stop_model_exec); void on_toggle_exec_edit (GtkWidget *btt_exec_xor_edit, GtkWidget *btt_run_stop_model_exec);
void on_toggle_model_exec (GtkWidget *btt_run_stop_model_exec, gpointer data); void on_toggle_model_exec (GtkWidget *btt_run_stop_model_exec, gpointer data);
void on_toggle_STATE_RULES_DATA (GtkWidget *btt_toggle_STATE_RULES_DATA, gpointer data); void on_toggle_STATE_RULES (GtkWidget *btt_toggle_STATE_RULES_DATA, gpointer data);
void on_toggle_observ_interpret (GtkWidget *btt_toggle_observ_interpret, gpointer data); void on_toggle_ANALYSIS (GtkWidget *btt_toggle_ANALYSIS, gpointer data);
void on_SAVE_CURRENT_MODEL_BEFORE_EDITING (GtkWidget *btt_SAVE_CURRENT_MODEL, gpointer data); void on_SAVE_CURRENT_MODEL_BEFORE_EDITING (GtkWidget *btt_SAVE_CURRENT_MODEL, gpointer data);
void on_DISCARD_CURRENT_MODEL_AND_START_EDITING (GtkWidget *btt_SAVE_CURRENT_MODEL, gpointer data); void on_DISCARD_CURRENT_MODEL_AND_START_EDITING (GtkWidget *btt_SAVE_CURRENT_MODEL, gpointer data);

View File

@ -177,17 +177,17 @@ void window_header_bar (GtkWindow *window, char *title){
GtkButton *run_stop_model_exec = GTK_BUTTON (gtk_button_new_with_label (" run ")); 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); 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 (" state ")); GtkButton *btt_toggle_STATE_RULES = 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); g_signal_connect (btt_toggle_STATE_RULES, "clicked", G_CALLBACK (on_toggle_STATE_RULES), no_local_data);
// GtkButton *observ_interpret = GTK_BUTTON (gtk_button_new_with_label ("data analysis")); GtkButton *btt_toggle_ANALYSIS = GTK_BUTTON (gtk_button_new_with_label ("data analysis"));
// g_signal_connect (observ_interpret, "clicked", G_CALLBACK (on_toggle_observ_interpret), no_local_data); g_signal_connect (btt_toggle_ANALYSIS, "clicked", G_CALLBACK (on_toggle_ANALYSIS), btt_toggle_STATE_RULES);
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (exec_xor_edit)); gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (exec_xor_edit));
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (run_stop_model_exec)); gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (run_stop_model_exec));
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (any_Label)); gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (any_Label));
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_toggle_STATE_RULES_DATA)); gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_toggle_STATE_RULES));
// gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (observ_interpret)); gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_toggle_ANALYSIS));
icons_for_fun (GTK_HEADER_BAR (header_bar)); // https://iconduck.com/sets/adwaita-icon-theme icons_for_fun (GTK_HEADER_BAR (header_bar)); // https://iconduck.com/sets/adwaita-icon-theme
} }