WIP: systematic renaming II
This commit is contained in:
parent
8ce7191df3
commit
953f96b19d
|
@ -35,19 +35,19 @@
|
||||||
/* W I N D O W S */
|
/* W I N D O W S */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
void head_set_MAIN_WINDOW (GtkApplication *app);
|
void widget_head_set_MAIN_WINDOW (GtkApplication *app);
|
||||||
void head_set_DIALOG_WINDOW (GtkApplication *app);
|
void widget_head_set_DIALOG_WINDOW (GtkApplication *app);
|
||||||
void head_set_TEXT_WINDOW (GtkApplication *app);
|
void widget_head_set_TEXT_WINDOW (GtkApplication *app);
|
||||||
|
|
||||||
void widget_MAIN_WINDOW_design (GtkWindow *main_window);
|
void widget_head_MAIN_WINDOW_design (GtkWindow *main_window);
|
||||||
void widget_DIALOG_WINDOW_design (GtkWindow *main_window,
|
void widget_head_DIALOG_WINDOW_design (GtkWindow *main_window,
|
||||||
GtkWindow *dialog_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 *text_window);
|
||||||
|
|
||||||
GtkWindow *head_get_MAIN_WINDOW();
|
GtkWindow *widget_head_get_MAIN_WINDOW();
|
||||||
GtkWindow *head_get_DIALOG_WINDOW();
|
GtkWindow *widget_head_get_DIALOG_WINDOW();
|
||||||
GtkWindow *head_get_TEXT_WINDOW();
|
GtkWindow *widget_head_get_TEXT_WINDOW();
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
24
src/calls.c
24
src/calls.c
|
@ -64,14 +64,14 @@ static void on_auto_notification (const char *message)
|
||||||
void on_windows_activation (GtkApplication *app,
|
void on_windows_activation (GtkApplication *app,
|
||||||
gpointer no_user_data)
|
gpointer no_user_data)
|
||||||
{
|
{
|
||||||
head_set_MAIN_WINDOW (app);
|
widget_head_set_MAIN_WINDOW (app);
|
||||||
widget_MAIN_WINDOW_design (head_get_MAIN_WINDOW());
|
widget_head_MAIN_WINDOW_design (widget_head_get_MAIN_WINDOW());
|
||||||
|
|
||||||
head_set_DIALOG_WINDOW (app);
|
widget_head_set_DIALOG_WINDOW (app);
|
||||||
widget_DIALOG_WINDOW_design (head_get_MAIN_WINDOW(), head_get_DIALOG_WINDOW());
|
widget_head_DIALOG_WINDOW_design (widget_head_get_MAIN_WINDOW(), widget_head_get_DIALOG_WINDOW());
|
||||||
|
|
||||||
head_set_TEXT_WINDOW (app);
|
widget_head_set_TEXT_WINDOW (app);
|
||||||
widget_TEXT_WINDOW_design (head_get_MAIN_WINDOW(), head_get_TEXT_WINDOW());
|
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()) {
|
switch (get_STATE_RULES_DATA()) {
|
||||||
|
|
||||||
case (STATE) :
|
case (STATE) :
|
||||||
gtk_window_set_child (head_get_MAIN_WINDOW(),
|
gtk_window_set_child (widget_head_get_MAIN_WINDOW(),
|
||||||
GTK_WIDGET (get_STATE_page()));
|
GTK_WIDGET (get_STATE_page()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (RULES) :
|
case (RULES) :
|
||||||
gtk_window_set_child (head_get_MAIN_WINDOW(),
|
gtk_window_set_child (widget_head_get_MAIN_WINDOW(),
|
||||||
GTK_WIDGET (get_RULES_page()));
|
GTK_WIDGET (get_RULES_page()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (DATA) :
|
case (DATA) :
|
||||||
gtk_window_set_child (head_get_MAIN_WINDOW(),
|
gtk_window_set_child (widget_head_get_MAIN_WINDOW(),
|
||||||
GTK_WIDGET (get_STOCK_page()));
|
GTK_WIDGET (get_STOCK_page()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@ void on_toggle_EXEC_EDIT (GtkWidget *toggled_button, gpointer user_data)
|
||||||
"text-editor-symbolic");
|
"text-editor-symbolic");
|
||||||
|
|
||||||
// https://docs.gtk.org/gtk4/class.Window.html TODO 2024-06-30
|
// 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);
|
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");
|
printf ("callback.on_clicked_MENU() button\n");
|
||||||
// presents the text_window and works only once.\nIt should present a menu.\n"); // TODO
|
// presents the text_window and works only once.\nIt should present a menu.\n"); // TODO
|
||||||
learning_how_to_create_a_menu (menu_button);
|
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)
|
void on_clicked_HOME (GtkWidget *btt_reset, gpointer data)
|
||||||
{
|
{
|
||||||
printf ("callback.on_clicked_HOME() button presents the dialog_window\
|
printf ("callback.on_clicked_HOME() button presents the dialog_window\
|
||||||
( :- ) but it works only once.\n"); // TODO
|
( :- ) 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()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -261,9 +261,9 @@
|
||||||
*
|
*
|
||||||
* Les autres fonctions appelées par les fonctions callback() sont :
|
* Les autres fonctions appelées par les fonctions callback() sont :
|
||||||
*
|
*
|
||||||
* widget_MAIN_WINDOW_design()
|
* widget_head_MAIN_WINDOW_design()
|
||||||
* widget_DIALOG_WINDOW_design()
|
* widget_head_DIALOG_WINDOW_design()
|
||||||
* widget_TEXT_WINDOW_design()
|
* widget_head_TEXT_WINDOW_design()
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Widgets.c appelle :
|
* Widgets.c appelle :
|
||||||
|
|
|
@ -38,21 +38,21 @@
|
||||||
static GtkWindow *main_window, *dialog_window, *text_window;
|
static GtkWindow *main_window, *dialog_window, *text_window;
|
||||||
static GtkButton *btt_STATE, *btt_RULES, *btt_DATA;
|
static GtkButton *btt_STATE, *btt_RULES, *btt_DATA;
|
||||||
|
|
||||||
GtkWindow *head_get_MAIN_WINDOW() {return main_window;}
|
GtkWindow *widget_head_get_MAIN_WINDOW() {return main_window;}
|
||||||
GtkWindow *head_get_DIALOG_WINDOW() {return dialog_window;}
|
GtkWindow *widget_head_get_DIALOG_WINDOW() {return dialog_window;}
|
||||||
GtkWindow *head_get_TEXT_WINDOW() {return text_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));
|
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));
|
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));
|
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. ";
|
char *title = " Learn more about Gem Graph. ";
|
||||||
GtkWidget *header_bar = GTK_WIDGET (gtk_header_bar_new ());
|
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);
|
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? ";
|
char *title = " Save the current model before modifying it? ";
|
||||||
GtkWidget *header_bar = GTK_WIDGET (gtk_header_bar_new ());
|
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));
|
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,
|
window_header_bar (main_window,
|
||||||
"E coli (with permission from David S. Goodsell, 2009)");
|
"E coli (with permission from David S. Goodsell, 2009)");
|
||||||
gtk_check_button_set_active (GTK_CHECK_BUTTON (btt_STATE), TRUE);
|
gtk_check_button_set_active (GTK_CHECK_BUTTON (btt_STATE), TRUE);
|
||||||
|
|
Loading…
Reference in New Issue