journal filters on a possible classification and indexing test (/fsm/dispatch)

This commit is contained in:
Jean Sirmai 2024-09-17 12:56:59 +02:00
parent bc6b6082ec
commit 39a4537fed
Signed by: jean
GPG Key ID: FB3115C340E057E3
6 changed files with 182 additions and 134 deletions

View File

@ -63,38 +63,60 @@ 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
// ****************** - WIDGET FILTER - **********************************/
// MAIN 0
// MAIN_WINDOW DIALOG_WINDOW MODAL_WINDOW 1 2 3
// TOPBAR TOPBAR_LEFT TOPBAR_RIGHT 4 5 6
// SYNTH_PAGE STATE_PAGE RULES_PAGE RESULTS_PAGE 7 8 9 10
// SYNTH_GLAREA SYNTH_ALL_RESULTS 11 12
// SYNTH_TIME_DEP_RESULTS SYNTH_TIME_INDEP_RESULTS 13 14 15
// STATE_TOP STATE_GLAREA STATE_CAMERA STATE_BOTTOM 16 17 18 19
// RULES_MANAGE RULE_GLAREA RULE_CAMERA 20 21 22
// RULES_TREE RULES_COMPARE RULES_USE 23 24 25
// MEASURES_TOOLS MEASURES_ACTIVE 26 27
// TIME_DEP_RESULTS TIME_INDEP_RESULTS 28 29
// BUTTON SCROLL GLAREA TEXT LABEL 30 31 32 33 34
/* * * * * * * - F I L T E R S - * * * * * * *
* This list is duplicated in both /fsm.h and /fsm/dispatch *
* *
*
* MAIN, FSM_INIT (in fsm/dispatch) & WINDOW ACTIVATION (in widget/dispatch) 0
* MAIN_WINDOW DIALOG_WINDOW MODAL_WINDOW 10 11 12
*
* TOPBAR TOPBAR_LEFT TOPBAR_RIGHT TOPBAR_CENTER 20 21 22 23
*
* SYNTH_PAGE STATE_PAGE RULES_PAGE RESULTS_PAGE 30 31 32 33
* SYNTH_GLAREA SYNTH_ALL_RESULTS 34 35
* SYNTH_TIME_DEP_RESULTS SYNTH_TIME_INDEP_RESULTS 36 37
*
* STATE_PAGE STATE_TOP STATE_BOTTOM 40 41 42
* STATE_GLAREA STATE_CAMERA 43 44
*
* RULES_PAGE RULE_GLAREA RULE_CAMERA 50 51 52
* RULES_TREE RULES_COMPARE RULES_USE 53 54 55
*
* MEASURES_PAGE _TOOLS _ACTIVITY _DISPLAY 60 61 62 63
* TIME_DEP_RESULTS TIME_INDEP_RESULTS 64 65
*
* WIDGET BUTTON SCROLL GLAREA TEXT LABEL 70 71 72 73 74 75
*
* AUTO_NOTIFICATION 80
*
* FSM 90
* *
* This list is duplicated in both /fsm.h and /fsm/dispatch *
* * * * * * * - F I L T E R S - * * * * * * */
#define MAIN 0
#define MAIN_WINDOW 1
#define DIALOG_WINDOW 2
#define MODAL_WINDOW 3
#define TOPBAR 4
#define TOPBAR_LEFT 5
#define TOPBAR_RIGHT 6
#define SYNTH_PAGE 7
#define STATE_PAGE 8
#define RULES_PAGE 9
#define RESULTS_PAGE 10
#define MAIN_WINDOW 10
#define DIALOG_WINDOW 11
#define MODAL_WINDOW 12
#define BUTTON 30
#define SCROLL 31
#define GLAREA 32
#define TEXT 33
#define LABEL 34
#define TOPBAR 20
#define TOPBAR_LEFT 21
#define TOPBAR_RIGHT 22
#define SYNTH_PAGE 30
#define STATE_PAGE 40
#define RULES_PAGE 50
#define MEASURES_PAGE 60
#define BUTTON 71
#define SCROLL 72
#define GLAREA 73
#define TEXT 74
#define LABEL 75
#define AUTO_NOTIFICATION 80
#define FSM 90
#define JOURNAL_DATE_MAX_LENGTH 255

