Compare commits

..

No commits in common. "59b797d965f839294ac68571c6f74560c0bc6069" and "0d312b7d3176bc151b46220af35ebb723cecab5e" have entirely different histories.

18 changed files with 338 additions and 240 deletions

View File

@ -62,7 +62,7 @@ typedef struct disp_list {int value; struct disp_list *suiv;} disp_list ;
* * * * * - J O U R N A L M E T A R U L E S - * * * */
enum severity {CRITICAL, ERROR, WARNING, INFO, MESSAGE, DEBUG, REPETITIVE, SPEW};
enum severity {CRITICAL, ERROR, WARNING, INFO, MESSAGE, DEBUG, REPEATED, SPEW};
enum source {
SOURCE, TARGET, JOURNAL, FSM, PREFER,
@ -76,7 +76,7 @@ enum source {
RULE_ALGEBRA, RULE_CONDITION, RULE_ASSIGN, RULE_ID,
RULES_TREE, RULES_COMPARE, RULES_USE,
MEASURES_TOOLS, MEASURES__ACTIVITY, MEASURES__DISPLAY,
RESULTS, TIME_DEP_RESULTS, TIME_INDEP_RESULTS,
TIME_DEP_RESULTS, TIME_INDEP_RESULTS,
WIDGET, BUTTON, SCROLL, GLAREA, TEXT, LABEL, TREE, SLIDER, EXPANDER, ENTRY,
SWITCH_STATE_RULES_DATA,
SLIDER_X, SLIDER_Y, SLIDER_Z,
@ -89,47 +89,33 @@ enum value {VALUE}; // to use or not to use ... (plutôt non)
typedef struct unit {long yy_dd_mm;
long usec;
const char *file_source;
const char *function_source;
const char *string_value;
char *message;
struct unit *prev;
struct unit *next;} unit; // journal unit 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 (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, // removes an évènement
const char *file_source, // at the journal end
const char *function_source,
const char *string_value);
void fsm_journal_push (char *message,
const char *string_value); // def: fsm/dispatch
// call: any call that does not have
// the log address
void fsm_journal_clear (journal *jj, char *message); // empty the journal
void fsm_journal_push_front (journal *jj, char *message); // add an évènement at the journal front
long fsm_journal_pop_back (journal *jj, char *message); // remove an évènement at the journal end
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);
void fsm_journal_seek (journal jj, long usec, char *message); // seek for an évènement in the journal
void fsm_journal_publish (journal jj); // display the journal
void fsm_journal_test (char *message);
// -----------------------------------------------------------------------------
// --------------------------------------------------------------- WIP ------
// ref: sudo cat /var/log/messages
// journal fsm_get_journal(); // def: fsm/dispatch call: fsm/prefer/fsm_store_restore_reset()
void fsm_journal_publication_request (); // def: fsm/dispatch call: main;
void fsm_journal_event (int severity,
int source,
const char *file_source,
const char *function_source,
const char *string_value);
void fsm_journal_event (char *message, int severity, int source, const char *value);
// def: fsm/dispatch call: widget/dispatch;
// -----------------------------------------------------------------------------
// --------------------------------------------------------------- WIP ------
@ -162,6 +148,12 @@ void fsm_add_displayable (char *displayable_name);// def: fsm/prefer; call: fs
void fsm_reset_all_situations_transparencies_at_value (int value); // provisoire...
// def: fsm/prefer; call: signal;
void fsm_msg (int choice, int value, char *string, int sub_automaton);
// def: fsm/dispatch; call: fsm/dispatch;
// fsm/measure;
// fsm/result;
// --------------------------------------------------------------- WIP ------
// def: measure/tool_list call: measure/tool_list (about the following functions...)
void fsm_tools_list_insert (tool_list **tl, int value);

View File

@ -30,8 +30,6 @@
#include "../include/fsm.h"
char *util_read_file (char *filename);
// Programmers using the strcat function can easily be recognized as lazy and reckless.
// (quoted from: The GNU C Library (glibc) manual - 5.5 Concatenating Strings)
char *concat (const char *str, ...);
typedef struct pile {int value; struct pile *prev;} pile; // structure d'un élément

103
journal.c Normal file
View File

