journal: considering a widget filter (see fsm.h)

This commit is contained in:
Jean Sirmai 2024-09-16 21:27:29 +02:00
parent 586dc4c7fa
commit 42f7b9dba8
Signed by: jean
GPG Key ID: FB3115C340E057E3
2 changed files with 36 additions and 10 deletions

View File

@ -49,6 +49,9 @@ typedef struct disp_list {int value; struct disp_list *suiv;} disp_list ;
/******************************************************************************/ /******************************************************************************/
/* J O U R N A L */ /* J O U R N A L */
/******************************************************************************/ /******************************************************************************/
// ****************** - SEVERITY - ****************************************/
//
// CRITICAL ERROR WARNING INFO MESSAGE DEBUG SPEW (see: fsm.h) // CRITICAL ERROR WARNING INFO MESSAGE DEBUG SPEW (see: fsm.h)
// 0 1 2 3 4 5 6 (fsm_journal_event) // 0 1 2 3 4 5 6 (fsm_journal_event)
@ -60,13 +63,34 @@ typedef struct disp_list {int value; struct disp_list *suiv;} disp_list ;
#define DEBUG 5 #define DEBUG 5
#define SPEW 6 // THE_LOWER THE PRIORITY, THE HIGHER THE INDEX #define SPEW 6 // THE_LOWER THE PRIORITY, THE HIGHER THE INDEX
// WINDOW BUTTON GLIDER GLAREA etc. // ****************** - WIDGET FILTER - **********************************/
#define WINDOW 0 //
#define BUTTON 1 // MAIN_WINDOW DIALOG_WINDOW MODAL_WINDOW
#define SCROLL 2 // TOPBAR TOPBAR_LEFT TOPBAR_RIGHT
#define GLAREA 3 // SYNTH_PAGE STATE_PAGE RULES_PAGE RESULTS_PAGE
#define TEXT 4 // SYNTH_GLAREA SYNTH_ALL_RESULTS SYNTH_TIME_DEP_RESULTS SYNTH_TIME_INDEP_RESULTS
#define LABEL 5 // STATE_TOP STATE_GLAREA STATE_CAMERA STATE_BOTTOM
// RULE_CAMERA RULE_GLAREA RULES_MANAGE RULES_TREE RULES_COMPARE RULES_USE
// MEASURES_TOOLS MEASURES_ACTIVE TIME_DEP_RESULTS TIME_INDEP_RESULTS
//
// BUTTON GLIDER GLAREA etc.
#define MAIN_WINDOW 0
#define DIALOG_WINDOW 1
#define MODAL_WINDOW 2
#define TOPBAR 3
#define TOPBAR_LEFT 4
#define TOPBAR_RIGHT 5
#define SYNTH_PAGE 6
#define STATE_PAGE 7
#define RULES_PAGE 8
#define RESULTS_PAGE 9
#define BUTTON 31
#define SCROLL 32
#define GLAREA 33
#define TEXT 34
#define LABEL 35
#define JOURNAL_DATE_MAX_LENGTH 255 #define JOURNAL_DATE_MAX_LENGTH 255

View File

@ -62,11 +62,13 @@ void fsm_journal_publication_request () {fsm_journal_publish (gg_logs);}
#define CRITICAL___ERROR____WARNING___INFO____MESSAGE___DEBUG ___SPEW____😄 0 #define CRITICAL___ERROR____WARNING___INFO____MESSAGE___DEBUG ___SPEW____😄 0
void fsm_journal_event (char *message, int priority, int specificity) void fsm_journal_event (char *message, int priority, int filter)
{ {
// CRITICAL ERROR WARNING INFO MESSAGE DEBUG SPEW 😄️ // CRITICAL ERROR WARNING INFO MESSAGE DEBUG SPEW 😄️
// 0 1 2 3 4 5 6 // 0 1 2 3 4 5 6
if (priority < DEBUG) fsm_journal_push (message); if (priority < DEBUG
|| filter == 3)
fsm_journal_push (message);
} }
#define _CRITICAL___ERROR____WARNING___INFO____MESSAGE___DEBUG ___SPEW____👋 0 #define _CRITICAL___ERROR____WARNING___INFO____MESSAGE___DEBUG ___SPEW____👋 0
@ -151,7 +153,7 @@ void fsm_set_state_rules_data (int choice)
/******************************************************************************/ /******************************************************************************/
/* switch D E B U G G I N G */ /* D E B U G G I N G */
/******************************************************************************/ /******************************************************************************/
static char *tab_0 [] = { "EXEC", "EDIT" }; static char *tab_0 [] = { "EXEC", "EDIT" };