1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-24 22:33:52 +03:00

GH-298 Add open in new window menu item

This commit is contained in:
Tae Won Ha 2016-10-09 21:25:34 +02:00
parent e2e47f518b
commit b5cf060be4
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44
3 changed files with 14 additions and 4 deletions

View File

@ -124,7 +124,7 @@ static void server_ui_main(UIBridgeData *bridge, UI *ui) {
}
ui_bridge_stopped(bridge);
loop_close(&loop);
loop_close(&loop, false);
xfree(_server_ui_data);
xfree(ui);

View File

@ -217,16 +217,20 @@ extension AppDelegate {
// MARK: - IBActions
extension AppDelegate {
@IBAction func showPrefWindow(_ sender: AnyObject!) {
@IBAction func openInNewWindow(_ sender: Any?) {
self.openDocument(sender)
}
@IBAction func showPrefWindow(_ sender: Any?) {
self.prefWindowComponent.show()
}
@IBAction func newDocument(_ sender: AnyObject!) {
@IBAction func newDocument(_ sender: Any?) {
_ = self.mainWindowManager.newMainWindow()
}
// Invoked when no main window is open.
@IBAction func openDocument(_ sender: AnyObject!) {
@IBAction func openDocument(_ sender: Any?) {
let panel = NSOpenPanel()
panel.canChooseDirectories = true
panel.begin { result in

View File

@ -87,6 +87,12 @@
<action selector="openDocument:" target="-1" id="zbe-h0-oBM"/>
</connections>
</menuItem>
<menuItem title="Open In New Window…" keyEquivalent="o" id="c6W-bD-wRy">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="openInNewWindow:" target="-1" id="2ZC-Rl-rjR"/>
</connections>
</menuItem>
<menuItem title="Open Quickly…" keyEquivalent="O" id="0V2-yi-P2z">
<connections>
<action selector="openQuickly:" target="-1" id="FSA-7W-F0m"/>