@ -0,0 +1,103 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Gem-graph client *
* *
* State machine / Measures *
* *
* Copyright © 2024 Libre en Communs <contact@a-lec.org> *
* Copyright © 2024 Adrien Bourmault <neox@a-lec.org> *
* Copyright © 2024 Jean Sirmai <jean@a-lec.org> *
* *
* This file is part of Gem-graph. *
* *
* This program is free software: you can redistribute it and/or modify it *
* under the terms of the GNU Affero General Public License *
* as published by the Free Software Foundation, *
* either version 3 of the License, *
* or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; *
* without even the implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU Affero General Public License for more details. *
* *
* You should have received a copy of the GNU Affero General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include "../../../include/fsm.h"
/******************************************************************************/
/* A journal (a pile) stores chronologically the fsm events */
/* during a session run (rules exec, mainly) */
/* */
/* A session starts when the main window opens and ends when it closes. */
/******************************************************************************/
int fsm_journal_push (journal **jj, int vv)
{
journal *element = malloc (sizeof(journal));
if (!element) exit (EXIT_FAILURE); // Si l'allocation a échoué.
element->value = vv;
element->prev = *jj;
*jj = element; // Le pointeur pointe sur le dernier élément.
return vv;
}
int fsm_journal_pop (journal **jj)
{
int vv;
journal *tmp;
if (!*jj) return -1; // Retourne -1 si le journal est vide.
tmp = (*jj)->prev;
vv = (*jj)->value;
free (*jj);
*jj = tmp; // Le pointeur pointe sur le dernier élément.
return vv; // retourne la value retirée du journal.
}
void fsm_journal_clear (journal **jj)
{
journal *tmp;
while (*jj)
{
tmp = (*jj)->prev;
free (*jj);
*jj = tmp;
}
}
int fsm_journal_length (journal *jj)
{
int n=0;
while (jj)
{
n++;
jj = jj->prev;
}
return n;
}
void fsm_journal_view (journal *jj)
{
printf ("view journal (n = %d)\n", fsm_journal_length (jj));
while (jj)
{
printf ("> %d\n", jj->value);
jj = jj->prev;
}
puts ("------");
}
void fsm_journal_seek (journal *jj, int value)
{
}

View File

