WIP: cleaning ...

This commit is contained in:
Jean Sirmai 2024-05-29 07:23:44 +02:00
parent 8578047ab1
commit 0c2530020d
Signed by: jean
GPG Key ID: FB3115C340E057E3
2 changed files with 9 additions and 15 deletions

View File

@ -179,21 +179,19 @@ void window_bar(GtkWindow *window, char *title){
}
void experimental_activate_00 (GtkApplication *app, GtkWindow *window) {
// window_bar (window, "E coli (with permission from David S. Goodsell, 2009)");
GtkWidget *my_header_bar = gtk_header_bar_new ();
gtk_header_bar_set_title_widget (GTK_HEADER_BAR (my_header_bar), GTK_WIDGET (gtk_label_new ("E coli (with permission from David S. Goodsell, 2009)")));
GtkWidget *header_bar = gtk_header_bar_new ();
GtkWidget *title = GTK_WIDGET (gtk_label_new ("GemGraph 0.1.0"));
title = GTK_WIDGET (gtk_label_new ("E coli (with permission from David S. Goodsell, 2009)"));
gtk_header_bar_set_title_widget (GTK_HEADER_BAR (header_bar), title);
GtkWidget *run_edit = gtk_toggle_button_new ();
gtk_button_set_icon_name (GTK_BUTTON (run_edit), "document-edit-symbolic");
gtk_button_set_icon_name (GTK_BUTTON (run_edit), "system-run-symbolic");
// gtk_toggle_button_set_active (run_edit, TRUE);
gtk_actionable_set_action_name (run_edit, "app.togglerunedit");
// gtk_actionable_set_action_target_value (GTK_WIDGET (run_edit), "togglerunedit"); // ui_toggle_run_edit() GVariant
gtk_header_bar_pack_start (GTK_HEADER_BAR (my_header_bar), run_edit);
gtk_window_set_titlebar (window, my_header_bar);
gtk_actionable_set_action_name (GTK_ACTIONABLE (run_edit), "app.togglerunedit");
gtk_header_bar_pack_start (GTK_HEADER_BAR (header_bar), run_edit);
gtk_window_set_titlebar (window, header_bar);
GtkNotebook *run_notebook = GTK_NOTEBOOK (gtk_notebook_new());
// gtk_notebook_set_tab_pos (run_notebook, GTK_POS_TOP); // TOP par défaut ? sinon : GTK_POS_LEFT
// gtk_notebook_set_tab_pos (run_notebook, GTK_POS_TOP); // TOP par défaut, I presume. Sinon : GTK_POS_LEFT
gtk_notebook_append_page (run_notebook, get_run_space_page_new(), gtk_label_new ("space"));
gtk_notebook_append_page (run_notebook, get_run_rules_page_new(), gtk_label_new ("rules"));
@ -203,7 +201,6 @@ gtk_actionable_set_action_name (run_edit, "app.togglerunedit");
gtk_notebook_append_page (run_notebook, get_run_help_page_new(), gtk_label_new ("help"));
GtkNotebook *edit_notebook = GTK_NOTEBOOK (gtk_notebook_new());
// gtk_notebook_set_tab_pos (edit_notebook, GTK_POS_TOP); // TOP par défaut, I presume
gtk_notebook_append_page (edit_notebook, get_edit_space_page_new(), gtk_label_new ("space"));
gtk_notebook_append_page (edit_notebook, get_edit_rules_page_new(), gtk_label_new ("rules"));

View File

@ -99,10 +99,7 @@ static GtkWidget *get_scroll_speed(){
const gchar *new_name = "new_name"; gtk_widget_set_name (scroll_speed, new_name);
// const GtkWidgetPath* gtk_style_context_get_path (GtkStyleContext* context);
// GtkStyleContext *my_context = gtk_style_context_new ();
gtk_style_context_set_state (gtk_widget_get_style_context (scroll_speed), 100);
if (0) printf("display.get_scroll_speed() gtk_style_context_get_state (gtk_widget_get_style_context (scroll_speed)) = %d\n",\
gtk_style_context_get_state (gtk_widget_get_style_context (scroll_speed)));
// gtk_style_context_set_state (gtk_widget_get_style_context (scroll_speed), 100);
return scroll_speed;
}