must journal include widget specificities (window, button, glarea, etc.) ?
This commit is contained in:
parent
adeee11597
commit
586dc4c7fa
|
@ -60,6 +60,14 @@ typedef struct disp_list {int value; struct disp_list *suiv;} disp_list ;
|
|||
#define DEBUG 5
|
||||
#define SPEW 6 // THE_LOWER THE PRIORITY, THE HIGHER THE INDEX
|
||||
|
||||
// WINDOW BUTTON GLIDER GLAREA etc.
|
||||
#define WINDOW 0
|
||||
#define BUTTON 1
|
||||
#define SCROLL 2
|
||||
#define GLAREA 3
|
||||
#define TEXT 4
|
||||
#define LABEL 5
|
||||
|
||||
#define JOURNAL_DATE_MAX_LENGTH 255
|
||||
|
||||
typedef struct unit {long yy_dd_mm;
|
||||
|
@ -87,7 +95,8 @@ void fsm_journal_test (char *message);
|
|||
// ref: sudo cat /var/log/messages
|
||||
// journal fsm_get_journal(); // def: fsm/dispatch call: fsm/prefer/fsm_store_restore_reset()
|
||||
void fsm_journal_publication_request (); // def: fsm/dispatch call: main;
|
||||
void fsm_journal_event (char *message, int priority); // def: fsm/dispatch call: widget/dispatch;
|
||||
void fsm_journal_event (char *message, int priority, int specificity);
|
||||
// def: fsm/dispatch call: widget/dispatch;
|
||||
// --------------------------------------------------------------- WIP ------
|
||||
|
||||
|
||||
|
|
|
@ -62,11 +62,11 @@ void fsm_journal_publication_request () {fsm_journal_publish (gg_logs);}
|
|||
|
||||
|
||||
#define CRITICAL___ERROR____WARNING___INFO____MESSAGE___DEBUG ___SPEW____😄️ 0
|
||||
void fsm_journal_event (char *message, int priority)
|
||||
void fsm_journal_event (char *message, int priority, int specificity)
|
||||
{
|
||||
// CRITICAL ERROR WARNING INFO MESSAGE DEBUG SPEW 😄️
|
||||
// 0 1 2 3 4 5 6
|
||||
if (priority < DEBUG) fsm_journal_push_front (&gg_logs, message);
|
||||
if (priority < DEBUG) fsm_journal_push (message);
|
||||
}
|
||||
#define _CRITICAL___ERROR____WARNING___INFO____MESSAGE___DEBUG ___SPEW____👋️ 0
|
||||
|
||||
|
@ -77,23 +77,23 @@ void fsm_journal_event (char *message, int priority)
|
|||
void fsm_init (char *initial_message_from_main)
|
||||
{
|
||||
fsm_journal_init (&gg_logs);
|
||||
fsm_journal_push_front (&gg_logs, initial_message_from_main);
|
||||
fsm_journal_push (initial_message_from_main);
|
||||
|
||||
fsm_journal_push_front (&gg_logs, "fsm/dispatch initialisation fsm has began");
|
||||
fsm_journal_push ("fsm/dispatch initialisation fsm has began");
|
||||
|
||||
fsm_measures_list_init();
|
||||
fsm_journal_push_front (&gg_logs, "fsm/dispatch measures list init()");
|
||||
fsm_journal_push ("fsm/dispatch measures list init()");
|
||||
|
||||
fsm_results_list_init();
|
||||
fsm_journal_push_front (&gg_logs, "fsm/dispatch results list init()");
|
||||
fsm_journal_push ("fsm/dispatch results list init()");
|
||||
|
||||
fsm_displayable_list_init();
|
||||
fsm_journal_push_front (&gg_logs, "fsm/dispatch displayable list init()");
|
||||
fsm_journal_push ("fsm/dispatch displayable list init()");
|
||||
|
||||
fsm_preferences_list_init();
|
||||
fsm_journal_push_front (&gg_logs, "fsm/dispatch preferences list init()");
|
||||
fsm_journal_push ("fsm/dispatch preferences list init()");
|
||||
|
||||
fsm_journal_push_front (&gg_logs, "fsm/dispatch initialisation fsm has ended");
|
||||
fsm_journal_push ("fsm/dispatch initialisation fsm has ended");
|
||||
}
|
||||
|
||||
|
||||
|
@ -107,10 +107,12 @@ static int preferences_have_been_modified = FALSE;
|
|||
void fsm_set_preferences_modified (bool value)
|
||||
{
|
||||
preferences_have_been_modified = value;
|
||||
if (value) fsm_journal_push_front (&gg_logs,
|
||||
"fsm/dispatch fsm set preferences modified (TRUE)");
|
||||
else fsm_journal_push_front (&gg_logs,
|
||||
"fsm/dispatch fsm set preferences modified (FALSE)");
|
||||
/*
|
||||
if (value) fsm_journal_push (
|
||||
"fsm/dispatch set preferences modified (TRUE)"); // TODO concat value
|
||||
else fsm_journal_push (
|
||||
"fsm/dispatch set preferences modified (FALSE)");
|
||||
*/
|
||||
}
|
||||
|
||||
bool fsm_get_preferences_state() {return preferences_have_been_modified;}
|
||||
|
@ -134,7 +136,7 @@ int fsm_get_state_rules_data() {return choice_STATE_RULES_DATA;}
|
|||
void fsm_set_exec_edit (int choice)
|
||||
{
|
||||
if (choice_EXEC_EDIT != choice) {
|
||||
// fsm_msg (choice, 0, "", 0); // EXEC_EDIT is sub_automaton 0
|
||||
fsm_journal_push ("fsm/dispatch set_exec_edit()"); // TODO print choice
|
||||
choice_EXEC_EDIT = choice;
|
||||
}
|
||||
}
|
||||
|
@ -142,14 +144,14 @@ void fsm_set_exec_edit (int choice)
|
|||
void fsm_set_state_rules_data (int choice)
|
||||
{
|
||||
if (choice_STATE_RULES_DATA != choice) {
|
||||
// fsm_msg (choice, 0, "", 1); // STATE_RULES_DATA is sub_automaton 1
|
||||
fsm_journal_push ("fsm/dispatch set_state_rules_data()"); // TODO print choice
|
||||
choice_STATE_RULES_DATA = choice;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* D E B U G G I N G */
|
||||
/* switch D E B U G G I N G */
|
||||
/******************************************************************************/
|
||||
|
||||
static char *tab_0 [] = { "EXEC", "EDIT" };
|
||||
|
@ -160,16 +162,20 @@ void fsm_msg (int choice, int value, char *string, int sub_automaton)
|
|||
switch (sub_automaton) { // sub_automaton 0 is EXEC_EDIT and
|
||||
// sub_automaton 1 is STATE_RULES_DATA
|
||||
// sub_automaton 2 is MEASURE
|
||||
case (0) : printf ("fsm/dispatch (message) |\
|
||||
switch %5s x %5s > %5s x %5s\n",
|
||||
tab_0 [choice_EXEC_EDIT], tab_1 [choice_STATE_RULES_DATA],
|
||||
tab_0 [choice], tab_1 [choice_STATE_RULES_DATA]);
|
||||
case (0) :
|
||||
fsm_journal_push ("fsm/dispatch switch EXEC_EDIT (TODO)"); // TODO print choice
|
||||
printf ("fsm/dispatch (message) |\
|
||||
switch %5s x %5s > %5s x %5s\n",
|
||||
tab_0 [choice_EXEC_EDIT], tab_1 [choice_STATE_RULES_DATA],
|
||||
tab_0 [choice], tab_1 [choice_STATE_RULES_DATA]);
|
||||
break;
|
||||
|
||||
case (1) : printf ("fsm/dispatch (message) |\
|
||||
switch %5s x %5s > %5s x %5s\n",
|
||||
tab_0 [choice_EXEC_EDIT], tab_1 [choice_STATE_RULES_DATA],
|
||||
tab_0 [choice_EXEC_EDIT], tab_1 [choice]);
|
||||
case (1) :
|
||||
fsm_journal_push ("fsm/dispatch switch STATE_RULES_DATA (TODO)"); // TODO print choice
|
||||
printf ("fsm/dispatch (message) |\
|
||||
switch %5s x %5s > %5s x %5s\n",
|
||||
tab_0 [choice_EXEC_EDIT], tab_1 [choice_STATE_RULES_DATA],
|
||||
tab_0 [choice_EXEC_EDIT], tab_1 [choice]);
|
||||
break;
|
||||
|
||||
case (2) : // printf ("fsm/dispatch (message) | %s\n", string);
|
||||
|
@ -180,6 +186,7 @@ void fsm_msg (int choice, int value, char *string, int sub_automaton)
|
|||
|
||||
|
||||
default : printf ("default in fsm/dispatch.fsm_msg()\n");
|
||||
fsm_journal_push ("fsm/dispatch fsm_msg () default in switch (sub_automaton)");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ void fsm_store_restore_reset (int choice, int value)
|
|||
switch (choice) {
|
||||
case (STORE) :
|
||||
fsm_journal_push (
|
||||
"fsm/prefer fsm store restore reset(): switch (STORE)");
|
||||
"fsm/prefer store restore reset(): switch (STORE)");
|
||||
for (int i = 0; i < n_objects; i++) {
|
||||
p [i] = widget_get_object_transparency (i);
|
||||
widget_set_object_transparency_to_value (i, p [i]);
|
||||
|
@ -82,19 +82,19 @@ void fsm_store_restore_reset (int choice, int value)
|
|||
break;
|
||||
case (RESTORE) :
|
||||
fsm_journal_push (
|
||||
"fsm/prefer fsm store restore reset(): switch (RESTORE)");
|
||||
"fsm/prefer store restore reset(): switch (RESTORE)");
|
||||
for (int i = 0; i < n_objects; i++)
|
||||
widget_set_object_transparency_to_value (i, p [i]);
|
||||
break;
|
||||
case (RESET) :
|
||||
fsm_journal_push (
|
||||
"fsm/prefer fsm store restore reset(): switch (RESET)");
|
||||
"fsm/prefer store restore reset(): switch (RESET)");
|
||||
for (int i = 0; i < n_objects; i++)
|
||||
widget_set_object_transparency_to_value (i, value); // i * 4 // rand() % 127
|
||||
break;
|
||||
default :
|
||||
fsm_journal_push (
|
||||
"fsm/prefer fsm store restore reset(): switch (default)");
|
||||
"fsm/prefer store restore reset(): switch (default)");
|
||||
}
|
||||
|
||||
fsm_set_preferences_modified (TRUE);
|
||||
|
@ -109,9 +109,9 @@ static int reset_situations_to_value = -1;
|
|||
|
||||
void fsm_reset_all_situations_transparencies_at_value (int value)
|
||||
{
|
||||
char str1[140] = "fsm/prefer fsm reset all situations transparencies at value() ";
|
||||
char str1[140] = "fsm/prefer reset all situations transparencies at value() ";
|
||||
char str2[10]; sprintf(str2, "%d, ", value); strcat(str1, str2);
|
||||
fsm_journal_push ("fsm/prefer fsm reset all situations transparencies at value() "); // TODO
|
||||
fsm_journal_push ("fsm/prefer reset all situations transparencies at value() "); // TODO
|
||||
reset_situations_to_value = value;
|
||||
widget_reset_all_situations_transparencies_to_value (value);
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ void fsm_reset_all_situations_transparencies_at_value (int value)
|
|||
void fsm_add_displayable (char *displayable_name)
|
||||
{
|
||||
fsm_journal_push (
|
||||
strcat("fsm/prefer fsm add displayable() ", displayable_name)); // TODO
|
||||
strcat("fsm/prefer add displayable() ", displayable_name)); // TODO
|
||||
}
|
||||
|
||||
|
||||
|
@ -136,11 +136,11 @@ void fsm_add_displayable (char *displayable_name)
|
|||
/******************************************************************************/
|
||||
void fsm_preferences_list_init ()
|
||||
{
|
||||
fsm_journal_push ("fsm/prefer fsm preferences init()");
|
||||
fsm_journal_push ("fsm/prefer preferences list required()");
|
||||
}
|
||||
|
||||
void fsm_displayable_list_init ()
|
||||
{
|
||||
fsm_journal_push ("fsm/prefer fsm display init()");
|
||||
fsm_journal_push ("fsm/prefer displayable list required()");
|
||||
}
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ int main (int argc, char **argv)
|
|||
GtkApplication *app = gtk_application_new ("org.gem-graph",
|
||||
G_APPLICATION_DEFAULT_FLAGS);
|
||||
|
||||
fsm_journal_push ("main g_signal_connect (app <--> on_windows_startup)");
|
||||
fsm_journal_push ("main g signal connect (app <--> on_windows_startup)");
|
||||
g_signal_connect (app, "startup", G_CALLBACK (on_windows_startup), NULL);
|
||||
g_signal_connect (app, "activate", G_CALLBACK (on_windows_activation), NULL);
|
||||
// ! WARNING ! 'on_windows_activation()'
|
||||
|
@ -148,7 +148,7 @@ int main (int argc, char **argv)
|
|||
|
||||
int status = g_application_run (G_APPLICATION (app), argc, argv);
|
||||
g_object_unref (app);
|
||||
fsm_journal_push ("main g_object_unref (app)");
|
||||
fsm_journal_push ("main g object unref (app)");
|
||||
|
||||
fsm_journal_push ("main That'all folks ! 👋️😄️");
|
||||
fsm_journal_publication_request();
|
||||
|
|
145
src/signal.c
145
src/signal.c
|
@ -36,7 +36,7 @@
|
|||
|
||||
static void on_auto_notification (const char *message)
|
||||
{
|
||||
fsm_journal_event ("signal on auto notification()", INFO);
|
||||
fsm_journal_event ("signal auto notification() has began", DEBUG, 0);
|
||||
/* Ignored (2024-06-06) because I don't know how to get "main_window" easily
|
||||
|
||||
if (window->toast_revealer == NULL) {
|
||||
|
@ -53,7 +53,7 @@ static void on_auto_notification (const char *message)
|
|||
gtk_revealer_set_reveal_child(window->toast_revealer, true);
|
||||
*/
|
||||
g_printerr("%s\n", message);
|
||||
fsm_journal_event ("signal on auto notification()", DEBUG);
|
||||
fsm_journal_event ("signal auto notification() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -64,11 +64,11 @@ static void on_auto_notification (const char *message)
|
|||
static void on_user_tree_expander_toggled (GtkExpander *expander,
|
||||
gpointer user_data)
|
||||
{
|
||||
fsm_journal_event ("signal on user tree expander toggled()", DEBUG);
|
||||
fsm_journal_event ("signal user tree expander toggled() has began", DEBUG, 0);
|
||||
GtkTreeListRow *row = GTK_TREE_LIST_ROW (user_data);
|
||||
gboolean is_expanded = gtk_tree_list_row_get_expanded (row);
|
||||
gtk_tree_list_row_set_expanded (row, ! is_expanded);
|
||||
fsm_journal_event ("signal on user tree expander toggled()", SPEW);
|
||||
fsm_journal_event ("signal user tree expander toggled() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -76,7 +76,7 @@ void on_bind_user_tree_factory (GtkSignalListItemFactory *factory,
|
|||
GObject* object,
|
||||
gpointer user_data)
|
||||
{
|
||||
fsm_journal_event ("signal on bind user tree factory()", DEBUG);
|
||||
fsm_journal_event ("signal bind user tree factory() has began", DEBUG, 0);
|
||||
GtkListItem *list_item = GTK_LIST_ITEM (object);
|
||||
assert (list_item);
|
||||
|
||||
|
@ -96,15 +96,15 @@ void on_bind_user_tree_factory (GtkSignalListItemFactory *factory,
|
|||
row);
|
||||
gtk_widget_set_margin_start (expander,
|
||||
gtk_tree_list_row_get_depth(row) * 20);
|
||||
fsm_journal_event ("signal on bind user tree factory()", SPEW);
|
||||
fsm_journal_event ("signal bind user tree factory() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
void on_setup_user_tree_factory (GtkSignalListItemFactory *factory,
|
||||
GObject* object, gpointer user_data){
|
||||
fsm_journal_event ("signal on setup user tree factory()", DEBUG);
|
||||
fsm_journal_event ("signal setup user tree factory() has began", DEBUG, 0);
|
||||
GtkWidget* expander = gtk_expander_new (NULL);
|
||||
gtk_list_item_set_child (GTK_LIST_ITEM (object), expander);
|
||||
fsm_journal_event ("signal on setup user tree factory()", SPEW);
|
||||
fsm_journal_event ("signal setup user tree factory() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -115,7 +115,7 @@ void on_setup_user_tree_factory (GtkSignalListItemFactory *factory,
|
|||
gboolean on_glarea_render (GtkGLArea *area,
|
||||
GdkGLContext *context)
|
||||
{
|
||||
fsm_journal_event ("signal on glarea render()", SPEW);
|
||||
fsm_journal_event ("signal glarea render() has began", DEBUG, 0);
|
||||
// Check if the widget is a glarea
|
||||
if(gtk_gl_area_get_error(area) != NULL) {
|
||||
on_auto_notification("An OpenGL error occured !");
|
||||
|
@ -127,7 +127,7 @@ gboolean on_glarea_render (GtkGLArea *area,
|
|||
return false;
|
||||
}
|
||||
|
||||
fsm_journal_event ("signal on glarea render()", SPEW);
|
||||
fsm_journal_event ("signal glarea render() has ended", DEBUG, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ gboolean on_glarea_render (GtkGLArea *area,
|
|||
/* We need to set up our state when we realize the GtkGLArea widget */
|
||||
void on_glarea_realize (GtkWidget *widget)
|
||||
{
|
||||
fsm_journal_event ("signal on glarea realize()", DEBUG);
|
||||
fsm_journal_event ("signal glarea realize() has began", DEBUG, 0);
|
||||
GError *internal_error = NULL;
|
||||
|
||||
// Make the GL context current to be able to call the GL API
|
||||
|
@ -156,13 +156,13 @@ void on_glarea_realize (GtkWidget *widget)
|
|||
}
|
||||
|
||||
gtk_gl_area_set_auto_render(GTK_GL_AREA(widget), true);
|
||||
fsm_journal_event ("signal on glarea realize()", SPEW);
|
||||
fsm_journal_event ("signal glarea realize() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
/* We should tear down the state when unrealizing */
|
||||
void on_glarea_unrealize (GtkWidget *widget)
|
||||
{
|
||||
fsm_journal_event ("signal on glarea unrealize()", DEBUG);
|
||||
fsm_journal_event ("signal glarea unrealize() has began", DEBUG, 0);
|
||||
GError *internal_error = NULL;
|
||||
|
||||
// Make the GL context current to be able to call the GL API
|
||||
|
@ -171,7 +171,7 @@ void on_glarea_unrealize (GtkWidget *widget)
|
|||
// Check if the widget is a glarea
|
||||
if(gtk_gl_area_get_error(GTK_GL_AREA(widget)) != NULL) {
|
||||
on_auto_notification("An OpenGL error occured !");
|
||||
fsm_journal_event ("signal on glarea unrealize()", SPEW);
|
||||
fsm_journal_event ("signal glarea unrealize() has ended", DEBUG, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -180,15 +180,15 @@ void on_glarea_unrealize (GtkWidget *widget)
|
|||
internal_error) == false) {
|
||||
on_auto_notification(
|
||||
"Failed to shutdown the graphic stack !");
|
||||
fsm_journal_event ("signal on glarea unrealize()", SPEW);
|
||||
fsm_journal_event ("signal glarea unrealize() has ended", DEBUG, 0);
|
||||
return;
|
||||
}
|
||||
fsm_journal_event ("signal on glarea unrealize()", SPEW);
|
||||
fsm_journal_event ("signal glarea unrealize() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
void on_axis_value_change (GtkAdjustment *adjustment, gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on axis value change()", DEBUG);
|
||||
fsm_journal_event ("signal axis value change() has began", DEBUG, 0);
|
||||
|
||||
GtkWidget *slider = gtk_widget_get_parent(GTK_WIDGET(data));
|
||||
GtkWidget *container_widget = gtk_widget_get_parent(GTK_WIDGET(slider));
|
||||
|
@ -216,25 +216,25 @@ void on_axis_value_change (GtkAdjustment *adjustment, gpointer data)
|
|||
void on_save_current_model_before_editing (GtkWidget *btt_SAVE_CURRENT_MODEL,
|
||||
gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on save current model before editing()", INFO);
|
||||
fsm_journal_event ("signal save current model before editing() has began", INFO, 0);
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (data), TRUE);
|
||||
fsm_journal_event ("signal on save current model before editing()", DEBUG);
|
||||
fsm_journal_event ("signal save current model before editing() has ended", INFO, 0);
|
||||
}
|
||||
|
||||
void on_discard_current_model_before_editing (GtkWidget *btt_SAVE_CURRENT_MODEL,
|
||||
gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on discard current model before editing()", INFO);
|
||||
fsm_journal_event ("signal discard current model before editing() has began", INFO, 0);
|
||||
gtk_window_close (GTK_WINDOW (data));
|
||||
fsm_journal_event ("signal on discard current model before editing()", DEBUG);
|
||||
fsm_journal_event ("signal discard current model before editing() has ended", INFO, 0);
|
||||
}
|
||||
|
||||
void on_write_current_model (GtkWidget *btt_WRITE_CURRENT_MODEL,
|
||||
gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on write current model()", INFO);
|
||||
fsm_journal_event ("signal write current model() has began", INFO, 0);
|
||||
gtk_window_close (GTK_WINDOW (data));
|
||||
fsm_journal_event ("signal on write current model()", DEBUG);
|
||||
fsm_journal_event ("signal write current model() has ended", INFO, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -249,7 +249,7 @@ static void switch_state_rules_data();
|
|||
|
||||
void on_toggle_exec_edit (GtkWidget *toggled_button, gpointer user_data)
|
||||
{
|
||||
fsm_journal_event ("signal on toggle exec edit()", INFO);
|
||||
fsm_journal_event ("signal toggle exec edit() has began", INFO, 0);
|
||||
if (fsm_get_exec_edit ()) { // TODO (or NOT ?) et si je ne suis pas sur la page SYNTH
|
||||
|
||||
gtk_button_set_icon_name (GTK_BUTTON (toggled_button),
|
||||
|
@ -270,7 +270,7 @@ void on_toggle_exec_edit (GtkWidget *toggled_button, gpointer user_data)
|
|||
}
|
||||
|
||||
switch_state_rules_data();
|
||||
fsm_journal_event ("signal on toggle exec edit()", DEBUG);
|
||||
fsm_journal_event ("signal toggle exec edit() has ended", INFO, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -279,7 +279,7 @@ void on_toggle_exec_edit (GtkWidget *toggled_button, gpointer user_data)
|
|||
|
||||
static void switch_state_rules_data()
|
||||
{
|
||||
fsm_journal_event ("signal switch state rules data()", INFO);
|
||||
fsm_journal_event ("signal switch state rules data() has began", INFO, 0);
|
||||
switch (fsm_get_state_rules_data()) {
|
||||
|
||||
case (SYNTH) :
|
||||
|
@ -323,9 +323,9 @@ static void switch_state_rules_data()
|
|||
|
||||
default :
|
||||
printf("default in signal.on_toggle_state_rule_data()\n");
|
||||
fsm_journal_event ("signal default in : switch state rules data()", DEBUG);
|
||||
fsm_journal_event ("signal default in : switch state rules data() > has ended", INFO, 0);
|
||||
}
|
||||
fsm_journal_event ("signal switch state rules data()", DEBUG);
|
||||
fsm_journal_event ("signal switch state rules data() has ended", INFO, 0);
|
||||
}
|
||||
|
||||
// TODO Il doit y avoir plus élégant,... ET SURTOUT MOINS DANGEREUX !!!
|
||||
|
@ -333,7 +333,7 @@ static void switch_state_rules_data()
|
|||
// Les noms d'icônes sont utilisés pour deux fonctions distinctes...
|
||||
void on_toggle_state_rules_data (GtkWidget *toggled_button, gpointer user_data)
|
||||
{
|
||||
fsm_journal_event ("signal on toggle state rules data()", INFO);
|
||||
fsm_journal_event ("signal toggle state rules data() has began", INFO, 0);
|
||||
const char *toggled_button_name
|
||||
= gtk_check_button_get_label (GTK_CHECK_BUTTON (toggled_button));
|
||||
int is_active = gtk_check_button_get_active (GTK_CHECK_BUTTON (toggled_button));
|
||||
|
@ -343,8 +343,8 @@ void on_toggle_state_rules_data (GtkWidget *toggled_button, gpointer user_data)
|
|||
if ( ! strcmp (toggled_button_name, "rules")) fsm_set_state_rules_data (RULES);
|
||||
if ( ! strcmp (toggled_button_name, "results")) fsm_set_state_rules_data (DATA);
|
||||
|
||||
fsm_journal_event ("signal toggle state rules data() has ended", INFO, 0);
|
||||
if (is_active) switch_state_rules_data();
|
||||
fsm_journal_event ("signal on toggle state rules data()", DEBUG);
|
||||
}
|
||||
|
||||
|
||||
|
@ -352,19 +352,19 @@ void on_toggle_state_rules_data (GtkWidget *toggled_button, gpointer user_data)
|
|||
// ------------ M E N U / S E A R C H / H O M E / E T C ----------- //
|
||||
|
||||
void on_clicked_topbar_right_search (GtkWidget *btt_menu, gpointer list_box) {
|
||||
fsm_journal_event ("signal on clicked topbar right search()", INFO);
|
||||
fsm_journal_event ("signal clicked topbar right search() has began", DEBUG, 0);
|
||||
// next line presents the text_window and works only once.\n
|
||||
// It should present a menu.\n"); // TODO
|
||||
gtk_window_present (GTK_WINDOW (widget_get_text_window()));
|
||||
fsm_journal_event ("signal on clicked topbar right search()", DEBUG);
|
||||
fsm_journal_event ("signal clicked topbar right search() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
|
||||
void on_clicked_topbar_right_home (GtkWidget *btt_reset, gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on clicked topbar right home()", INFO);
|
||||
fsm_journal_event ("signal clicked topbar right home() has began", DEBUG, 0);
|
||||
// gtk_window_present (GTK_WINDOW (widget_get_dialog_window())); // NB works only once. < TODO
|
||||
fsm_journal_event ("signal on clicked topbar right home()", DEBUG);
|
||||
fsm_journal_event ("signal clicked topbar right home() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -378,7 +378,7 @@ void on_clicked_topbar_right_home (GtkWidget *btt_reset, gpointer data)
|
|||
|
||||
void on_updating_objects_transparencies (GtkWidget *btt_source, GtkScrollbar *scrollbar)
|
||||
{
|
||||
fsm_journal_event ("signal on updating objects transparencies()", INFO);
|
||||
fsm_journal_event ("signal updating objects transparencies() has began", DEBUG, 0);
|
||||
const char *btt_name = gtk_button_get_icon_name (GTK_BUTTON (btt_source));
|
||||
int value = gtk_adjustment_get_value (gtk_scrollbar_get_adjustment (scrollbar));
|
||||
|
||||
|
@ -386,25 +386,25 @@ void on_updating_objects_transparencies (GtkWidget *btt_source, GtkScrollbar *sc
|
|||
if ( ! strcmp (btt_name, "edit-undo-symbolic")) fsm_store_restore_reset (RESTORE, value);
|
||||
if ( ! strcmp (btt_name, "view-refresh-symbolic")) fsm_store_restore_reset (RESET, value);
|
||||
|
||||
fsm_journal_event ("signal updating objects transparencies() has ended", DEBUG, 0);
|
||||
fsm_set_preferences_modified (TRUE); // << à détailler TODO
|
||||
fsm_journal_event ("signal on updating objects transparencies()", DEBUG);
|
||||
}
|
||||
|
||||
void on_resetting_XYZ_in_state_page ()
|
||||
{
|
||||
fsm_journal_event ("signal on resetting XYZ in state page()", INFO);
|
||||
fsm_journal_event ("signal resetting XYZ in state page() has began", DEBUG, 0);
|
||||
widget_state_XYZ_reset_all();
|
||||
fsm_journal_event ("signal on resetting XYZ in state page()", DEBUG);
|
||||
fsm_journal_event ("signal resetting XYZ in state page() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
// -------------------------- S I T U A T I O N S ----------------------- //
|
||||
|
||||
void on_situations_box_do_reset (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar)
|
||||
{
|
||||
fsm_journal_event ("signal on_situations_box_do_reset()", INFO);
|
||||
fsm_journal_event ("signal on_situations_box_do_reset() has began", DEBUG, 0);
|
||||
GtkAdjustment *adj_situ = gtk_scrollbar_get_adjustment (reset_scrollbar);
|
||||
fsm_reset_all_situations_transparencies_at_value (gtk_adjustment_get_value (adj_situ));
|
||||
fsm_journal_event ("signal on_situations_box_do_reset()", DEBUG);
|
||||
fsm_journal_event ("signal on_situations_box_do_reset() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -415,123 +415,123 @@ void on_situations_box_do_reset (GtkWidget *btt_reset, GtkScrollbar *reset_scrol
|
|||
|
||||
void on_clicked_topbar_right_measure (GtkWidget *btt, gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on clicked topbar right measure()", INFO);
|
||||
fsm_journal_event ("signal clicked topbar right measure() has began", DEBUG, 0);
|
||||
// fsm_measures_sorted_list_do something ();
|
||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||
GTK_WIDGET (widget_get_measure_page()));
|
||||
fsm_journal_event ("signal on clicked topbar right measure()", DEBUG);
|
||||
fsm_journal_event ("signal clicked topbar right measure() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
void on_start_new_measure (GtkWidget *btt, gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on start new measure()", INFO);
|
||||
fsm_journal_event ("signal start new measure() has began", DEBUG, 0);
|
||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||
GTK_WIDGET (widget_measure_do_select_rules_first()));
|
||||
fsm_journal_event ("signal on start new measure()", DEBUG);
|
||||
fsm_journal_event ("signal start new measure() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
void on_select_rules_first (GtkWidget *btt, gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on select rules first()", INFO);
|
||||
fsm_journal_event ("signal select rules first() has began", DEBUG, 0);
|
||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||
GTK_WIDGET (widget_measure_do_depends_on_one_or_two_events()));
|
||||
fsm_journal_event ("signal on select rules first()", DEBUG);
|
||||
fsm_journal_event ("signal select rules first() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
void on_measure_depends_on_a_single_event (GtkWidget *btt, gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on measure depends on a single event()", INFO);
|
||||
fsm_journal_event ("signal measure depends on a single event() has began", DEBUG, 0);
|
||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||
GTK_WIDGET (widget_measure_do_depends_on_a_single_event()));
|
||||
fsm_journal_event ("signal on measure depends on a single event()", DEBUG);
|
||||
fsm_journal_event ("signal measure depends on a single event() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
void on_measure_depends_on_two_events (GtkWidget *btt, gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on measure depends on two events()", INFO);
|
||||
fsm_journal_event ("signal measure depends on two events() has began", DEBUG, 0);
|
||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||
GTK_WIDGET (widget_measure_do_select_a_second_rules_set()));
|
||||
fsm_journal_event ("signal on measure depends on two events()", DEBUG);
|
||||
fsm_journal_event ("signal measure depends on two events() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
void on_select_a_second_rules_set (GtkWidget *btt, gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on select a second rules set()", INFO);
|
||||
fsm_journal_event ("signal select a second rules set() has began", DEBUG, 0);
|
||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||
GTK_WIDGET (widget_measure_do_choose_an_event_type()));
|
||||
fsm_journal_event ("signal on select a second rules set()", DEBUG);
|
||||
fsm_journal_event ("signal select a second rules set() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
void on_select_a_second_measurement (GtkWidget *btt, gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on_select_a_second_measurement()", INFO);
|
||||
fsm_journal_event ("signal select a second measurement() has began", DEBUG, 0);
|
||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||
GTK_WIDGET (widget_measure_do_correlate()));
|
||||
fsm_journal_event ("signal on_select_a_second_measurement()", DEBUG);
|
||||
fsm_journal_event ("signal select a second measurement() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
void on_skip_this_step (GtkWidget *btt, gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on_skip_this_step()", INFO);
|
||||
fsm_journal_event ("signal skip this step() has began", DEBUG, 0);
|
||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||
GTK_WIDGET (widget_measure_do_insert_in_measurements_list ()));
|
||||
fsm_journal_event ("signal on_skip_this_step()", DEBUG);
|
||||
fsm_journal_event ("signal skip this step() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
void on_something_else (GtkWidget *btt, gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on_something_else()", INFO);
|
||||
fsm_journal_event ("signal something else() has began", DEBUG, 0);
|
||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||
GTK_WIDGET (widget_measure_do_end_creation_of_measurement_process()));
|
||||
fsm_journal_event ("signal on_something_else()", DEBUG);
|
||||
fsm_journal_event ("signal something else() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
void on_closing_page (GtkWidget *btt, gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on_closing_page()", INFO);
|
||||
fsm_journal_event ("signal closing page() has began", DEBUG, 0);
|
||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||
GTK_WIDGET (widget_get_synth_page()));
|
||||
fsm_journal_event ("signal on_closing_page()", DEBUG);
|
||||
fsm_journal_event ("signal closing page() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
void on_measure_single_event_occurences_nb (GtkWidget *btt, gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on_measure_single_event_occurences_nb()", INFO);
|
||||
fsm_journal_event ("signal measure single event occurences nb() has began", DEBUG, 0);
|
||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||
GTK_WIDGET (widget_measure_event_occurences_nb()));
|
||||
fsm_journal_event ("signal on_measure_single_event_occurences_nb()", DEBUG);
|
||||
fsm_journal_event ("signal measure single event occurences nb() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
void on_measure_single_event_occurences_dates (GtkWidget *btt, gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on_measure_single_event_occurences_dates()", INFO);
|
||||
fsm_journal_event ("signal measure single event occurences dates() has began", DEBUG, 0);
|
||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||
GTK_WIDGET (widget_measure_event_occurences_dates()));
|
||||
fsm_journal_event ("signal on_measure_single_event_occurences_dates()", DEBUG);
|
||||
fsm_journal_event ("signal measure single event occurences dates() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
void on_measure_single_event_occurences_situations (GtkWidget *btt, gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on_measure_single_event_occurences_situations()", INFO);
|
||||
fsm_journal_event ("signal measure single event occurences situations() has began", DEBUG, 0);
|
||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||
GTK_WIDGET (widget_measure_event_occurences_situations()));
|
||||
fsm_journal_event ("signal on_measure_single_event_occurences_situations()", DEBUG);
|
||||
fsm_journal_event ("signal measure single event occurences situations() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
void on_measure_time_elapsed_between_two_events (GtkWidget *btt, gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on_measure_time_elapsed_between_two_events()", INFO);
|
||||
fsm_journal_event ("signal measure time elapsed between two events() has began", DEBUG, 0);
|
||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||
GTK_WIDGET (widget_measure_time_elapsed_between_two_events()));
|
||||
fsm_journal_event ("signal on_measure_time_elapsed_between_two_events()", DEBUG);
|
||||
fsm_journal_event ("signal measure time elapsed between two events() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
void on_measure_third_event_occurences_in_between (GtkWidget *btt, gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on_measure_third_event_occurences_in_between()", INFO);
|
||||
fsm_journal_event ("signal measure third event occurences in between() has began", DEBUG, 0);
|
||||
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
|
||||
GTK_WIDGET (widget_measure_third_event_occurences_in_between()));
|
||||
fsm_journal_event ("signal on_measure_third_event_occurences_in_between()", DEBUG);
|
||||
fsm_journal_event ("signal measure third event occurences in between() has ended", DEBUG, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -541,12 +541,11 @@ void on_measure_third_event_occurences_in_between (GtkWidget *btt, gpointer data
|
|||
|
||||
void on_entry_name_insert_after (GtkWidget *entry, gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on_entry_name_insert_after()", INFO);
|
||||
fsm_journal_event ("signal entry name insert after() has began", DEBUG, 0);
|
||||
}
|
||||
|
||||
void on_entry_name_delete_after (GtkWidget *entry, gpointer data)
|
||||
{
|
||||
fsm_journal_event ("signal on_entry_name_delete_after()", INFO);
|
||||
fsm_journal_event ("signal entry name delete after() has began", DEBUG, 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -60,13 +60,13 @@ static void action_b (GSimpleAction *action,
|
|||
|
||||
void on_windows_startup (GtkApplication *app) // WIP 2024-09
|
||||
{
|
||||
fsm_journal_event ("widget/dispatch on_windows_startup()", INFO);
|
||||
fsm_journal_event ("widget/dispatch windows startup()", INFO, 0);
|
||||
// on_windows_startup() is in: widget/dispatch NOT in: src/signal
|
||||
}
|
||||
|
||||
void on_windows_activation (GtkApplication *app)
|
||||
{
|
||||
fsm_journal_event ("widget/dispatch on_windows_activation() has began", INFO);
|
||||
fsm_journal_event ("widget/dispatch windows activation() has began", INFO, 0);
|
||||
|
||||
// on_windows_activation() is in: widget/dispatch NOT in: src/signal
|
||||
// g_application_activate (G_APPLICATION (app)); < how ? > in main is
|
||||
|
@ -102,7 +102,7 @@ void on_windows_activation (GtkApplication *app)
|
|||
g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (act_b));
|
||||
g_signal_connect (act_b, "activate", G_CALLBACK (action_b), app2);
|
||||
|
||||
fsm_journal_event ("widget/dispatch on_windows_activation() has ended", INFO);
|
||||
fsm_journal_event ("widget/dispatch windows activation() has ended", INFO, 0);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
|
Loading…
Reference in New Issue