Skip to content

Commit 83e9952

Browse files
committed
New features:
- main application can only set the preferences and is no longer a viewer. - support for .xsd, .xquery, .xsl, .asp and julia (.jl) formats. - UTI info panel.
1 parent 8ae7f87 commit 83e9952

26 files changed

+1728
-354
lines changed

Application/AppDelegate.swift

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -42,37 +42,17 @@ class AppDelegate: NSObject, NSApplicationDelegate {
4242
return service
4343
}()
4444

45-
private (set) var documentsOpenedAtStart = false
46-
private var firstAppear = false
4745
func applicationDidFinishLaunching(_ aNotification: Notification) {
4846
// Insert code here to initialize your application
49-
firstAppear = true
50-
51-
// Debug constraints.
52-
// UserDefaults.standard.set(true, forKey: "NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints")
53-
// Or put -NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints YES on the launch arguments
5447
}
5548

5649
func applicationWillTerminate(_ aNotification: Notification) {
5750
// Insert code here to tear down your application
5851
self.connection.invalidate()
5952
}
60-
61-
func applicationDidBecomeActive(_ notification: Notification) {
62-
if firstAppear {
63-
if NSApplication.shared.windows.first(where: { $0.contentViewController is ViewController }) == nil, let menu = NSApp.menu?.item(at: 0)?.submenu?.item(withTag: 100), let a = menu.action {
64-
// Open the settings window if there are no windows opened.
65-
NSApp.sendAction(a, to: menu.target, from: menu)
66-
documentsOpenedAtStart = false
67-
} else {
68-
documentsOpenedAtStart = true
69-
}
70-
}
71-
firstAppear = false
72-
}
7353

7454
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
75-
return !documentsOpenedAtStart
55+
return true
7656
}
7757

7858
/// Get the url of the quicklook extension.

Application/Base.lproj/Main.storyboard

Lines changed: 60 additions & 107 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)