Skip to content

Commit

Permalink
v0.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
rimusz committed Jul 5, 2016
1 parent 114935a commit 7c32e19
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 29 deletions.
Binary file not shown.
25 changes: 24 additions & 1 deletion src/corectl/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
statusItem.image = icon
statusItem.menu = statusMenu

addToLoginItems()
ServerStart()

// create menu programmaticly
Expand Down Expand Up @@ -71,7 +72,8 @@ class AppDelegate: NSObject, NSApplicationDelegate {

// stop corectld server
ServerStop()

ServerStop()

sleep(5)

menuItem.menu?.itemWithTag(1)?.title = "Server is starting"
Expand All @@ -80,6 +82,12 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}



@IBAction func checkForUpdates(sender: NSMenuItem) {

}


// fetch latest ISOs

@IBAction func fetchLatestISOAlpha(sender: NSMenuItem) {
Expand Down Expand Up @@ -179,5 +187,20 @@ class AppDelegate: NSObject, NSApplicationDelegate {
alert.runModal()
}


// Adds the app to the system's list of login items.
// NOTE: This is a relatively janky way of doing this. Using a
// bundled helper app is Apple's recommended approach, but that
// has a lot of configuration overhead to get right.
func addToLoginItems() {
NSTask.launchedTaskWithLaunchPath(
"/usr/bin/osascript",
arguments: [
"-e",
"tell application \"System Events\" to make login item at end with properties {path:\"/Applications/corectl.app\", hidden:false, name:\"Corectl\"}"
]
)
}

}

5 changes: 4 additions & 1 deletion src/corectl/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,9 @@
<menuItem isSeparatorItem="YES" id="7F0-f8-uD9"/>
<menuItem title="Check for updates" id="G6m-bG-AHV">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="checkForUpdates:" target="Voe-Tx-rLC" id="ZGM-0U-UMz"/>
</connections>
</menuItem>
<menuItem title="Fetch latest CoreOS ISO" id="cxS-wy-CSq">
<modifierMask key="keyEquivalentModifierMask"/>
Expand Down Expand Up @@ -723,7 +726,7 @@
</connections>
</menuItem>
</items>
<point key="canvasLocation" x="-198.5" y="80.5"/>
<point key="canvasLocation" x="-570.5" y="131.5"/>
</menu>
</objects>
</document>
4 changes: 2 additions & 2 deletions src/corectl/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.0.6</string>
<string>0.0.7</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>27</string>
<string>29</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>LSUIElement</key>
Expand Down
25 changes: 0 additions & 25 deletions src/install_iterm.command

This file was deleted.

0 comments on commit 7c32e19

Please sign in to comment.