diff --git a/src/graphics/graphics.c b/src/graphics/graphics.c index 49e3d5a..ae7f38a 100644 --- a/src/graphics/graphics.c +++ b/src/graphics/graphics.c @@ -316,8 +316,8 @@ void graphics_model_setup (const int stack_id) g_print("[GRAPH DEBUG] cur arrow has x = %d\n", arrow.x); stack->arrows_nb = set_arrow (stack_id, stack->arrows_nb, space_X, space_Y, space_Z, - arrow.load, // load - arrow.site, // site + arrow.load, // load + arrow.site, // site arrow.x, // x arrow.y, // y arrow.z); // z diff --git a/src/ui/events.c b/src/ui/events.c index c77d8cb..7c87b38 100644 --- a/src/ui/events.c +++ b/src/ui/events.c @@ -90,9 +90,8 @@ void on_togglerunedit_action(GSimpleAction *action, ui_toggle_run_edit (); - /* - if (EDIT_MODE) ui_toggle_run_edit (RUN_MODE); - else if (RUN_MODE) ui_toggle_run_edit (EDIT_MODE); */ + /* if (EDIT_MODE) ui_toggle_run_edit (RUN_MODE); + else if (RUN_MODE) ui_toggle_run_edit (EDIT_MODE); */ } void on_togglerunstop_action(GSimpleAction *action, diff --git a/src/ui/gemgraph.ui b/src/ui/gemgraph.ui index 63160d2..c13ef28 100644 --- a/src/ui/gemgraph.ui +++ b/src/ui/gemgraph.ui @@ -27,16 +27,15 @@ Run mode app.togglerunedit - - + + - @@ -54,10 +53,6 @@ sidebar-show-symbolic Display/hide sidebar app.togglesidebar - - - - diff --git a/src/ui/window.c b/src/ui/window.c index 6788943..2245381 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -128,27 +128,27 @@ void ui_set_stack(int mode) case EDIT_MODE: // gtk_stack_set_visible_child_full(window->main_stack, "edition", GTK_STACK_TRANSITION_TYPE_CROSSFADE); gtk_stack_set_visible_child_full(window->side_stack, "edition", GTK_STACK_TRANSITION_TYPE_CROSSFADE); - gtk_menu_button_set_icon_name(window->main_button_mode, "document-edit-symbolic"); + gtk_menu_button_set_icon_name (window->main_button_mode, "document-edit-symbolic"); ui_setup_glarea(EDIT_MODE, GTK_WIDGET(window->edition_glarea_box)); break; case RUN_MODE: gtk_stack_set_visible_child_full(window->main_stack, "run", GTK_STACK_TRANSITION_TYPE_CROSSFADE); gtk_stack_set_visible_child_full(window->side_stack, "run", GTK_STACK_TRANSITION_TYPE_CROSSFADE); - gtk_menu_button_set_icon_name(window->main_button_mode, "system-run-symbolic"); + gtk_menu_button_set_icon_name (window->main_button_mode, "system-run-symbolic"); ui_setup_glarea(RUN_MODE, GTK_WIDGET(window->run_glarea_box)); ui_create_tree (GTK_WIDGET (window->run_conditions_tree_box)); break; case PRESENTATION_MODE: - // gtk_stack_set_visible_child_full(window->main_stack, "presentation", GTK_STACK_TRANSITION_TYPE_CROSSFADE); + gtk_stack_set_visible_child_full(window->main_stack, "presentation", GTK_STACK_TRANSITION_TYPE_CROSSFADE); gtk_stack_set_visible_child_full(window->side_stack, "presentation", GTK_STACK_TRANSITION_TYPE_CROSSFADE); - gtk_menu_button_set_icon_name(window->main_button_mode, "x-office-presentation-symbolic"); + gtk_menu_button_set_icon_name (window->main_button_mode, "x-office-presentation-symbolic"); ui_setup_glarea(PRESENTATION_MODE, GTK_WIDGET(window->presentation_glarea_box)); break; case HOME_MODE: gtk_stack_set_visible_child_full(window->main_stack, "home", GTK_STACK_TRANSITION_TYPE_CROSSFADE); gtk_stack_set_visible_child_full(window->side_stack, "home", GTK_STACK_TRANSITION_TYPE_CROSSFADE); gtk_paned_set_position(window->main_paned, 0); - gtk_menu_button_set_icon_name(window->main_button_mode, "user-home-symbolic"); + gtk_menu_button_set_icon_name (window->main_button_mode, "user-home-symbolic"); break; default: break; @@ -166,18 +166,22 @@ void ui_toggle_run_edit() switch(get_run_edit_mode()) { case 1: - // gtk_stack_set_visible_child_full(window->main_button_run_edit, "edition", GTK_STACK_TRANSITION_TYPE_CROSSFADE); - // gtk_menu_button_set_icon_name(window->main_button_run_edit, "document-edit-symbolic"); - set_run_edit_mode (0); // (EDIT_MODE); - // ui_setup_glarea(EDIT_MODE, GTK_WIDGET(window->edition_glarea_box)); - break; + gtk_stack_set_visible_child_full(window->main_stack, "edition", GTK_STACK_TRANSITION_TYPE_CROSSFADE); + gtk_stack_set_visible_child_full(window->side_stack, "edition", GTK_STACK_TRANSITION_TYPE_CROSSFADE); + gtk_menu_button_set_icon_name (GTK_MENU_BUTTON (window->main_button_run_edit), "document-edit-symbolic"); + gtk_paned_set_position(window->main_paned, 300); + set_run_edit_mode (0); // (EDIT_MODE); + // ui_setup_glarea(EDIT_MODE, GTK_WIDGET(window->edition_glarea_box)); + break; case 0: - // gtk_stack_set_visible_child_full(window->main_button_run_edit, "run", GTK_STACK_TRANSITION_TYPE_CROSSFADE); - // gtk_menu_button_set_icon_name(window->main_button_run_edit, "system-run-symbolic"); - // ui_setup_glarea(RUN_MODE, GTK_WIDGET(window->run_glarea_box)); - // ui_create_tree (GTK_WIDGET (window->run_conditions_tree_box)); - set_run_edit_mode (1); // (RUN_MODE); - break; + gtk_stack_set_visible_child_full(window->main_stack, "run", GTK_STACK_TRANSITION_TYPE_CROSSFADE); + gtk_stack_set_visible_child_full(window->side_stack, "run", GTK_STACK_TRANSITION_TYPE_CROSSFADE); + gtk_menu_button_set_icon_name (GTK_MENU_BUTTON (window->main_button_run_edit), "system-run-symbolic"); + gtk_paned_set_position(window->main_paned, 200); + set_run_edit_mode (1); // (EDIT_MODE); + ui_setup_glarea(RUN_MODE, GTK_WIDGET(window->run_glarea_box)); + ui_create_tree (GTK_WIDGET (window->run_conditions_tree_box)); + break; default: break; }