The commutation that changes all : src/ui/application.gem_graph_client_application_activate() line 66

This commit is contained in:
Jean Sirmai 2024-05-24 15:01:37 +02:00
parent 99027fe5f4
commit b18d1aca5c
Signed by: jean
GPG Key ID: FB3115C340E057E3
2 changed files with 28 additions and 10 deletions

View File

@ -28,6 +28,14 @@
#include "../include/base.h" #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 G_BEGIN_DECLS
#define GEM_GRAPH_CLIENT_TYPE_WINDOW (gem_graph_client_window_get_type()) #define GEM_GRAPH_CLIENT_TYPE_WINDOW (gem_graph_client_window_get_type())

View File

@ -63,6 +63,10 @@ static void gem_graph_client_application_activate(GApplication *app)
{ {
GtkWindow *window; GtkWindow *window;
int commute_XML_ui_based_window = 1;
if (commute_XML_ui_based_window) {
g_assert(GEM_GRAPH_CLIENT_IS_APPLICATION(app)); g_assert(GEM_GRAPH_CLIENT_IS_APPLICATION(app));
window = gtk_application_get_active_window(GTK_APPLICATION (app)); window = gtk_application_get_active_window(GTK_APPLICATION (app));
@ -76,6 +80,12 @@ static void gem_graph_client_application_activate(GApplication *app)
ui_set_stack(HOME_MODE); ui_set_stack(HOME_MODE);
ui_debug_model_loading (window, "data/models/dimers random walk.xml"); ui_debug_model_loading (window, "data/models/dimers random walk.xml");
} else {
window = GTK_WINDOW (gtk_application_window_new (app));
}
gtk_window_present(window); gtk_window_present(window);
} }