@ -60,27 +60,42 @@ static journal gg_logs;
void fsm_journal_publication_request () {fsm_journal_publish (gg_logs);}
// CRITICAL ERROR WARNING INFO MESSAGE DEBUG REPETITIVE SPEW
// 0 1 2 3 4 5 6 7
void fsm_journal_event (int severity,
int source,
const char *file_source,
const char *function_source,
const char *string_value)
void fsm_journal_push (char *message, const char *string_value)
{
if ( TRUE // just to find easily the line beginning the filter conditions 😄️
// Programmers using the strcat function can easily be recognized as lazy and reckless.
// (quoted from: The GNU C Library (glibc) manual - 5.5 Concatenating Strings)
&& severity != REPETITIVE
// source != TREE
// source == FSM
// strcmp (value, "")
&& TRUE) // just to find easily the line ending the filter conditions 😄️
// in case there are many ...
fsm_journal_push_front (&gg_logs, file_source, function_source, string_value);
fsm_journal_push_front (&gg_logs, concat (message, " ", string_value, NULL));
}
// CRITICAL ERROR WARNING INFO MESSAGE DEBUG qq SPEW 😄️
// 0 1 2 3 4 5 6 7
#define CRITICAL___ERROR____WARNING___INFO____MESSAGE___DEBUG ___REPEATED___SPEW____😄 0
void fsm_journal_event (char *message, int severity, int source, const char *value)
{
if
(
severity != REPEATED
// && source != TREE
/* && (
source == MAIN
|| source == FSM
|| source == TOPBAR
|| source == DIALOG_WINDOW
|| source == MODAL_WINDOW
|| source == TEXT_WINDOW
|| source == TOPBAR_LEFT
|| source == TOPBAR_RIGHT
|| source == PREFER
)
// && strcmp (value, "")
&& source != SIGNAL */
)
fsm_journal_push (message, value); // TODO push (message + value)
}
#define MAIN___DIALOG___MODAL___TOPBAR___SYNTH___RULES___MEASURES___RESULTS___😄 0
/******************************************************************************/
/* F S M I N I T */
@ -88,23 +103,23 @@ void fsm_journal_event (int severity,
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 (initial_message_from_main, MESSAGE, MAIN, "");
fsm_journal_event (MESSAGE, FSM, "fsm/dispatch", "fsm initialisation", "has began");
fsm_journal_event ("fsm/dispatch fsm initialisation has began", MESSAGE, FSM, "");
fsm_journal_event (MESSAGE, FSM, "fsm/dispatch", "measures list init()", "");
fsm_journal_event ("fsm/dispatch measures list init()", MESSAGE, FSM, "");
fsm_measures_list_init();
fsm_journal_event (MESSAGE, FSM, "fsm/dispatch", "results list init()", "");
fsm_journal_event ("fsm/dispatch results list init()", MESSAGE, FSM, "");
fsm_results_list_init();
fsm_journal_event (MESSAGE, FSM, "fsm/dispatch", "displayable list init()", "");
fsm_journal_event ("fsm/dispatch displayable list init()", MESSAGE, FSM, "");
fsm_displayable_list_init();
fsm_journal_event (MESSAGE, FSM, "fsm/dispatch", "preferences list init()", "");
fsm_journal_event ("fsm/dispatch preferences list init()", MESSAGE, FSM, "");
fsm_preferences_list_init();
fsm_journal_event (MESSAGE, FSM, "fsm/dispatch", "fsm initialisation", "has ended");
fsm_journal_event ("fsm/dispatch fsm initialisation has ended", MESSAGE, FSM, "");
}
@ -117,27 +132,22 @@ static int preferences_have_been_modified = FALSE;
void fsm_set_preferences_modified (bool value)
{
const char *str_value;
if (value) str_value = "FALSE"; else str_value = "TRUE";
fsm_journal_event (INFO, FSM,
"fsm/dispatch",
"preferences modified: value = ",
str_value);
char str1[] = "fsm/dispatch preferences modified: value = ";
char str2[] = "TRUE or FALSE (TODO)"; //sprintf(str2, "%d", value); TODO
fsm_journal_event (str1, INFO, FSM, str2);
preferences_have_been_modified = value;
}
bool fsm_get_preferences_state() {return preferences_have_been_modified;}
// preferences_have_been_modified
// and should be stored before closing the current session. TODO
bool fsm_get_preferences_state() {return preferences_have_been_modified;}
static int choice_EXEC_EDIT = EXEC;
static int choice_STATE_RULES_DATA = SYNTH; // THE FIRST PAGE TO BE PRESENTED
// SEE ALSO fsm/dispatch.c window_design_topbar_left() (the end)
int fsm_get_exec_edit() {return choice_EXEC_EDIT;}
int fsm_get_state_rules_data() {return choice_STATE_RULES_DATA;}
@ -147,26 +157,61 @@ int fsm_get_state_rules_data() {return choice_STATE_RULES_DATA;}
/* T R A N S I T I O N S */
/******************************************************************************/
static char *tab_0 [] = { "EXEC", "EDIT" };
static char *tab_1 [] = { "SYNTH", "STATE", "RULES", "DATA" };
void fsm_set_exec_edit (int choice)
{
if (choice_EXEC_EDIT != choice)
{
fsm_journal_event (INFO, FSM, "fsm/dispatch", "set_exec_edit()",
concat (tab_0 [choice_EXEC_EDIT], " > ", tab_0 [choice], NULL));
if (choice_EXEC_EDIT != choice) {
fsm_journal_event ("fsm/dispatch set_exec_edit()", INFO, FSM, ""); // TODO print choice
choice_EXEC_EDIT = choice;
}
}
void fsm_set_state_rules_data (int choice)
{
if (choice_STATE_RULES_DATA != choice)
{
fsm_journal_event (INFO, FSM, "fsm/dispatch", "set_state_rules_data()",
concat (tab_1 [choice_STATE_RULES_DATA], " > ", tab_1 [choice], NULL));
if (choice_STATE_RULES_DATA != choice) {
fsm_journal_event ("fsm/dispatch set_state_rules_data()", INFO, FSM, ""); // TODO print choice
choice_STATE_RULES_DATA = choice;
}
}
/******************************************************************************/
/* D E B U G G I N G */
/******************************************************************************/
static char *tab_0 [] = { "EXEC", "EDIT" };
static char *tab_1 [] = { "SYNTH", "STATE", "RULES", "DATA" };
void fsm_msg (int choice, int value, char *string, int sub_automaton)
{
switch (sub_automaton) { // sub_automaton 0 is EXEC_EDIT and
// sub_automaton 1 is STATE_RULES_DATA
// sub_automaton 2 is MEASURE
case (0) :
fsm_journal_event ("fsm/dispatch switch EXEC_EDIT (TODO)", INFO, FSM, ""); // TODO print choice
printf ("fsm/dispatch (message) |\
switch %5s x %5s > %5s x %5s\n",
tab_0 [choice_EXEC_EDIT], tab_1 [choice_STATE_RULES_DATA],
tab_0 [choice], tab_1 [choice_STATE_RULES_DATA]);
break;
case (1) :
fsm_journal_event ("fsm/dispatch switch STATE_RULES_DATA (TODO)", INFO, FSM, ""); // TODO print choice
printf ("fsm/dispatch (message) |\
switch %5s x %5s > %5s x %5s\n",
tab_0 [choice_EXEC_EDIT], tab_1 [choice_STATE_RULES_DATA],
tab_0 [choice_EXEC_EDIT], tab_1 [choice]);
break;
case (2) : // printf ("fsm/dispatch (message) | %s\n", string);
break;
case (3) : // printf ("fsm/dispatch (message) | %2d\n", choice);
break;
default : printf ("default in fsm/dispatch.fsm_msg()\n");
fsm_journal_event ("fsm/dispatch fsm_msg () default in switch (sub_automaton)", INFO, FSM, "");
}
}

View File

@ -23,7 +23,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
//#include <stdbool.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
@ -32,19 +32,10 @@
#include "../../include/fsm.h"
/******************************************************************************/
/* A journal stores chronologically the events */
/* A journal stores chronologically the fsm events */
/* during a session run (rules exec, mainly) */
/******************************************************************************/
/* 2024-09-22
* What types of events should be reported ? (fsm, widgets, ... )
* For what purpose ?
* What information must be collected and transmitted ?
* How do you name and classify this information ?
* How do you present it ?
*
* date clé (rank) fichier source fonction source +/- valeur */
/*
time_t current_time = time(NULL);
@ -61,10 +52,7 @@ void fsm_journal_init (journal *jj)
jj->last = NULL;
}
void fsm_journal_clear (journal *jj,
const char *file_source,
const char *function_source,
const char *string_value)
void fsm_journal_clear (journal *jj, char *message)
{
unit *tmp;
unit *a_unit = jj->first;
@ -72,28 +60,21 @@ void fsm_journal_clear (journal *jj,
{
tmp = a_unit;
a_unit = a_unit->next;
free (tmp);
free(tmp);
}
jj->first = NULL;
jj->last = NULL;
}
void fsm_journal_push_front (journal *jj,
const char *file_source,
const char *function_source,
const char *string_value)
void fsm_journal_push_front (journal *jj, char *message)
{
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->message = message;
new_unit->next = jj->first;
new_unit->prev = NULL;
if (jj->first) jj->first->prev = new_unit;
@ -101,10 +82,7 @@ void fsm_journal_push_front (journal *jj,
jj->first = new_unit;
}
long fsm_journal_pop_back (journal *jj,
const char *file_source,
const char *function_source,
const char *string_value)
long fsm_journal_pop_back (journal *jj, char *message)
{
long usec;
unit *tmp = jj->last;
@ -130,10 +108,7 @@ int fsm_journal_length (journal jj)
return nb;
}
void fsm_journal_seek (journal jj, long usec,
const char *file_source,
const char *function_source,
const char *string_value)
void fsm_journal_seek (journal jj, long usec, char *message)
{
unit *a_unit = jj.first;
int nb = 0;
@ -148,7 +123,6 @@ void fsm_journal_seek (journal jj, long usec,
//------------------------------------------------------------------------------
// ref: sudo cat /var/log/messages
// 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
// https://en.cppreference.com/w/c/io/fprintf
@ -165,13 +139,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 %-32s %-36s %-50s",
buf,
a_unit->usec,
nb,
a_unit->file_source,
a_unit->function_source,
a_unit->string_value);
g_message ("%s + %6ld %6d %s", buf, a_unit->usec, nb, a_unit->message);
a_unit = a_unit->prev;
nb ++;
}

View File

@ -87,17 +87,8 @@
void fsm_add_measure (char *measure_name)
{
fsm_journal_event (DEBUG,
MEASURES_TOOLS,
"fsm/measure/manage/",
"fsm_add_measure()",
measure_name);
}
void fsm_add_measure (char *measure_name) {fsm_msg (2, 0, measure_name, 2);}
void fsm_measures_list_init() {if (0) fsm_tools_list_test();}
void fsm_rule_trig_measure (int rule_id, int object_id, int measure_id) {}

View File

@ -73,24 +73,28 @@ void fsm_store_restore_reset (int choice, int value)
{
switch (choice) {
case (STORE) :
fsm_journal_event (MESSAGE, PREFER, "fsm/prefer", "store restore reset(): switch (STORE)", "");
fsm_journal_event (
"fsm/prefer store restore reset(): switch (STORE)", MESSAGE, PREFER, "");
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 (MESSAGE, PREFER, "fsm/prefer", "store restore reset(): switch (RESTORE)", "");
fsm_journal_event (
"fsm/prefer store restore reset(): switch (RESTORE)", MESSAGE, PREFER, "");
for (int i = 0; i < n_objects; i++)
widget_set_object_transparency_at_value (i, p [i]);
break;
case (RESET) :
fsm_journal_event (MESSAGE, PREFER, "fsm/prefer", "store restore reset(): switch (RESET)", "");
fsm_journal_event (
"fsm/prefer store restore reset(): switch (RESET)", MESSAGE, PREFER, "");
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 (MESSAGE, PREFER, "fsm/prefer", "store restore reset(): switch (default)", "");
fsm_journal_event (
"fsm/prefer store restore reset(): switch (default)", MESSAGE, PREFER, "");
}
fsm_set_preferences_modified (TRUE);
@ -105,8 +109,9 @@ static int reset_situations_to_value = -1;
void fsm_reset_all_situations_transparencies_at_value (int value)
{
char string_value [12]; sprintf(string_value, "(%d)", value);
fsm_journal_event (INFO, PREFER, "fsm/prefer", "reset all situations transparencies at value", string_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
reset_situations_to_value = value;
widget_reset_all_situations_transparencies_at_value (value);
}
@ -121,7 +126,8 @@ void fsm_reset_all_situations_transparencies_at_value (int value)
void fsm_add_displayable (char *displayable_name)
{
fsm_journal_event (MESSAGE, PREFER, "fsm/prefer", "add displayable()", displayable_name);
fsm_journal_event (
strcat("fsm/prefer add displayable() ", displayable_name), MESSAGE, PREFER, ""); // TODO
}
@ -130,11 +136,11 @@ void fsm_add_displayable (char *displayable_name)
/******************************************************************************/
void fsm_preferences_list_init ()
{
fsm_journal_event (MESSAGE, PREFER, "fsm/prefer", "preferences list init()", "");
fsm_journal_event ("fsm/prefer setting up preferences list", MESSAGE, PREFER, "");
}
void fsm_displayable_list_init ()
{
fsm_journal_event (MESSAGE, PREFER, "fsm/prefer", "displayables list init()", "");
fsm_journal_event ("fsm/prefer setting up displayable list", MESSAGE, PREFER, "");
}

View File

@ -70,10 +70,6 @@ void fsm_add_result (char *result_name)
void fsm_results_list_init ()
{
fsm_journal_event (DEBUG,
RESULTS,
"fsm/",
"fsm_results_list_init()",
"");
fsm_msg (0,0, "src/fsm/result.c fsm_results_list_init()", 2); // sub_automaton 2
}

View File

@ -133,13 +133,15 @@
int main (int argc, char **argv)
{
// def: src/fsm/dispatch fsm = finite state machine
fsm_init ("first instruction / first log");
fsm_journal_event (INFO, MAIN, "main", "*app = gtk_application_new ()", "");
fsm_init ("main first instruction in main() & first log");
fsm_journal_event (
"main *app = gtk_application_new ()", INFO, MAIN, "");
GtkApplication *app = gtk_application_new ("org.gem-graph",
G_APPLICATION_DEFAULT_FLAGS);
fsm_journal_event (INFO, MAIN, "main",
"g signal connect", "(app <--> on_windows_startup & activate)");
fsm_journal_event ("main \
g signal connect (app <--> on_windows_startup & activate)", INFO, MAIN, "\n");
// ! WARNING ! 'on_windows_activation()'
// and 'on_windows_startup()' are in: src/widget/dispatch.c
// NOT in: src/signal.c
@ -147,10 +149,10 @@ int main (int argc, char **argv)
g_signal_connect (app, "activate", G_CALLBACK (on_windows_activation), NULL);
int status = g_application_run (G_APPLICATION (app), argc, argv);
fsm_journal_event (INFO, MAIN, "main", "g_object unref (app)", "");
fsm_journal_event ("main g_object unref (app)", INFO, MAIN, "");
g_object_unref (app);
fsm_journal_event (INFO, MAIN, "main", "That'all folks ! 👋️😄️", "");
fsm_journal_event ("main That'all folks ! 👋️😄️",INFO, MAIN, "");
fsm_journal_publication_request();
return status;

View File

@ -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", "");
fsm_journal_event ("signal (notif.) ", DEBUG, AUTO_NOTIFICATION, message);
/* Ignored (2024-06-06) because I don't know how to get "main_window" easily
if (window->toast_revealer == NULL) {
@ -64,7 +64,8 @@ static void on_auto_notification (char *message)
static void on_user_tree_expander_toggled (GtkExpander *expander,
gpointer user_data)
{
fsm_journal_event (SPEW, EXPANDER, "signal", "user tree expander toggled()", "");
fsm_journal_event ("signal user tree expander toggled()",
SPEW, EXPANDER, "");
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);
@ -72,7 +73,8 @@ 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 (REPETITIVE, EXPANDER, "signal", "setup user tree factory()", "");
fsm_journal_event ("signal setup user tree factory()",
REPEATED, EXPANDER, "");
GtkWidget* expander = gtk_expander_new (NULL);
gtk_list_item_set_child (GTK_LIST_ITEM (object), expander);
}
@ -101,7 +103,8 @@ 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 (REPETITIVE, TREE, "signal", "(tree) bind user tree factory()", text);
fsm_journal_event ("signal (tree) bind user tree factory()",
REPEATED, TREE, text);
}
@ -112,7 +115,7 @@ void on_bind_user_tree_factory (GtkSignalListItemFactory *factory,
gboolean on_glarea_render (GtkGLArea *area,
GdkGLContext *context)
{
fsm_journal_event (DEBUG, GLAREA, "signal", "glarea render()", "(context TODO)");
fsm_journal_event ("signal (GLArea) glarea render()", DEBUG, GLAREA, "(context TODO)");
// Check if the widget is a glarea
if(gtk_gl_area_get_error(area) != NULL) {
on_auto_notification("An OpenGL error occured !");
@ -131,7 +134,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 (DEBUG, GLAREA, "signal", "glarea realize()", "");
fsm_journal_event ("signal (GLArea) glarea realize()", DEBUG, GLAREA, "");
GError *internal_error = NULL;
// Make the GL context current to be able to call the GL API
@ -157,7 +160,7 @@ void on_glarea_realize (GtkWidget *widget)
/* We should tear down the state when unrealizing */
void on_glarea_unrealize (GtkWidget *widget)
{
fsm_journal_event (DEBUG, GLAREA, "signal", "glarea unrealize()", "");
fsm_journal_event ("signal (GLArea) glarea unrealize()", DEBUG, GLAREA, "");
GError *internal_error = NULL;
// Make the GL context current to be able to call the GL API
@ -200,15 +203,12 @@ 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 (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;
case 0 : fsm_journal_event ("signal (axis) X value changed()",
REPEATED, SLIDER_X, string_value); break;
case 1 : fsm_journal_event ("signal (axis) Y value changed()",
REPEATED, SLIDER_Y, string_value); break;
case 2 : fsm_journal_event ("signal (axis) Z value changed()",
REPEATED, SLIDER_Z, 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 (INFO, BUTTON, "signal", "(dialog) save current model()", "");
fsm_journal_event ("signal (dialog) save current model()", INFO, BUTTON, "");
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 (INFO, BUTTON, "signal", "(dialog) discard current model()", "");
fsm_journal_event ("signal (dialog) discard current model()", INFO, BUTTON, "");
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 (INFO, BUTTON, "signal", "(dialog) write current model()", "");
fsm_journal_event ("signal (dialog) write current model()", INFO, BUTTON, "");
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 (INFO, BUTTON, "signal", "(Xec/Ed) toggle exec edit()", "");
fsm_journal_event ("signal (Xec/Ed) toggle exec edit()", INFO, BUTTON, "");
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),
@ -284,12 +284,9 @@ void on_toggle_exec_edit (GtkWidget *toggled_button, gpointer user_data)
static void switch_state_rules_data()
{
int value = fsm_get_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 (DEBUG, SWITCH_STATE_RULES_DATA, "signal", "(switch) value = ", string_value);
*/
fsm_journal_event ("signal (switch) value = ",
DEBUG, SWITCH_STATE_RULES_DATA, string_value);
switch (value) {
case (SYNTH) :
@ -333,8 +330,8 @@ static void switch_state_rules_data()
default :
printf("default in signal.on_toggle_state_rule_data()\n");
fsm_journal_event (INFO, SWITCH_STATE_RULES_DATA,
"signal", "(switch) default in : switch state rules data()", "");
fsm_journal_event ("signal (switch) default in : switch state rules data()",
INFO, SWITCH_STATE_RULES_DATA, "");
}
}
@ -345,8 +342,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 (DEBUG, BUTTON,
"signal", "(toggle)", concat ("[ ", toggled_button_name, " ]", NULL));
fsm_journal_event ("signal (toggle) <-->",
INFO, BUTTON, toggled_button_name);
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);
@ -363,7 +360,9 @@ 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 (DEBUG, BUTTON, "signal", "(topbar right) search()", "");
fsm_journal_event ("signal (topbar R) search()",
// fsm_journal_event ("signal clicked topbar right search()",
DEBUG, BUTTON, "");
// 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()));
@ -372,7 +371,9 @@ 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 (DEBUG, BUTTON, "signal", "(topbar right) home()", "");
fsm_journal_event ("signal (topbar R) home()",
// fsm_journal_event ("signal clicked topbar right home()",
DEBUG, BUTTON, "");
gtk_window_present (GTK_WINDOW (widget_get_dialog_window()));
// NB works only once. < TODO
}
@ -388,7 +389,8 @@ void on_clicked_topbar_right_home (GtkWidget *btt_reset, gpointer data)
void on_updating_objects_transparencies (GtkWidget *btt_source, GtkScrollbar *scrollbar)
{
fsm_journal_event (DEBUG, BUTTON, "signal", "updating objects transparencies()", "");
fsm_journal_event ("signal updating objects transparencies()",
DEBUG, BUTTON, "");
const char *btt_name = gtk_button_get_icon_name (GTK_BUTTON (btt_source));
int value = gtk_adjustment_get_value (gtk_scrollbar_get_adjustment (scrollbar));
@ -401,7 +403,8 @@ void on_updating_objects_transparencies (GtkWidget *btt_source, GtkScrollbar *sc
void on_resetting_XYZ_in_state_page ()
{
fsm_journal_event (DEBUG, BUTTON, "signal", "resetting XYZ in state page()", "");
fsm_journal_event ("signal resetting XYZ in state page()",
DEBUG, BUTTON, "");
widget_state_XYZ_reset_all();
}
@ -409,7 +412,8 @@ void on_resetting_XYZ_in_state_page ()
void on_situations_box_do_reset (GtkWidget *btt_reset, GtkScrollbar *reset_scrollbar)
{
fsm_journal_event (DEBUG, BUTTON, "signal", "situations box do reset()", "");
fsm_journal_event ("signal situations box do reset()",
DEBUG, BUTTON, "");
GtkAdjustment *adj_situ = gtk_scrollbar_get_adjustment (reset_scrollbar);
fsm_reset_all_situations_transparencies_at_value (gtk_adjustment_get_value (adj_situ));
}
@ -422,7 +426,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 (DEBUG, BUTTON, "signal", "clicked topbar right measure()", "");
fsm_journal_event ("signal clicked topbar right measure()", DEBUG, BUTTON, "");
// fsm_measures_sorted_list_do something ();
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_get_measure_page()));
@ -430,98 +434,98 @@ void on_clicked_topbar_right_measure (GtkWidget *btt, gpointer data)
void on_start_new_measure (GtkWidget *btt, gpointer data)
{
fsm_journal_event (DEBUG, BUTTON, "signal", "start new measure()", "");
fsm_journal_event ("signal start new measure()", DEBUG, BUTTON, "");
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 (DEBUG, BUTTON, "signal", "select rules first()", "");
fsm_journal_event ("signal select rules first()", DEBUG, BUTTON, "");
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 (DEBUG, BUTTON, "signal", "measure depends on a single event()", "");
fsm_journal_event ("signal measure depends on a single event()", DEBUG, BUTTON, "");
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 (DEBUG, BUTTON, "signal", "measure depends on two events()", "");
fsm_journal_event ("signal measure depends on two events()", DEBUG, BUTTON, "");
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 (DEBUG, BUTTON, "signal", "select a second rules set()", "");
fsm_journal_event ("signal select a second rules set()", DEBUG, BUTTON, "");
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 (DEBUG, BUTTON, "signal", "select a second measurement()", "");
fsm_journal_event ("signal select a second measurement()", DEBUG, BUTTON, "");
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 (DEBUG, BUTTON, "signal", "skip this step()", "");
fsm_journal_event ("signal skip this step()", DEBUG, BUTTON, "");
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 (DEBUG, BUTTON, "signal", "something else()", "");
fsm_journal_event ("signal something else()", DEBUG, BUTTON, "");
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 (DEBUG, BUTTON, "signal", "closing page()", "");
fsm_journal_event ("signal closing page()", DEBUG, BUTTON, "");
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 (DEBUG, BUTTON, "signal", "measure single event occurences nb()", "");
fsm_journal_event ("signal measure single event occurences nb()", DEBUG, BUTTON, "");
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 (DEBUG, BUTTON, "signal", "measure single event occurences dates()", "");
fsm_journal_event ("signal measure single event occurences dates()", DEBUG, BUTTON, "");
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 (DEBUG, BUTTON, "signal", "measure single event occurences situations()", "");
fsm_journal_event ("signal measure single event occurences situations()", DEBUG, BUTTON, "");
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 (DEBUG, BUTTON, "signal", "measure time elapsed between two events()", "");
fsm_journal_event ("signal measure time elapsed between two events()", DEBUG, BUTTON, "");
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 (DEBUG, BUTTON, "signal", "measure third event occurences in between()", "");
fsm_journal_event ("signal measure third event occurences in between()", DEBUG, BUTTON, "");
gtk_window_set_child (GTK_WINDOW (widget_get_main_window ()),
GTK_WIDGET (widget_measure_third_event_occurences_in_between()));
}
@ -533,11 +537,13 @@ 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 (DEBUG, ENTRY, "signal", "entry name insert after()", "");
fsm_journal_event ("signal entry name insert after()",
DEBUG, ENTRY, "");
}
void on_entry_name_delete_after (GtkWidget *entry, gpointer data)
{
fsm_journal_event (DEBUG, ENTRY, "signal", "entry name delete after()", "");
fsm_journal_event ("signal entry name delete after()",
DEBUG, ENTRY, "");
}

View File

@ -61,12 +61,13 @@ void *widget_get_text_window() { return text_window; }
void on_windows_startup (GtkApplication *app) // WIP 2024-09
{
// NB on_windows_startup() is in: widget/dispatch NOT in: src/signal
fsm_journal_event (MESSAGE, WIDGETS, "widget/dispatch", "windows startup()", "");
fsm_journal_event ("widget/dispatch windows startup()", MESSAGE, WIDGETS, "");
}
void on_windows_activation (GtkApplication *app)
{
fsm_journal_event (INFO, WIDGETS, "widget/dispatch", "windows activation()", "has began");
fsm_journal_event ("widget/dispatch windows activation() has began",
INFO, WIDGETS, "");
// on_windows_activation() is in: widget/dispatch NOT in: src/signal
// g_application_activate (G_APPLICATION (app)); < how ? > in main is
@ -102,7 +103,8 @@ 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");
fsm_journal_event ("widget/dispatch windows activation() has ended",
INFO, WIDGETS, "\n");
}
/******************************************************************************/

View File

@ -40,11 +40,11 @@ void *widget_get_btt_conditions_list()
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scrolled_list_box), list_box);
gtk_widget_set_size_request (GTK_WIDGET (scrolled_list_box), LIST_W, LIST_H);
int conditions_nb = 32, // arbitrary TODO link to the XML model
int conditions_nb = 32, // arbitrary TODO
nb_of_digits_used_to_write_the_conditions_nb_plus_one = 3;
char str_nb [nb_of_digits_used_to_write_the_conditions_nb_plus_one];
sprintf(str_nb, "%d", conditions_nb);
char *one_condition;
char *str_journal;
for (int i = 0; i < 32; i++)
{
@ -54,13 +54,9 @@ void *widget_get_btt_conditions_list()
char str4[5]; sprintf(str4, "%d, ", rand() % 10);
char str5[8]; sprintf(str5, "%d) == ", rand() % 10);
char str6[4]; sprintf(str6, "%d)", rand() % 10);
one_condition = concat (str1, str2, str3, str4, str5, str6, NULL);
widget_set_item_text (list_box, one_condition, TRUE);
fsm_journal_event (REPETITIVE,
RULE_CONDITION,
"one_rule/algebra/conditions",
"conditions list ",
one_condition);
str_journal = concat (str1, str2, str3, str4, str5, str6, NULL);
widget_set_item_text (list_box, str_journal, TRUE);
fsm_journal_event ("conditions_list ", REPEATED, RULE_CONDITION, str_journal);
}
GtkWidget *pop = gtk_popover_new ();
gtk_popover_set_child (GTK_POPOVER (pop), scrolled_list_box);
@ -72,14 +68,9 @@ void *widget_get_btt_conditions_list()
gtk_menu_button_set_label (GTK_MENU_BUTTON (conditions), "conditions");
gtk_menu_button_set_always_show_arrow (conditions, TRUE);
gtk_menu_button_set_popover (conditions, GTK_WIDGET (pop));
// clicked (conditions, NULL);
fsm_journal_event (DEBUG,
RULE_CONDITION,
"one_rule/algebra/conditions",
concat ("list; last of ", str_nb, " conditions: ", NULL),
concat ("[", one_condition, "]", NULL));
fsm_journal_event ("conditions_list ", DEBUG, RULE_CONDITION,
concat ("clicked [", str_journal, "] = last of: ", str_nb, NULL));
return conditions;
}

