OK. J'arrête de travailler sur Builder

This commit is contained in:
Jean Sirmai 2024-05-27 23:00:21 +02:00
parent a2bb86c86e
commit 4e06b32e72
Signed by: jean
GPG Key ID: FB3115C340E057E3
4 changed files with 26 additions and 28 deletions

View File

@ -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

View File

@ -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,

View File

@ -27,16 +27,15 @@
<property name="tooltip-text" translatable="yes">Run mode</property>
<property name="action-name">app.togglerunedit</property>
<!-- property name="color">rgb(255,128,0)</property -->
<!-- applications should be compiled with the -Wl,--export-dynamic argument inside their compiler flags -->
<!-- and linked against gmodule-export-2.0 -->
<!-- applications should be compiled with the -Wl,--export-dynamic argument inside their compiler flags and linked against gmodule-export-2.0 -->
<!-- A GtkBuilder reads XML descriptions of a user interface and instantiates the described objects. -->
<!-- https://docs.gtk.org/gtk4/class.Builder.html -->
<!-- https://docs.gtk.org/gtk4/css-properties.html -->
<!-- https://docs.gtk.org/gtk4/css-overview.html pour colorier ... -->
<!-- https://docs.gtk.org/gtk4/class.Widget.html#building-composite-widgets-from-template-xml -->
<!-- unlike the <object> tag, the <template> tag does not contain an “id” attribute -->
<!-- https://developer.gnome.org/documentation/tutorials/widget-templates.html -->
<!-- https://developer.gnome.org/documentation/tutorials/application.html -->
<!-- signal name="clicked" handler="ui_toggle_run_edit"/ -->
</object>
</child>
@ -54,10 +53,6 @@
<property name="icon-name">sidebar-show-symbolic</property>
<property name="tooltip-text" translatable="yes">Display/hide sidebar</property>
<property name="action-name">app.togglesidebar</property>
<!-- applications should be compiled with the -Wl,--export-dynamic argument inside their compiler flags -->
<!-- and linked against gmodule-export-2.0 -->
<!-- https://docs.gtk.org/gtk4/class.Builder.html -->
<!--signal name="clicked" handler="ui_toggle_sidebar" /-->
</object>
</child>
</object>

View File

@ -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;
}