[geary: 8/20] main-toolbar: Add add_to_swipe_groups()




commit 2139636d82b67414dd22170894bb61d2e9d1b415
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Sat Jan 18 12:58:18 2020 +0100

    main-toolbar: Add add_to_swipe_groups()
    
    This will be used to sync the swipe state of the leaflets.

 src/client/components/main-toolbar.vala | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/src/client/components/main-toolbar.vala b/src/client/components/main-toolbar.vala
index 286546d57..c7bdab8f4 100644
--- a/src/client/components/main-toolbar.vala
+++ b/src/client/components/main-toolbar.vala
@@ -24,6 +24,9 @@ public class MainToolbar : Hdy.Leaflet {
     public int selected_conversations { get; set; }
 
 
+    [GtkChild]
+    private Hdy.Leaflet conversations_leaflet;
+
     // Folder header elements
     [GtkChild]
     private Gtk.HeaderBar folder_header;
@@ -124,6 +127,12 @@ public class MainToolbar : Hdy.Leaflet {
         conversation_group.add_widget(conversation_header);
     }
 
+    public void add_to_swipe_groups(Hdy.SwipeGroup conversations_group,
+                                    Hdy.SwipeGroup conversation_group) {
+        conversations_group.add_swipeable(this.conversations_leaflet);
+        conversation_group.add_swipeable(this);
+    }
+
     // Updates tooltip text depending on number of conversations selected.
     private void update_conversation_buttons() {
         this.mark_message_button.tooltip_text = ngettext(


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