Skip to content

Commit

Permalink
fix typo, fix #29
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangduo committed Sep 19, 2019
1 parent 152a506 commit aed2237
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion source/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 1e14da6108c97041b7daef307aaa48a8f180f7a4

COCOAPODS: 1.6.1
COCOAPODS: 1.7.5
3 changes: 1 addition & 2 deletions source/tinypng4mac.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,9 @@
};
buildConfigurationList = 277AAF4A1D23F24900788F37 /* Build configuration list for PBXProject "tinypng4mac" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
"zh-Hans",
Expand Down
18 changes: 9 additions & 9 deletions source/tinypng4mac/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -168,23 +168,23 @@
<rect key="frame" x="0.0" y="-4" width="320" height="104"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="752" translatesAutoresizingMaskIntoConstraints="NO" id="j7S-Iz-wE1">
<rect key="frame" x="18" y="43" width="104" height="18"/>
<rect key="frame" x="18" y="43" width="97" height="18"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Output Path:" id="wAc-5q-1kG">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="752" translatesAutoresizingMaskIntoConstraints="NO" id="NnK-w1-6b9">
<rect key="frame" x="18" y="16" width="104" height="18"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Replace Origion:" id="7il-ST-uVu">
<rect key="frame" x="18" y="16" width="97" height="18"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Replace Origin:" id="7il-ST-uVu">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="752" translatesAutoresizingMaskIntoConstraints="NO" id="iOT-w7-ALe">
<rect key="frame" x="18" y="70" width="104" height="18"/>
<rect key="frame" x="18" y="70" width="97" height="18"/>
<constraints>
<constraint firstAttribute="height" constant="18" id="zLS-ML-ggj"/>
</constraints>
Expand All @@ -195,7 +195,7 @@
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fT1-QL-4Nq">
<rect key="frame" x="132" y="41" width="146" height="22"/>
<rect key="frame" x="125" y="41" width="153" height="22"/>
<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="controlTextColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -216,15 +216,15 @@
</connections>
</button>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="vPz-Tz-wUm">
<rect key="frame" x="132" y="68" width="172" height="22"/>
<rect key="frame" x="125" y="68" width="179" height="22"/>
<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="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button translatesAutoresizingMaskIntoConstraints="NO" id="zRv-TO-bMw">
<rect key="frame" x="132" y="16" width="22" height="18"/>
<rect key="frame" x="125" y="16" width="22" height="18"/>
<constraints>
<constraint firstAttribute="height" constant="14" id="mm5-iS-Q2I"/>
</constraints>
Expand Down Expand Up @@ -442,15 +442,15 @@
<rect key="frame" x="107" y="396" width="107" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="TinyPNG for Mac" id="8Ac-Uq-uCZ">
<font key="font" metaFont="system"/>
<color key="textColor" name="highlightColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="D8d-TS-a2j">
<rect key="frame" x="14" y="117" width="57" height="17"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" truncatesLastVisibleLine="YES" sendsActionOnEndEditing="YES" title="Reduce: " id="400-FH-fhZ">
<font key="font" metaFont="system"/>
<color key="textColor" name="highlightColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
Expand Down
13 changes: 7 additions & 6 deletions source/tinypng4mac/views/InputKeyAlert.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class InputKeyAlert: NSAlert, NSTextFieldDelegate {
let view = NSView.init(frame: CGRect(x: 0, y: 0, width: 300, height: 54))
self.input = NSTextField.init(frame: CGRect(x: 0, y: 30, width: 300, height: 24))
self.input?.delegate = self
self.input?.usesSingleLineMode = true
view.addSubview(self.input!)
let button = self.createRegisterButton()
view.addSubview(button)
Expand Down Expand Up @@ -60,10 +61,10 @@ class InputKeyAlert: NSAlert, NSTextFieldDelegate {
}
})
}
func controlTextDidEndEditing(_ obj: Notification) {
if let text = input?.stringValue {
self.submitButton?.isEnabled = text.count > 0
}
}
func controlTextDidChange(_ obj: Notification) {
if let text = input?.stringValue {
self.submitButton?.isEnabled = text.count > 0
}
}
}

0 comments on commit aed2237

Please sign in to comment.