[geary: 9/20] application-main-window: Sync the leaflets' swipe state




commit 28e319267446fe96c070b85d6a20096f787fcdcc
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Sat Jan 18 13:04:10 2020 +0100

    application-main-window: Sync the leaflets' swipe state
    
    This keeps the swiping state of the leaflets in sync.

 src/client/application/application-main-window.vala |  6 ++++++
 ui/application-main-window.ui                       | 10 ++++++++++
 2 files changed, 16 insertions(+)
---
diff --git a/src/client/application/application-main-window.vala 
b/src/client/application/application-main-window.vala
index b56079cf7..3af1b6aa4 100644
--- a/src/client/application/application-main-window.vala
+++ b/src/client/application/application-main-window.vala
@@ -338,6 +338,10 @@ public class Application.MainWindow :
     private Gtk.SizeGroup conversations_separator_size_group;
     [GtkChild]
     private Gtk.SizeGroup conversation_size_group;
+    [GtkChild]
+    private Hdy.SwipeGroup conversations_swipe_group;
+    [GtkChild]
+    private Hdy.SwipeGroup conversation_swipe_group;
 
     [GtkChild]
     private Gtk.Overlay overlay;
@@ -1259,6 +1263,8 @@ public class Application.MainWindow :
                                              this.conversations_size_group,
                                              this.conversations_separator_size_group,
                                              this.conversation_size_group);
+        this.main_toolbar.add_to_swipe_groups(this.conversations_swipe_group,
+                                              this.conversation_swipe_group);
         this.main_toolbar.move_folder_menu.folder_selected.connect(on_move_conversation);
         this.main_toolbar.copy_folder_menu.folder_selected.connect(on_copy_conversation);
         this.main_toolbar.bind_property("search-open", this.search_bar, "search-mode-enabled",
diff --git a/ui/application-main-window.ui b/ui/application-main-window.ui
index f7bb884ee..fe66491bd 100644
--- a/ui/application-main-window.ui
+++ b/ui/application-main-window.ui
@@ -187,4 +187,14 @@
   <object class="GtkSizeGroup" id="conversation_size_group">
     <property name="mode">horizontal</property>
   </object>
+  <object class="HdySwipeGroup" id="conversations_swipe_group">
+    <swipeables>
+      <swipeable name="conversations_leaflet"/>
+    </swipeables>
+  </object>
+  <object class="HdySwipeGroup" id="conversation_swipe_group">
+    <swipeables>
+      <swipeable name="main_leaflet"/>
+    </swipeables>
+  </object>
 </interface>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]