WIP: cleaning ...

This commit is contained in:
Jean Sirmai 2024-05-24 18:40:01 +02:00
parent 993ce2fc73
commit c849e61e11
Signed by: jean
GPG Key ID: FB3115C340E057E3
2 changed files with 9 additions and 12 deletions

View File

@ -28,6 +28,8 @@
#include "../include/base.h" #include "../include/base.h"
#define COMMUTE 0
#define W 1920 #define W 1920
#define H 960 #define H 960
#define W_IMAGE W - 320 #define W_IMAGE W - 320

View File

@ -61,34 +61,29 @@ void ui_disable_action(const char *name) {
*/ */
static void gem_graph_client_application_activate(GApplication *app) static void gem_graph_client_application_activate(GApplication *app)
{ {
int commute_XML_ui_based_window = 1; if (COMMUTE) {
if (commute_XML_ui_based_window) {
GtkWindow *window; GtkWindow *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));
if (window == NULL) if (window == NULL)
window = g_object_new(GEM_GRAPH_CLIENT_TYPE_WINDOW, window = g_object_new (GEM_GRAPH_CLIENT_TYPE_WINDOW,
"application", app, "application", app,
NULL); NULL);
// Launch with sidebar off // Launch with sidebar off
ui_toggle_sidebar(); ui_toggle_sidebar();
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");
gtk_window_present(window); gtk_window_present (window);
} else { } else {
char *user_data = NULL; char *user_data = NULL;
experimental_activate (app, user_data); experimental_activate (app, user_data); // see > contain.c
// in experimental_activate () are :
// window = GTK_WINDOW (gtk_application_window_new (GTK_APPLICATION (app))); and
// gtk_window_present(window);
} }
} }