Skip to content

Commit

Permalink
Fix app settings and default values
Browse files Browse the repository at this point in the history
  • Loading branch information
magicien committed May 14, 2020
1 parent b05c032 commit 4580620
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 53 deletions.
2 changes: 1 addition & 1 deletion JoyKeyMapper/DataModels/DataManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class DataManager: NSObject {
let stickConfig = StickConfig(context: self.container.viewContext)

stickConfig.speed = 10.0
stickConfig.type = StickType.Mouse.rawValue
stickConfig.type = StickType.None.rawValue

let left = self.createKeyMap()
left.button = StickDirection.Left.rawValue
Expand Down
2 changes: 1 addition & 1 deletion JoyKeyMapper/Views/AppSettings/AppSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class AppSettings {

static var notifyBatteryCharge: Bool {
get {
return UserDefaults.standard.bool(forKey: "notifyBattteryCharge")
return UserDefaults.standard.bool(forKey: "notifyBatteryCharge")
}
set {
UserDefaults.standard.set(newValue, forKey: "notifyBatteryCharge")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class AppSettingsViewController: NSViewController {
AppSettings.notifyBatteryLevel = self.notifyBatteryLevel.state == .on
}

@IBAction func didChangeNotifyBatteryChange(_ sender: NSButton) {
@IBAction func didChangeNotifyBatteryCharge(_ sender: NSButton) {
AppSettings.notifyBatteryCharge = self.notifyBatteryCharge.state == .on
}

Expand Down
22 changes: 11 additions & 11 deletions JoyKeyMapper/Views/en.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<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">
<rect key="frame" x="20" y="287" width="436" height="62"/>
<rect key="frame" x="20" y="285" width="436" height="62"/>
<clipView key="contentView" id="ulg-Dc-GtP">
<rect key="frame" x="1" y="1" width="434" height="60"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
Expand Down Expand Up @@ -772,17 +772,17 @@
</scroller>
</scrollView>
<splitView arrangesAllSubviews="NO" vertical="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5bB-qj-cCs">
<rect key="frame" x="20" y="49" width="436" height="205"/>
<rect key="frame" x="20" y="49" width="436" height="203"/>
<subviews>
<scrollView misplaced="YES" autohidesScrollers="YES" horizontalLineScroll="34" horizontalPageScroll="10" verticalLineScroll="34" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" id="9QK-AO-8UX">
<rect key="frame" x="0.0" y="0.0" width="154" height="205"/>
<rect key="frame" x="0.0" y="0.0" width="154" height="203"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<clipView key="contentView" id="fhh-tH-xVg">
<rect key="frame" x="1" y="1" width="152" height="203"/>
<rect key="frame" x="1" y="1" width="152" height="201"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" autosaveColumns="NO" rowHeight="32" viewBased="YES" id="ogj-OG-jIQ">
<rect key="frame" x="0.0" y="0.0" width="152" height="203"/>
<rect key="frame" x="0.0" y="0.0" width="152" height="201"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
Expand Down Expand Up @@ -851,14 +851,14 @@
</scroller>
</scrollView>
<scrollView fixedFrame="YES" autohidesScrollers="YES" horizontalLineScroll="24" horizontalPageScroll="10" verticalLineScroll="24" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="53B-wZ-f2a">
<rect key="frame" x="163" y="0.0" width="273" height="205"/>
<rect key="frame" x="163" y="0.0" width="273" height="203"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<clipView key="contentView" id="PHz-aE-X9a">
<rect key="frame" x="1" y="1" width="271" height="203"/>
<rect key="frame" x="1" y="1" width="271" height="201"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<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">
<rect key="frame" x="0.0" y="0.0" width="271" height="203"/>
<rect key="frame" x="0.0" y="0.0" width="271" height="201"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
Expand Down Expand Up @@ -960,7 +960,7 @@
</holdingPriorities>
</splitView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="eQa-gN-N8Y">
<rect key="frame" x="18" y="357" width="71" height="17"/>
<rect key="frame" x="18" y="355" width="71" height="17"/>
<constraints>
<constraint firstAttribute="height" constant="17" id="FVG-r6-Z7V"/>
</constraints>
Expand Down Expand Up @@ -988,7 +988,7 @@
</connections>
</segmentedControl>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wRB-I2-ExF">
<rect key="frame" x="18" y="262" width="36" height="17"/>
<rect key="frame" x="18" y="260" width="36" height="17"/>
<constraints>
<constraint firstAttribute="height" constant="17" id="8xt-Gw-nOg"/>
</constraints>
Expand Down Expand Up @@ -1240,7 +1240,7 @@
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="didChangeNotifyBatteryChange:" target="rRU-ju-4Jj" id="NOo-9v-pe6"/>
<action selector="didChangeNotifyBatteryCharge:" target="rRU-ju-4Jj" id="iGC-Q0-tfr"/>
</connections>
</button>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="yQr-GL-3hz">
Expand Down
Loading

0 comments on commit 4580620

Please sign in to comment.