diff --git a/src/client/components/main-window.vala b/src/client/components/main-window.vala index 7e7fe2bf..2c23bde0 100644 --- a/src/client/components/main-window.vala +++ b/src/client/components/main-window.vala @@ -11,29 +11,27 @@ public class MainWindow : Gtk.ApplicationWindow, Geary.BaseInterface { // Named actions. - public const string ACTION_ARCHIVE_CONVERSATION = "archive-conv"; + public const string ACTION_ARCHIVE_CONVERSATION = "archive-conversation"; public const string ACTION_CONVERSATION_DOWN = "down-conversation"; - public const string ACTION_CONVERSATION_LIST = "focus-conv-list"; + public const string ACTION_CONVERSATION_LIST = "focus-conversation-list"; public const string ACTION_CONVERSATION_UP = "up-conversation"; - public const string ACTION_COPY_MENU = "show-copy-menu"; - public const string ACTION_DELETE_CONVERSATION = "delete-conv"; + public const string ACTION_DELETE_CONVERSATION = "delete-conversation"; public const string ACTION_EMPTY_SPAM = "empty-spam"; public const string ACTION_EMPTY_TRASH = "empty-trash"; - public const string ACTION_FIND_IN_CONVERSATION = "conv-find"; - public const string ACTION_FORWARD_MESSAGE = "forward-message"; - public const string ACTION_MARK_AS_READ = "mark-message-read"; - public const string ACTION_MARK_AS_STARRED = "mark-message-starred"; - public const string ACTION_MARK_AS_UNREAD = "mark-message-unread"; - public const string ACTION_MARK_AS_UNSTARRED = "mark-message-unstarred"; - public const string ACTION_MOVE_MENU = "show-move-menu"; - public const string ACTION_REPLY_ALL_MESSAGE = "reply-all-message"; - public const string ACTION_REPLY_TO_MESSAGE = "reply-to-message"; - public const string ACTION_SEARCH = "search-conv"; - public const string ACTION_SHOW_MARK_MENU = "mark-message-menu"; - public const string ACTION_TOGGLE_FIND = "toggle-find"; - public const string ACTION_TOGGLE_SEARCH = "toggle-search"; - public const string ACTION_TOGGLE_SPAM = "toggle-message-spam"; - public const string ACTION_TRASH_CONVERSATION = "trash-conv"; + public const string ACTION_FIND_IN_CONVERSATION = "find-in-conversation"; + public const string ACTION_FORWARD_CONVERSATION = "forward-conversation"; + public const string ACTION_MARK_AS_READ = "mark-conversation-read"; + public const string ACTION_MARK_AS_STARRED = "mark-conversation-starred"; + public const string ACTION_MARK_AS_UNREAD = "mark-conversation-unread"; + public const string ACTION_MARK_AS_UNSTARRED = "mark-conversation-unstarred"; + public const string ACTION_REPLY_ALL_CONVERSATION = "reply-all-conversation"; + public const string ACTION_REPLY_CONVERSATION = "reply-conversation"; + public const string ACTION_SEARCH = "search"; + public const string ACTION_SHOW_COPY_MENU = "show-copy-menu"; + public const string ACTION_SHOW_MARK_MENU = "show-mark-menu"; + public const string ACTION_SHOW_MOVE_MENU = "show-move-menu"; + public const string ACTION_TOGGLE_SPAM = "toggle-conversation-spam"; + public const string ACTION_TRASH_CONVERSATION = "trash-conversation"; public const string ACTION_ZOOM = "zoom"; private const int STATUS_BAR_HEIGHT = 18; @@ -41,48 +39,49 @@ public class MainWindow : Gtk.ApplicationWindow, Geary.BaseInterface { private const int MIN_CONVERSATION_COUNT = 50; private const ActionEntry[] win_action_entries = { - {GearyApplication.ACTION_CLOSE, on_close }, - {GearyApplication.ACTION_UNDO, on_undo }, - {GearyApplication.ACTION_REDO, on_redo }, + { GearyApplication.ACTION_CLOSE, on_close }, + { GearyApplication.ACTION_UNDO, on_undo }, + { GearyApplication.ACTION_REDO, on_redo }, - {ACTION_CONVERSATION_LIST, on_conversation_list }, - {ACTION_FIND_IN_CONVERSATION, on_find_in_conversation_action }, - {ACTION_SEARCH, on_search_activated }, - {ACTION_EMPTY_SPAM, on_empty_spam }, - {ACTION_EMPTY_TRASH, on_empty_trash }, + { ACTION_CONVERSATION_LIST, on_conversation_list }, + { ACTION_FIND_IN_CONVERSATION, on_find_in_conversation_action }, + { ACTION_SEARCH, on_search_activated }, + { ACTION_EMPTY_SPAM, on_empty_spam }, + { ACTION_EMPTY_TRASH, on_empty_trash }, // Message actions - {ACTION_REPLY_TO_MESSAGE, on_reply_conversation }, - {ACTION_REPLY_ALL_MESSAGE, on_reply_all_conversation }, - {ACTION_FORWARD_MESSAGE, on_forward_conversation }, - {ACTION_ARCHIVE_CONVERSATION, on_archive_conversation }, - {ACTION_TRASH_CONVERSATION, on_trash_conversation }, - {ACTION_DELETE_CONVERSATION, on_delete_conversation }, - {ACTION_COPY_MENU, on_show_copy_menu }, - {ACTION_MOVE_MENU, on_show_move_menu }, - {ACTION_CONVERSATION_UP, on_conversation_up }, - {ACTION_CONVERSATION_DOWN, on_conversation_down }, + { ACTION_REPLY_CONVERSATION, on_reply_conversation }, + { ACTION_REPLY_ALL_CONVERSATION, on_reply_all_conversation }, + { ACTION_FORWARD_CONVERSATION, on_forward_conversation }, + { ACTION_ARCHIVE_CONVERSATION, on_archive_conversation }, + { ACTION_TRASH_CONVERSATION, on_trash_conversation }, + { ACTION_DELETE_CONVERSATION, on_delete_conversation }, + { ACTION_SHOW_COPY_MENU, on_show_copy_menu }, + { ACTION_SHOW_MOVE_MENU, on_show_move_menu }, + { ACTION_CONVERSATION_UP, on_conversation_up }, + { ACTION_CONVERSATION_DOWN, on_conversation_down }, // Message marking actions - {ACTION_SHOW_MARK_MENU, on_show_mark_menu }, - {ACTION_MARK_AS_READ, on_mark_as_read }, - {ACTION_MARK_AS_UNREAD, on_mark_as_unread }, - {ACTION_MARK_AS_STARRED, on_mark_as_starred }, - {ACTION_MARK_AS_UNSTARRED, on_mark_as_unstarred }, - {ACTION_TOGGLE_SPAM, on_mark_as_spam_toggle }, + { ACTION_SHOW_MARK_MENU, on_show_mark_menu }, + { ACTION_MARK_AS_READ, on_mark_as_read }, + { ACTION_MARK_AS_UNREAD, on_mark_as_unread }, + { ACTION_MARK_AS_STARRED, on_mark_as_starred }, + { ACTION_MARK_AS_UNSTARRED, on_mark_as_unstarred }, + { ACTION_TOGGLE_SPAM, on_mark_as_spam_toggle }, // Message viewer - {ACTION_ZOOM, on_zoom, "s" }, + { ACTION_ZOOM, on_zoom, "s" }, }; public static void add_window_accelerators(GearyApplication owner) { // Marking actions // - // Unmark is the primary action - owner.add_window_accelerators( - ACTION_MARK_AS_READ, { "U", "I" } - ); + // Unread is the primary action, so it doesn't get the + // modifier owner.add_window_accelerators( ACTION_MARK_AS_UNREAD, { "U", "U" } ); + owner.add_window_accelerators( + ACTION_MARK_AS_READ, { "U", "I" } + ); // Ephy uses Ctrl+D for bookmarking owner.add_window_accelerators( ACTION_MARK_AS_STARRED, { "D", "S" } @@ -96,21 +95,21 @@ public class MainWindow : Gtk.ApplicationWindow, Geary.BaseInterface { // Replying & forwarding owner.add_window_accelerators( - ACTION_REPLY_TO_MESSAGE, { "R", "R" } + ACTION_REPLY_CONVERSATION, { "R", "R" } ); owner.add_window_accelerators( - ACTION_REPLY_ALL_MESSAGE, { "R", "R" } + ACTION_REPLY_ALL_CONVERSATION, { "R", "R" } ); owner.add_window_accelerators( - ACTION_FORWARD_MESSAGE, { "L", "F" } + ACTION_FORWARD_CONVERSATION, { "L", "F" } ); // Moving & labelling owner.add_window_accelerators( - ACTION_COPY_MENU, { "L", "L" } + ACTION_SHOW_COPY_MENU, { "L", "L" } ); owner.add_window_accelerators( - ACTION_MOVE_MENU, { "M", "M" } + ACTION_SHOW_MOVE_MENU, { "M", "M" } ); owner.add_window_accelerators( ACTION_ARCHIVE_CONVERSATION, { "K", "A", "Y" } @@ -1085,21 +1084,21 @@ public class MainWindow : Gtk.ApplicationWindow, Geary.BaseInterface { this.current_folder != null && this.current_folder.special_folder_type != DRAFTS ); - get_action(ACTION_REPLY_TO_MESSAGE).set_enabled(reply_sensitive); - get_action(ACTION_REPLY_ALL_MESSAGE).set_enabled(reply_sensitive); - get_action(ACTION_FORWARD_MESSAGE).set_enabled(reply_sensitive); + get_action(ACTION_REPLY_CONVERSATION).set_enabled(reply_sensitive); + get_action(ACTION_REPLY_ALL_CONVERSATION).set_enabled(reply_sensitive); + get_action(ACTION_FORWARD_CONVERSATION).set_enabled(reply_sensitive); bool move_enabled = ( sensitive && (current_folder is Geary.FolderSupport.Move) ); this.main_toolbar.move_message_button.set_sensitive(move_enabled); - get_action(ACTION_MOVE_MENU).set_enabled(move_enabled); + get_action(ACTION_SHOW_MOVE_MENU).set_enabled(move_enabled); bool copy_enabled = ( sensitive && (current_folder is Geary.FolderSupport.Copy) ); this.main_toolbar.copy_message_button.set_sensitive(copy_enabled); - get_action(ACTION_COPY_MENU).set_enabled(move_enabled); + get_action(ACTION_SHOW_COPY_MENU).set_enabled(move_enabled); get_action(ACTION_ARCHIVE_CONVERSATION).set_enabled( sensitive && (current_folder is Geary.FolderSupport.Archive) @@ -1154,11 +1153,11 @@ public class MainWindow : Gtk.ApplicationWindow, Geary.BaseInterface { sensitive && (typeof(Geary.FolderSupport.Mark) in supported_operations) ); - get_action(ACTION_COPY_MENU).set_enabled( + get_action(ACTION_SHOW_COPY_MENU).set_enabled( sensitive && (supported_operations.contains(typeof(Geary.FolderSupport.Copy))) ); - get_action(ACTION_MOVE_MENU).set_enabled( + get_action(ACTION_SHOW_MOVE_MENU).set_enabled( sensitive && (supported_operations.contains(typeof(Geary.FolderSupport.Move))) ); diff --git a/src/client/conversation-list/conversation-list-view.vala b/src/client/conversation-list/conversation-list-view.vala index 3050935d..d1df162f 100644 --- a/src/client/conversation-list/conversation-list-view.vala +++ b/src/client/conversation-list/conversation-list-view.vala @@ -356,9 +356,9 @@ public class ConversationListView : Gtk.TreeView, Geary.BaseInterface { context_menu_model.append(_("_Star"), "win."+MainWindow.ACTION_MARK_AS_STARRED); Menu actions_section = new Menu(); - actions_section.append(_("_Reply"), "win."+MainWindow.ACTION_REPLY_TO_MESSAGE); - actions_section.append(_("R_eply All"), "win."+MainWindow.ACTION_REPLY_ALL_MESSAGE); - actions_section.append(_("_Forward"), "win."+MainWindow.ACTION_FORWARD_MESSAGE); + actions_section.append(_("_Reply"), "win."+MainWindow.ACTION_REPLY_CONVERSATION); + actions_section.append(_("R_eply All"), "win."+MainWindow.ACTION_REPLY_ALL_CONVERSATION); + actions_section.append(_("_Forward"), "win."+MainWindow.ACTION_FORWARD_CONVERSATION); context_menu_model.append_section(null, actions_section); // Use a popover rather than a regular context menu since diff --git a/ui/main-toolbar-menus.ui b/ui/main-toolbar-menus.ui index ca3f53b3..68f9959a 100644 --- a/ui/main-toolbar-menus.ui +++ b/ui/main-toolbar-menus.ui @@ -3,27 +3,23 @@ Mark as _Read - win.mark-message-read + win.mark-conversation-read Mark as _Unread - win.mark-message-unread + win.mark-conversation-unread _Star - win.mark-message-starred + win.mark-conversation-starred U_nstar - win.mark-message-unstarred + win.mark-conversation-unstarred - Mark as S_pam - win.mark-message-spam - - - Mark as not S_pam - win.mark-message-not-spam + Toggle as S_pam + win.toggle-conversation-spam diff --git a/ui/main-toolbar.ui b/ui/main-toolbar.ui index dcd813bd..353b9ff1 100644 --- a/ui/main-toolbar.ui +++ b/ui/main-toolbar.ui @@ -111,7 +111,7 @@ False False Reply - win.reply-to-message + win.reply-conversation True @@ -134,7 +134,7 @@ False False Reply All - win.reply-all-message + win.reply-all-conversation True @@ -157,7 +157,7 @@ False False Forward - win.forward-message + win.forward-conversation True @@ -189,7 +189,6 @@ True False False - win.mark-message-menu True @@ -288,7 +287,7 @@ True False False - win.archive-conv + win.archive-conversation archive_image True True @@ -305,7 +304,7 @@ True False False - win.trash-conv + win.trash-conversation True