Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleduo committed Jul 12, 2016
1 parent 44a65ca commit 37b85a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions source/tinypng4mac/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
</textField>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fT1-QL-4Nq">
<rect key="frame" x="109" y="16" width="167" height="22"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="99a-9k-u4D">
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" usesSingleLineMode="YES" id="99a-9k-u4D">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -203,7 +203,7 @@
</button>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="vPz-Tz-wUm">
<rect key="frame" x="109" y="42" width="195" height="22"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="OCF-de-u9Q">
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" usesSingleLineMode="YES" id="OCF-de-u9Q">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
Expand Down
6 changes: 3 additions & 3 deletions source/tinypng4mac/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class MainViewController: NSViewController, NSOpenSavePanelDelegate, NSTableView
apiKey.stringValue = savedKey
TPClient.sApiKey = savedKey
keySaved = true
apiKey.editable = false
apiKey.editable = savedKey == ""
}
if let savedPath = TPConfig.savedPath() {
outputPathField.stringValue = savedPath
Expand Down Expand Up @@ -225,7 +225,7 @@ class MainViewController: NSViewController, NSOpenSavePanelDelegate, NSTableView
}
if obj.object === self.apiKey {
if let newKey = obj.object?.stringValue {
if newKey != TPClient.sApiKey {
if newKey != TPClient.sApiKey && newKey != "" {
print("newKey: " + newKey)
saveApiKey(newKey)
if TPClient.sOutputPath != "" {
Expand All @@ -235,7 +235,7 @@ class MainViewController: NSViewController, NSOpenSavePanelDelegate, NSTableView
}
} else if obj.object === self.outputPathField {
if let newOutpath = obj.object?.stringValue {
if newOutpath != TPClient.sOutputPath {
if newOutpath != TPClient.sOutputPath && newOutpath != "" {
print("newOutpath: " + newOutpath)
saveOutputPath(newOutpath)
}
Expand Down

0 comments on commit 37b85a8

Please sign in to comment.