[geary] Tidy up main window accelerator setup.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Tidy up main window accelerator setup.
- Date: Sun, 29 May 2016 23:48:05 +0000 (UTC)
commit 10362b5a64b2681dae88743918856893ea3616e2
Author: Michael James Gratton <mike vee net>
Date: Mon May 30 09:37:12 2016 +1000
Tidy up main window accelerator setup.
* src/client/application/geary-controller.vala
(GearyController::create_actions): Remove uneeded calls to
add_accelerator - just remove them for dups ot move them to the action
definition. Ensure they are defined in accelerators.ui so they are
bound to their accelerators regarcdless of having a visible proxy.
src/client/application/geary-controller.vala | 20 +++++++-------------
ui/accelerators.ui | 4 ++++
2 files changed, 11 insertions(+), 13 deletions(-)
---
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index 1a66a2b..d3c75f6 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -428,12 +428,10 @@ public class GearyController : Geary.BaseObject {
_("Add label"), null };
copy_menu.label = _("_Label");
entries += copy_menu;
- add_accelerator("l", ACTION_COPY_MENU);
Gtk.ActionEntry move_menu = { ACTION_MOVE_MENU, null, TRANSLATABLE, "M", _("Move conversation"),
null };
move_menu.label = _("_Move");
entries += move_menu;
- add_accelerator("m", ACTION_MOVE_MENU);
Gtk.ActionEntry new_message = { ACTION_NEW_MESSAGE, null, null, "<Ctrl>N",
_("Compose new message (Ctrl+N, N)"), on_new_message };
@@ -520,25 +518,21 @@ public class GearyController : Geary.BaseObject {
null, on_zoom_normal };
entries += zoom_normal;
add_accelerator("0", ACTION_ZOOM_NORMAL);
-
- // Can't use the Action's "natural" accelerator because this Action is not tied to any
- // widget
- Gtk.ActionEntry search = { ACTION_SEARCH, null, null, null, null, on_search };
+
+ Gtk.ActionEntry search = { ACTION_SEARCH, null, null, "<Ctrl>S", null, on_search };
entries += search;
- add_accelerator("<Ctrl>S", ACTION_SEARCH);
-
- Gtk.ActionEntry conversation_list = { ACTION_CONVERSATION_LIST, null, null, null, null,
on_conversation_list };
+
+ Gtk.ActionEntry conversation_list = { ACTION_CONVERSATION_LIST, null, null, "<Ctrl>B", null,
on_conversation_list };
entries += conversation_list;
- add_accelerator("<Ctrl>B", ACTION_CONVERSATION_LIST);
-
+
// No callback is connected, since we bind the toggle button to the search bar visibility
Gtk.ActionEntry toggle_search = { ACTION_TOGGLE_SEARCH, null, null, null,
_("Toggle search bar"), null };
entries += toggle_search;
-
+
return entries;
}
-
+
private Gtk.ToggleActionEntry[] create_toggle_actions() {
Gtk.ToggleActionEntry[] entries = new Gtk.ToggleActionEntry[0];
diff --git a/ui/accelerators.ui b/ui/accelerators.ui
index 17002d5..549144a 100644
--- a/ui/accelerators.ui
+++ b/ui/accelerators.ui
@@ -1,13 +1,17 @@
<ui>
<accelerator action="GearyArchiveMessage" />
+ <accelerator action="GearyConversationList" />
+ <accelerator action="GearyCopyMenuButton" />
<accelerator action="GearyDeleteMessage" />
<accelerator action="GearyFindInConversation" />
<accelerator action="GearyFindNextInConversation" />
<accelerator action="GearyFindPreviousInConversation" />
<accelerator action="GearyForwardMessage" />
+ <accelerator action="GearyMoveMenuButton" />
<accelerator action="GearyNewMessage" />
<accelerator action="GearyReplyAllMessage" />
<accelerator action="GearyReplyToMessage" />
+ <accelerator action="GearySearch" />
<accelerator action="GearyTrashMessage" />
<accelerator action="GearyZoomIn" />
<accelerator action="GearyZoomNormal" />
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]