Skip to content

Commit 4580620

Browse files
committed
Fix app settings and default values
1 parent b05c032 commit 4580620

File tree

5 files changed

+50
-53
lines changed

5 files changed

+50
-53
lines changed

JoyKeyMapper/DataModels/DataManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ class DataManager: NSObject {
227227
let stickConfig = StickConfig(context: self.container.viewContext)
228228

229229
stickConfig.speed = 10.0
230-
stickConfig.type = StickType.Mouse.rawValue
230+
stickConfig.type = StickType.None.rawValue
231231

232232
let left = self.createKeyMap()
233233
left.button = StickDirection.Left.rawValue

JoyKeyMapper/Views/AppSettings/AppSettings.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class AppSettings {
4141

4242
static var notifyBatteryCharge: Bool {
4343
get {
44-
return UserDefaults.standard.bool(forKey: "notifyBattteryCharge")
44+
return UserDefaults.standard.bool(forKey: "notifyBatteryCharge")
4545
}
4646
set {
4747
UserDefaults.standard.set(newValue, forKey: "notifyBatteryCharge")

JoyKeyMapper/Views/AppSettings/AppSettingsViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class AppSettingsViewController: NSViewController {
3939
AppSettings.notifyBatteryLevel = self.notifyBatteryLevel.state == .on
4040
}
4141

42-
@IBAction func didChangeNotifyBatteryChange(_ sender: NSButton) {
42+
@IBAction func didChangeNotifyBatteryCharge(_ sender: NSButton) {
4343
AppSettings.notifyBatteryCharge = self.notifyBatteryCharge.state == .on
4444
}
4545

JoyKeyMapper/Views/en.lproj/Main.storyboard

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@
744744
<autoresizingMask key="autoresizingMask"/>
745745
<subviews>
746746
<scrollView wantsLayer="YES" borderType="line" autohidesScrollers="YES" horizontalLineScroll="0.0" horizontalPageScroll="0.0" verticalLineScroll="10" verticalPageScroll="10" hasVerticalScroller="NO" usesPredominantAxisScrolling="NO" horizontalScrollElasticity="allowed" verticalScrollElasticity="none" translatesAutoresizingMaskIntoConstraints="NO" id="1IN-hl-6e6">
747-
<rect key="frame" x="20" y="287" width="436" height="62"/>
747+
<rect key="frame" x="20" y="285" width="436" height="62"/>
748748
<clipView key="contentView" id="ulg-Dc-GtP">
749749
<rect key="frame" x="1" y="1" width="434" height="60"/>
750750
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -772,17 +772,17 @@
772772
</scroller>
773773
</scrollView>
774774
<splitView arrangesAllSubviews="NO" vertical="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5bB-qj-cCs">
775-
<rect key="frame" x="20" y="49" width="436" height="205"/>
775+
<rect key="frame" x="20" y="49" width="436" height="203"/>
776776
<subviews>
777777
<scrollView misplaced="YES" autohidesScrollers="YES" horizontalLineScroll="34" horizontalPageScroll="10" verticalLineScroll="34" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" id="9QK-AO-8UX">
778-
<rect key="frame" x="0.0" y="0.0" width="154" height="205"/>
778+
<rect key="frame" x="0.0" y="0.0" width="154" height="203"/>
779779
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
780780
<clipView key="contentView" id="fhh-tH-xVg">
781-
<rect key="frame" x="1" y="1" width="152" height="203"/>
781+
<rect key="frame" x="1" y="1" width="152" height="201"/>
782782
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
783783
<subviews>
784784
<tableView verticalHuggingPriority="750" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" autosaveColumns="NO" rowHeight="32" viewBased="YES" id="ogj-OG-jIQ">
785-
<rect key="frame" x="0.0" y="0.0" width="152" height="203"/>
785+
<rect key="frame" x="0.0" y="0.0" width="152" height="201"/>
786786
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
787787
<size key="intercellSpacing" width="3" height="2"/>
788788
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -851,14 +851,14 @@
851851
</scroller>
852852
</scrollView>
853853
<scrollView fixedFrame="YES" autohidesScrollers="YES" horizontalLineScroll="24" horizontalPageScroll="10" verticalLineScroll="24" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="53B-wZ-f2a">
854-
<rect key="frame" x="163" y="0.0" width="273" height="205"/>
854+
<rect key="frame" x="163" y="0.0" width="273" height="203"/>
855855
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
856856
<clipView key="contentView" id="PHz-aE-X9a">
857-
<rect key="frame" x="1" y="1" width="271" height="203"/>
857+
<rect key="frame" x="1" y="1" width="271" height="201"/>
858858
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
859859
<subviews>
860860
<outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" rowHeight="22" viewBased="YES" indentationPerLevel="16" outlineTableColumn="ZfE-dt-zeQ" id="DUf-fb-qNP">
861-
<rect key="frame" x="0.0" y="0.0" width="271" height="203"/>
861+
<rect key="frame" x="0.0" y="0.0" width="271" height="201"/>
862862
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
863863
<size key="intercellSpacing" width="3" height="2"/>
864864
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -960,7 +960,7 @@
960960
</holdingPriorities>
961961
</splitView>
962962
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="eQa-gN-N8Y">
963-
<rect key="frame" x="18" y="357" width="71" height="17"/>
963+
<rect key="frame" x="18" y="355" width="71" height="17"/>
964964
<constraints>
965965
<constraint firstAttribute="height" constant="17" id="FVG-r6-Z7V"/>
966966
</constraints>
@@ -988,7 +988,7 @@
988988
</connections>
989989
</segmentedControl>
990990
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wRB-I2-ExF">
991-
<rect key="frame" x="18" y="262" width="36" height="17"/>
991+
<rect key="frame" x="18" y="260" width="36" height="17"/>
992992
<constraints>
993993
<constraint firstAttribute="height" constant="17" id="8xt-Gw-nOg"/>
994994
</constraints>
@@ -1240,7 +1240,7 @@
12401240
<font key="font" metaFont="system"/>
12411241
</buttonCell>
12421242
<connections>
1243-
<action selector="didChangeNotifyBatteryChange:" target="rRU-ju-4Jj" id="NOo-9v-pe6"/>
1243+
<action selector="didChangeNotifyBatteryCharge:" target="rRU-ju-4Jj" id="iGC-Q0-tfr"/>
12441244
</connections>
12451245
</button>
12461246
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="yQr-GL-3hz">

0 commit comments

Comments
 (0)