From 59b797d965f839294ac68571c6f74560c0bc6069 Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Mon, 23 Sep 2024 00:07:26 +0200 Subject: [PATCH] journal restructuration (severity; source; file; function; value) completed --- include/fsm.h | 33 +++---- src/fsm/dispatch.c | 9 +- src/fsm/journal.c | 10 ++- src/fsm/prefer.c | 24 ++---- src/main.c | 2 +- src/signal.c | 105 ++++++++++------------- src/widget/dispatch.c | 4 +- src/widget/one_rule/algebra/conditions.c | 9 +- 8 files changed, 90 insertions(+), 106 deletions(-) diff --git a/include/fsm.h b/include/fsm.h index 5c4db3d..03ce888 100644 --- a/include/fsm.h +++ b/include/fsm.h @@ -93,29 +93,30 @@ typedef struct unit {long yy_dd_mm; const char *function_source; const char *string_value; struct unit *prev; - struct unit *next;} unit; // journal unit structure + struct unit *next;} unit; // journal unit structure -typedef struct {unit *first; unit *last;} journal; // journal unit access structure +typedef struct {unit *first; unit *last;} journal; // journal unit access structure -void fsm_journal_init (journal *jj); // init from main -void fsm_journal_push_front (const char *file_source, // add an évènement at the journal front - const char *function_source, // def: fsm/dispatch - const char *string_value); // call: any call that does not have - // the log address +void fsm_journal_init (journal *jj); // init from main +void fsm_journal_push_front (journal *jj, // add an évènement at the journal front + const char *file_source, // def: fsm/dispatch + const char *function_source, // call: any call that does not have + const char *string_value); // the log address void fsm_journal_clear (journal *jj, const char *file_source, const char *function_source, - const char *string_value); // empty the journal -long fsm_journal_pop_back (journal *jj, + const char *string_value); // empty the journal +long fsm_journal_pop_back (journal *jj, // removes an évènement + const char *file_source, // at the journal end + const char *function_source, + const char *string_value); +int fsm_journal_length (journal jj); // journal length +void fsm_journal_seek (journal jj, // seek for an évènement + long usec, // in the journal const char *file_source, const char *function_source, - const char *string_value); // remove an évènement at the journal end -int fsm_journal_length (journal jj); // journal length -void fsm_journal_seek (journal jj, long usec, - const char *file_source, - const char *function_source, - const char *string_value); // seek for an évènement in the journal -void fsm_journal_publish (journal jj); // display the journal + const char *string_value); +void fsm_journal_publish (journal jj); // display the journal // ----------------------------------------------------------------------------- diff --git a/src/fsm/dispatch.c b/src/fsm/dispatch.c index f9b0e4b..1c4ddb4 100644 --- a/src/fsm/dispatch.c +++ b/src/fsm/dispatch.c @@ -68,10 +68,9 @@ void fsm_journal_event (int severity, const char *function_source, const char *string_value) { - if (TRUE // just to find easily the line beginning the filter conditions 😄️ + if ( TRUE // just to find easily the line beginning the filter conditions 😄️ && severity != REPETITIVE - || FALSE // source != TREE // source == FSM // strcmp (value, "") @@ -91,7 +90,7 @@ void fsm_init (char *initial_message_from_main) fsm_journal_init (&gg_logs); fsm_journal_event (MESSAGE, MAIN, "main", initial_message_from_main, ""); - fsm_journal_event (MESSAGE, FSM, "fsm/dispatch", "fsm initialisation has began", ""); + fsm_journal_event (MESSAGE, FSM, "fsm/dispatch", "fsm initialisation", "has began"); fsm_journal_event (MESSAGE, FSM, "fsm/dispatch", "measures list init()", ""); fsm_measures_list_init(); @@ -105,7 +104,7 @@ void fsm_init (char *initial_message_from_main) fsm_journal_event (MESSAGE, FSM, "fsm/dispatch", "preferences list init()", ""); fsm_preferences_list_init(); - fsm_journal_event (MESSAGE, FSM, "fsm/dispatch", "fsm initialisation has ended", ""); + fsm_journal_event (MESSAGE, FSM, "fsm/dispatch", "fsm initialisation", "has ended"); } @@ -118,7 +117,7 @@ static int preferences_have_been_modified = FALSE; void fsm_set_preferences_modified (bool value) { - const char str_value; + const char *str_value; if (value) str_value = "FALSE"; else str_value = "TRUE"; fsm_journal_event (INFO, FSM, "fsm/dispatch", diff --git a/src/fsm/journal.c b/src/fsm/journal.c index 0b5c5c1..d9457a3 100644 --- a/src/fsm/journal.c +++ b/src/fsm/journal.c @@ -72,7 +72,7 @@ void fsm_journal_clear (journal *jj, { tmp = a_unit; a_unit = a_unit->next; - free(tmp); + free (tmp); } jj->first = NULL; jj->last = NULL; @@ -84,14 +84,16 @@ void fsm_journal_push_front (journal *jj, const char *string_value) { struct timeval tv; - gettimeofday(&tv, NULL); - unit *new_unit = malloc(sizeof(unit)); + gettimeofday (&tv, NULL); + unit *new_unit = malloc (sizeof(unit)); if (! new_unit) exit (EXIT_FAILURE); + new_unit->yy_dd_mm = tv.tv_sec; new_unit->usec = tv.tv_usec; new_unit->file_source = file_source; new_unit->function_source = function_source; new_unit->string_value = string_value; + new_unit->next = jj->first; new_unit->prev = NULL; if (jj->first) jj->first->prev = new_unit; @@ -163,7 +165,7 @@ void fsm_journal_publish (journal jj) while (a_unit) { strftime(buf, sizeof(buf), "%D %T", localtime(&a_unit->yy_dd_mm)); - g_message ("%s + %-6ld %6d %-30s %-60s %-60s", + g_message ("%s + %-6ld %6d %-32s %-36s %-50s", buf, a_unit->usec, nb, diff --git a/src/fsm/prefer.c b/src/fsm/prefer.c index 14fec00..3147730 100644 --- a/src/fsm/prefer.c +++ b/src/fsm/prefer.c @@ -73,28 +73,24 @@ void fsm_store_restore_reset (int choice, int value) { switch (choice) { case (STORE) : - fsm_journal_event ( - "fsm/prefer store restore reset(): switch (STORE)", MESSAGE, PREFER, ""); + fsm_journal_event (MESSAGE, PREFER, "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_at_value (i, p [i]); } break; case (RESTORE) : - fsm_journal_event ( - "fsm/prefer store restore reset(): switch (RESTORE)", MESSAGE, PREFER, ""); + fsm_journal_event (MESSAGE, PREFER, "fsm/prefer", "store restore reset(): switch (RESTORE)", ""); for (int i = 0; i < n_objects; i++) widget_set_object_transparency_at_value (i, p [i]); break; case (RESET) : - fsm_journal_event ( - "fsm/prefer store restore reset(): switch (RESET)", MESSAGE, PREFER, ""); + fsm_journal_event (MESSAGE, PREFER, "fsm/prefer", "store restore reset(): switch (RESET)", ""); for (int i = 0; i < n_objects; i++) widget_set_object_transparency_at_value (i, value); // i * 4 // rand() % 127 break; default : - fsm_journal_event ( - "fsm/prefer store restore reset(): switch (default)", MESSAGE, PREFER, ""); + fsm_journal_event (MESSAGE, PREFER, "fsm/prefer", "store restore reset(): switch (default)", ""); } fsm_set_preferences_modified (TRUE); @@ -109,9 +105,8 @@ static int reset_situations_to_value = -1; void fsm_reset_all_situations_transparencies_at_value (int value) { - char str1[140] = "fsm/prefer reset all situations transparencies at value"; - char string_value [12]; sprintf(string_value, " (%d)", value); strcat(str1, string_value); - fsm_journal_event (str1, INFO, PREFER, string_value); // TODO + char string_value [12]; sprintf(string_value, "(%d)", value); + fsm_journal_event (INFO, PREFER, "fsm/prefer", "reset all situations transparencies at value", string_value); reset_situations_to_value = value; widget_reset_all_situations_transparencies_at_value (value); } @@ -126,8 +121,7 @@ void fsm_reset_all_situations_transparencies_at_value (int value) void fsm_add_displayable (char *displayable_name) { - fsm_journal_event ( - strcat("fsm/prefer add displayable() ", displayable_name), MESSAGE, PREFER, ""); // TODO + fsm_journal_event (MESSAGE, PREFER, "fsm/prefer", "add displayable()", displayable_name); } @@ -136,11 +130,11 @@ void fsm_add_displayable (char *displayable_name) /******************************************************************************/ void fsm_preferences_list_init () { - fsm_journal_event ("fsm/prefer setting up preferences list", MESSAGE, PREFER, ""); + fsm_journal_event (MESSAGE, PREFER, "fsm/prefer", "preferences list init()", ""); } void fsm_displayable_list_init () { - fsm_journal_event ("fsm/prefer setting up displayable list", MESSAGE, PREFER, ""); + fsm_journal_event (MESSAGE, PREFER, "fsm/prefer", "displayables list init()", ""); } diff --git a/src/main.c b/src/main.c index 42c1896..db8040a 100644 --- a/src/main.c +++ b/src/main.c @@ -139,7 +139,7 @@ int main (int argc, char **argv) G_APPLICATION_DEFAULT_FLAGS); fsm_journal_event (INFO, MAIN, "main", - "g signal connect (app <--> on_windows_startup & activate)", "\n"); + "g signal connect", "(app <--> on_windows_startup & activate)"); // ! WARNING ! 'on_windows_activation()' // and 'on_windows_startup()' are in: src/widget/dispatch.c // NOT in: src/signal.c diff --git a/src/signal.c b/src/signal.c index d5964ea..bff584f 100644 --- a/src/signal.c +++ b/src/signal.c @@ -37,7 +37,7 @@ static void on_auto_notification (char *message) { // message = "-(any auto notification)-"; // test - fsm_journal_event (DEBUG, AUTO_NOTIFICATION, "signal", "auto_notification", message); + fsm_journal_event (DEBUG, AUTO_NOTIFICATION, "signal", "auto_notification", ""); /* Ignored (2024-06-06) because I don't know how to get "main_window" easily if (window->toast_revealer == NULL) { @@ -64,8 +64,7 @@ static void on_auto_notification (char *message) static void on_user_tree_expander_toggled (GtkExpander *expander, gpointer user_data) { - fsm_journal_event ("signal user tree expander toggled()", - SPEW, EXPANDER, ""); + fsm_journal_event (SPEW, EXPANDER, "signal", "user tree expander toggled()", ""); 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); @@ -73,8 +72,7 @@ static void on_user_tree_expander_toggled (GtkExpander *expander, void on_setup_user_tree_factory (GtkSignalListItemFactory *factory, GObject* object, gpointer user_data){ - fsm_journal_event ("signal setup user tree factory()", - REPETITIVE, EXPANDER, ""); + fsm_journal_event (REPETITIVE, EXPANDER, "signal", "setup user tree factory()", ""); GtkWidget* expander = gtk_expander_new (NULL); gtk_list_item_set_child (GTK_LIST_ITEM (object), expander); } @@ -103,8 +101,7 @@ 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 (tree) bind user tree factory()", - REPETITIVE, TREE, text); + fsm_journal_event (REPETITIVE, TREE, "signal", "(tree) bind user tree factory()", text); } @@ -115,7 +112,7 @@ void on_bind_user_tree_factory (GtkSignalListItemFactory *factory, gboolean on_glarea_render (GtkGLArea *area, GdkGLContext *context) { - fsm_journal_event ("signal (GLArea) glarea render()", DEBUG, GLAREA, "(context TODO)"); + fsm_journal_event (DEBUG, GLAREA, "signal", "glarea render()", "(context TODO)"); // Check if the widget is a glarea if(gtk_gl_area_get_error(area) != NULL) { on_auto_notification("An OpenGL error occured !"); @@ -134,7 +131,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 (GLArea) glarea realize()", DEBUG, GLAREA, ""); + fsm_journal_event (DEBUG, GLAREA, "signal", "glarea realize()", ""); GError *internal_error = NULL; // Make the GL context current to be able to call the GL API @@ -160,7 +157,7 @@ void on_glarea_realize (GtkWidget *widget) /* We should tear down the state when unrealizing */ void on_glarea_unrealize (GtkWidget *widget) { - fsm_journal_event ("signal (GLArea) glarea unrealize()", DEBUG, GLAREA, ""); + fsm_journal_event (DEBUG, GLAREA, "signal", "glarea unrealize()", ""); GError *internal_error = NULL; // Make the GL context current to be able to call the GL API @@ -203,12 +200,15 @@ void on_axis_value_change (GtkAdjustment *adjustment, gpointer data) char string_value [10]; sprintf(string_value, " (%d)", axis_value); switch (axis) { - case 0 : fsm_journal_event ("signal (axis) X value changed()", - REPETITIVE, SLIDER_X, string_value); break; - case 1 : fsm_journal_event ("signal (axis) Y value changed()", - REPETITIVE, SLIDER_Y, string_value); break; - case 2 : fsm_journal_event ("signal (axis) Z value changed()", - REPETITIVE, SLIDER_Z, string_value); break; + case 0 : fsm_journal_event (REPETITIVE, SLIDER_X, + "signal", "X value changed()", string_value); + break; + case 1 : fsm_journal_event (REPETITIVE, SLIDER_Y, + "signal", "Y value changed()", string_value); + break; + case 2 : fsm_journal_event (REPETITIVE, SLIDER_Z, + "signal", "Z value changed()", string_value); + break; } } @@ -220,7 +220,7 @@ 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 (dialog) save current model()", INFO, BUTTON, ""); + fsm_journal_event (INFO, BUTTON, "signal", "(dialog) save current model()", ""); on_auto_notification ("save_current_model_before_editing !"); gtk_widget_set_sensitive (GTK_WIDGET (data), TRUE); } @@ -228,7 +228,7 @@ void on_save_current_model_before_editing (GtkWidget *btt_save_current_model, void on_discard_current_model_before_editing (GtkWidget *btt_discard_current_model, gpointer data) { - fsm_journal_event ("signal (dialog) discard current model()", INFO, BUTTON, ""); + fsm_journal_event (INFO, BUTTON, "signal", "(dialog) discard current model()", ""); on_auto_notification ("discard_current_model_before_editing ?"); gtk_window_close (GTK_WINDOW (data)); } @@ -236,7 +236,7 @@ void on_discard_current_model_before_editing (GtkWidget *btt_discard_current_mod void on_write_current_model (GtkWidget *btt_write_current_model, gpointer data) { - fsm_journal_event ("signal (dialog) write current model()", INFO, BUTTON, ""); + fsm_journal_event (INFO, BUTTON, "signal", "(dialog) write current model()", ""); on_auto_notification ("writing current_model_before_editing 😄️"); gtk_window_close (GTK_WINDOW (data)); } @@ -253,7 +253,7 @@ static void switch_state_rules_data(); void on_toggle_exec_edit (GtkWidget *toggled_button, gpointer user_data) { - fsm_journal_event ("signal (Xec/Ed) toggle exec edit()", INFO, BUTTON, ""); + fsm_journal_event (INFO, BUTTON, "signal", "(Xec/Ed) toggle exec edit()", ""); 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), @@ -288,8 +288,7 @@ static void switch_state_rules_data() * pas sûr que ça ait un intérêt... en tout cas, pas comme ça ! * char string_value [12]; sprintf(string_value, "%d", value); - fsm_journal_event ("signal (switch) value = ", - DEBUG, SWITCH_STATE_RULES_DATA, string_value); + fsm_journal_event (DEBUG, SWITCH_STATE_RULES_DATA, "signal", "(switch) value = ", string_value); */ switch (value) { @@ -334,8 +333,8 @@ static void switch_state_rules_data() default : printf("default in signal.on_toggle_state_rule_data()\n"); - fsm_journal_event ("signal (switch) default in : switch state rules data()", - INFO, SWITCH_STATE_RULES_DATA, ""); + fsm_journal_event (INFO, SWITCH_STATE_RULES_DATA, + "signal", "(switch) default in : switch state rules data()", ""); } } @@ -346,9 +345,8 @@ void on_toggle_state_rules_data (GtkWidget *toggled_button, gpointer user_data) { const char *toggled_button_name = gtk_check_button_get_label (GTK_CHECK_BUTTON (toggled_button)); - fsm_journal_event ("signal (toggle) --> [", INFO, BUTTON, - concat (toggled_button_name, - " ]", NULL)); + fsm_journal_event (DEBUG, BUTTON, + "signal", "(toggle)", concat ("[ ", toggled_button_name, " ]", NULL)); int is_active = gtk_check_button_get_active (GTK_CHECK_BUTTON (toggled_button)); if ( ! strcmp (toggled_button_name, "synth")) fsm_set_state_rules_data (SYNTH); @@ -365,9 +363,7 @@ void on_toggle_state_rules_data (GtkWidget *toggled_button, gpointer user_data) void on_clicked_topbar_right_search (GtkWidget *btt_menu, gpointer list_box) { - fsm_journal_event ("signal (topbar R) search()", -// fsm_journal_event ("signal clicked topbar right search()", - DEBUG, BUTTON, ""); + fsm_journal_event (DEBUG, BUTTON, "signal", "(topbar right) search()", ""); // 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())); @@ -376,9 +372,7 @@ void on_clicked_topbar_right_search (GtkWidget *btt_menu, gpointer list_box) void on_clicked_topbar_right_home (GtkWidget *btt_reset, gpointer data) { - fsm_journal_event ("signal (topbar R) home()", -// fsm_journal_event ("signal clicked topbar right home()", - DEBUG, BUTTON, ""); + fsm_journal_event (DEBUG, BUTTON, "signal", "(topbar right) home()", ""); gtk_window_present (GTK_WINDOW (widget_get_dialog_window())); // NB works only once. < TODO } @@ -394,8 +388,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 updating objects transparencies()", - DEBUG, BUTTON, ""); + fsm_journal_event (DEBUG, BUTTON, "signal", "updating objects transparencies()", ""); const char *btt_name = gtk_button_get_icon_name (GTK_BUTTON (btt_source)); int value = gtk_adjustment_get_value (gtk_scrollbar_get_adjustment (scrollbar)); @@ -408,8 +401,7 @@ void on_updating_objects_transparencies (GtkWidget *btt_source, GtkScrollbar *sc void on_resetting_XYZ_in_state_page () { - fsm_journal_event ("signal resetting XYZ in state page()", - DEBUG, BUTTON, ""); + fsm_journal_event (DEBUG, BUTTON, "signal", "resetting XYZ in state page()", ""); widget_state_XYZ_reset_all(); } @@ -417,8 +409,7 @@ void on_resetting_XYZ_in_state_page () void on_situations_box_do_reset (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar) { - fsm_journal_event ("signal situations box do reset()", - DEBUG, BUTTON, ""); + fsm_journal_event (DEBUG, BUTTON, "signal", "situations box do reset()", ""); GtkAdjustment *adj_situ = gtk_scrollbar_get_adjustment (reset_scrollbar); fsm_reset_all_situations_transparencies_at_value (gtk_adjustment_get_value (adj_situ)); } @@ -431,7 +422,7 @@ 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 clicked topbar right measure()", DEBUG, BUTTON, ""); + fsm_journal_event (DEBUG, BUTTON, "signal", "clicked topbar right measure()", ""); // fsm_measures_sorted_list_do something (); gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()), GTK_WIDGET (widget_get_measure_page())); @@ -439,98 +430,98 @@ void on_clicked_topbar_right_measure (GtkWidget *btt, gpointer data) void on_start_new_measure (GtkWidget *btt, gpointer data) { - fsm_journal_event ("signal start new measure()", DEBUG, BUTTON, ""); + fsm_journal_event (DEBUG, BUTTON, "signal", "start new measure()", ""); gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()), GTK_WIDGET (widget_measure_do_select_rules_first())); } void on_select_rules_first (GtkWidget *btt, gpointer data) { - fsm_journal_event ("signal select rules first()", DEBUG, BUTTON, ""); + fsm_journal_event (DEBUG, BUTTON, "signal", "select rules first()", ""); gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()), GTK_WIDGET (widget_measure_do_depends_on_one_or_two_events())); } void on_measure_depends_on_a_single_event (GtkWidget *btt, gpointer data) { - fsm_journal_event ("signal measure depends on a single event()", DEBUG, BUTTON, ""); + fsm_journal_event (DEBUG, BUTTON, "signal", "measure depends on a single event()", ""); gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()), GTK_WIDGET (widget_measure_do_depends_on_a_single_event())); } void on_measure_depends_on_two_events (GtkWidget *btt, gpointer data) { - fsm_journal_event ("signal measure depends on two events()", DEBUG, BUTTON, ""); + fsm_journal_event (DEBUG, BUTTON, "signal", "measure depends on two events()", ""); gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()), GTK_WIDGET (widget_measure_do_select_a_second_rules_set())); } void on_select_a_second_rules_set (GtkWidget *btt, gpointer data) { - fsm_journal_event ("signal select a second rules set()", DEBUG, BUTTON, ""); + fsm_journal_event (DEBUG, BUTTON, "signal", "select a second rules set()", ""); gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()), GTK_WIDGET (widget_measure_do_choose_an_event_type())); } void on_select_a_second_measurement (GtkWidget *btt, gpointer data) { - fsm_journal_event ("signal select a second measurement()", DEBUG, BUTTON, ""); + fsm_journal_event (DEBUG, BUTTON, "signal", "select a second measurement()", ""); gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()), GTK_WIDGET (widget_measure_do_correlate())); } void on_skip_this_step (GtkWidget *btt, gpointer data) { - fsm_journal_event ("signal skip this step()", DEBUG, BUTTON, ""); + fsm_journal_event (DEBUG, BUTTON, "signal", "skip this step()", ""); gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()), GTK_WIDGET (widget_measure_do_insert_in_measurements_list ())); } void on_something_else (GtkWidget *btt, gpointer data) { - fsm_journal_event ("signal something else()", DEBUG, BUTTON, ""); + fsm_journal_event (DEBUG, BUTTON, "signal", "something else()", ""); gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()), GTK_WIDGET (widget_measure_do_end_creation_of_measurement_process())); } void on_closing_page (GtkWidget *btt, gpointer data) { - fsm_journal_event ("signal closing page()", DEBUG, BUTTON, ""); + fsm_journal_event (DEBUG, BUTTON, "signal", "closing page()", ""); gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()), GTK_WIDGET (widget_get_synth_page())); } void on_measure_single_event_occurences_nb (GtkWidget *btt, gpointer data) { - fsm_journal_event ("signal measure single event occurences nb()", DEBUG, BUTTON, ""); + fsm_journal_event (DEBUG, BUTTON, "signal", "measure single event occurences nb()", ""); gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()), GTK_WIDGET (widget_measure_event_occurences_nb())); } void on_measure_single_event_occurences_dates (GtkWidget *btt, gpointer data) { - fsm_journal_event ("signal measure single event occurences dates()", DEBUG, BUTTON, ""); + fsm_journal_event (DEBUG, BUTTON, "signal", "measure single event occurences dates()", ""); gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()), GTK_WIDGET (widget_measure_event_occurences_dates())); } void on_measure_single_event_occurences_situations (GtkWidget *btt, gpointer data) { - fsm_journal_event ("signal measure single event occurences situations()", DEBUG, BUTTON, ""); + fsm_journal_event (DEBUG, BUTTON, "signal", "measure single event occurences situations()", ""); gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()), GTK_WIDGET (widget_measure_event_occurences_situations())); } void on_measure_time_elapsed_between_two_events (GtkWidget *btt, gpointer data) { - fsm_journal_event ("signal measure time elapsed between two events()", DEBUG, BUTTON, ""); + fsm_journal_event (DEBUG, BUTTON, "signal", "measure time elapsed between two events()", ""); gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()), GTK_WIDGET (widget_measure_time_elapsed_between_two_events())); } void on_measure_third_event_occurences_in_between (GtkWidget *btt, gpointer data) { - fsm_journal_event ("signal measure third event occurences in between()", DEBUG, BUTTON, ""); + fsm_journal_event (DEBUG, BUTTON, "signal", "measure third event occurences in between()", ""); gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()), GTK_WIDGET (widget_measure_third_event_occurences_in_between())); } @@ -542,13 +533,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 entry name insert after()", - DEBUG, ENTRY, ""); + fsm_journal_event (DEBUG, ENTRY, "signal", "entry name insert after()", ""); } void on_entry_name_delete_after (GtkWidget *entry, gpointer data) { - fsm_journal_event ("signal entry name delete after()", - DEBUG, ENTRY, ""); + fsm_journal_event (DEBUG, ENTRY, "signal", "entry name delete after()", ""); } diff --git a/src/widget/dispatch.c b/src/widget/dispatch.c index 2b8e7d4..9cd6c1b 100644 --- a/src/widget/dispatch.c +++ b/src/widget/dispatch.c @@ -66,7 +66,7 @@ void on_windows_startup (GtkApplication *app) // WIP 2024-09 void on_windows_activation (GtkApplication *app) { - fsm_journal_event (INFO, WIDGETS, "widget/dispatch", "windows activation()", " has began"); + fsm_journal_event (INFO, WIDGETS, "widget/dispatch", "windows activation()", "has began"); // 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 (INFO, WIDGETS, "widget/dispatch", "windows activation()", " has ended\n"); + fsm_journal_event (INFO, WIDGETS, "widget/dispatch", "windows activation()", "has ended"); } /******************************************************************************/ diff --git a/src/widget/one_rule/algebra/conditions.c b/src/widget/one_rule/algebra/conditions.c index 75654f9..32c01f7 100644 --- a/src/widget/one_rule/algebra/conditions.c +++ b/src/widget/one_rule/algebra/conditions.c @@ -58,7 +58,7 @@ void *widget_get_btt_conditions_list() widget_set_item_text (list_box, one_condition, TRUE); fsm_journal_event (REPETITIVE, RULE_CONDITION, - "widget/one_rule/algebra/conditions", + "one_rule/algebra/conditions", "conditions list ", one_condition); } @@ -76,10 +76,9 @@ void *widget_get_btt_conditions_list() fsm_journal_event (DEBUG, RULE_CONDITION, - "widget/one_rule/algebra/conditions", - "conditions_list ", - concat ("[", one_condition, "] = last of: ", str_nb, NULL) - ); + "one_rule/algebra/conditions", + concat ("list; last of ", str_nb, " conditions: ", NULL), + concat ("[", one_condition, "]", NULL)); return conditions; }