window: remove unnecessary single-childed Gtk.Box

Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/542>
This commit is contained in:
Markus Göllnitz
2025-06-08 09:59:00 +00:00
committed by Marge Bot
parent ef5eb8c155
commit 55df257ed1
2 changed files with 31 additions and 41 deletions
-3
View File
@@ -102,8 +102,6 @@ struct _GcalWindow
AdwApplicationWindow parent; AdwApplicationWindow parent;
/* upper level widgets */ /* upper level widgets */
GtkWidget *main_box;
GtkWidget *header_bar; GtkWidget *header_bar;
AdwToastOverlay *overlay; AdwToastOverlay *overlay;
AdwViewStack *views_stack; AdwViewStack *views_stack;
@@ -1267,7 +1265,6 @@ gcal_window_class_init (GcalWindowClass *klass)
gtk_widget_class_bind_template_child (widget_class, GcalWindow, date_chooser); gtk_widget_class_bind_template_child (widget_class, GcalWindow, date_chooser);
gtk_widget_class_bind_template_child (widget_class, GcalWindow, event_editor); gtk_widget_class_bind_template_child (widget_class, GcalWindow, event_editor);
gtk_widget_class_bind_template_child (widget_class, GcalWindow, header_bar); gtk_widget_class_bind_template_child (widget_class, GcalWindow, header_bar);
gtk_widget_class_bind_template_child (widget_class, GcalWindow, main_box);
gtk_widget_class_bind_template_child (widget_class, GcalWindow, menu_button); gtk_widget_class_bind_template_child (widget_class, GcalWindow, menu_button);
gtk_widget_class_bind_template_child (widget_class, GcalWindow, month_view); gtk_widget_class_bind_template_child (widget_class, GcalWindow, month_view);
gtk_widget_class_bind_template_child (widget_class, GcalWindow, action_bar); gtk_widget_class_bind_template_child (widget_class, GcalWindow, action_bar);
+31 -38
View File
@@ -263,49 +263,42 @@
<property name="content"> <property name="content">
<object class="GtkBox" id="main_box"> <object class="AdwViewStack" id="views_stack">
<property name="hexpand">True</property> <property name="hexpand">True</property>
<property name="vexpand">True</property> <property name="vexpand">True</property>
<property name="orientation">vertical</property> <signal name="notify::visible-child" handler="view_changed" object="GcalWindow" swapped="no"/>
<style>
<class name="view"/>
</style>
<child> <child>
<object class="AdwViewStack" id="views_stack"> <object class="AdwViewStackPage">
<property name="hexpand">True</property> <property name="name">week</property>
<property name="vexpand">True</property> <property name="title" translatable="yes">_Week</property>
<signal name="notify::visible-child" handler="view_changed" object="GcalWindow" swapped="no"/> <property name="use-underline">True</property>
<style> <property name="icon-name">calendar-week-symbolic</property>
<class name="view"/> <property name="child">
</style> <object class="GcalWeekView" id="week_view">
<child> <property name="active-date" bind-source="GcalWindow" bind-property="active-date" bind-flags="bidirectional"/>
<object class="AdwViewStackPage"> <signal name="create-event" handler="show_new_event_widget" object="GcalWindow" swapped="no"/>
<property name="name">week</property> <signal name="event-activated" handler="event_activated" object="GcalWindow" swapped="no"/>
<property name="title" translatable="yes">_Week</property>
<property name="use-underline">True</property>
<property name="icon_name">calendar-week-symbolic</property>
<property name="child">
<object class="GcalWeekView" id="week_view">
<property name="active-date" bind-source="GcalWindow" bind-property="active-date" bind-flags="bidirectional"/>
<signal name="create-event" handler="show_new_event_widget" object="GcalWindow" swapped="no"/>
<signal name="event-activated" handler="event_activated" object="GcalWindow" swapped="no"/>
</object>
</property>
</object> </object>
</child> </property>
<child> </object>
<object class="AdwViewStackPage"> </child>
<property name="name">month</property> <child>
<property name="title" translatable="yes">_Month</property> <object class="AdwViewStackPage">
<property name="use-underline">True</property> <property name="name">month</property>
<property name="icon_name">calendar-month-symbolic</property> <property name="title" translatable="yes">_Month</property>
<property name="child"> <property name="use-underline">True</property>
<object class="GcalMonthView" id="month_view"> <property name="icon-name">calendar-month-symbolic</property>
<property name="active-date" bind-source="GcalWindow" bind-property="active-date" bind-flags="bidirectional"/> <property name="child">
<signal name="create-event" handler="show_new_event_widget" object="GcalWindow" swapped="no"/> <object class="GcalMonthView" id="month_view">
<signal name="create-event-detailed" handler="create_event_detailed_cb" object="GcalWindow" swapped="no"/> <property name="active-date" bind-source="GcalWindow" bind-property="active-date" bind-flags="bidirectional"/>
<signal name="event-activated" handler="event_activated" object="GcalWindow" swapped="no"/> <signal name="create-event" handler="show_new_event_widget" object="GcalWindow" swapped="no"/>
</object> <signal name="create-event-detailed" handler="create_event_detailed_cb" object="GcalWindow" swapped="no"/>
</property> <signal name="event-activated" handler="event_activated" object="GcalWindow" swapped="no"/>
</object> </object>
</child> </property>
</object> </object>
</child> </child>
</object> </object>