main-toolbar: Add add_to_swipe_groups()

This will be used to sync the swipe state of the leaflets.
This commit is contained in:
Adrien Plazas 2020-01-18 12:58:18 +01:00 committed by Julian Sparber
parent 12a7101ba5
commit 2139636d82

View file

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