Commit c1903621 authored by Charles Lindsay's avatar Charles Lindsay

Show gear menu with F10; fix #6714

parent 53d0e89d
......@@ -28,6 +28,7 @@ public class GearyController {
public const string ACTION_MARK_AS_SPAM = "GearyMarkAsSpam";
public const string ACTION_COPY_MENU = "GearyCopyMenuButton";
public const string ACTION_MOVE_MENU = "GearyMoveMenuButton";
public const string ACTION_GEAR_MENU = "GearyGearMenuButton";
public const int FETCH_EMAIL_CHUNK_COUNT = 200;
......@@ -85,6 +86,7 @@ public class GearyController {
// Setup actions.
GearyApplication.instance.actions.add_actions(create_actions(), this);
GearyApplication.instance.actions.add_toggle_actions(create_toggle_actions(), this);
GearyApplication.instance.ui_manager.insert_action_group(
GearyApplication.instance.actions, 0);
GearyApplication.instance.load_ui_file("accelerators.ui");
......@@ -280,7 +282,17 @@ public class GearyController {
null, on_zoom_normal };
entries += zoom_normal;
add_accelerator("0", ACTION_ZOOM_NORMAL);
return entries;
}
private Gtk.ToggleActionEntry[] create_toggle_actions() {
Gtk.ToggleActionEntry[] entries = new Gtk.ToggleActionEntry[0];
Gtk.ToggleActionEntry gear_menu = { ACTION_GEAR_MENU, null, null, "F10",
null, null, false };
entries += gear_menu;
return entries;
}
......
......@@ -61,7 +61,8 @@ public class MainToolbar : Gtk.Box {
as Gtk.Menu;
Gtk.Menu application_proxy_menu = GearyApplication.instance.ui_manager.get_widget("/ui/ToolbarMenuProxy")
as Gtk.Menu;
Gtk.ToggleToolButton app_menu_button = (Gtk.ToggleToolButton) builder.get_object("menu_button");
Gtk.ToggleToolButton app_menu_button = set_toolbutton_action(builder, GearyController.ACTION_GEAR_MENU)
as Gtk.ToggleToolButton;
app_menu_dropdown = new GtkUtil.ToggleToolbarDropdown(
IconFactory.instance.get_theme_icon("application-menu"), Gtk.IconSize.LARGE_TOOLBAR,
application_menu, application_proxy_menu);
......
......@@ -7,4 +7,5 @@
<accelerator action="GearyZoomIn" />
<accelerator action="GearyZoomOut" />
<accelerator action="GearyZoomNormal" />
<accelerator action="GearyGearMenuButton" />
</ui>
......@@ -174,7 +174,7 @@
</packing>
</child>
<child>
<object class="GtkToggleToolButton" id="menu_button">
<object class="GtkToggleToolButton" id="GearyGearMenuButton">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment