From b18d1aca5c1f4d062c358cffefd12e65c21d6ee2 Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Fri, 24 May 2024 15:01:37 +0200 Subject: [PATCH] The commutation that changes all : src/ui/application.gem_graph_client_application_activate() line 66 --- include/ui.h | 8 ++++++++ src/ui/application.c | 30 ++++++++++++++++++++---------- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/include/ui.h b/include/ui.h index bf4a09e..fc19f48 100644 --- a/include/ui.h +++ b/include/ui.h @@ -28,6 +28,14 @@ #include "../include/base.h" +#define W 1920 +#define H 960 +#define W_IMAGE W - 320 +#define H_IMAGE H - 126 +#define H_STYLES_PANE 30 +#define W_IMAGE_LOCAL W / 16 +#define H_IMAGE_LOCAL H / 16 + G_BEGIN_DECLS #define GEM_GRAPH_CLIENT_TYPE_WINDOW (gem_graph_client_window_get_type()) diff --git a/src/ui/application.c b/src/ui/application.c index 615a707..c34fedd 100644 --- a/src/ui/application.c +++ b/src/ui/application.c @@ -63,18 +63,28 @@ static void gem_graph_client_application_activate(GApplication *app) { GtkWindow *window; - g_assert(GEM_GRAPH_CLIENT_IS_APPLICATION(app)); + int commute_XML_ui_based_window = 1; - window = gtk_application_get_active_window(GTK_APPLICATION (app)); - if (window == NULL) - window = g_object_new(GEM_GRAPH_CLIENT_TYPE_WINDOW, - "application", app, - NULL); + if (commute_XML_ui_based_window) { - // Launch with sidebar off - ui_toggle_sidebar(); - ui_set_stack(HOME_MODE); - ui_debug_model_loading (window, "data/models/dimers random walk.xml"); + g_assert(GEM_GRAPH_CLIENT_IS_APPLICATION(app)); + + window = gtk_application_get_active_window(GTK_APPLICATION (app)); + if (window == NULL) + window = g_object_new(GEM_GRAPH_CLIENT_TYPE_WINDOW, + "application", app, + NULL); + + // Launch with sidebar off + ui_toggle_sidebar(); + ui_set_stack(HOME_MODE); + ui_debug_model_loading (window, "data/models/dimers random walk.xml"); + + } else { + + window = GTK_WINDOW (gtk_application_window_new (app)); + + } gtk_window_present(window); }