OK. J'arrête de travailler sur Builder
This commit is contained in:
parent
a2bb86c86e
commit
4e06b32e72
|
@ -316,8 +316,8 @@ void graphics_model_setup (const int stack_id)
|
||||||
g_print("[GRAPH DEBUG] cur arrow has x = %d\n", arrow.x);
|
g_print("[GRAPH DEBUG] cur arrow has x = %d\n", arrow.x);
|
||||||
stack->arrows_nb =
|
stack->arrows_nb =
|
||||||
set_arrow (stack_id, stack->arrows_nb, space_X, space_Y, space_Z,
|
set_arrow (stack_id, stack->arrows_nb, space_X, space_Y, space_Z,
|
||||||
arrow.load, // load
|
arrow.load, // load
|
||||||
arrow.site, // site
|
arrow.site, // site
|
||||||
arrow.x, // x
|
arrow.x, // x
|
||||||
arrow.y, // y
|
arrow.y, // y
|
||||||
arrow.z); // z
|
arrow.z); // z
|
||||||
|
|
|
@ -90,9 +90,8 @@ void on_togglerunedit_action(GSimpleAction *action,
|
||||||
|
|
||||||
ui_toggle_run_edit ();
|
ui_toggle_run_edit ();
|
||||||
|
|
||||||
/*
|
/* if (EDIT_MODE) ui_toggle_run_edit (RUN_MODE);
|
||||||
if (EDIT_MODE) ui_toggle_run_edit (RUN_MODE);
|
else if (RUN_MODE) ui_toggle_run_edit (EDIT_MODE); */
|
||||||
else if (RUN_MODE) ui_toggle_run_edit (EDIT_MODE); */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void on_togglerunstop_action(GSimpleAction *action,
|
void on_togglerunstop_action(GSimpleAction *action,
|
||||||
|
|
|
@ -27,16 +27,15 @@
|
||||||
<property name="tooltip-text" translatable="yes">Run mode</property>
|
<property name="tooltip-text" translatable="yes">Run mode</property>
|
||||||
<property name="action-name">app.togglerunedit</property>
|
<property name="action-name">app.togglerunedit</property>
|
||||||
<!-- property name="color">rgb(255,128,0)</property -->
|
<!-- property name="color">rgb(255,128,0)</property -->
|
||||||
<!-- applications should be compiled with the -Wl,--export-dynamic argument inside their compiler flags -->
|
<!-- applications should be compiled with the -Wl,--export-dynamic argument inside their compiler flags and linked against gmodule-export-2.0 -->
|
||||||
<!-- and linked against gmodule-export-2.0 -->
|
|
||||||
<!-- A GtkBuilder reads XML descriptions of a user interface and instantiates the described objects. -->
|
<!-- 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/class.Builder.html -->
|
||||||
<!-- https://docs.gtk.org/gtk4/css-properties.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 -->
|
<!-- 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 -->
|
<!-- 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/widget-templates.html -->
|
||||||
<!-- https://developer.gnome.org/documentation/tutorials/application.html -->
|
<!-- https://developer.gnome.org/documentation/tutorials/application.html -->
|
||||||
<!-- signal name="clicked" handler="ui_toggle_run_edit"/ -->
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
@ -54,10 +53,6 @@
|
||||||
<property name="icon-name">sidebar-show-symbolic</property>
|
<property name="icon-name">sidebar-show-symbolic</property>
|
||||||
<property name="tooltip-text" translatable="yes">Display/hide sidebar</property>
|
<property name="tooltip-text" translatable="yes">Display/hide sidebar</property>
|
||||||
<property name="action-name">app.togglesidebar</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>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|
|
@ -128,27 +128,27 @@ void ui_set_stack(int mode)
|
||||||
case EDIT_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->main_stack, "edition", GTK_STACK_TRANSITION_TYPE_CROSSFADE);
|
||||||
gtk_stack_set_visible_child_full(window->side_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));
|
ui_setup_glarea(EDIT_MODE, GTK_WIDGET(window->edition_glarea_box));
|
||||||
break;
|
break;
|
||||||
case RUN_MODE:
|
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->main_stack, "run", GTK_STACK_TRANSITION_TYPE_CROSSFADE);
|
||||||
gtk_stack_set_visible_child_full(window->side_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_setup_glarea(RUN_MODE, GTK_WIDGET(window->run_glarea_box));
|
||||||
ui_create_tree (GTK_WIDGET (window->run_conditions_tree_box));
|
ui_create_tree (GTK_WIDGET (window->run_conditions_tree_box));
|
||||||
break;
|
break;
|
||||||
case PRESENTATION_MODE:
|
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_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));
|
ui_setup_glarea(PRESENTATION_MODE, GTK_WIDGET(window->presentation_glarea_box));
|
||||||
break;
|
break;
|
||||||
case HOME_MODE:
|
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->main_stack, "home", GTK_STACK_TRANSITION_TYPE_CROSSFADE);
|
||||||
gtk_stack_set_visible_child_full(window->side_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_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;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -166,18 +166,22 @@ void ui_toggle_run_edit()
|
||||||
|
|
||||||
switch(get_run_edit_mode()) {
|
switch(get_run_edit_mode()) {
|
||||||
case 1:
|
case 1:
|
||||||
// gtk_stack_set_visible_child_full(window->main_button_run_edit, "edition", GTK_STACK_TRANSITION_TYPE_CROSSFADE);
|
gtk_stack_set_visible_child_full(window->main_stack, "edition", GTK_STACK_TRANSITION_TYPE_CROSSFADE);
|
||||||
// gtk_menu_button_set_icon_name(window->main_button_run_edit, "document-edit-symbolic");
|
gtk_stack_set_visible_child_full(window->side_stack, "edition", GTK_STACK_TRANSITION_TYPE_CROSSFADE);
|
||||||
set_run_edit_mode (0); // (EDIT_MODE);
|
gtk_menu_button_set_icon_name (GTK_MENU_BUTTON (window->main_button_run_edit), "document-edit-symbolic");
|
||||||
// ui_setup_glarea(EDIT_MODE, GTK_WIDGET(window->edition_glarea_box));
|
gtk_paned_set_position(window->main_paned, 300);
|
||||||
break;
|
set_run_edit_mode (0); // (EDIT_MODE);
|
||||||
|
// ui_setup_glarea(EDIT_MODE, GTK_WIDGET(window->edition_glarea_box));
|
||||||
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
// gtk_stack_set_visible_child_full(window->main_button_run_edit, "run", GTK_STACK_TRANSITION_TYPE_CROSSFADE);
|
gtk_stack_set_visible_child_full(window->main_stack, "run", GTK_STACK_TRANSITION_TYPE_CROSSFADE);
|
||||||
// gtk_menu_button_set_icon_name(window->main_button_run_edit, "system-run-symbolic");
|
gtk_stack_set_visible_child_full(window->side_stack, "run", GTK_STACK_TRANSITION_TYPE_CROSSFADE);
|
||||||
// ui_setup_glarea(RUN_MODE, GTK_WIDGET(window->run_glarea_box));
|
gtk_menu_button_set_icon_name (GTK_MENU_BUTTON (window->main_button_run_edit), "system-run-symbolic");
|
||||||
// ui_create_tree (GTK_WIDGET (window->run_conditions_tree_box));
|
gtk_paned_set_position(window->main_paned, 200);
|
||||||
set_run_edit_mode (1); // (RUN_MODE);
|
set_run_edit_mode (1); // (EDIT_MODE);
|
||||||
break;
|
ui_setup_glarea(RUN_MODE, GTK_WIDGET(window->run_glarea_box));
|
||||||
|
ui_create_tree (GTK_WIDGET (window->run_conditions_tree_box));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue