WIP: systematic renaming II

This commit is contained in:
Jean Sirmai 2024-07-11 08:53:38 +02:00
parent 8ce7191df3
commit 953f96b19d
Signed by: jean
GPG Key ID: FB3115C340E057E3
4 changed files with 33 additions and 33 deletions

View File

@ -35,19 +35,19 @@
/* W I N D O W S */
/******************************************************************************/
void head_set_MAIN_WINDOW (GtkApplication *app);
void head_set_DIALOG_WINDOW (GtkApplication *app);
void head_set_TEXT_WINDOW (GtkApplication *app);
void widget_head_set_MAIN_WINDOW (GtkApplication *app);
void widget_head_set_DIALOG_WINDOW (GtkApplication *app);
void widget_head_set_TEXT_WINDOW (GtkApplication *app);
void widget_MAIN_WINDOW_design (GtkWindow *main_window);
void widget_DIALOG_WINDOW_design (GtkWindow *main_window,
void widget_head_MAIN_WINDOW_design (GtkWindow *main_window);
void widget_head_DIALOG_WINDOW_design (GtkWindow *main_window,
GtkWindow *dialog_window);
void widget_TEXT_WINDOW_design (GtkWindow *main_window,
void widget_head_TEXT_WINDOW_design (GtkWindow *main_window,
GtkWindow *text_window);
GtkWindow *head_get_MAIN_WINDOW();
GtkWindow *head_get_DIALOG_WINDOW();
GtkWindow *head_get_TEXT_WINDOW();
GtkWindow *widget_head_get_MAIN_WINDOW();
GtkWindow *widget_head_get_DIALOG_WINDOW();
GtkWindow *widget_head_get_TEXT_WINDOW();
/******************************************************************************/

View File

@ -64,14 +64,14 @@ static void on_auto_notification (const char *message)
void on_windows_activation (GtkApplication *app,
gpointer no_user_data)
{
head_set_MAIN_WINDOW (app);
widget_MAIN_WINDOW_design (head_get_MAIN_WINDOW());
widget_head_set_MAIN_WINDOW (app);
widget_head_MAIN_WINDOW_design (widget_head_get_MAIN_WINDOW());
head_set_DIALOG_WINDOW (app);
widget_DIALOG_WINDOW_design (head_get_MAIN_WINDOW(), head_get_DIALOG_WINDOW());
widget_head_set_DIALOG_WINDOW (app);
widget_head_DIALOG_WINDOW_design (widget_head_get_MAIN_WINDOW(), widget_head_get_DIALOG_WINDOW());
head_set_TEXT_WINDOW (app);
widget_TEXT_WINDOW_design (head_get_MAIN_WINDOW(), head_get_TEXT_WINDOW());
widget_head_set_TEXT_WINDOW (app);
widget_head_TEXT_WINDOW_design (widget_head_get_MAIN_WINDOW(), widget_head_get_TEXT_WINDOW());
}
@ -251,17 +251,17 @@ static void switch_STATE_RULES_DATA()
switch (get_STATE_RULES_DATA()) {
case (STATE) :
gtk_window_set_child (head_get_MAIN_WINDOW(),
gtk_window_set_child (widget_head_get_MAIN_WINDOW(),
GTK_WIDGET (get_STATE_page()));
break;
case (RULES) :
gtk_window_set_child (head_get_MAIN_WINDOW(),
gtk_window_set_child (widget_head_get_MAIN_WINDOW(),
GTK_WIDGET (get_RULES_page()));
break;
case (DATA) :
gtk_window_set_child (head_get_MAIN_WINDOW(),
gtk_window_set_child (widget_head_get_MAIN_WINDOW(),
GTK_WIDGET (get_STOCK_page()));
break;
@ -284,7 +284,7 @@ void on_toggle_EXEC_EDIT (GtkWidget *toggled_button, gpointer user_data)
"text-editor-symbolic");
// https://docs.gtk.org/gtk4/class.Window.html TODO 2024-06-30
// gtk_window_present (GTK_WINDOW (head_get_DIALOG_WINDOW())); // works once only !
// gtk_window_present (GTK_WINDOW (widget_head_get_DIALOG_WINDOW())); // works once only !
set_EXEC_EDIT (EDIT);
}
@ -353,14 +353,14 @@ void on_clicked_MENU (GtkWidget *btt_reset, gpointer menu_button)
printf ("callback.on_clicked_MENU() button\n");
// presents the text_window and works only once.\nIt should present a menu.\n"); // TODO
learning_how_to_create_a_menu (menu_button);
gtk_window_present (GTK_WINDOW (head_get_TEXT_WINDOW()));
gtk_window_present (GTK_WINDOW (widget_head_get_TEXT_WINDOW()));
}
void on_clicked_HOME (GtkWidget *btt_reset, gpointer data)
{
printf ("callback.on_clicked_HOME() button presents the dialog_window\
( :- ) but it works only once.\n"); // TODO
gtk_window_present (GTK_WINDOW (head_get_DIALOG_WINDOW()));
gtk_window_present (GTK_WINDOW (widget_head_get_DIALOG_WINDOW()));
}

View File

@ -261,9 +261,9 @@
*
* Les autres fonctions appelées par les fonctions callback() sont :
*
* widget_MAIN_WINDOW_design()
* widget_DIALOG_WINDOW_design()
* widget_TEXT_WINDOW_design()
* widget_head_MAIN_WINDOW_design()
* widget_head_DIALOG_WINDOW_design()
* widget_head_TEXT_WINDOW_design()
*
*
* Widgets.c appelle :

View File

@ -38,21 +38,21 @@
static GtkWindow *main_window, *dialog_window, *text_window;
static GtkButton *btt_STATE, *btt_RULES, *btt_DATA;
GtkWindow *head_get_MAIN_WINDOW() {return main_window;}
GtkWindow *head_get_DIALOG_WINDOW() {return dialog_window;}
GtkWindow *head_get_TEXT_WINDOW() {return text_window;}
GtkWindow *widget_head_get_MAIN_WINDOW() {return main_window;}
GtkWindow *widget_head_get_DIALOG_WINDOW() {return dialog_window;}
GtkWindow *widget_head_get_TEXT_WINDOW() {return text_window;}
void head_set_MAIN_WINDOW (GtkApplication *app)
void widget_head_set_MAIN_WINDOW (GtkApplication *app)
{
main_window = GTK_WINDOW (gtk_application_window_new (app));
}
void head_set_DIALOG_WINDOW (GtkApplication *app)
void widget_head_set_DIALOG_WINDOW (GtkApplication *app)
{
dialog_window = GTK_WINDOW (gtk_application_window_new (app));
}
void head_set_TEXT_WINDOW (GtkApplication *app)
void widget_head_set_TEXT_WINDOW (GtkApplication *app)
{
text_window = GTK_WINDOW (gtk_application_window_new (app));
}
@ -67,7 +67,7 @@ GtkButton *get_GtkButton (char *btt_name)
//------------------------------------------------------------------------------
void widget_TEXT_WINDOW_design (GtkWindow *main_window, GtkWindow *text_window)
void widget_head_TEXT_WINDOW_design (GtkWindow *main_window, GtkWindow *text_window)
{
char *title = " Learn more about Gem Graph. ";
GtkWidget *header_bar = GTK_WIDGET (gtk_header_bar_new ());
@ -84,7 +84,7 @@ void widget_TEXT_WINDOW_design (GtkWindow *main_window, GtkWindow *text_window)
gtk_window_set_destroy_with_parent (GTK_WINDOW (text_window), TRUE);
}
void widget_DIALOG_WINDOW_design (GtkWindow *main_window, GtkWindow *dialog_window)
void widget_head_DIALOG_WINDOW_design (GtkWindow *main_window, GtkWindow *dialog_window)
{
char *title = " Save the current model before modifying it? ";
GtkWidget *header_bar = GTK_WIDGET (gtk_header_bar_new ());
@ -191,7 +191,7 @@ static void window_header_bar (GtkWindow *window, char *title)
gtk_header_bar_pack_end (GTK_HEADER_BAR (header_bar), GTK_WIDGET (menu_btt));
}
void widget_MAIN_WINDOW_design (GtkWindow *main_window){
void widget_head_MAIN_WINDOW_design (GtkWindow *main_window){
window_header_bar (main_window,
"E coli (with permission from David S. Goodsell, 2009)");
gtk_check_button_set_active (GTK_CHECK_BUTTON (btt_STATE), TRUE);