From 0c2530020d64e670f6dbadc01b5e3c2312f04ccd Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Wed, 29 May 2024 07:23:44 +0200 Subject: [PATCH] WIP: cleaning ... --- src/ui/contain.c | 19 ++++++++----------- src/ui/display.c | 5 +---- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/ui/contain.c b/src/ui/contain.c index 547e609..74fcdc7 100644 --- a/src/ui/contain.c +++ b/src/ui/contain.c @@ -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")); diff --git a/src/ui/display.c b/src/ui/display.c index d1ac1b1..0574b01 100644 --- a/src/ui/display.c +++ b/src/ui/display.c @@ -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; }