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,18 +63,28 @@ static void gem_graph_client_application_activate(GApplication *app)
{ {
GtkWindow *window; 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 (commute_XML_ui_based_window) {
if (window == NULL)
window = g_object_new(GEM_GRAPH_CLIENT_TYPE_WINDOW,
"application", app,
NULL);
// Launch with sidebar off g_assert(GEM_GRAPH_CLIENT_IS_APPLICATION(app));
ui_toggle_sidebar();
ui_set_stack(HOME_MODE); window = gtk_application_get_active_window(GTK_APPLICATION (app));
ui_debug_model_loading (window, "data/models/dimers random walk.xml"); 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); gtk_window_present(window);
} }