Skip to content

Commit

Permalink
address apple review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Velislava Yanchina committed Dec 1, 2018
1 parent 0a3625d commit bf09b02
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 21 deletions.
16 changes: 10 additions & 6 deletions Comment Spell Checker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/* Begin PBXBuildFile section */
E309ECE921AA90560091219D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E309ECE821AA90560091219D /* Assets.xcassets */; };
E310467421B24AB500ABAC3B /* ExternalLinks.swift in Sources */ = {isa = PBXBuildFile; fileRef = E310467321B24AB500ABAC3B /* ExternalLinks.swift */; };
E364A51E21AAA51A00B501EE /* demo.mov in Resources */ = {isa = PBXBuildFile; fileRef = E364A51D21AAA51A00B501EE /* demo.mov */; };
E3C03A2821A95AF90025C8F1 /* key_bindings_demo.mov in Resources */ = {isa = PBXBuildFile; fileRef = E3C03A2721A95AF90025C8F1 /* key_bindings_demo.mov */; };
E3C03A2A21A95D5D0025C8F1 /* Demo.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3C03A2921A95D5D0025C8F1 /* Demo.swift */; };
Expand Down Expand Up @@ -61,6 +62,7 @@

/* Begin PBXFileReference section */
E309ECE821AA90560091219D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
E310467321B24AB500ABAC3B /* ExternalLinks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExternalLinks.swift; sourceTree = "<group>"; };
E364A51D21AAA51A00B501EE /* demo.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = demo.mov; sourceTree = "<group>"; };
E3C03A2721A95AF90025C8F1 /* key_bindings_demo.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = key_bindings_demo.mov; sourceTree = "<group>"; };
E3C03A2921A95D5D0025C8F1 /* Demo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Demo.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -142,6 +144,7 @@
E3C63A4721A94BE7001B8CB4 /* ViewController.swift */,
E3C63A6521A94C28001B8CB4 /* HelpController.swift */,
E3C63A6E21A94C49001B8CB4 /* Model.swift */,
E310467321B24AB500ABAC3B /* ExternalLinks.swift */,
E3C63A6721A94C3B001B8CB4 /* View */,
E309ECE821AA90560091219D /* Assets.xcassets */,
E3C63A7221A94C80001B8CB4 /* Main.storyboard */,
Expand Down Expand Up @@ -337,6 +340,7 @@
files = (
E3C63A6F21A94C49001B8CB4 /* Model.swift in Sources */,
E3C63A6D21A94C3B001B8CB4 /* HelpSplitViewController.swift in Sources */,
E310467421B24AB500ABAC3B /* ExternalLinks.swift in Sources */,
E3C63A4821A94BE7001B8CB4 /* ViewController.swift in Sources */,
E3C63A6C21A94C3B001B8CB4 /* HelpSourceViewController.swift in Sources */,
E3C63A6B21A94C3B001B8CB4 /* HelpContentViewController.swift in Sources */,
Expand Down Expand Up @@ -503,7 +507,7 @@
CODE_SIGN_ENTITLEMENTS = "Comment Spell Checker/Comment_Spell_Checker.entitlements";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 4Q28357BSU;
DEVELOPMENT_TEAM = L4ALPHW89P;
INFOPLIST_FILE = "Comment Spell Checker/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -523,7 +527,7 @@
CODE_SIGN_ENTITLEMENTS = "Comment Spell Checker/Comment_Spell_Checker.entitlements";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 4Q28357BSU;
DEVELOPMENT_TEAM = L4ALPHW89P;
INFOPLIST_FILE = "Comment Spell Checker/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -542,7 +546,7 @@
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 4Q28357BSU;
DEVELOPMENT_TEAM = L4ALPHW89P;
INFOPLIST_FILE = "Comment Spell CheckerTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -563,7 +567,7 @@
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 4Q28357BSU;
DEVELOPMENT_TEAM = L4ALPHW89P;
INFOPLIST_FILE = "Comment Spell CheckerTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -583,7 +587,7 @@
CODE_SIGN_ENTITLEMENTS = "Comment Spell Checker Extension/Comment_Spell_Checker_Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 4Q28357BSU;
DEVELOPMENT_TEAM = L4ALPHW89P;
INFOPLIST_FILE = "Comment Spell Checker Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -603,7 +607,7 @@
CODE_SIGN_ENTITLEMENTS = "Comment Spell Checker Extension/Comment_Spell_Checker_Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 4Q28357BSU;
DEVELOPMENT_TEAM = L4ALPHW89P;
INFOPLIST_FILE = "Comment Spell Checker Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down
23 changes: 18 additions & 5 deletions Comment Spell Checker/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,30 @@ import Cocoa

@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {



func applicationDidFinishLaunching(_ aNotification: Notification) {
// Insert code here to initialize your application
}

func applicationWillTerminate(_ aNotification: Notification) {
// Insert code here to tear down your application
}

func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {
return true
}

func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
}
}

