From 94ab7e5ac6b282e07edf8966da5c69e4fdba0cc8 Mon Sep 17 00:00:00 2001 From: Adrien Plazas Date: Sat, 18 Jan 2020 09:16:32 +0100 Subject: [PATCH 048/124] main-toolbar: Split the folder header Split it into a folder header and a conversations header. This is needed to properly split the 3 panes. Fixes https://gitlab.gnome.org/GNOME/geary/issues/442. --- src/client/components/main-toolbar.vala | 12 ++- ui/main-toolbar.ui | 108 +++++++++++++++--------- 2 files changed, 77 insertions(+), 43 deletions(-) diff --git a/src/client/components/main-toolbar.vala b/src/client/components/main-toolbar.vala index aa263253..4ee02079 100644 --- a/src/client/components/main-toolbar.vala +++ b/src/client/components/main-toolbar.vala @@ -28,10 +28,14 @@ public class MainToolbar : Gtk.Box { [GtkChild] private Gtk.HeaderBar folder_header; [GtkChild] - private Gtk.ToggleButton search_conversations_button; - [GtkChild] private Gtk.MenuButton main_menu_button; + // Conversations header elements + [GtkChild] + private Gtk.HeaderBar conversations_header; + [GtkChild] + private Gtk.ToggleButton search_conversations_button; + // Conversation header elements [GtkChild] private Gtk.HeaderBar conversation_header; @@ -60,8 +64,8 @@ public class MainToolbar : Gtk.Box { public MainToolbar(Application.Configuration config) { if (config.desktop_environment != UNITY) { - this.bind_property("account", this.folder_header, "title", BindingFlags.SYNC_CREATE); - this.bind_property("folder", this.folder_header, "subtitle", BindingFlags.SYNC_CREATE); + this.bind_property("account", this.conversations_header, "title", BindingFlags.SYNC_CREATE); + this.bind_property("folder", this.conversations_header, "subtitle", BindingFlags.SYNC_CREATE); } // Assemble the main/mark menus diff --git a/ui/main-toolbar.ui b/ui/main-toolbar.ui index 874f5b4b..732a01b9 100644 --- a/ui/main-toolbar.ui +++ b/ui/main-toolbar.ui @@ -11,68 +11,97 @@ True False - + True False - - + True - True - False - False - Compose Message - app.compose - True + False + + Mail - + True - False - text-editor-symbolic + True + False + False + True + + + True + False + open-menu-symbolic + + + + end + 1 + - + True - True - False - False - True - - - True - False - open-menu-symbolic - - + False + vertical + - end + False + True 1 - + True - True - False - False - Toggle search bar - True + False + - + True - False - preferences-system-search-symbolic + True + False + False + Compose Message + app.compose + True + + + True + False + text-editor-symbolic + + + + + True + True + False + False + Toggle search bar + True + + + True + False + preferences-system-search-symbolic + + + + + end + 3 + + - - end - 3 - @@ -82,7 +111,7 @@ - + True False vertical @@ -342,6 +371,7 @@ + -- 2.29.2