application-main-window: Sync the leaflets' swipe state

This keeps the swiping state of the leaflets in sync.
This commit is contained in:
Adrien Plazas 2020-01-18 13:04:10 +01:00 committed by Julian Sparber
parent 2139636d82
commit 28e3192674
2 changed files with 16 additions and 0 deletions

View file

@ -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",

View file

@ -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>