Skip to content

Commit 4074c7c

Browse files
author
Robert Gummesson
authored
Merge pull request #45 from RobertGummesson/Standalone-for-Xcode-8
Standalone for Xcode 8
2 parents 2af975e + 75998a3 commit 4074c7c

45 files changed

Lines changed: 2082 additions & 1467 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BuildTimeAnalyzer.xcodeproj/project.pbxproj

Lines changed: 225 additions & 195 deletions
Large diffs are not rendered by default.

BuildTimeAnalyzer.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
//
2+
// AppDelegate.swift
3+
// BuildTimeAnalyzer
4+
//
5+
6+
import Cocoa
7+
8+
@NSApplicationMain
9+
class AppDelegate: NSObject, NSApplicationDelegate {
10+
11+
@IBOutlet weak var projectSelectionMenuItem: NSMenuItem!
12+
@IBOutlet weak var buildTimesMenuItem: NSMenuItem!
13+
@IBOutlet weak var alwaysInFrontMenuItem: NSMenuItem!
14+
15+
func applicationDidFinishLaunching(_ notification: Notification) {
16+
alwaysInFrontMenuItem.state = UserSettings.windowShouldBeTopMost ? NSOnState : NSOffState
17+
}
18+
19+
var viewController: ViewController? {
20+
return NSApplication.shared().mainWindow?.contentViewController as? ViewController
21+
}
22+
23+
func configureMenuItems(showBuildTimesMenuItem: Bool) {
24+
projectSelectionMenuItem.isEnabled = !showBuildTimesMenuItem
25+
buildTimesMenuItem.isEnabled = showBuildTimesMenuItem
26+
}
27+
28+
// MARK: Actions
29+
30+
@IBAction func navigateToProjectSelection(_ sender: NSMenuItem) {
31+
configureMenuItems(showBuildTimesMenuItem: true)
32+
33+
viewController?.cancelProcessing()
34+
viewController?.showInstructions(true)
35+
}
36+
37+
@IBAction func navigateToBuildTimes(_ sender: NSMenuItem) {
38+
configureMenuItems(showBuildTimesMenuItem: false)
39+
viewController?.showInstructions(false)
40+
}
41+
42+
@IBAction func visitGitHubPage(_ sender: AnyObject) {
43+
let path = "https://github.com/RobertGummesson/BuildTimeAnalyzer-for-Xcode"
44+
if let url = URL(string: path) {
45+
NSWorkspace.shared().open(url)
46+
}
47+
}
48+
49+
@IBAction func toggleAlwaysInFront(_ sender: NSMenuItem) {
50+
let alwaysInFront = sender.state == NSOffState
51+
52+
sender.state = alwaysInFront ? NSOnState : NSOffState
53+
UserSettings.windowShouldBeTopMost = alwaysInFront
54+
55+
viewController?.makeWindowTopMost(topMost: alwaysInFront)
56+
}
57+
}
58+
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"images" : [
3+
{
4+
"size" : "16x16",
5+
"idiom" : "mac",
6+
"filename" : "logo16.png",
7+
"scale" : "1x"
8+
},
9+
{
10+
"size" : "16x16",
11+
"idiom" : "mac",
12+
"filename" : "logo32-1.png",
13+
"scale" : "2x"
14+
},
15+
{
16+
"size" : "32x32",
17+
"idiom" : "mac",
18+
"filename" : "logo32.png",
19+
"scale" : "1x"
20+
},
21+
{
22+
"size" : "32x32",
23+
"idiom" : "mac",
24+
"filename" : "logo64.png",
25+
"scale" : "2x"
26+
},
27+
{
28+
"size" : "128x128",
29+
"idiom" : "mac",
30+
"filename" : "logo128.png",
31+
"scale" : "1x"
32+
},
33+
{
34+
"size" : "128x128",
35+
"idiom" : "mac",
36+
"filename" : "logo256-1.png",
37+
"scale" : "2x"
38+
},
39+
{
40+
"size" : "256x256",
41+
"idiom" : "mac",
42+
"filename" : "logo256.png",
43+
"scale" : "1x"
44+
},
45+
{
46+
"size" : "256x256",
47+
"idiom" : "mac",
48+
"filename" : "logo512-1.png",
49+
"scale" : "2x"
50+
},
51+
{
52+
"size" : "512x512",
53+
"idiom" : "mac",
54+
"filename" : "logo512.png",
55+
"scale" : "1x"
56+
},
57+
{
58+
"size" : "512x512",
59+
"idiom" : "mac",
60+
"filename" : "logo512@2x.png",
61+
"scale" : "2x"
62+
}
63+
],
64+
"info" : {
65+
"version" : 1,
66+
"author" : "xcode"
67+
}
68+
}
70.3 KB
Loading
7.23 KB
Loading
263 KB
Loading
263 KB
Loading
10.2 KB
Loading
10.2 KB
Loading

0 commit comments

Comments
 (0)