Start the final part of bug 713991.

* Ported Gtk.Action to GLib.Action in the GearyController.
* Removed Gtk.AccelGroups (handled through Gtk.Application now).
* Got rid of Gtk.UiManager (now all is done through Gtk.Builder).
* Throw away workaround for conflicting Gtk.Actions in ComposerContainer.
* Aggregate zoom in/out/normal into one parameterized zoom action.

Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
This commit is contained in:
Niels De Graef 2017-05-15 23:21:32 +02:00 committed by Michael James Gratton
parent dfd3355d48
commit 1dddcebb92
15 changed files with 388 additions and 668 deletions

View file

@ -1,6 +1,5 @@
set(RESOURCE_LIST
STRIPBLANKS "accelerators.ui"
STRIPBLANKS "account_cannot_remove.glade"
STRIPBLANKS "account_list.glade"
STRIPBLANKS "account_spinner.glade"
@ -29,12 +28,11 @@ set(RESOURCE_LIST
STRIPBLANKS "gtk/menus.ui"
STRIPBLANKS "login.glade"
STRIPBLANKS "main-toolbar.ui"
STRIPBLANKS "main-toolbar-menus.ui"
STRIPBLANKS "main-window.ui"
STRIPBLANKS "password-dialog.glade"
STRIPBLANKS "preferences-dialog.ui"
STRIPBLANKS "remove_confirm.glade"
STRIPBLANKS "toolbar_empty_menu.ui"
STRIPBLANKS "toolbar_mark_menu.ui"
STRIPBLANKS "upgrade_dialog.glade"
"geary.css"
)

View file

@ -1,17 +0,0 @@
<ui>
<accelerator action="GearyArchiveConversation" />
<accelerator action="GearyConversationList" />
<accelerator action="GearyCopyMenuButton" />
<accelerator action="GearyDeleteConversation" />
<accelerator action="GearyFindInConversation" />
<accelerator action="GearyForwardMessage" />
<accelerator action="GearyMoveMenuButton" />
<accelerator action="GearyNewMessage" />
<accelerator action="GearyReplyAllMessage" />
<accelerator action="GearyReplyToMessage" />
<accelerator action="GearySearch" />
<accelerator action="GearyTrashConversation" />
<accelerator action="GearyZoomIn" />
<accelerator action="GearyZoomNormal" />
<accelerator action="GearyZoomOut" />
</ui>

40
ui/main-toolbar-menus.ui Normal file
View file

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<menu id="empty_menu">
<item>
<attribute name="label" translatable="yes">Empty _Spam…</attribute>
<attribute name="action">win.empty-spam</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Empty _Trash…</attribute>
<attribute name="action">win.empty-trash</attribute>
</item>
</menu>
<menu id="mark_message_menu">
<item>
<attribute name="label" translatable="yes">Mark as _Read</attribute>
<attribute name="action">win.mark-message-read</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Mark as _Unread</attribute>
<attribute name="action">win.mark-message-unread</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Star</attribute>
<attribute name="action">win.mark-message-starred</attribute>
</item>
<item>
<attribute name="label" translatable="yes">U_nstar</attribute>
<attribute name="action">win.mark-message-unstarred</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Mark as S_pam</attribute>
<attribute name="action">win.mark-message-spam</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Mark as not S_pam</attribute>
<attribute name="action">win.mark-message-not-spam</attribute>
</item>
</menu>
</interface>

View file

@ -20,6 +20,7 @@
<property name="can_focus">True</property>
<property name="focus_on_click">False</property>
<property name="always_show_image">True</property>
<property name="action_name">win.new-message</property>
<child>
<object class="GtkImage" id="compose_new_message_image">
<property name="icon_name">text-editor-symbolic</property>
@ -43,6 +44,7 @@
<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">Toggle search bar</property>
<child>
<object class="GtkImage" id="search_conversations_image">
<property name="icon_name">preferences-system-search-symbolic</property>
@ -94,6 +96,8 @@
<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">Reply</property>
<property name="action_name">win.reply-to-message</property>
<child>
<object class="GtkImage" id="reply_sender_image">
<property name="icon_name">mail-reply-sender-symbolic</property>
@ -107,6 +111,8 @@
<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">Reply All</property>
<property name="action_name">win.reply-all-message</property>
<child>
<object class="GtkImage" id="reply_all_image">
<property name="icon_name">mail-reply-all-symbolic</property>
@ -120,6 +126,8 @@
<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">Forward</property>
<property name="action_name">win.forward-message</property>
<child>
<object class="GtkImage" id="forward_image">
<property name="icon_name">mail-forward-symbolic</property>
@ -143,6 +151,7 @@
<property name="can_focus">True</property>
<property name="focus_on_click">False</property>
<property name="always_show_image">True</property>
<property name="action_name">win.mark-message-menu</property>
<child>
<object class="GtkImage" id="mark_message_image">
<property name="icon_name">marker-symbolic</property>
@ -151,7 +160,7 @@
</object>
</child>
<child>
<object class="GtkMenuButton" id="copy_message_button">
<object class="GtkMenuButton" id="move_message_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="focus_on_click">False</property>
@ -164,7 +173,7 @@
</object>
</child>
<child>
<object class="GtkMenuButton" id="move_message_button">
<object class="GtkMenuButton" id="copy_message_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="focus_on_click">False</property>
@ -184,6 +193,7 @@
<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">Toggle find bar</property>
<child>
<object class="GtkImage" id="find_image">
<property name="icon_name">preferences-system-search-symbolic</property>
@ -200,9 +210,10 @@
<property name="can_focus">True</property>
<property name="focus_on_click">False</property>
<property name="always_show_image">True</property>
<property name="action_name">win.undo</property>
<child>
<object class="GtkImage" id="undo_image">
<property name="icon_name">preferences-system-search-symbolic</property>
<property name="icon_name">edit-undo-symbolic</property>
</object>
</child>
</object>
@ -224,6 +235,12 @@
<property name="can_focus">True</property>
<property name="focus_on_click">False</property>
<property name="always_show_image">True</property>
<property name="action_name">win.archive-conv</property>
<child>
<object class="GtkImage" id="archive_image">
<property name="icon_name">mail-archive-symbolic</property>
</object>
</child>
</object>
</child>
<child>
@ -232,6 +249,12 @@
<property name="can_focus">True</property>
<property name="focus_on_click">False</property>
<property name="always_show_image">True</property>
<property name="action_name">win.trash-conv</property>
<child>
<object class="GtkImage" id="trash_delete_image">
<property name="icon_name">user-trash-symbolic</property>
</object>
</child>
</object>
</child>
</object>

View file

@ -1,7 +0,0 @@
<ui>
<popup name="ToolbarEmptyMenu">
<menuitem name="EmptySpam" action="GearyEmptySpam" />
<menuitem name="EmptyTrash" action="GearyEmptyTrash" />
</popup>
</ui>

View file

@ -1,10 +0,0 @@
<ui>
<popup name="ToolbarMarkMenu">
<menuitem name="MarkAsRead" action="GearyMarkAsRead" />
<menuitem name="MarkAsUnread" action="GearyMarkAsUnread" />
<menuitem name="MarkAsStarred" action="GearyMarkAsStarred" />
<menuitem name="MarkAsUnStarred" action="GearyMarkAsUnStarred" />
<menuitem name="MarkAsSpam" action="GearyMarkAsSpam" />
</popup>
</ui>