From f45afac091a26a71f93ac31e977c2afecfab5d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bellegarde?= Date: Wed, 14 Sep 2022 16:21:16 +0200 Subject: [PATCH] components: Rework adapative layout by removing HdySwipeGroup HdySwipeGroup is deprecated since libhandy 1.4. - Split headerbar into 3 components - Remove HdySwipeGroups/GtkSizeGroups used for syncing headerbar with content. --- .../application/application-main-window.vala | 81 +++--- .../components-conversation-actions.vala | 2 +- .../components-headerbar-application.vala | 33 +++ ...omponents-headerbar-conversation-list.vala | 37 +++ .../components-headerbar-conversation.vala | 59 +++++ .../components/components-main-toolbar.vala | 131 ---------- src/client/composer/composer-box.vala | 10 +- .../conversation-viewer.vala | 2 +- src/client/meson.build | 4 +- ui/application-main-window.ui | 81 +++--- ui/components-headerbar-application.ui | 27 ++ ui/components-headerbar-conversation-list.ui | 67 +++++ ui/components-headerbar-conversation.ui | 76 ++++++ ui/components-main-toolbar.ui | 235 ------------------ ...enus.ui => components-menu-application.ui} | 24 +- ui/components-menu-conversation.ui | 25 ++ ui/org.gnome.Geary.gresource.xml | 7 +- 17 files changed, 403 insertions(+), 498 deletions(-) create mode 100644 src/client/components/components-headerbar-application.vala create mode 100644 src/client/components/components-headerbar-conversation-list.vala create mode 100644 src/client/components/components-headerbar-conversation.vala delete mode 100644 src/client/components/components-main-toolbar.vala create mode 100644 ui/components-headerbar-application.ui create mode 100644 ui/components-headerbar-conversation-list.ui create mode 100644 ui/components-headerbar-conversation.ui delete mode 100644 ui/components-main-toolbar.ui rename ui/{components-main-toolbar-menus.ui => components-menu-application.ui} (54%) create mode 100644 ui/components-menu-conversation.ui diff --git a/src/client/application/application-main-window.vala b/src/client/application/application-main-window.vala index 9afffb45..1d7daa93 100644 --- a/src/client/application/application-main-window.vala +++ b/src/client/application/application-main-window.vala @@ -354,7 +354,6 @@ public class Application.MainWindow : // Widget descendants public FolderList.Tree folder_list { get; private set; default = new FolderList.Tree(); } - public Components.MainToolbar main_toolbar { get; private set; } public SearchBar search_bar { get; private set; } public ConversationListView conversation_list_view { get; private set; } public ConversationViewer conversation_viewer { get; private set; } @@ -389,8 +388,9 @@ public class Application.MainWindow : private Geary.TimeoutManager update_ui_timeout; private int64 update_ui_last = 0; - - [GtkChild] private unowned Gtk.Box main_layout; + [GtkChild] private unowned Components.ApplicationHeaderBar application_headerbar; + [GtkChild] private unowned Components.ConversationListHeaderBar conversation_list_headerbar; + [GtkChild] public unowned Components.ConversationHeaderBar conversation_headerbar; // Folds the inner leaftlet and conversation viewer [GtkChild] private unowned Hdy.Leaflet outer_leaflet; @@ -408,28 +408,17 @@ public class Application.MainWindow : [GtkChild] private unowned Gtk.Box conversation_viewer_box; [GtkChild] private unowned Gtk.Revealer conversation_viewer_actions_revealer; - [GtkChild] private unowned Gtk.SizeGroup folder_size_group; - [GtkChild] private unowned Gtk.SizeGroup folder_separator_size_group; - [GtkChild] private unowned Gtk.SizeGroup conversations_size_group; - [GtkChild] private unowned Gtk.SizeGroup conversations_separator_size_group; - [GtkChild] private unowned Gtk.SizeGroup conversation_size_group; - [GtkChild] private unowned Hdy.SwipeGroup conversations_swipe_group; - [GtkChild] private unowned Hdy.SwipeGroup conversation_swipe_group; [GtkChild] private unowned Gtk.Overlay overlay; + [GtkChild] private unowned Components.InfoBarStack info_bars; + private Components.ConversationActions[] folder_conversation_actions = {}; private FolderPopover[] folder_popovers = {}; - private Components.InfoBarStack info_bars = - new Components.InfoBarStack(SINGLE); - private Components.InfoBar offline_infobar; - private Components.InfoBar cert_problem_infobar; - private Components.InfoBar auth_problem_infobar; - private Components.ProblemReportInfoBar? service_problem_infobar = null; /** Fired when the user requests an account status be retried. */ @@ -715,8 +704,8 @@ public class Application.MainWindow : title = _("%s — %s").printf(folder_name, account_name); } this.title = title; - this.main_toolbar.account = account_name ?? ""; - this.main_toolbar.folder = folder_name?? ""; + this.conversation_list_headerbar.account = account_name ?? ""; + this.conversation_list_headerbar.folder = folder_name?? ""; } /** Updates the window's account status info bars. */ @@ -954,7 +943,7 @@ public class Application.MainWindow : if (this.inner_leaflet.folded) { this.inner_leaflet.navigate(Hdy.NavigationDirection.BACK); } - this.main_toolbar.show_main_menu(); + this.application_headerbar.show_app_menu(); } /** Displays and focuses the search bar for the window. */ @@ -1367,41 +1356,24 @@ public class Application.MainWindow : this.conversation_viewer.hexpand = true; this.conversation_viewer_box.add(this.conversation_viewer); - // Main toolbar - this.main_toolbar = new Components.MainToolbar(config); - this.main_toolbar.add_to_size_groups(this.folder_size_group, - this.folder_separator_size_group, - 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.bind_property( + this.conversation_list_headerbar.bind_property( "search-open", this.search_bar, "search-mode-enabled", SYNC_CREATE | BIDIRECTIONAL ); - this.main_toolbar.bind_property( + this.conversation_headerbar.bind_property( "find-open", this.conversation_viewer.conversation_find_bar, "search-mode-enabled", SYNC_CREATE | BIDIRECTIONAL ); - this.main_toolbar.notify["shown-actions"].connect( + this.conversation_headerbar.notify["shown-actions"].connect( () => { this.conversation_viewer_actions_revealer.reveal_child = ( - this.main_toolbar.shown_actions == - this.main_toolbar.compact_actions + this.conversation_headerbar.shown_actions == + this.conversation_headerbar.compact_actions ); } ); - if (config.desktop_environment == UNITY) { - this.main_toolbar.show_close_button = false; - this.main_layout.pack_start(main_toolbar, false, true, 0); - } else { - this.main_layout.pack_start(main_toolbar, false, true, 0); - } - - this.main_layout.pack_start(this.info_bars, false, true, 0); // Status bar this.status_bar.set_size_request(-1, STATUS_BAR_HEIGHT); @@ -1412,7 +1384,7 @@ public class Application.MainWindow : this.status_bar.show_all(); this.folder_conversation_actions = { - this.main_toolbar.full_actions, + this.conversation_headerbar.full_actions, this.conversation_list_actions }; foreach (var actions in this.folder_conversation_actions) { @@ -1645,8 +1617,8 @@ public class Application.MainWindow : this.conversation_list_view.select_conversations(to_select); this.conversation_list_actions.selected_conversations = to_select.size; - this.main_toolbar.full_actions.selected_conversations = to_select.size; - this.main_toolbar.compact_actions.selected_conversations = to_select.size; + this.conversation_headerbar.full_actions.selected_conversations = to_select.size; + this.conversation_headerbar.compact_actions.selected_conversations = to_select.size; if (this.selected_folder != null && !this.has_composer) { switch(to_select.size) { @@ -1833,8 +1805,8 @@ public class Application.MainWindow : } if (count > 0) { - this.main_toolbar.folder = _("%s (%d)").printf( - this.main_toolbar.folder, count + this.conversation_list_headerbar.folder = _("%s (%d)").printf( + this.conversation_list_headerbar.folder, count ); } } @@ -1914,7 +1886,7 @@ public class Application.MainWindow : this.selected_folder_supports_trash ); this.conversation_list_actions.update_trash_button(show_trash); - this.main_toolbar.full_actions.update_trash_button(show_trash); + this.conversation_headerbar.full_actions.update_trash_button(show_trash); } private async void update_context_dependent_actions(bool sensitive) { @@ -2147,12 +2119,15 @@ public class Application.MainWindow : ConversationCount.for_size(selected) ); if (this.outer_leaflet.folded) { + this.conversation_list_headerbar.show_close_button = true; // Ensure something useful gets the keyboard focus, given // GNOME/libhandy#179 if (this.is_conversation_list_shown) { this.conversation_list_view.grab_focus(); } else if (this.is_folder_list_shown) { this.folder_list.grab_focus(); + } else { + this.conversation_headerbar.back_button.visible = true; } // Close any open composer that is no longer visible @@ -2160,19 +2135,27 @@ public class Application.MainWindow : (this.is_folder_list_shown || this.is_conversation_list_shown)) { close_composer(false, false); } + } else { + this.conversation_list_headerbar.show_close_button = false; + this.conversation_headerbar.back_button.visible = false; } } [GtkCallback] private void on_inner_leaflet_changed() { if (this.inner_leaflet.folded) { + this.application_headerbar.show_close_button = true; // Ensure something useful gets the keyboard focus, given // GNOME/libhandy#179 if (this.is_conversation_list_shown) { + this.conversation_list_headerbar.back_button.visible = true; this.conversation_list_view.grab_focus(); } else if (this.is_folder_list_shown) { this.folder_list.grab_focus(); } + } else { + this.application_headerbar.show_close_button = false; + this.conversation_list_headerbar.back_button.visible = false; } } @@ -2454,7 +2437,7 @@ public class Application.MainWindow : this.conversation_list_actions_revealer.child_revealed) { this.conversation_list_actions.show_copy_menu(); } else if (this.is_conversation_viewer_shown) { - this.main_toolbar.shown_actions.show_copy_menu(); + this.conversation_headerbar.shown_actions.show_copy_menu(); } else { error_bell(); } @@ -2465,7 +2448,7 @@ public class Application.MainWindow : this.conversation_list_actions_revealer.child_revealed) { this.conversation_list_actions.show_move_menu(); } else if (this.is_conversation_viewer_shown) { - this.main_toolbar.shown_actions.show_move_menu(); + this.conversation_headerbar.shown_actions.show_move_menu(); } else { error_bell(); } diff --git a/src/client/components/components-conversation-actions.vala b/src/client/components/components-conversation-actions.vala index e5931614..7adb6afc 100644 --- a/src/client/components/components-conversation-actions.vala +++ b/src/client/components/components-conversation-actions.vala @@ -51,7 +51,7 @@ public class Components.ConversationActions : Gtk.Box { construct { // Assemble the mark menus Gtk.Builder menu_builder = new Gtk.Builder.from_resource( - "/org/gnome/Geary/components-main-toolbar-menus.ui" + "/org/gnome/Geary/components-menu-conversation.ui" ); GLib.MenuModel mark_menu = (MenuModel) menu_builder.get_object( "mark_message_menu" diff --git a/src/client/components/components-headerbar-application.vala b/src/client/components/components-headerbar-application.vala new file mode 100644 index 00000000..39ca1312 --- /dev/null +++ b/src/client/components/components-headerbar-application.vala @@ -0,0 +1,33 @@ +/* + * Copyright © 2017 Software Freedom Conservancy Inc. + * Copyright © 2021 Michael Gratton + * Copyright © 2022 Cédric Bellegarde + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ + + +/** + * The Application HeaderBar + * + * @see Application.MainWindow + */ +[GtkTemplate (ui = "/org/gnome/Geary/components-headerbar-application.ui")] +public class Components.ApplicationHeaderBar : Hdy.HeaderBar { + + [GtkChild] private unowned Gtk.MenuButton app_menu_button; + + + construct { + Gtk.Builder builder = new Gtk.Builder.from_resource("/org/gnome/Geary/components-menu-application.ui"); + MenuModel app_menu = (MenuModel) builder.get_object("app_menu"); + + this.app_menu_button.popover = new Gtk.Popover.from_model(null, app_menu); + } + + public void show_app_menu() { + this.app_menu_button.clicked(); + } + +} diff --git a/src/client/components/components-headerbar-conversation-list.vala b/src/client/components/components-headerbar-conversation-list.vala new file mode 100644 index 00000000..319b2a4e --- /dev/null +++ b/src/client/components/components-headerbar-conversation-list.vala @@ -0,0 +1,37 @@ +/* + * Copyright © 2017 Software Freedom Conservancy Inc. + * Copyright © 2021 Michael Gratton + * Copyright © 2022 Cédric Bellegarde + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ + + +/** + * The conversation list headerbar. + * + * @see Application.MainWindow + */ +[GtkTemplate (ui = "/org/gnome/Geary/components-headerbar-conversation-list.ui")] +public class Components.ConversationListHeaderBar : Hdy.HeaderBar { + + public string account { get; set; } + public string folder { get; set; } + public bool search_open { get; set; default = false; } + + [GtkChild] private unowned Gtk.ToggleButton search_button; + [GtkChild] public unowned Gtk.Button back_button; + + + construct { + this.bind_property("account", this, "title", BindingFlags.SYNC_CREATE); + this.bind_property("folder", this, "subtitle", BindingFlags.SYNC_CREATE); + + this.bind_property( + "search-open", + this.search_button, "active", + SYNC_CREATE | BIDIRECTIONAL + ); + } +} diff --git a/src/client/components/components-headerbar-conversation.vala b/src/client/components/components-headerbar-conversation.vala new file mode 100644 index 00000000..6179f031 --- /dev/null +++ b/src/client/components/components-headerbar-conversation.vala @@ -0,0 +1,59 @@ +/* + * Copyright © 2017 Software Freedom Conservancy Inc. + * Copyright © 2021 Michael Gratton + * Copyright © 2022 Cédric Bellegarde + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ + + +/** + * The conversations headerbar. + * + * @see Application.MainWindow + */ +[GtkTemplate (ui = "/org/gnome/Geary/components-headerbar-conversation.ui")] +public class Components.ConversationHeaderBar : Gtk.Bin { + + public bool find_open { get; set; default = false; } + + public ConversationActions shown_actions { + get { + return (ConversationActions) this.actions_squeezer.visible_child; + } + } + + [GtkChild] private unowned Hdy.Squeezer actions_squeezer; + [GtkChild] public unowned ConversationActions full_actions; + [GtkChild] public unowned ConversationActions compact_actions; + + [GtkChild] private unowned Gtk.ToggleButton find_button; + [GtkChild] public unowned Gtk.Button back_button; + + [GtkChild] private unowned Hdy.HeaderBar conversation_header; + + + construct { + this.actions_squeezer.notify["visible-child"].connect_after( + () => { notify_property("shown-actions"); } + ); + + this.bind_property( + "find-open", + this.find_button, "active", + SYNC_CREATE | BIDIRECTIONAL + ); + } + + public void set_conversation_header(Hdy.HeaderBar header) { + remove(this.conversation_header); + header.hexpand = true; + add(header); + } + + public void remove_conversation_header(Hdy.HeaderBar header) { + remove(header); + add(this.conversation_header); + } +} diff --git a/src/client/components/components-main-toolbar.vala b/src/client/components/components-main-toolbar.vala deleted file mode 100644 index a66e9888..00000000 --- a/src/client/components/components-main-toolbar.vala +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright © 2017 Software Freedom Conservancy Inc. - * Copyright © 2021 Michael Gratton - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - - -/** - * The toolbar for the main window. - * - * @see Application.MainWindow - */ -[GtkTemplate (ui = "/org/gnome/Geary/components-main-toolbar.ui")] -public class Components.MainToolbar : Hdy.Leaflet { - - - public string account { get; set; } - - public string folder { get; set; } - - public bool show_close_button { get; set; default = true; } - - public bool search_open { get; set; default = false; } - - public bool find_open { get; set; default = false; } - - public ConversationActions shown_actions { - get { - return (ConversationActions) this.actions_squeezer.visible_child; - } - } - - [GtkChild] public unowned ConversationActions full_actions; - [GtkChild] public unowned ConversationActions compact_actions; - - [GtkChild] private unowned Hdy.Leaflet conversations_leaflet; - - // Folder header elements - [GtkChild] private unowned Hdy.HeaderBar folder_header; - [GtkChild] private unowned Gtk.MenuButton main_menu_button; - - [GtkChild] private unowned Gtk.Separator folder_separator; - - // Conversation list header elements - [GtkChild] private unowned Hdy.HeaderBar conversations_header; - [GtkChild] private unowned Gtk.ToggleButton search_button; - - [GtkChild] private unowned Gtk.Separator conversations_separator; - - // Conversation viewer header elements - [GtkChild] private unowned Hdy.HeaderBar conversation_header; - [GtkChild] private unowned Hdy.Squeezer actions_squeezer; - [GtkChild] private unowned Gtk.ToggleButton find_button; - - [GtkChild] private unowned Hdy.HeaderGroup header_group; - - private Gtk.SizeGroup conversation_group; - - - public MainToolbar(Application.Configuration config) { - if (config.desktop_environment != UNITY) { - 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 - Gtk.Builder builder = new Gtk.Builder.from_resource("/org/gnome/Geary/components-main-toolbar-menus.ui"); - MenuModel main_menu = (MenuModel) builder.get_object("main_menu"); - - this.main_menu_button.popover = new Gtk.Popover.from_model(null, main_menu); - this.bind_property( - "search-open", - this.search_button, "active", - SYNC_CREATE | BIDIRECTIONAL - ); - this.bind_property( - "find-open", - this.find_button, "active", - SYNC_CREATE | BIDIRECTIONAL - ); - - this.actions_squeezer.notify["visible-child"].connect_after( - () => { notify_property("shown-actions"); } - ); - } - - public void set_conversation_header(Hdy.HeaderBar header) { - remove(conversation_header); - this.header_group.add_header_bar(header); - header.hexpand = true; - conversation_group.remove_widget(conversation_header); - conversation_group.add_widget(header); - add(header); - child_set(header, "name", "conversation", null); - } - - public void remove_conversation_header(Hdy.HeaderBar header) { - remove(header); - this.header_group.remove_header_bar(header); - conversation_group.remove_widget(header); - conversation_group.add_widget(conversation_header); - add(conversation_header); - child_set(conversation_header, "name", "conversation", null); - } - - 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); - this.conversation_group = conversation_group; - } - - 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); - } - - public void show_main_menu() { - this.main_menu_button.clicked(); - } - -} diff --git a/src/client/composer/composer-box.vala b/src/client/composer/composer-box.vala index 2addc0c1..dfe5a5ca 100644 --- a/src/client/composer/composer-box.vala +++ b/src/client/composer/composer-box.vala @@ -27,19 +27,19 @@ public class Composer.Box : Gtk.Frame, Container { /** {@inheritDoc} */ internal Widget composer { get; set; } - private Components.MainToolbar main_toolbar { get; private set; } + private Components.ConversationHeaderBar headerbar { get; private set; } /** Emitted when the container is closed. */ public signal void vanished(); - public Box(Widget composer, Components.MainToolbar main_toolbar) { + public Box(Widget composer, Components.ConversationHeaderBar headerbar) { this.composer = composer; this.composer.set_mode(PANED); - this.main_toolbar = main_toolbar; - this.main_toolbar.set_conversation_header(composer.header); + this.headerbar = headerbar; + this.headerbar.set_conversation_header(composer.header); get_style_context().add_class("geary-composer-box"); this.halign = Gtk.Align.FILL; @@ -54,7 +54,7 @@ public class Composer.Box : Gtk.Frame, Container { public void close() { vanished(); - this.main_toolbar.remove_conversation_header(composer.header); + this.headerbar.remove_conversation_header(composer.header); remove(this.composer); destroy(); } diff --git a/src/client/conversation-viewer/conversation-viewer.vala b/src/client/conversation-viewer/conversation-viewer.vala index e3a9825e..983d6539 100644 --- a/src/client/conversation-viewer/conversation-viewer.vala +++ b/src/client/conversation-viewer/conversation-viewer.vala @@ -150,7 +150,7 @@ public class ConversationViewer : Gtk.Stack, Geary.BaseInterface { var main_window = get_toplevel() as Application.MainWindow; if (main_window != null) { Composer.Box box = new Composer.Box( - composer, main_window.main_toolbar + composer, main_window.conversation_headerbar ); this.current_composer = composer; diff --git a/src/client/meson.build b/src/client/meson.build index 628201a1..419e7f4d 100644 --- a/src/client/meson.build +++ b/src/client/meson.build @@ -49,6 +49,9 @@ client_vala_sources = files( 'components/components-attachment-pane.vala', 'components/components-conversation-actions.vala', 'components/components-entry-undo.vala', + 'components/components-headerbar-application.vala', + 'components/components-headerbar-conversation-list.vala', + 'components/components-headerbar-conversation.vala', 'components/components-info-bar-stack.vala', 'components/components-info-bar.vala', 'components/components-inspector.vala', @@ -56,7 +59,6 @@ client_vala_sources = files( 'components/components-inspector-error-view.vala', 'components/components-inspector-log-view.vala', 'components/components-inspector-system-view.vala', - 'components/components-main-toolbar.vala', 'components/components-placeholder-pane.vala', 'components/components-preferences-window.vala', 'components/components-problem-report-info-bar.vala', diff --git a/ui/application-main-window.ui b/ui/application-main-window.ui index dc841501..70ca4f7c 100644 --- a/ui/application-main-window.ui +++ b/ui/application-main-window.ui @@ -36,6 +36,14 @@ True vertical + + + True + + + 0 + + True @@ -54,7 +62,7 @@ True - 0 + 1 @@ -78,6 +86,14 @@ True vertical + + + True + + + 0 + + True @@ -149,6 +165,14 @@ True True vertical + + + True + + + 0 + + True @@ -175,12 +199,15 @@ True True - end - 0 + start - + + + + end + - - - - - - - - horizontal - - - - - - horizontal - - - - - - horizontal - - - - - - horizontal - - - - - - horizontal - - - - - - - - - - - - - - diff --git a/ui/components-headerbar-application.ui b/ui/components-headerbar-application.ui new file mode 100644 index 00000000..96c62194 --- /dev/null +++ b/ui/components-headerbar-application.ui @@ -0,0 +1,27 @@ + + + + + + diff --git a/ui/components-headerbar-conversation-list.ui b/ui/components-headerbar-conversation-list.ui new file mode 100644 index 00000000..9addaab6 --- /dev/null +++ b/ui/components-headerbar-conversation-list.ui @@ -0,0 +1,67 @@ + + + + + + diff --git a/ui/components-headerbar-conversation.ui b/ui/components-headerbar-conversation.ui new file mode 100644 index 00000000..adfc946a --- /dev/null +++ b/ui/components-headerbar-conversation.ui @@ -0,0 +1,76 @@ + + + + + + diff --git a/ui/components-main-toolbar.ui b/ui/components-main-toolbar.ui deleted file mode 100644 index fa51f628..00000000 --- a/ui/components-main-toolbar.ui +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ui/components-main-toolbar-menus.ui b/ui/components-menu-application.ui similarity index 54% rename from ui/components-main-toolbar-menus.ui rename to ui/components-menu-application.ui index ebbc72f0..8be1d7a3 100644 --- a/ui/components-main-toolbar-menus.ui +++ b/ui/components-menu-application.ui @@ -1,28 +1,6 @@ - - - Mark as _Read - win.mark-conversation-read - - - Mark as _Unread - win.mark-conversation-unread - - - _Star - win.mark-conversation-starred - - - U_nstar - win.mark-conversation-unstarred - - - Toggle as _Junk - win.toggle-conversation-junk - - - +
_Accounts diff --git a/ui/components-menu-conversation.ui b/ui/components-menu-conversation.ui new file mode 100644 index 00000000..6fcbc177 --- /dev/null +++ b/ui/components-menu-conversation.ui @@ -0,0 +1,25 @@ + + + + + Mark as _Read + win.mark-conversation-read + + + Mark as _Unread + win.mark-conversation-unread + + + _Star + win.mark-conversation-starred + + + U_nstar + win.mark-conversation-unstarred + + + Toggle as _Junk + win.toggle-conversation-junk + + + diff --git a/ui/org.gnome.Geary.gresource.xml b/ui/org.gnome.Geary.gresource.xml index 3af61ca7..a486d1fa 100644 --- a/ui/org.gnome.Geary.gresource.xml +++ b/ui/org.gnome.Geary.gresource.xml @@ -13,14 +13,17 @@ components-attachment-pane-menus.ui components-attachment-view.ui components-conversation-actions.ui + components-headerbar-application.ui + components-headerbar-conversation-list.ui + components-headerbar-conversation.ui components-in-app-notification.ui components-info-bar.ui components-inspector.ui components-inspector-error-view.ui components-inspector-log-view.ui components-inspector-system-view.ui - components-main-toolbar.ui - components-main-toolbar-menus.ui + components-menu-application.ui + components-menu-conversation.ui components-placeholder-pane.ui composer-editor.ui composer-editor-menus.ui