From 22e3eb998b4b3756b79bf5c0f7fbd564df78f84e Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Wed, 11 Sep 2024 23:57:13 +0200 Subject: [PATCH] first journal --- first journal.txt | 288 ++++++++++++++++++++++++ include/fsm.h | 16 +- src/fsm/dispatch.c | 22 +- src/fsm/journal.c | 116 +++------- src/fsm/prefer.c | 5 +- src/signal.c | 130 +++++++---- src/widget/dispatch.c | 12 +- src/widget/one_rule/algebra/utilities.c | 4 +- 8 files changed, 427 insertions(+), 166 deletions(-) create mode 100644 first journal.txt diff --git a/first journal.txt b/first journal.txt new file mode 100644 index 0000000..7b65465 --- /dev/null +++ b/first journal.txt @@ -0,0 +1,288 @@ +jean@n-guix-port:~/Gem-Graph/gem-graph-client [env] $ make run + DEP build/src/fsm/journal.d + CC build/src/fsm/journal.o + LD bin/gem-graph-client +bin/gem-graph-client +09/11/24 23:52:04 > 269928 < fsm_init() start +09/11/24 23:52:04 > 269932 < fsm_measures_list_init() +09/11/24 23:52:04 > 269932 < fsm_results_list_init() +09/11/24 23:52:04 > 269932 < fsm_displayable_list_init() +09/11/24 23:52:04 > 269932 < fsm_preferences_init() +09/11/24 23:52:04 > 269933 < fsm_init() end +09/11/24 23:52:04 > 293764 < on_windows_startup_event() is in: widget/dispatch.c NOT in: src/signal.c +09/11/24 23:52:04 > 293768 < on_windows_activation() is in: widget/dispatch.c NOT in: src/signal.c +09/11/24 23:52:04 > 295870 < signal > on_toggle_state_rules_data() +09/11/24 23:52:04 > 295874 < signal > switch_state_rules_data() +09/11/24 23:52:04 > 396763 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 397502 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 397537 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 397567 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 397585 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 397608 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 397623 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 397645 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 397659 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 397680 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 397694 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 397715 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 397729 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 397750 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 397764 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 397784 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 397803 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 397826 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 397840 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 397861 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 397875 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 397896 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 397910 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 397931 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 397944 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 397965 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398025 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398048 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398063 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398084 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398098 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398119 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398132 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398153 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398167 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398190 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398204 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398231 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398245 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398272 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398286 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398313 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398327 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398353 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398367 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398397 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398411 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398438 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398452 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398479 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398493 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398520 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398534 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398560 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398575 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398601 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398615 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398641 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398654 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398681 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398695 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398722 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398736 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398763 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398777 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398803 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398817 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398846 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398860 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398887 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398901 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398928 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398942 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 398969 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 398983 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 399009 < signal > on_bind_user_tree_factory() +09/11/24 23:52:04 > 399023 < signal > on_setup_user_tree_factory() +09/11/24 23:52:04 > 399050 < signal > on_bind_user_tree_factory() +09/11/24 23:52:06 > 440093 < signal > on_toggle_state_rules_data() +09/11/24 23:52:06 > 440337 < signal > on_toggle_state_rules_data() +09/11/24 23:52:06 > 440338 < signal > switch_state_rules_data() +09/11/24 23:52:07 > 486290 < signal > on_toggle_state_rules_data() +09/11/24 23:52:07 > 486473 < signal > on_toggle_state_rules_data() +09/11/24 23:52:07 > 486475 < signal > switch_state_rules_data() +09/11/24 23:52:08 > 390351 < signal > on_toggle_state_rules_data() +09/11/24 23:52:08 > 390491 < signal > on_toggle_state_rules_data() +09/11/24 23:52:08 > 390492 < signal > switch_state_rules_data() +09/11/24 23:52:08 > 496247 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 496311 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 496333 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 496364 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 496381 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 496409 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 496493 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 496521 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 496541 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 496568 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 496584 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 496610 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 496625 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 496654 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 496669 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 496696 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 496711 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 496737 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 496752 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 496778 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 496793 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 496818 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 496833 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 496859 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 496873 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 496899 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 496914 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 496940 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 496954 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 496980 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 496995 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 497021 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 497036 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 497061 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 497076 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 497102 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 497117 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 497142 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 497157 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 497185 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 497200 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 497225 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 497240 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 497268 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 497283 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 497309 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 497324 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 497349 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 497364 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 497390 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 497405 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 497431 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 497446 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 497471 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 497486 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 497512 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 497527 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 497553 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 497568 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 497594 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 497608 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 498042 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 498062 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 498092 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 498108 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 498135 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 498151 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 498177 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 498192 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 498218 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 498232 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 498259 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 498275 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 498302 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 498317 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 498343 < signal > on_bind_user_tree_factory() +09/11/24 23:52:08 > 498359 < signal > on_setup_user_tree_factory() +09/11/24 23:52:08 > 498386 < signal > on_bind_user_tree_factory() +09/11/24 23:52:09 > 348398 < signal > on_toggle_state_rules_data() +09/11/24 23:52:09 > 348567 < signal > on_toggle_state_rules_data() +09/11/24 23:52:09 > 348568 < signal > switch_state_rules_data() +09/11/24 23:52:10 > 484266 < signal > on_toggle_exec_edit() +09/11/24 23:52:10 > 484313 < signal > switch_state_rules_data() +09/11/24 23:52:12 > 912247 < signal > on_toggle_exec_edit() +09/11/24 23:52:12 > 912294 < signal > switch_state_rules_data() +09/11/24 23:52:14 > 234231 < signal > on_toggle_state_rules_data() +09/11/24 23:52:14 > 234402 < signal > on_toggle_state_rules_data() +09/11/24 23:52:14 > 234403 < signal > switch_state_rules_data() +09/11/24 23:52:14 > 333149 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 333199 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 333219 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 333250 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 333267 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 333295 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 333310 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 333338 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 333353 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 333380 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 333396 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 333422 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 333437 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 333463 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 333478 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 333505 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 333520 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 333548 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 333563 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 333592 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 333608 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 333635 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 333651 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 333679 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 333694 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 333722 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 333737 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 333763 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 333778 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 333805 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 333820 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 333847 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 333862 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 333888 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 333903 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 333932 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 333946 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 333975 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 333990 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 334018 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 334032 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 334059 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 334073 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 334100 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 334114 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 334141 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 334156 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 334182 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 334197 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 334223 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 334237 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 334264 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 334278 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 334305 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 334319 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 334345 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 334359 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 334391 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 334407 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 334434 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 334448 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 334474 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 334489 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 334515 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 334529 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 334555 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 334570 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 334596 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 334611 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 334637 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 334651 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 334677 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 334692 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 334718 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 334733 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 334759 < signal > on_bind_user_tree_factory() +09/11/24 23:52:14 > 334774 < signal > on_setup_user_tree_factory() +09/11/24 23:52:14 > 334801 < signal > on_bind_user_tree_factory() +09/11/24 23:52:15 > 220421 < signal > on_toggle_state_rules_data() +09/11/24 23:52:15 > 220583 < signal > on_toggle_state_rules_data() +09/11/24 23:52:15 > 220585 < signal > switch_state_rules_data() +09/11/24 23:52:16 > 286371 < signal > on_toggle_exec_edit() +09/11/24 23:52:16 > 286393 < signal > switch_state_rules_data() +09/11/24 23:52:20 > 162520 < signal > on_clicked_topbar_right_measure() +09/11/24 23:52:21 > 382219 < signal > on_start_new_measure() +09/11/24 23:52:22 > 28227 < signal > on_select_rules_first() +09/11/24 23:52:22 > 744336 < signal > on_measure_depends_on_a_single_event() +09/11/24 23:52:23 > 480264 < signal > on_measure_single_event_occurences_nb() +09/11/24 23:52:23 > 480267 < signal > on_select_a_second_measurement() +09/11/24 23:52:27 > 282269 < signal > on_toggle_state_rules_data() +09/11/24 23:52:27 > 282442 < signal > on_toggle_state_rules_data() +09/11/24 23:52:27 > 282443 < signal > switch_state_rules_data() +09/11/24 23:52:29 > 210047 < signal > on_clicked_topbar_right_search() +09/11/24 23:52:32 > 672067 < signal > on_clicked_topbar_right_home() +view journal (n = 279) +jean@n-guix-port:~/Gem-Graph/gem-graph-client [env] $ + + diff --git a/include/fsm.h b/include/fsm.h index 70b4783..5f85135 100644 --- a/include/fsm.h +++ b/include/fsm.h @@ -47,23 +47,21 @@ typedef struct data_list {int value; struct data_list *suiv;} data_list ; typedef struct disp_list {int value; struct disp_list *suiv;} disp_list ; // --------------------------------------------------------------- WIP ------ -void fsm_get_time(char *message); -// --------------------------------------------------------------- WIP ------ -typedef struct unit {int event; struct unit *prev; struct unit *next;} unit; +typedef struct unit {long yy_dd_mm; long usec; char *message; struct unit *prev; struct unit *next;} unit; typedef struct {unit *first; unit *last;} journal; // structure d'accès au journal void fsm_journal_init (journal *jj, char *message); // initialise void fsm_journal_clear (journal *jj, char *message); // vide tout le journal -int fsm_journal_push_back (journal *jj, int event, char *message); // ajoute un évènement en fin de journal -int fsm_journal_push_front (journal *jj, int event, char *message); // ajoute un évènement en début de journal -int fsm_journal_pop_back (journal *jj, char *message); // retire un évènement en fin de journal -int fsm_journal_pop_front (journal *jj, char *message); // retire un évènement en début de journal -int fsm_journal_length (journal jj, char *message); // nombre d'évènements dans le journal -void fsm_journal_seek (journal jj, int event, char *message); // recherche un évènement dans le journal +void fsm_journal_push_front (journal *jj, char *message); // ajoute un évènement en début de journal +long fsm_journal_pop_back (journal *jj, char *message); // retire un évènement en fin de journal +int fsm_journal_length (journal jj); // nombre d'évènements dans le journal +void fsm_journal_seek (journal jj, long usec, char *message); // recherche un évènement dans le journal void fsm_journal_view (journal jj, char *message); // affiche tout le journal void fsm_journal_test(char *message); // --------------------------------------------------------------- WIP ------ // ref: sudo cat /var/log/messages +void fsm_journal_view_request (char *message); // def: fsm/dispatch call: widget/dispatch; +void fsm_journal_widget_event (char *message); // def: fsm/dispatch call: widget/dispatch; // --------------------------------------------------------------- WIP ------ diff --git a/src/fsm/dispatch.c b/src/fsm/dispatch.c index ca45b47..45eae32 100644 --- a/src/fsm/dispatch.c +++ b/src/fsm/dispatch.c @@ -59,16 +59,18 @@ journal glogos; // gg_logs, should be, but 'glogos' is funny 2024-09-11 void fsm_init() { - fsm_journal_init (&glogos, "start fsm_init()"); + fsm_journal_push_front (&glogos, "fsm_init() start"); - fsm_measures_list_init(); fsm_journal_push_front (&glogos, 1, "measures"); - fsm_results_list_init(); fsm_journal_push_front (&glogos, 2, "results"); - fsm_displayable_list_init(); fsm_journal_push_front (&glogos, 3, "display"); - fsm_preferences_init(); fsm_journal_push_front (&glogos, 4, "prefer"); + fsm_measures_list_init(); fsm_journal_push_front (&glogos, "fsm_measures_list_init()"); + fsm_results_list_init(); fsm_journal_push_front (&glogos, "fsm_results_list_init()"); + fsm_displayable_list_init(); fsm_journal_push_front (&glogos, "fsm_displayable_list_init()"); + fsm_preferences_init(); fsm_journal_push_front (&glogos, "fsm_preferences_init()"); - fsm_journal_length (glogos, "end fsm_init()"); + fsm_journal_push_front (&glogos, "fsm_init() end"); } +void fsm_journal_view_request (char *message) {fsm_journal_view (glogos, message);} +void fsm_journal_widget_event (char *message) {fsm_journal_push_front (&glogos, message);} /******************************************************************************/ /* S T A T E S */ @@ -98,7 +100,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_msg (choice, 0, "", 0); // EXEC_EDIT is sub_automaton 0 choice_EXEC_EDIT = choice; } } @@ -106,7 +108,7 @@ 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_msg (choice, 0, "", 1); // STATE_RULES_DATA is sub_automaton 1 choice_STATE_RULES_DATA = choice; } } @@ -136,10 +138,10 @@ void fsm_msg (int choice, int value, char *string, int sub_automaton) tab_0 [choice_EXEC_EDIT], tab_1 [choice]); break; - case (2) : printf ("fsm/dispatch (message) | %s\n", string); + case (2) : // printf ("fsm/dispatch (message) | %s\n", string); break; - case (3) : printf ("fsm/dispatch (message) | %2d\n", choice); + case (3) : // printf ("fsm/dispatch (message) | %2d\n", choice); break; diff --git a/src/fsm/journal.c b/src/fsm/journal.c index cb29445..8fcfa09 100644 --- a/src/fsm/journal.c +++ b/src/fsm/journal.c @@ -31,16 +31,11 @@ #include "../../include/fsm.h" /******************************************************************************/ -/* A journal stores chronologically the fsm events */ +/* A journal stores chronologically the fsm yy_dd_mms */ /* during a session run (rules exec, mainly) */ /******************************************************************************/ -void fsm_get_time (char *message) -{ - struct timeval tv; - gettimeofday(&tv, NULL); - printf(" Seconds since Jan. 1, 1970: %ld %s\n", tv.tv_sec, message); /* time_t current_time = time(NULL); // Check if the time retrieval was successful @@ -49,16 +44,15 @@ void fsm_get_time (char *message) printf(" Current timestamp: %ld %s\n", current_time, message); printf(" Current time: %s", ctime(¤t_time)); */ -} + void fsm_journal_init (journal *jj, char *message) { jj->first = NULL; jj->last = NULL; - fsm_get_time (message); } -void fsm_journal_clear (journal *jj, char *message) +void fsm_journal_clear (journal *jj, char *message) { unit *tmp; unit *a_unit = jj->first; @@ -72,59 +66,36 @@ void fsm_journal_clear (journal *jj, char *message) jj->last = NULL; } -int fsm_journal_push_back (journal *jj, int event, char *message) -{ - unit *new_unit = malloc (sizeof(unit)); - if (! new_unit) exit (EXIT_FAILURE); - new_unit->event = event; - new_unit->prev = jj->last; - new_unit->next = NULL; - if (jj->last) jj->last->next = new_unit; - else jj->first = new_unit; - jj->last = new_unit; - return event; -} - -int fsm_journal_push_front (journal *jj, int event, char *message) +void fsm_journal_push_front (journal *jj, char *message) { + struct timeval tv; + gettimeofday(&tv, NULL); unit *new_unit = malloc(sizeof(unit)); if (! new_unit) exit (EXIT_FAILURE); - new_unit->event = event; + new_unit->yy_dd_mm = tv.tv_sec; + new_unit->usec = tv.tv_usec; + new_unit->message = message; new_unit->next = jj->first; new_unit->prev = NULL; if (jj->first) jj->first->prev = new_unit; else jj->last = new_unit; jj->first = new_unit; - return event; } -int fsm_journal_pop_back (journal *jj, char *message) +long fsm_journal_pop_back (journal *jj, char *message) { - int event; + long usec; unit *tmp = jj->last; if (! tmp) return -1; - event = tmp->event; + usec = tmp->usec; jj->last = tmp->prev; if (jj->last) jj->last->next = NULL; else jj->first = NULL; free (tmp); - return event; // retourne l'évènement retiré du journal. + return usec; // retourne l'évènement retiré du journal. } -int fsm_journal_pop_front (journal *jj, char *message) -{ - int event; - unit *tmp = jj->first; - if (! tmp) return -1; - event = tmp->event; - jj->first = tmp->next; - if (jj->first) jj->first->prev = NULL; - else jj->last = NULL; - free (tmp); - return event; // retourne l'évènement retiré du journal. -} - -int fsm_journal_length (journal jj, char *message) +int fsm_journal_length (journal jj) { unit *a_unit = jj.first; int nb = 0; @@ -133,66 +104,37 @@ int fsm_journal_length (journal jj, char *message) nb ++; a_unit = a_unit->next; } - printf (" fsm_journal_length (n = %d) %s\n", nb, ""); - fsm_get_time (message); + // printf ("fsm journal length = %d\n", nb); return nb; } -void fsm_journal_seek (journal jj, int event, char *message) +void fsm_journal_seek (journal jj, long usec, char *message) { unit *a_unit = jj.first; int nb = 0; while (a_unit) { - if (event == a_unit->event) nb++; + if (usec == a_unit->usec) nb++; a_unit = a_unit->next; } - if (nb > 0) printf ("> event %d found %d times in journal\n", event, nb); - else printf ("> event %d not found in journal\n", event); - fsm_get_time (message); + if (nb > 0) printf ("> date (usec) %ld found %d times in journal\n", usec, nb); + else printf ("> date (usec) %ld not found in journal\n", usec); } void fsm_journal_view (journal jj, char *message) { - printf ("view journal (n = %d)\n", fsm_journal_length (jj, message)); - unit *a_unit = jj.first; + unit *a_unit = jj.last; + char buf[80]; + int nb = 0; while (a_unit) { - printf ("> %d <\n", a_unit->event); - a_unit = a_unit->next; + // Format time, "ddd yyyy-mm-dd hh:mm:ss zzz" "%Y-%m-%d %H:%M:%S" + // https://www.man7.org/linux/man-pages/man3/strftime.3.html + strftime(buf, sizeof(buf), "%D %T", localtime(&a_unit->yy_dd_mm)); + printf ("%s > %6ld < %s\n", buf, a_unit->usec, a_unit->message); + a_unit = a_unit->prev; + nb ++; } - puts ("------"); -} - -void fsm_journal_test(char *message) // call: widget/dispatch -{ - journal exemple; - - fsm_journal_init (&exemple, message); - - printf ("push front > %d\n", fsm_journal_push_front (&exemple, 10, "")); - printf ("push back > %d\n", fsm_journal_push_back (&exemple, 100, "")); - printf ("push back > %d\n", fsm_journal_push_back (&exemple, 1000, "")); - printf ("push front > %d\n", fsm_journal_push_front (&exemple, 1, "")); - - fsm_journal_view (exemple, ""); - fsm_journal_seek (exemple, 2, ""); - - printf ("pop back > %d\n", fsm_journal_pop_back (&exemple, "")); - printf ("pop back > %d\n", fsm_journal_pop_back (&exemple, "")); - printf ("pop back > %d\n", fsm_journal_pop_back (&exemple, "")); - printf ("push back > %d\n", fsm_journal_push_back (&exemple, 2, "")); - - fsm_journal_view (exemple, ""); - - printf ("push back > %d\n", fsm_journal_push_back (&exemple, 3, "")); - printf ("push front > %d\n", fsm_journal_push_front (&exemple, 0, "")); - - fsm_journal_view (exemple, ""); - fsm_journal_seek (exemple, 2, ""); - - printf ("clear list\n"); fsm_journal_clear (&exemple, ""); - - fsm_journal_view (exemple, message); + printf ("view journal (n = %d)\n", nb); } diff --git a/src/fsm/prefer.c b/src/fsm/prefer.c index b603283..b2baea3 100644 --- a/src/fsm/prefer.c +++ b/src/fsm/prefer.c @@ -127,8 +127,11 @@ void fsm_add_displayable (char *displayable_name) /******************************************************************************/ /* P R E F E R E N C E S */ /******************************************************************************/ - +void fsm_preferences_init () {} +void fsm_displayable_list_init () {} +/* void fsm_preferences_init () {printf("fsm/prefer |\ src/fsm/prefer.c fsm_preferences_init()\n");} void fsm_displayable_list_init () {printf("fsm/prefer |\ src/fsm/prefer.c fsm_displayable_list_init()\n");} + */ diff --git a/src/signal.c b/src/signal.c index 39568e0..39184c5 100644 --- a/src/signal.c +++ b/src/signal.c @@ -36,6 +36,7 @@ static void on_auto_notification (const char *message) { + fsm_journal_widget_event ("signal > on_auto_notification()"); /* Ignored (2024-06-06) because I don't know how to get "main_window" easily if (window->toast_revealer == NULL) { @@ -62,10 +63,10 @@ static void on_auto_notification (const char *message) static void on_user_tree_expander_toggled (GtkExpander *expander, gpointer user_data) { - 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_widget_event ("signal > on_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,29 +74,31 @@ void on_bind_user_tree_factory (GtkSignalListItemFactory *factory, GObject* object, gpointer user_data) { - GtkListItem *list_item = GTK_LIST_ITEM (object); - assert (list_item); + fsm_journal_widget_event ("signal > on_bind_user_tree_factory()"); + GtkListItem *list_item = GTK_LIST_ITEM (object); + assert (list_item); - GtkTreeListRow *row = gtk_list_item_get_item (list_item); - assert (row); // if (row != NULL) {...} do something ? TODO Check ! + GtkTreeListRow *row = gtk_list_item_get_item (list_item); + assert (row); // if (row != NULL) {...} do something ? TODO Check ! - const gchar *text = gtk_string_object_get_string ( + const gchar *text = gtk_string_object_get_string ( GTK_STRING_OBJECT (gtk_tree_list_row_get_item (row))); - GtkWidget *expander = gtk_list_item_get_child (list_item); - gtk_expander_set_label (GTK_EXPANDER (expander), text); - g_signal_handlers_disconnect_by_func (expander, + GtkWidget *expander = gtk_list_item_get_child (list_item); + gtk_expander_set_label (GTK_EXPANDER (expander), text); + g_signal_handlers_disconnect_by_func (expander, G_CALLBACK (on_user_tree_expander_toggled), row); - g_signal_connect (expander, + g_signal_connect (expander, "activate", G_CALLBACK (on_user_tree_expander_toggled), row); - gtk_widget_set_margin_start (expander, + gtk_widget_set_margin_start (expander, gtk_tree_list_row_get_depth(row) * 20); } void on_setup_user_tree_factory (GtkSignalListItemFactory *factory, GObject* object, gpointer user_data){ + fsm_journal_widget_event ("signal > on_setup_user_tree_factory()"); GtkWidget* expander = gtk_expander_new (NULL); gtk_list_item_set_child (GTK_LIST_ITEM (object), expander); if (0) printf("[on_setup_user_tree_factory] here is an expander\n"); @@ -106,9 +109,10 @@ void on_setup_user_tree_factory (GtkSignalListItemFactory *factory, /* G L A R E A */ /******************************************************************************/ -gboolean on_glarea_render(GtkGLArea *area, +gboolean on_glarea_render (GtkGLArea *area, GdkGLContext *context) { + fsm_journal_widget_event ("signal > on_glarea_render()"); // Check if the widget is a glarea if(gtk_gl_area_get_error(area) != NULL) { on_auto_notification("An OpenGL error occured !"); @@ -125,8 +129,9 @@ 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) +void on_glarea_realize (GtkWidget *widget) { + fsm_journal_widget_event ("signal > on_glarea_realize()"); GError *internal_error = NULL; // Make the GL context current to be able to call the GL API @@ -150,8 +155,9 @@ void on_glarea_realize(GtkWidget *widget) } /* We should tear down the state when unrealizing */ -void on_glarea_unrealize(GtkWidget *widget) +void on_glarea_unrealize (GtkWidget *widget) { + fsm_journal_widget_event ("signal > on_glarea_unrealize()"); GError *internal_error = NULL; // Make the GL context current to be able to call the GL API @@ -172,8 +178,9 @@ void on_glarea_unrealize(GtkWidget *widget) } } -void on_axis_value_change(GtkAdjustment *adjustment, gpointer data) +void on_axis_value_change (GtkAdjustment *adjustment, gpointer data) { + fsm_journal_widget_event ("signal > on_axis_value_change()"); GtkWidget *slider = gtk_widget_get_parent(GTK_WIDGET(data)); GtkWidget *container_widget = gtk_widget_get_parent(GTK_WIDGET(slider)); @@ -201,23 +208,25 @@ void on_axis_value_change(GtkAdjustment *adjustment, gpointer data) void on_save_current_model_before_editing (GtkWidget *btt_SAVE_CURRENT_MODEL, gpointer data) { - gtk_widget_set_sensitive (GTK_WIDGET (data), + fsm_journal_widget_event ("signal > on_save_current_model_before_editing()"); + gtk_widget_set_sensitive (GTK_WIDGET (data), TRUE); - printf ("signal.c - SAVE_CURRENT_MODEL_BEFORE_EDITING\n"); + printf ("signal.c - SAVE_CURRENT_MODEL_BEFORE_EDITING\n"); } void on_discard_current_model_before_editing (GtkWidget *btt_SAVE_CURRENT_MODEL, gpointer data) { - gtk_window_close (GTK_WINDOW (data)); - printf ("signal | on_discard_current_model_before_editing > gtk_window_close\n"); + fsm_journal_widget_event ("signal > on_discard_current_model_before_editing()"); + gtk_window_close (GTK_WINDOW (data)); } void on_write_current_model (GtkWidget *btt_WRITE_CURRENT_MODEL, gpointer data) { - gtk_window_close (GTK_WINDOW (data)); - printf ("signal.c - WRITE_CURRENT_MODEL\n"); + fsm_journal_widget_event ("signal > on_write_current_model()"); + gtk_window_close (GTK_WINDOW (data)); + printf ("signal.c - WRITE_CURRENT_MODEL\n"); } @@ -232,26 +241,27 @@ static void switch_state_rules_data(); void on_toggle_exec_edit (GtkWidget *toggled_button, gpointer user_data) { - if (fsm_get_exec_edit ()) { // TODO (or NOT ?) et si je ne suis pas sur la page SYNTH + fsm_journal_widget_event ("signal > on_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), - "power-profile-balanced-rtl-symbolic"); - fsm_set_exec_edit (EXEC); - // TODO set_btt_SYNTH_active (TRUE) + gtk_button_set_icon_name (GTK_BUTTON (toggled_button), + "power-profile-balanced-rtl-symbolic"); + fsm_set_exec_edit (EXEC); + // TODO set_btt_SYNTH_active (TRUE) - } else { + } else { - gtk_button_set_icon_name (GTK_BUTTON (toggled_button), - "text-editor-symbolic"); + gtk_button_set_icon_name (GTK_BUTTON (toggled_button), + "text-editor-symbolic"); - // https://docs.gtk.org/gtk4/class.Window.html TODO 2024-06-30 - // gtk_window_present (GTK_WINDOW (widget_get_dialog_window())); // works once only ! + // https://docs.gtk.org/gtk4/class.Window.html TODO 2024-06-30 + // gtk_window_present (GTK_WINDOW (widget_get_dialog_window())); // works once only ! - fsm_set_exec_edit (EDIT); - // TODO set_btt_SYNTH_active (FALSE) - } + fsm_set_exec_edit (EDIT); + // TODO set_btt_SYNTH_active (FALSE) + } - switch_state_rules_data(); + switch_state_rules_data(); } @@ -260,6 +270,7 @@ void on_toggle_exec_edit (GtkWidget *toggled_button, gpointer user_data) static void switch_state_rules_data() { + fsm_journal_widget_event ("signal > switch_state_rules_data()"); switch (fsm_get_state_rules_data()) { case (SYNTH) : @@ -311,16 +322,17 @@ 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) { - const char *toggled_button_name + fsm_journal_widget_event ("signal > on_toggle_state_rules_data()"); + 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)); + 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); - if ( ! strcmp (toggled_button_name, "state")) fsm_set_state_rules_data (STATE); - if ( ! strcmp (toggled_button_name, "rules")) fsm_set_state_rules_data (RULES); - if ( ! strcmp (toggled_button_name, "results")) fsm_set_state_rules_data (DATA); + if ( ! strcmp (toggled_button_name, "synth")) fsm_set_state_rules_data (SYNTH); + if ( ! strcmp (toggled_button_name, "state")) fsm_set_state_rules_data (STATE); + if ( ! strcmp (toggled_button_name, "rules")) fsm_set_state_rules_data (RULES); + if ( ! strcmp (toggled_button_name, "results")) fsm_set_state_rules_data (DATA); - if (is_active) switch_state_rules_data(); + if (is_active) switch_state_rules_data(); } @@ -328,6 +340,7 @@ 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_widget_event ("signal > on_clicked_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())); @@ -336,8 +349,9 @@ void on_clicked_topbar_right_search (GtkWidget *btt_menu, gpointer list_box) { void on_clicked_topbar_right_home (GtkWidget *btt_reset, gpointer data) { - printf ("signal | on_clicked_topbar_right_home() presents the dialog_window\n"); - gtk_window_present (GTK_WINDOW (widget_get_dialog_window())); // NB it works only once. < TODO + fsm_journal_widget_event ("signal > on_clicked_topbar_right_home()"); + fsm_journal_view_request ("signal > fsm_journal_view_request()"); + // gtk_window_present (GTK_WINDOW (widget_get_dialog_window())); // NB it works only once. < TODO } @@ -351,6 +365,7 @@ void on_clicked_topbar_right_home (GtkWidget *btt_reset, gpointer data) void on_updating_objects_transparencies (GtkWidget *btt_source, GtkScrollbar *scrollbar) { + fsm_journal_widget_event ("signal > on_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)); @@ -363,6 +378,7 @@ void on_updating_objects_transparencies (GtkWidget *btt_source, GtkScrollbar *sc void on_resetting_XYZ_in_state_page () { + fsm_journal_widget_event ("signal > on_resetting_XYZ_in_state_page()"); widget_state_XYZ_reset_all(); } @@ -370,6 +386,7 @@ void on_resetting_XYZ_in_state_page () void on_situations_box_do_reset (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar) { + fsm_journal_widget_event ("signal > on_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)); } @@ -382,6 +399,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_widget_event ("signal > on_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())); @@ -389,84 +407,98 @@ void on_clicked_topbar_right_measure (GtkWidget *btt, gpointer data) void on_start_new_measure (GtkWidget *btt, gpointer data) { + fsm_journal_widget_event ("signal > on_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_widget_event ("signal > on_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_widget_event ("signal > on_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_widget_event ("signal > on_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_widget_event ("signal > on_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_widget_event ("signal > on_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_widget_event ("signal > on_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_widget_event ("signal > on_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_widget_event ("signal > on_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_widget_event ("signal > on_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_widget_event ("signal > on_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_widget_event ("signal > on_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_widget_event ("signal > on_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_widget_event ("signal > on_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())); } @@ -478,12 +510,12 @@ void on_measure_third_event_occurences_in_between (GtkWidget *btt, gpointer data void on_entry_name_insert_after (GtkWidget *entry, gpointer data) { - printf("on_entry_name_insert_after(.)\n"); + fsm_journal_widget_event ("signal > on_entry_name_insert_after()"); } void on_entry_name_delete_after (GtkWidget *entry, gpointer data) { - printf("on_entry_name_delete_after(.)\n"); + fsm_journal_widget_event ("signal > on_entry_name_delete_after()"); } diff --git a/src/widget/dispatch.c b/src/widget/dispatch.c index c37f571..50a0e81 100644 --- a/src/widget/dispatch.c +++ b/src/widget/dispatch.c @@ -58,17 +58,15 @@ static void action_b (GSimpleAction *action, GVariant *parameter, GApplication *application) {printf ("action_b() in widget/dispatch.c\n");} -void on_windows_startup (GtkApplication *app) // WIP 2024-09 +void on_windows_startup (GtkApplication *app) // WIP 2024-09 { - printf ("widget/dispatch |\ - on_windows_startup() is in: widget/dispatch.c NOT in: src/signal.c\n"); - + fsm_journal_widget_event ("on_windows_startup_event() is in: widget/dispatch.c NOT in: src/signal.c"); } void on_windows_activation (GtkApplication *app) { - printf ("widget/dispatch |\ - on_windows_activation() is in: widget/dispatch.c NOT in: src/signal.c\n"); + fsm_journal_widget_event ("on_windows_activation() is in: widget/dispatch.c NOT in: src/signal.c"); + // on_windows_activation() is in: widget/dispatch.c NOT in: src/signal.c // g_application_activate (G_APPLICATION (app)); < how ? > in main.c is // g_signal_connect (app, "activate", G_CALLBACK (on_windows_activation), NULL); @@ -92,8 +90,6 @@ void on_windows_activation (GtkApplication *app) widget_design_text_window (main_window, text_window); // ------------------------------------------------------------------------ util_trigger_test(); // then go to util/tests.c and change if (0) to if (1)... - if (0) fsm_journal_test("<> fsm_journal_test() in widget / dispatch"); - // ------------------------------------------------------------------------ diff --git a/src/widget/one_rule/algebra/utilities.c b/src/widget/one_rule/algebra/utilities.c index 62e08f8..ab86b3a 100644 --- a/src/widget/one_rule/algebra/utilities.c +++ b/src/widget/one_rule/algebra/utilities.c @@ -34,7 +34,7 @@ #define LIST_W 190 #define LIST_H 114 - +/* static void widget_let_us_play_with_events (GtkEntry *entry) { gtk_entry_set_icon_from_icon_name (entry, 0, "text-editor-symbolic"); @@ -47,7 +47,7 @@ static void widget_let_us_play_with_events (GtkEntry *entry) g_signal_connect_after( entry, "delete-text", G_CALLBACK (on_entry_name_delete_after), NULL ); // icon_press (entry, GTK_ENTRY_ICON_PRIMARY, NULL); } - +*/