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;
/* upper level widgets */
GtkWidget *main_box;
GtkWidget *header_bar;
AdwToastOverlay *overlay;
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, event_editor);
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, month_view);
gtk_widget_class_bind_template_child (widget_class, GcalWindow, action_bar);
+31 -38
View File
@@ -263,49 +263,42 @@
<property name="content">
<object class="GtkBox" id="main_box">
<object class="AdwViewStack" id="views_stack">
<property name="hexpand">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>
<object class="AdwViewStack" id="views_stack">
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<signal name="notify::visible-child" handler="view_changed" object="GcalWindow" swapped="no"/>
<style>
<class name="view"/>
</style>
<child>
<object class="AdwViewStackPage">
<property name="name">week</property>
<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 class="AdwViewStackPage">
<property name="name">week</property>
<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>
</child>
<child>
<object class="AdwViewStackPage">
<property name="name">month</property>
<property name="title" translatable="yes">_Month</property>
<property name="use-underline">True</property>
<property name="icon_name">calendar-month-symbolic</property>
<property name="child">
<object class="GcalMonthView" id="month_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="create-event-detailed" handler="create_event_detailed_cb" object="GcalWindow" swapped="no"/>
<signal name="event-activated" handler="event_activated" object="GcalWindow" swapped="no"/>
</object>
</property>
</property>
</object>
</child>
<child>
<object class="AdwViewStackPage">
<property name="name">month</property>
<property name="title" translatable="yes">_Month</property>
<property name="use-underline">True</property>
<property name="icon-name">calendar-month-symbolic</property>
<property name="child">
<object class="GcalMonthView" id="month_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="create-event-detailed" handler="create_event_detailed_cb" object="GcalWindow" swapped="no"/>
<signal name="event-activated" handler="event_activated" object="GcalWindow" swapped="no"/>
</object>
</child>
</property>
</object>
</child>
</object>