[geary] Remove 'EmptyMenu'-action. Bug 775018.



commit 9f331c46397ae8c387313acc2a2c536050a05953
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Thu Nov 24 16:27:43 2016 +0100

    Remove 'EmptyMenu'-action. Bug 775018.
    
    Signed-off-by: Niels De Graef <nielsdegraef gmail com>

 src/client/application/geary-controller.vala |    7 -------
 src/client/components/main-toolbar.vala      |    2 +-
 ui/main-toolbar.ui                           |    6 ++++++
 3 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index 2229089..03e2383 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -30,7 +30,6 @@ public class GearyController : Geary.BaseObject {
     public const string ACTION_ARCHIVE_MESSAGE = "GearyArchiveMessage";
     public const string ACTION_TRASH_MESSAGE = "GearyTrashMessage";
     public const string ACTION_DELETE_MESSAGE = "GearyDeleteMessage";
-    public const string ACTION_EMPTY_MENU = "GearyEmptyMenu";
     public const string ACTION_EMPTY_SPAM = "GearyEmptySpam";
     public const string ACTION_EMPTY_TRASH = "GearyEmptyTrash";
     public const string ACTION_UNDO = "GearyUndo";
@@ -519,12 +518,6 @@ public class GearyController : Geary.BaseObject {
         entries += delete_message;
         add_accelerator("<Shift>BackSpace", ACTION_DELETE_MESSAGE);
         
-        Gtk.ActionEntry empty_menu = { ACTION_EMPTY_MENU, "edit-clear-all-symbolic", null, null,
-            null, null };
-        empty_menu.label = _("Empty");
-        empty_menu.tooltip = _("Empty Spam or Trash folders");
-        entries += empty_menu;
-        
         Gtk.ActionEntry empty_spam = { ACTION_EMPTY_SPAM, null, null, null, null, on_empty_spam };
         empty_spam.label = _("Empty _Spam…");
         entries += empty_spam;
diff --git a/src/client/components/main-toolbar.vala b/src/client/components/main-toolbar.vala
index d28c114..bf63799 100644
--- a/src/client/components/main-toolbar.vala
+++ b/src/client/components/main-toolbar.vala
@@ -87,7 +87,7 @@ public class MainToolbar : Gtk.Box {
 
         // Setup folder header elements
         setup_button(compose_new_message_button, GearyController.ACTION_NEW_MESSAGE);
-        setup_menu_button(empty_menu_button, empty_menu, GearyController.ACTION_EMPTY_MENU);
+        empty_menu_button.popup = empty_menu;
 
         setup_button(search_conversations_button, GearyController.ACTION_TOGGLE_SEARCH);
         this.bind_property("search-open", search_conversations_button, "active",
diff --git a/ui/main-toolbar.ui b/ui/main-toolbar.ui
index 58cff1d..074710c 100644
--- a/ui/main-toolbar.ui
+++ b/ui/main-toolbar.ui
@@ -59,6 +59,12 @@
             <property name="can_focus">True</property>
             <property name="focus_on_click">False</property>
             <property name="always_show_image">True</property>
+            <property name="tooltip_text" translatable="yes">Empty Spam or Trash folders</property>
+            <child>
+              <object class="GtkImage" id="empty_menu_image">
+                <property name="icon_name">edit-clear-all-symbolic</property>
+              </object>
+            </child>
           </object>
           <packing>
             <property name="pack_type">end</property>


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