View File

@ -36,7 +36,7 @@
void widget_design_dialog_window (GtkWindow *main_window, GtkWindow *dialog_window)
{
fsm_journal_event (INFO, MODAL_WINDOW, "widget/topbar/dialog", "modal window design", "");
fsm_journal_event ("modal window design", INFO, MODAL_WINDOW, "");
char *title = " Save the current model before modifying it? ";
GtkWidget *header_bar = GTK_WIDGET (gtk_header_bar_new ());
gtk_header_bar_set_title_widget (GTK_HEADER_BAR (header_bar), gtk_label_new (title));

View File

@ -39,7 +39,8 @@ static GtkWidget *window_topbar (GtkWindow *window);
void widget_design_main_window (GtkWindow *main_window, GtkApplication *app)
{
fsm_journal_event (INFO, TOPBAR, "widget/topbar/dispatch", "design (main window topbar)", "");
fsm_journal_event ("main_window *topbar = window_topbar (main_window)",
INFO, TOPBAR, "");
GtkWidget *topbar = window_topbar (main_window);
window_design_topbar_left (topbar);
window_design_topbar_right (topbar, app);
@ -50,7 +51,8 @@ void widget_design_main_window (GtkWindow *main_window, GtkApplication *app)
static GtkWidget *window_topbar (GtkWindow *window)
{
fsm_journal_event (INFO, TOPBAR_CENTER, "widget/topbar/dispatch", "topbar = gtk_header_bar_new()", "");
fsm_journal_event ("topbar *topbar = gtk_header_bar_new ()",
INFO, TOPBAR_CENTER, "");
char *title = "E coli (with permission from David S. Goodsell, 2009)";
GtkWidget *topbar = GTK_WIDGET (gtk_header_bar_new ());
gtk_header_bar_set_title_widget (GTK_HEADER_BAR (topbar), gtk_label_new (title));

View File

@ -43,8 +43,8 @@ void *widget_get_btt_data () {return btt_DATA;}
void window_design_topbar_left (GtkWidget *header_bar)
{
fsm_journal_event (INFO, TOPBAR_LEFT, "widget/topbar/left", "design",
"(EXEC / EDIT) and (SYNTH / STATE / RULES / DATA)");
fsm_journal_event ("topbar left g_signal_connect (EXEC / EDIT) + select a page",
INFO, TOPBAR_LEFT, "");
gpointer no_local_data = NULL;
GtkButton *btt_XOR_EXEC_EDIT = GTK_BUTTON (gtk_toggle_button_new ());

View File

@ -35,7 +35,7 @@
void widget_design_text_window (GtkWindow *main_window, GtkWindow *text_window)
{
fsm_journal_event (INFO, TEXT_WINDOW, "widget/topbar/modal", "text window design", "");
fsm_journal_event ("text window design", INFO, TEXT_WINDOW, "");
char *title = " Learn more about Gem Graph. ";
GtkWidget *header_bar = GTK_WIDGET (gtk_header_bar_new ());
gtk_header_bar_set_title_widget (GTK_HEADER_BAR (header_bar), gtk_label_new (title));

View File

@ -93,7 +93,8 @@ static void connect(GApplication *app, gpointer *data) { puts("Connect menu item
void window_design_topbar_right (GtkWidget *header_bar, GtkApplication *app)
{
fsm_journal_event (INFO, TOPBAR_RIGHT, "widget/topbar/right", "design (buttons, menus)", "");
fsm_journal_event ("topbar right display_widgets (buttons, menus)",
INFO, TOPBAR_RIGHT, "");
display_widgets_at_the_right_side (header_bar);
GSimpleActionGroup *ga = g_simple_action_group_new ();

View File

@ -24,7 +24,6 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "../../include/fsm.h"
#include "../../include/signal.h"
#include "../../include/widget.h"
@ -77,8 +76,6 @@ static GListModel *get_user_tree_model (GObject *item, gpointer root)
// ! WARNING ! TODO CUR EST L'ENFANT, MAINTENANT
// DONC, SI CUR EST UNE FEUILLE, JE N'ATTEINDRAI PAS SON ENFANT
// TODO: link the tree to the XML model
return get_user_tree_model_child (cur);
}
@ -87,8 +84,6 @@ static GListModel *get_user_tree_model (GObject *item, gpointer root)
void *widget_get_user_rules_tree ()
{
fsm_journal_event (DEBUG, RULES_TREE, "widget/tree", "get user rules tree", "[We, the people,]...");
struct TreeNode_t *tree_root = widget_create_user_tree_node("We, the people,");
widget_let_us_create_a_complex_useless_and_expensive_tree (tree_root);