View File

@ -66,22 +66,40 @@ void fsm_journal_event (char *message, int priority, int filter)
// CRITICAL ERROR WARNING INFO MESSAGE DEBUG SPEW 😄️
// 0 1 2 3 4 5 6
if (priority < DEBUG
if (priority <= DEBUG
// MAIN 0
// MAIN_WINDOW DIALOG_WINDOW MODAL_WINDOW 1 2 3
// TOPBAR TOPBAR_LEFT TOPBAR_RIGHT 4 5 6
// SYNTH_PAGE STATE_PAGE RULES_PAGE RESULTS_PAGE 7 8 9 10
// SYNTH_GLAREA SYNTH_ALL_RESULTS 11 12
// SYNTH_TIME_DEP_RESULTS SYNTH_TIME_INDEP_RESULTS 13 14 15
// STATE_TOP STATE_GLAREA STATE_CAMERA STATE_BOTTOM 16 17 18 19
// RULES_MANAGE RULE_GLAREA RULE_CAMERA 20 21 22
// RULES_TREE RULES_COMPARE RULES_USE 23 24 25
// MEASURES_TOOLS MEASURES_ACTIVE 26 27
// TIME_DEP_RESULTS TIME_INDEP_RESULTS 28 29
// BUTTON SCROLL GLAREA TEXT LABEL 30 31 32 33 34
/* * * * * * * - F I L T E R S - * * * * * * *
* This list is duplicated in both /fsm.h and /fsm/dispatch *
* *
*
* MAIN, FSM_INIT (in fsm/dispatch) & WINDOW ACTIVATION (in widget/dispatch) 0
* MAIN_WINDOW DIALOG_WINDOW MODAL_WINDOW 10 11 12
*
* TOPBAR TOPBAR_LEFT TOPBAR_RIGHT TOPBAR_CENTER 20 21 22 23
*
* SYNTH_PAGE STATE_PAGE RULES_PAGE RESULTS_PAGE 30 31 32 33
* SYNTH_GLAREA SYNTH_ALL_RESULTS 34 35
* SYNTH_TIME_DEP_RESULTS SYNTH_TIME_INDEP_RESULTS 36 37
*
* STATE_PAGE STATE_TOP STATE_BOTTOM 40 41 42
* STATE_GLAREA STATE_CAMERA 43 44
*
* RULES_PAGE RULE_GLAREA RULE_CAMERA 50 51 52
* RULES_TREE RULES_COMPARE RULES_USE 53 54 55
*
* MEASURES_PAGE _TOOLS _ACTIVITY _DISPLAY 60 61 62 63
* TIME_DEP_RESULTS TIME_INDEP_RESULTS 64 65
*
* WIDGET BUTTON SCROLL GLAREA TEXT LABEL 70 71 72 73 74 75
*
* AUTO_NOTIFICATION 80
*
* FSM 90
* *
* This list is duplicated in both /fsm.h and /fsm/dispatch *
* * * * * * * - F I L T E R S - * * * * * * */
&& filter == MAIN)
&& filter == FSM)
fsm_journal_push (message);
}
#define _CRITICAL___ERROR____WARNING___INFO____MESSAGE___DEBUG ___SPEW____👋 0
@ -122,6 +140,13 @@ static int preferences_have_been_modified = FALSE;
void fsm_set_preferences_modified (bool value)
{
char str1[140] = "fsm/dispatch preferences modified value = ";
char str2[20]; sprintf(str2, " (%d)\n", value); strcat(str1, str2);
fsm_journal_event (str1, 4, 90);
fsm_journal_event ("fsm/dispatch preferences modified value = ?\n\
> Je ne sais ni concatener les strings ni utiliser 'itoa'\n\
> et les 'toggle' buttons envoient probablement deux events", 4, 90);
preferences_have_been_modified = value;
/*
if (value) fsm_journal_event (

View File

@ -74,7 +74,7 @@ void fsm_store_restore_reset (int choice, int value)
switch (choice) {
case (STORE) :
fsm_journal_event (
"fsm/prefer store restore reset(): switch (STORE)", 5, 0);
"fsm/prefer store restore reset(): switch (STORE)", 5, 41);
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_event (
"fsm/prefer store restore reset(): switch (RESTORE)", 5, 0);
"fsm/prefer store restore reset(): switch (RESTORE)", 5, 41);
for (int i = 0; i < n_objects; i++)
widget_set_object_transparency_to_value (i, p [i]);
break;
case (RESET) :
fsm_journal_event (
"fsm/prefer store restore reset(): switch (RESET)", 5, 0);
"fsm/prefer store restore reset(): switch (RESET)", 5, 41);
for (int i = 0; i < n_objects; i++)
widget_set_object_transparency_to_value (i, value); // i * 4 // rand() % 127
break;
default :
fsm_journal_event (
"fsm/prefer store restore reset(): switch (default)", 5, 0);
"fsm/prefer store restore reset(): switch (default)", 5, 41);
}
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 reset all situations transparencies at value() ";
char str2[10]; sprintf(str2, "%d, ", value); strcat(str1, str2);
fsm_journal_event ("fsm/prefer reset all situations transparencies at value() ", 5, 0); // TODO
char str1[140] = "fsm/prefer reset all situations transparencies at value";
char str2[10]; sprintf(str2, " (%d)", value); strcat(str1, str2);
fsm_journal_event (str1, 5, 41); // 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_event (
strcat("fsm/prefer add displayable() ", displayable_name), 5, 0); // TODO
strcat("fsm/prefer add displayable() ", displayable_name), 5, 90); // TODO
}

View File

@ -135,22 +135,22 @@ int main (int argc, char **argv)
// def: src/fsm/dispatch fsm = finite state machine
fsm_init ("main first instruction in main() & first log");
fsm_journal_event ("main *app = gtk_application_new ()", 3, -1);
fsm_journal_event ("main *app = gtk_application_new ()", 3, 0);
GtkApplication *app = gtk_application_new ("org.gem-graph",
G_APPLICATION_DEFAULT_FLAGS);
fsm_journal_event ("main g signal connect (app <--> on_windows_startup)", 3, -1);
g_signal_connect (app, "startup", G_CALLBACK (on_windows_startup), NULL);
g_signal_connect (app, "activate", G_CALLBACK (on_windows_activation), NULL);
fsm_journal_event ("main g signal connect (app <--> on_windows_startup)", 3, 0);
// ! WARNING ! 'on_windows_activation()'
// and 'on_windows_startup()' are in: src/widget/dispatch.c
// NOT in: src/signal.c
g_signal_connect (app, "startup", G_CALLBACK (on_windows_startup), NULL);
g_signal_connect (app, "activate", G_CALLBACK (on_windows_activation), NULL);
int status = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
fsm_journal_event ("main g object unref (app)", 3, -1);
fsm_journal_event ("main g object unref (app)", 3, 0);
fsm_journal_event ("main That'all folks ! 👋️😄️", 3, -1);
fsm_journal_event ("main That'all folks ! 👋️😄️", 3, 0);
fsm_journal_publication_request();
return status;

View File

@ -36,7 +36,7 @@
static void on_auto_notification (const char *message)
{
fsm_journal_event ("signal auto notification() has began", DEBUG, 0);
fsm_journal_event ("signal auto notification() has began", DEBUG, 35);
/* 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 auto notification() has ended", DEBUG, 0);
fsm_journal_event ("signal auto notification() has ended", DEBUG, 35);
}
@ -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 user tree expander toggled() has began", DEBUG, 0);
fsm_journal_event ("signal user tree expander toggled() has began", DEBUG, 23);
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 user tree expander toggled() has ended", DEBUG, 0);
fsm_journal_event ("signal user tree expander toggled() has ended", DEBUG, 23);
}
@ -76,7 +76,7 @@ void on_bind_user_tree_factory (GtkSignalListItemFactory *factory,
GObject* object,
gpointer user_data)
{
fsm_journal_event ("signal bind user tree factory() has began", DEBUG, 0);
fsm_journal_event ("signal bind user tree factory() has began", DEBUG, 23);
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 bind user tree factory() has ended", DEBUG, 0);
fsm_journal_event ("signal bind user tree factory() has ended", DEBUG, 23);
}
void on_setup_user_tree_factory (GtkSignalListItemFactory *factory,
GObject* object, gpointer user_data){
fsm_journal_event ("signal setup user tree factory() has began", DEBUG, 0);
fsm_journal_event ("signal setup user tree factory() has began", DEBUG, 23);
GtkWidget* expander = gtk_expander_new (NULL);
gtk_list_item_set_child (GTK_LIST_ITEM (object), expander);
fsm_journal_event ("signal setup user tree factory() has ended", DEBUG, 0);
fsm_journal_event ("signal setup user tree factory() has ended", DEBUG, 23);
}
@ -115,7 +115,7 @@ void on_setup_user_tree_factory (GtkSignalListItemFactory *factory,
gboolean on_glarea_render (GtkGLArea *area,
GdkGLContext *context)
{
fsm_journal_event ("signal glarea render() has began", DEBUG, 0);
fsm_journal_event ("signal glarea render() has began", DEBUG, 32);
// 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 glarea render() has ended", DEBUG, 0);
fsm_journal_event ("signal glarea render() has ended", DEBUG, 32);
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 glarea realize() has began", DEBUG, 0);
fsm_journal_event ("signal glarea realize() has began", DEBUG, 32);
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 glarea realize() has ended", DEBUG, 0);
fsm_journal_event ("signal glarea realize() has ended", DEBUG, 32);
}
/* We should tear down the state when unrealizing */
void on_glarea_unrealize (GtkWidget *widget)
{
fsm_journal_event ("signal glarea unrealize() has began", DEBUG, 0);
fsm_journal_event ("signal glarea unrealize() has began", DEBUG, 32);
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 glarea unrealize() has ended", DEBUG, 0);
fsm_journal_event ("signal glarea unrealize() has ended", DEBUG, 32);
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 glarea unrealize() has ended", DEBUG, 0);
fsm_journal_event ("signal glarea unrealize() has ended", DEBUG, 32);
return;
}
fsm_journal_event ("signal glarea unrealize() has ended", DEBUG, 0);
fsm_journal_event ("signal glarea unrealize() has ended", DEBUG, 32);
}
void on_axis_value_change (GtkAdjustment *adjustment, gpointer data)
{
fsm_journal_event ("signal axis value change() has began", DEBUG, 0);
fsm_journal_event ("signal axis value change() has began", DEBUG, 32);
GtkWidget *slider = gtk_widget_get_parent(GTK_WIDGET(data));
GtkWidget *container_widget = gtk_widget_get_parent(GTK_WIDGET(slider));
@ -206,6 +206,7 @@ void on_axis_value_change (GtkAdjustment *adjustment, gpointer data)
gtk_adjustment_get_value(adjustment));
/* Update the contents of the GL drawing area */
fsm_journal_event ("signal axis value change() has ENDED", DEBUG, 32);
}
@ -216,25 +217,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 save current model before editing() has began", INFO, 0);
fsm_journal_event ("signal save current model before editing() has began", INFO, 2);
gtk_widget_set_sensitive (GTK_WIDGET (data), TRUE);
fsm_journal_event ("signal save current model before editing() has ended", INFO, 0);
fsm_journal_event ("signal save current model before editing() has ended", INFO, 2);
}
void on_discard_current_model_before_editing (GtkWidget *btt_SAVE_CURRENT_MODEL,
gpointer data)
{
fsm_journal_event ("signal discard current model before editing() has began", INFO, 0);
fsm_journal_event ("signal discard current model before editing() has began", INFO, 2);
gtk_window_close (GTK_WINDOW (data));
fsm_journal_event ("signal discard current model before editing() has ended", INFO, 0);
fsm_journal_event ("signal discard current model before editing() has ended", INFO, 2);
}
void on_write_current_model (GtkWidget *btt_WRITE_CURRENT_MODEL,
gpointer data)
{
fsm_journal_event ("signal write current model() has began", INFO, 0);
fsm_journal_event ("signal write current model() has began", INFO, 2);
gtk_window_close (GTK_WINDOW (data));
fsm_journal_event ("signal write current model() has ended", INFO, 0);
fsm_journal_event ("signal write current model() has ended", INFO, 2);
}
@ -249,7 +250,7 @@ static void switch_state_rules_data();
void on_toggle_exec_edit (GtkWidget *toggled_button, gpointer user_data)
{
fsm_journal_event ("signal toggle exec edit() has began", INFO, 0);
fsm_journal_event ("signal toggle exec edit() has began", INFO, 5);
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 +271,7 @@ void on_toggle_exec_edit (GtkWidget *toggled_button, gpointer user_data)
}
switch_state_rules_data();
fsm_journal_event ("signal toggle exec edit() has ended", INFO, 0);
fsm_journal_event ("signal toggle exec edit() has ended", INFO, 5);
}
@ -279,7 +280,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() has began", INFO, 0);
fsm_journal_event ("signal switch state rules data() has began", INFO, 5);
switch (fsm_get_state_rules_data()) {
case (SYNTH) :
@ -323,9 +324,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() > has ended", INFO, 0);
fsm_journal_event ("signal default in : switch state rules data() > has ended", INFO, 5);
}
fsm_journal_event ("signal switch state rules data() has ended", INFO, 0);
fsm_journal_event ("signal switch state rules data() has ended", INFO, 5);
}
// TODO Il doit y avoir plus élégant,... ET SURTOUT MOINS DANGEREUX !!!
@ -333,7 +334,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 toggle state rules data() has began", INFO, 0);
fsm_journal_event ("signal toggle state rules data() has began", INFO, 5);
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,7 +344,7 @@ 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);
fsm_journal_event ("signal toggle state rules data() has ended", INFO, 5);
if (is_active) switch_state_rules_data();
}
@ -352,19 +353,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 clicked topbar right search() has began", DEBUG, 0);
fsm_journal_event ("signal clicked topbar right search() has began", DEBUG, 6);
// 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 clicked topbar right search() has ended", DEBUG, 0);
fsm_journal_event ("signal clicked topbar right search() has ended", DEBUG, 6);
}
void on_clicked_topbar_right_home (GtkWidget *btt_reset, gpointer data)
{
fsm_journal_event ("signal clicked topbar right home() has began", DEBUG, 0);
fsm_journal_event ("signal clicked topbar right home() has began", DEBUG, 6);
// gtk_window_present (GTK_WINDOW (widget_get_dialog_window())); // NB works only once. < TODO
fsm_journal_event ("signal clicked topbar right home() has ended", DEBUG, 0);
fsm_journal_event ("signal clicked topbar right home() has ended", DEBUG, 6);
}
@ -378,7 +379,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() has began", DEBUG, 0);
fsm_journal_event ("signal updating objects transparencies() has began", DEBUG, 16);
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 +387,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_journal_event ("signal updating objects transparencies() has ended", DEBUG, 16);
fsm_set_preferences_modified (TRUE); // << à détailler TODO
}
void on_resetting_XYZ_in_state_page ()
{
fsm_journal_event ("signal resetting XYZ in state page() has began", DEBUG, 0);
fsm_journal_event ("signal resetting XYZ in state page() has began", DEBUG, 16);
widget_state_XYZ_reset_all();
fsm_journal_event ("signal resetting XYZ in state page() has ended", DEBUG, 0);
fsm_journal_event ("signal resetting XYZ in state page() has ended", DEBUG, 16);
}
// -------------------------- 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() has began", DEBUG, 0);
fsm_journal_event ("signal on_situations_box_do_reset() has began", DEBUG, 16);
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() has ended", DEBUG, 0);
fsm_journal_event ("signal on_situations_box_do_reset() has ended", DEBUG, 16);
}
@ -415,123 +416,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 clicked topbar right measure() has began", DEBUG, 0);
fsm_journal_event ("signal clicked topbar right measure() has began", DEBUG, 26);
// 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 clicked topbar right measure() has ended", DEBUG, 0);
fsm_journal_event ("signal clicked topbar right measure() has ended", DEBUG, 26);
}
void on_start_new_measure (GtkWidget *btt, gpointer data)
{
fsm_journal_event ("signal start new measure() has began", DEBUG, 0);
fsm_journal_event ("signal start new measure() has began", DEBUG, 26);
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_measure_do_select_rules_first()));
fsm_journal_event ("signal start new measure() has ended", DEBUG, 0);
fsm_journal_event ("signal start new measure() has ended", DEBUG, 26);
}
void on_select_rules_first (GtkWidget *btt, gpointer data)
{
fsm_journal_event ("signal select rules first() has began", DEBUG, 0);
fsm_journal_event ("signal select rules first() has began", DEBUG, 26);
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 select rules first() has ended", DEBUG, 0);
fsm_journal_event ("signal select rules first() has ended", DEBUG, 26);
}
void on_measure_depends_on_a_single_event (GtkWidget *btt, gpointer data)
{
fsm_journal_event ("signal measure depends on a single event() has began", DEBUG, 0);
fsm_journal_event ("signal measure depends on a single event() has began", DEBUG, 26);
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_measure_do_depends_on_a_single_event()));
fsm_journal_event ("signal measure depends on a single event() has ended", DEBUG, 0);
fsm_journal_event ("signal measure depends on a single event() has ended", DEBUG, 26);
}
void on_measure_depends_on_two_events (GtkWidget *btt, gpointer data)
{
fsm_journal_event ("signal measure depends on two events() has began", DEBUG, 0);
fsm_journal_event ("signal measure depends on two events() has began", DEBUG, 26);
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_measure_do_select_a_second_rules_set()));
fsm_journal_event ("signal measure depends on two events() has ended", DEBUG, 0);
fsm_journal_event ("signal measure depends on two events() has ended", DEBUG, 26);
}
void on_select_a_second_rules_set (GtkWidget *btt, gpointer data)
{
fsm_journal_event ("signal select a second rules set() has began", DEBUG, 0);
fsm_journal_event ("signal select a second rules set() has began", DEBUG, 26);
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_measure_do_choose_an_event_type()));
fsm_journal_event ("signal select a second rules set() has ended", DEBUG, 0);
fsm_journal_event ("signal select a second rules set() has ended", DEBUG, 26);
}
void on_select_a_second_measurement (GtkWidget *btt, gpointer data)
{
fsm_journal_event ("signal select a second measurement() has began", DEBUG, 0);
fsm_journal_event ("signal select a second measurement() has began", DEBUG, 26);
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_measure_do_correlate()));
fsm_journal_event ("signal select a second measurement() has ended", DEBUG, 0);
fsm_journal_event ("signal select a second measurement() has ended", DEBUG, 26);
}
void on_skip_this_step (GtkWidget *btt, gpointer data)
{
fsm_journal_event ("signal skip this step() has began", DEBUG, 0);
fsm_journal_event ("signal skip this step() has began", DEBUG, 26);
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_measure_do_insert_in_measurements_list ()));
fsm_journal_event ("signal skip this step() has ended", DEBUG, 0);
fsm_journal_event ("signal skip this step() has ended", DEBUG, 26);
}
void on_something_else (GtkWidget *btt, gpointer data)
{
fsm_journal_event ("signal something else() has began", DEBUG, 0);
fsm_journal_event ("signal something else() has began", DEBUG, 26);
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_measure_do_end_creation_of_measurement_process()));
fsm_journal_event ("signal something else() has ended", DEBUG, 0);
fsm_journal_event ("signal something else() has ended", DEBUG, 26);
}
void on_closing_page (GtkWidget *btt, gpointer data)
{
fsm_journal_event ("signal closing page() has began", DEBUG, 0);
fsm_journal_event ("signal closing page() has began", DEBUG, 26);
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_get_synth_page()));
fsm_journal_event ("signal closing page() has ended", DEBUG, 0);
fsm_journal_event ("signal closing page() has ended", DEBUG, 26);
}
void on_measure_single_event_occurences_nb (GtkWidget *btt, gpointer data)
{
fsm_journal_event ("signal measure single event occurences nb() has began", DEBUG, 0);
fsm_journal_event ("signal measure single event occurences nb() has began", DEBUG, 26);
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_measure_event_occurences_nb()));
fsm_journal_event ("signal measure single event occurences nb() has ended", DEBUG, 0);
fsm_journal_event ("signal measure single event occurences nb() has ended", DEBUG, 26);
}
void on_measure_single_event_occurences_dates (GtkWidget *btt, gpointer data)
{
fsm_journal_event ("signal measure single event occurences dates() has began", DEBUG, 0);
fsm_journal_event ("signal measure single event occurences dates() has began", DEBUG, 26);
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_measure_event_occurences_dates()));
fsm_journal_event ("signal measure single event occurences dates() has ended", DEBUG, 0);
fsm_journal_event ("signal measure single event occurences dates() has ended", DEBUG, 26);
}
void on_measure_single_event_occurences_situations (GtkWidget *btt, gpointer data)
{
fsm_journal_event ("signal measure single event occurences situations() has began", DEBUG, 0);
fsm_journal_event ("signal measure single event occurences situations() has began", DEBUG, 26);
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_measure_event_occurences_situations()));
fsm_journal_event ("signal measure single event occurences situations() has ended", DEBUG, 0);
fsm_journal_event ("signal measure single event occurences situations() has ended", DEBUG, 26);
}
void on_measure_time_elapsed_between_two_events (GtkWidget *btt, gpointer data)
{
fsm_journal_event ("signal measure time elapsed between two events() has began", DEBUG, 0);
fsm_journal_event ("signal measure time elapsed between two events() has began", DEBUG, 26);
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_measure_time_elapsed_between_two_events()));
fsm_journal_event ("signal measure time elapsed between two events() has ended", DEBUG, 0);
fsm_journal_event ("signal measure time elapsed between two events() has ended", DEBUG, 26);
}
void on_measure_third_event_occurences_in_between (GtkWidget *btt, gpointer data)
{
fsm_journal_event ("signal measure third event occurences in between() has began", DEBUG, 0);
fsm_journal_event ("signal measure third event occurences in between() has began", DEBUG, 26);
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_measure_third_event_occurences_in_between()));
fsm_journal_event ("signal measure third event occurences in between() has ended", DEBUG, 0);
fsm_journal_event ("signal measure third event occurences in between() has ended", DEBUG, 26);
}
@ -541,11 +542,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() has began", DEBUG, 0);
fsm_journal_event ("signal entry name insert after() has began", DEBUG, 25);
}
void on_entry_name_delete_after (GtkWidget *entry, gpointer data)
{
fsm_journal_event ("signal entry name delete after() has began", DEBUG, 0);
fsm_journal_event ("signal entry name delete after() has began", DEBUG, 25);
}

