WIP: restructuring widget head (main window)

This commit is contained in:
Jean Sirmai 2024-07-15 07:46:59 +02:00
parent 2115749c60
commit d64691bf38
Signed by: jean
GPG Key ID: FB3115C340E057E3
1 changed files with 14 additions and 2 deletions

View File

@ -128,11 +128,14 @@ void widget_head_DIALOG_WINDOW_design (GtkWindow *main_window, GtkWindow *dialog
/******************************************************************************/
static GtkWidget *window_header_bar (GtkWindow *window, char *title);
static void window_left (GtkWidget *header_bar);
static void window_right (GtkWidget *header_bar);
void widget_head_MAIN_WINDOW_design (GtkWindow *main_window){
GtkWidget *header_bar = window_header_bar (main_window,
"E coli (with permission from David S. Goodsell, 2009)");
window_left (header_bar);
window_right (header_bar);
// next line <=> calls.on_toggle_STATE_RULES_DATA (btt_STATE)
gtk_check_button_set_active (GTK_CHECK_BUTTON (btt_STATE), TRUE);
@ -144,7 +147,11 @@ static GtkWidget *window_header_bar (GtkWindow *window, char *title)
GtkWidget *header_bar = GTK_WIDGET (gtk_header_bar_new ());
gtk_header_bar_set_title_widget (GTK_HEADER_BAR (header_bar), gtk_label_new (title));
gtk_window_set_titlebar (window, header_bar);
return header_bar;
}
static void window_left (GtkWidget *header_bar)
{
gpointer no_local_data = NULL;
GtkButton *btt_XOR_EXEC_EDIT = GTK_BUTTON (gtk_toggle_button_new ());
@ -174,6 +181,12 @@ static GtkWidget *window_header_bar (GtkWindow *window, char *title)
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_RULES));
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), GTK_WIDGET (btt_DATA));
}
static void window_right (GtkWidget *header_bar)
{
gpointer no_local_data = NULL;
// https://iconduck.com/sets/adwaita-icon-theme https://iconduck.com/sets/carbon-icons
GtkButton *btt_go_home = GTK_BUTTON (gtk_button_new ());
@ -258,7 +271,6 @@ static GtkWidget *window_header_bar (GtkWindow *window, char *title)
// g_signal_connect (menu_item_C, "clicked", G_CALLBACK (on_clicked_HOME), no_local_data);
return header_bar;
}