[geary/wip/730682-refine-convo-list: 28/37] Rename conversation-specific actions/widgets to reflect convos, not messages.



commit 433827a714d094fa15ddaf54b8bef90ab06794cb
Author: Michael James Gratton <mike vee net>
Date:   Mon Dec 11 16:07:19 2017 +1100

    Rename conversation-specific actions/widgets to reflect convos, not messages.

 src/client/application/geary-controller.vala |   18 ++++----
 src/client/components/main-toolbar.vala      |   58 +++++++++++++++-----------
 ui/main-toolbar-menus.ui                     |   14 +++---
 ui/main-toolbar.ui                           |    8 ++--
 4 files changed, 53 insertions(+), 45 deletions(-)
---
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index 1ba0e7a..361487d 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -33,13 +33,13 @@ public class GearyController : Geary.BaseObject {
     public const string ACTION_UNDO = "undo";
     public const string ACTION_FIND_IN_CONVERSATION = "conv-find";
     public const string ACTION_ZOOM = "zoom";
-    public const string ACTION_SHOW_MARK_MENU = "mark-message-menu";
-    public const string ACTION_MARK_AS_READ = "mark-message-read";
-    public const string ACTION_MARK_AS_UNREAD = "mark-message-unread";
-    public const string ACTION_MARK_AS_STARRED = "mark-message-starred";
-    public const string ACTION_MARK_AS_UNSTARRED = "mark-message-unstarred";
-    public const string ACTION_MARK_AS_SPAM = "mark-message-spam";
-    public const string ACTION_MARK_AS_NOT_SPAM = "mark-message-not-spam";
+    public const string ACTION_SHOW_MARK_MENU = "mark-conversation-menu";
+    public const string ACTION_MARK_AS_READ = "mark-conversation-read";
+    public const string ACTION_MARK_AS_UNREAD = "mark-conversation-unread";
+    public const string ACTION_MARK_AS_STARRED = "mark-conversation-starred";
+    public const string ACTION_MARK_AS_UNSTARRED = "mark-conversation-unstarred";
+    public const string ACTION_MARK_AS_SPAM = "mark-conversation-spam";
+    public const string ACTION_MARK_AS_NOT_SPAM = "mark-conversation-not-spam";
     public const string ACTION_COPY_MENU = "show-copy-menu";
     public const string ACTION_MOVE_MENU = "show-move-menu";
     public const string ACTION_SEARCH = "search-conv";
@@ -1721,11 +1721,11 @@ public class GearyController : Geary.BaseObject {
     }
 
     private void on_show_move_menu(SimpleAction? action) {
-        this.main_window.main_toolbar.copy_message_button.clicked();
+        this.main_window.main_toolbar.copy_conversation_button.clicked();
     }
 
     private void on_show_copy_menu(SimpleAction? action) {
-        this.main_window.main_toolbar.move_message_button.clicked();
+        this.main_window.main_toolbar.move_conversation_button.clicked();
     }
 
     private async void mark_as_spam_toggle_async(Cancellable? cancellable) {
diff --git a/src/client/components/main-toolbar.vala b/src/client/components/main-toolbar.vala
index 67fc5d5..795a3a3 100644
--- a/src/client/components/main-toolbar.vala
+++ b/src/client/components/main-toolbar.vala
@@ -45,11 +45,11 @@ public class MainToolbar : Gtk.Box {
     [GtkChild]
     private Gtk.HeaderBar conversation_header;
     [GtkChild]
-    private Gtk.MenuButton mark_message_button;
+    private Gtk.MenuButton mark_conversation_button;
     [GtkChild]
-    public Gtk.MenuButton copy_message_button;
+    public Gtk.MenuButton copy_conversation_button;
     [GtkChild]
-    public Gtk.MenuButton move_message_button;
+    public Gtk.MenuButton move_conversation_button;
     [GtkChild]
     private Gtk.Button archive_button;
     [GtkChild]
@@ -72,12 +72,12 @@ public class MainToolbar : Gtk.Box {
     private const string TRASH_CONVERSATION_TOOLTIP_MULTIPLE = _("Move conversations to Trash (Delete, 
Backspace)");
     private const string ARCHIVE_CONVERSATION_TOOLTIP_SINGLE = _("Archive conversation (A)");
     private const string ARCHIVE_CONVERSATION_TOOLTIP_MULTIPLE = _("Archive conversations (A)");
-    private const string MARK_MESSAGE_MENU_TOOLTIP_SINGLE = _("Mark conversation");
-    private const string MARK_MESSAGE_MENU_TOOLTIP_MULTIPLE = _("Mark conversations");
-    private const string LABEL_MESSAGE_TOOLTIP_SINGLE = _("Add label to conversation");
-    private const string LABEL_MESSAGE_TOOLTIP_MULTIPLE = _("Add label to conversations");
-    private const string MOVE_MESSAGE_TOOLTIP_SINGLE = _("Move conversation");
-    private const string MOVE_MESSAGE_TOOLTIP_MULTIPLE = _("Move conversations");
+    private const string MARK_CONVERSATION_MENU_TOOLTIP_SINGLE = _("Mark conversation");
+    private const string MARK_CONVERSATION_MENU_TOOLTIP_MULTIPLE = _("Mark conversations");
+    private const string LABEL_CONVERSATION_TOOLTIP_SINGLE = _("Add label to conversation");
+    private const string LABEL_CONVERSATION_TOOLTIP_MULTIPLE = _("Add label to conversations");
+    private const string MOVE_CONVERSATION_TOOLTIP_SINGLE = _("Move conversation");
+    private const string MOVE_CONVERSATION_TOOLTIP_MULTIPLE = _("Move conversations");
 
     public MainToolbar(Configuration config) {
         // Instead of putting a separator between the two headerbars, as other applications do,
@@ -105,7 +105,7 @@ public class MainToolbar : Gtk.Box {
         // Assemble the empty/mark menus
         Gtk.Builder builder = new Gtk.Builder.from_resource("/org/gnome/Geary/main-toolbar-menus.ui");
         MenuModel empty_menu = (MenuModel) builder.get_object("empty_menu");
-        MenuModel mark_menu = (MenuModel) builder.get_object("mark_message_menu");
+        MenuModel mark_menu = (MenuModel) builder.get_object("mark_conversation_menu");
 
         // Setup folder header elements
         this.empty_menu_button.popover = new Gtk.Popover.from_model(null, empty_menu);
@@ -115,9 +115,9 @@ public class MainToolbar : Gtk.Box {
         // Setup conversation header elements
         this.notify["selected-conversations"].connect(() => update_conversation_buttons());
         this.notify["show-trash-button"].connect(() => update_conversation_buttons());
-        this.mark_message_button.popover = new Gtk.Popover.from_model(null, mark_menu);
-        this.copy_message_button.popover = copy_folder_menu;
-        this.move_message_button.popover = move_folder_menu;
+        this.mark_conversation_button.popover = new Gtk.Popover.from_model(null, mark_menu);
+        this.copy_conversation_button.popover = copy_folder_menu;
+        this.move_conversation_button.popover = move_folder_menu;
 
         this.bind_property("find-open", this.find_button, "active",
             BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL);
@@ -160,18 +160,26 @@ public class MainToolbar : Gtk.Box {
 
     // Updates tooltip text depending on number of conversations selected.
     private void update_conversation_buttons() {
-        this.mark_message_button.tooltip_text = ngettext(MARK_MESSAGE_MENU_TOOLTIP_SINGLE,
-                                                         MARK_MESSAGE_MENU_TOOLTIP_MULTIPLE,
-                                                         this.selected_conversations);
-        this.copy_message_button.tooltip_text = ngettext(LABEL_MESSAGE_TOOLTIP_SINGLE,
-                                                         LABEL_MESSAGE_TOOLTIP_MULTIPLE,
-                                                         this.selected_conversations);
-        this.move_message_button.tooltip_text = ngettext(MOVE_MESSAGE_TOOLTIP_SINGLE,
-                                                         MOVE_MESSAGE_TOOLTIP_MULTIPLE,
-                                                         this.selected_conversations);
-        this.archive_button.tooltip_text = ngettext(ARCHIVE_CONVERSATION_TOOLTIP_SINGLE,
-                                                    ARCHIVE_CONVERSATION_TOOLTIP_MULTIPLE,
-                                                    this.selected_conversations);
+        this.mark_conversation_button.tooltip_text = ngettext(
+            MARK_CONVERSATION_MENU_TOOLTIP_SINGLE,
+            MARK_CONVERSATION_MENU_TOOLTIP_MULTIPLE,
+            this.selected_conversations
+        );
+        this.copy_conversation_button.tooltip_text = ngettext(
+            LABEL_CONVERSATION_TOOLTIP_SINGLE,
+            LABEL_CONVERSATION_TOOLTIP_MULTIPLE,
+            this.selected_conversations
+        );
+        this.move_conversation_button.tooltip_text = ngettext(
+            MOVE_CONVERSATION_TOOLTIP_SINGLE,
+            MOVE_CONVERSATION_TOOLTIP_MULTIPLE,
+            this.selected_conversations
+        );
+        this.archive_button.tooltip_text = ngettext(
+            ARCHIVE_CONVERSATION_TOOLTIP_SINGLE,
+            ARCHIVE_CONVERSATION_TOOLTIP_MULTIPLE,
+            this.selected_conversations
+        );
 
         if (this.show_trash_button) {
             this.trash_delete_button.action_name = "win."+GearyController.ACTION_TRASH_CONVERSATION;
diff --git a/ui/main-toolbar-menus.ui b/ui/main-toolbar-menus.ui
index dea30cc..20e262f 100644
--- a/ui/main-toolbar-menus.ui
+++ b/ui/main-toolbar-menus.ui
@@ -11,30 +11,30 @@
     </item>
   </menu>
 
-  <menu id="mark_message_menu">
+  <menu id="mark_conversation_menu">
     <item>
       <attribute name="label" translatable="yes">Mark as _Read</attribute>
-      <attribute name="action">win.mark-message-read</attribute>
+      <attribute name="action">win.mark-conversation-read</attribute>
     </item>
     <item>
       <attribute name="label" translatable="yes">Mark as _Unread</attribute>
-      <attribute name="action">win.mark-message-unread</attribute>
+      <attribute name="action">win.mark-conversation-unread</attribute>
     </item>
     <item>
       <attribute name="label" translatable="yes">_Star</attribute>
-      <attribute name="action">win.mark-message-starred</attribute>
+      <attribute name="action">win.mark-conversation-starred</attribute>
     </item>
     <item>
       <attribute name="label" translatable="yes">U_nstar</attribute>
-      <attribute name="action">win.mark-message-unstarred</attribute>
+      <attribute name="action">win.mark-conversation-unstarred</attribute>
     </item>
     <item>
       <attribute name="label" translatable="yes">Mark as S_pam</attribute>
-      <attribute name="action">win.mark-message-spam</attribute>
+      <attribute name="action">win.mark-conversation-spam</attribute>
     </item>
     <item>
       <attribute name="label" translatable="yes">Mark as not S_pam</attribute>
-      <attribute name="action">win.mark-message-not-spam</attribute>
+      <attribute name="action">win.mark-conversation-not-spam</attribute>
     </item>
   </menu>
 </interface>
diff --git a/ui/main-toolbar.ui b/ui/main-toolbar.ui
index 030f59c..500b189 100644
--- a/ui/main-toolbar.ui
+++ b/ui/main-toolbar.ui
@@ -177,12 +177,12 @@
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <child>
-              <object class="GtkMenuButton" id="mark_message_button">
+              <object class="GtkMenuButton" id="mark_conversation_button">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="focus_on_click">False</property>
                 <property name="receives_default">False</property>
-                <property name="action_name">win.mark-message-menu</property>
+                <property name="action_name">win.mark-conversation-menu</property>
                 <property name="always_show_image">True</property>
                 <child>
                   <object class="GtkImage" id="mark_message_image">
@@ -198,7 +198,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkMenuButton" id="copy_message_button">
+              <object class="GtkMenuButton" id="copy_conversation_button">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="focus_on_click">False</property>
@@ -218,7 +218,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkMenuButton" id="move_message_button">
+              <object class="GtkMenuButton" id="move_conversation_button">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="focus_on_click">False</property>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]