calendar-management: Port to AdwNavigationView

The interfacing that GcalCalendarManagementDialog had is somewhat
similar to AdwNavigationView, with pages and signaling basically
matching the same semantics.

We can save some code by switching to AdwNavigationView then, as
the heavy-lifting of page management is done there now.

The headerbar of the dialog is no more; instead, each page has its
own headerbar that automatically gets a back button.

Page activation and deactivation works essentially the same, but
uses AdwNavigationView signals to manage that.
This commit is contained in:
Georges Basile Stavracas Neto
2023-06-22 00:20:21 +00:00
parent fd5aeac057
commit bdda09abb8
10 changed files with 341 additions and 398 deletions
@@ -9,32 +9,8 @@
<property name="destroy_with_parent">True</property>
<property name="hide-on-close">True</property>
<child>
<object class="AdwLeaflet">
<property name="can-unfold">False</property>
<child>
<object class="AdwToolbarView" id="vbox">
<child type="top">
<object class="GtkHeaderBar" id="headerbar">
<property name="show-title-buttons">True</property>
<property name="title-widget">
<object class="AdwWindowTitle" id="window_title" />
</property>
</object>
</child>
<property name="content">
<object class="GtkOverlay" id="overlay">
<child>
<object class="GtkStack" id="stack">
<property name="hexpand">True</property>
<property name="vhomogeneous">False</property>
<property name="transition_type">crossfade</property>
</object>
</child>
</object>
</property>
</object>
</child>
<object class="AdwNavigationView" id="navigation_view">
<signal name="popped" handler="on_navigation_view_popped_cb" object="GcalCalendarManagementDialog" swapped="no" />
</object>
</child>
</template>