View File

@ -54,14 +54,14 @@ void *widget_get_main_window() { return main_window; }
void *widget_get_dialog_window() { return dialog_window; }
void *widget_get_text_window() { return text_window; }
static void action_b (GSimpleAction *action,
/*static void action_b (GSimpleAction *action,
GVariant *parameter,
GApplication *application) {printf ("action_b() in widget/dispatch\n");}
GApplication *application) {printf ("action_b() in widget/dispatch\n");}action_b;*/
void on_windows_startup (GtkApplication *app) // WIP 2024-09
{
// NB on_windows_startup() is in: widget/dispatch NOT in: src/signal
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)
@ -97,10 +97,10 @@ void on_windows_activation (GtkApplication *app)
// ------------------------------------------------------------------------
// WIP 2024-09
// https://github.com/ToshioCP/Gtk4-tutorial/blob/main/gfm/sec17.md
GtkApplication *app2 = GTK_APPLICATION (app);
/*GtkApplication *app2 = GTK_APPLICATION (app);
GSimpleAction *act_b = g_simple_action_new ("do_b", NULL);
g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (act_b));
g_signal_connect (act_b, "activate", G_CALLBACK (action_b), app2);
g_signal_connect (act_b, "activate", G_CALLBACK (action_b), app2);*/
fsm_journal_event ("widget/dispatch windows activation() has ended", INFO, 0);
}