From 7d4a61d431e072dbcacda2d089b587fe52257da6 Mon Sep 17 00:00:00 2001
From: Adrien Plazas <kekun.plazas@laposte.net>
Date: Thu, 16 Jan 2020 13:50:03 +0100
Subject: [PATCH 049/124] main-toolbar: Add add_to_size_groups()

This will be used to sync requests of the panes.
---
 src/client/components/main-toolbar.vala | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/src/client/components/main-toolbar.vala b/src/client/components/main-toolbar.vala
index 4ee02079..6ea472a8 100644
--- a/src/client/components/main-toolbar.vala
+++ b/src/client/components/main-toolbar.vala
@@ -30,12 +30,18 @@ public class MainToolbar : Gtk.Box {
     [GtkChild]
     private Gtk.MenuButton main_menu_button;
 
+    [GtkChild]
+    private Gtk.Separator folder_separator;
+
     // Conversations header elements
     [GtkChild]
     private Gtk.HeaderBar conversations_header;
     [GtkChild]
     private Gtk.ToggleButton search_conversations_button;
 
+    [GtkChild]
+    private Gtk.Separator conversations_separator;
+
     // Conversation header elements
     [GtkChild]
     private Gtk.HeaderBar conversation_header;
@@ -105,6 +111,18 @@ public class MainToolbar : Gtk.Box {
         update_conversation_buttons();
     }
 
+    public void add_to_size_groups(Gtk.SizeGroup folder_group,
+                                   Gtk.SizeGroup folder_separator_group,
+                                   Gtk.SizeGroup conversations_group,
+                                   Gtk.SizeGroup conversations_separator_group,
+                                   Gtk.SizeGroup conversation_group) {
+        folder_group.add_widget(folder_header);
+        folder_separator_group.add_widget(folder_separator);
+        conversations_group.add_widget(conversations_header);
+        conversations_separator_group.add_widget(conversations_separator);
+        conversation_group.add_widget(conversation_header);
+    }
+
     // Updates tooltip text depending on number of conversations selected.
     private void update_conversation_buttons() {
         this.mark_message_button.tooltip_text = ngettext(
-- 
2.29.2