extension AppDelegate {

@IBAction private func helpMenuTwitterItemSelected(sender: AnyObject) {
ExternalLinks.openTwitterProfile()
}

@IBAction private func helpMenuGitHubItemSelected(sender: AnyObject) {
ExternalLinks.openGitHubPage()
}
}

29 changes: 29 additions & 0 deletions Comment Spell Checker/ExternalLinks.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// ExternalLinks.swift
// Comment Spell Checker
//
// Created by Velislava Yanchina on 1/12/18.
// Copyright © 2018 Velislava Yanchina. All rights reserved.
//

import Foundation
import AppKit

enum ExternalLinks {

static func openTwitterProfile() {
open(url: "https://twitter.com/vel_is_lava")
}

static func openGitHubPage() {
open(url: "https://github.com/velyan/Comment-Spell-Checker")
}

private static func open(url urlString: String) {
if let url = URL(string: urlString) {
NSWorkspace.shared.open(url)
} else {
print("Unable to construct url from string: \(urlString)")
}
}
}
23 changes: 13 additions & 10 deletions Comment Spell Checker/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Spell Comment Spell Comment" systemMenu="apple" id="uQy-DD-JDr" userLabel="Spell Checker">
<items>
<menuItem title="About Mark" id="5kV-Vb-QxS" userLabel="About Spell Checker">
<menuItem title="About Comment Spell Checker" id="5kV-Vb-QxS" userLabel="About Spell Checker">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
<menuItem title="Hide Mark" keyEquivalent="h" id="Olw-nP-bQN">
<menuItem title="Hide Comment Spell Checker" keyEquivalent="h" id="Olw-nP-bQN">
<connections>
<action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/>
</connections>
Expand All @@ -41,7 +41,7 @@
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
<menuItem title="Quit Mark" keyEquivalent="q" id="4sb-4s-VLi">
<menuItem title="Quit Comment Spell Checker" keyEquivalent="q" id="4sb-4s-VLi">
<connections>
<action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF"/>
</connections>
Expand Down Expand Up @@ -78,13 +78,16 @@
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
<items>
<menuItem title="About" keyEquivalent="?" id="FKE-Sm-Kum">
<menuItem title="Tweet Me" id="PXU-eK-umg">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="helpMenuTwitterItemSelectedWithSender:" target="Voe-Tx-rLC" id="RaV-Ch-d7W"/>
</connections>
</menuItem>
<menuItem title="Comment Spell Checker on GitHub" id="ulk-jB-gGS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<binding destination="Voe-Tx-rLC" name="target" keyPath="self" id="K7Q-b7-u15">
<dictionary key="options">
<string key="NSSelectorName">openHelp</string>
</dictionary>
</binding>
<action selector="helpMenuGitHubItemSelectedWithSender:" target="Voe-Tx-rLC" id="e6H-Ub-Z0E"/>
</connections>
</menuItem>
</items>
Expand All @@ -105,7 +108,7 @@
<scene sceneID="R2V-B0-nI4">
<objects>
<windowController id="B8D-0N-5wS" sceneMemberID="viewController">
<window key="window" title="Help" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
<window key="window" title="Comment Spell Checker" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="407" y="509" width="600" height="400"/>
Expand Down

0 comments on commit bf09b02

Please sign in to comment.