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

@ -90,8 +90,7 @@ 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); */
} }

View File

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

View File

@ -139,7 +139,7 @@ void ui_set_stack(int mode)
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));
@ -166,17 +166,21 @@ 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);
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); set_run_edit_mode (0); // (EDIT_MODE);
// 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 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);
ui_setup_glarea(RUN_MODE, GTK_WIDGET(window->run_glarea_box));
ui_create_tree (GTK_WIDGET (window->run_conditions_tree_box));
break; break;
default: default:
break; break;