mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-26 23:36:08 +03:00
GH-244 Add stub applicationOpenUntitledFile()
This commit is contained in:
parent
d30b2ab31b
commit
ae9cddf0ac
@ -26,6 +26,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|||||||
private let prefWindowComponent: PrefWindowComponent
|
private let prefWindowComponent: PrefWindowComponent
|
||||||
|
|
||||||
private var quitWhenAllWindowsAreClosed = false
|
private var quitWhenAllWindowsAreClosed = false
|
||||||
|
private var launching = true
|
||||||
|
|
||||||
override init() {
|
override init() {
|
||||||
self.actionSink = self.actionSubject.asObservable()
|
self.actionSink = self.actionSubject.asObservable()
|
||||||
@ -66,16 +67,26 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|||||||
// MARK: - NSApplicationDelegate
|
// MARK: - NSApplicationDelegate
|
||||||
extension AppDelegate {
|
extension AppDelegate {
|
||||||
|
|
||||||
func applicationDidFinishLaunching(aNotification: NSNotification) {
|
func applicationWillFinishLaunching(_: NSNotification) {
|
||||||
|
self.launching = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func applicationDidFinishLaunching(_: NSNotification) {
|
||||||
// let testView = InputTestView(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
|
// let testView = InputTestView(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
|
||||||
// self.window.contentView?.addSubview(testView)
|
// self.window.contentView?.addSubview(testView)
|
||||||
// self.window.makeFirstResponder(testView)
|
// self.window.makeFirstResponder(testView)
|
||||||
|
|
||||||
|
self.launching = false
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
self.debugMenu.hidden = false
|
self.debugMenu.hidden = false
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
func applicationOpenUntitledFile(sender: NSApplication) -> Bool {
|
||||||
self.newDocument(self)
|
self.newDocument(self)
|
||||||
|
NSLog("\(#function)")
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func applicationShouldTerminate(sender: NSApplication) -> NSApplicationTerminateReply {
|
func applicationShouldTerminate(sender: NSApplication) -> NSApplicationTerminateReply {
|
||||||
|
Loading…
Reference in New Issue
Block a user