autostart
This commit is contained in:
parent
016c55d6f9
commit
e8c8356dc9
2 changed files with 6 additions and 3 deletions
|
@ -15,9 +15,11 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|||
|
||||
@IBOutlet weak var statusMenu: NSMenu!
|
||||
|
||||
let autostart = Process.arguments.count >= 2 ? Process.arguments[1] == "--autostart" : false
|
||||
let statusItem = NSStatusBar.systemStatusBar().statusItemWithLength(-1)
|
||||
let basePath = NSString(string:"~/Library/Application Support/Open Media Library").stringByExpandingTildeInPath
|
||||
|
||||
|
||||
func applicationDidFinishLaunching(aNotification: NSNotification) {
|
||||
let icon = NSImage(named: "statusIcon")
|
||||
//invert icon in dark status bar mode
|
||||
|
@ -31,8 +33,9 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|||
server.launchPath = basePath.stringByAppendingString("/ctl")
|
||||
server.arguments = ["start"]
|
||||
server.launch()
|
||||
load()
|
||||
|
||||
if (!autostart) {
|
||||
load()
|
||||
}
|
||||
} else {
|
||||
let resourcePath = NSBundle.mainBundle().resourcePath
|
||||
let install_py = resourcePath?.stringByAppendingString("/install.py")
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.7</string>
|
||||
<string>0.8</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
|
|
Loading…
Reference in a new issue