[gnome-todo/wip/cdavis/sidebar-style-consistency: 2/6] task-list-workspace: Use adw_leaflet_navigate ()
- From: Christopher Davis <christopherdavis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo/wip/cdavis/sidebar-style-consistency: 2/6] task-list-workspace: Use adw_leaflet_navigate ()
- Date: Fri, 29 Oct 2021 07:32:44 +0000 (UTC)
commit cdf2528a5640af40dc0222fbcb6ae2c7801aff7d
Author: Christopher Davis <christopherdavis gnome org>
Date: Thu Oct 28 23:01:36 2021 -0700
task-list-workspace: Use adw_leaflet_navigate ()
This is how you're supposed to use leaflets
for back and forward navigation.
src/plugins/task-lists-workspace/gtd-task-lists-workspace.c | 4 ++--
src/plugins/task-lists-workspace/gtd-task-lists-workspace.ui | 7 +++++--
2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/task-lists-workspace/gtd-task-lists-workspace.c
b/src/plugins/task-lists-workspace/gtd-task-lists-workspace.c
index 24d3c66e..fe120511 100644
--- a/src/plugins/task-lists-workspace/gtd-task-lists-workspace.c
+++ b/src/plugins/task-lists-workspace/gtd-task-lists-workspace.c
@@ -177,7 +177,7 @@ on_action_activate_panel_activated_cb (GSimpleAction *simple,
gtd_panel_activate (panel, panel_parameters);
gtk_stack_set_visible_child (self->stack, GTK_WIDGET (panel));
- adw_leaflet_set_visible_child (self->leaflet, self->content_box);
+ adw_leaflet_navigate (self->leaflet, ADW_NAVIGATION_DIRECTION_FORWARD);
}
static void
@@ -199,7 +199,7 @@ static void
on_back_sidebar_button_clicked_cb (GtkButton *button,
GtdTaskListsWorkspace *self)
{
- adw_leaflet_set_visible_child (self->leaflet, self->sidebar_box);
+ adw_leaflet_navigate (self->leaflet, ADW_NAVIGATION_DIRECTION_BACK);
}
static void
diff --git a/src/plugins/task-lists-workspace/gtd-task-lists-workspace.ui
b/src/plugins/task-lists-workspace/gtd-task-lists-workspace.ui
index 7edb62f8..7596c00b 100644
--- a/src/plugins/task-lists-workspace/gtd-task-lists-workspace.ui
+++ b/src/plugins/task-lists-workspace/gtd-task-lists-workspace.ui
@@ -61,8 +61,11 @@
</child>
<child>
- <object class="GtkSeparator">
- <property name="orientation">vertical</property>
+ <object class="AdwLeafletPage">
+ <property name="navigatable">False</property>
+ <property name="child">
+ <object class="GtkSeparator"/>
+ </property>
</object>
</child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]