Skip to content

Commit

Permalink
Merge pull request #619 from glouel/testfix
Browse files Browse the repository at this point in the history
Last fixes for 1.4.5
  • Loading branch information
glouel authored Nov 3, 2018
2 parents 926004e + 174b8df commit e276098
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
20 changes: 20 additions & 0 deletions Aerial/Source/Controllers/PreferencesWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,10 @@ class PreferencesWindowController: NSWindowController, NSOutlineViewDataSource,
if preferences.darkModeNightOverride {
overrideNightOnDarkMode.state = .on
}
// We disable the checkbox if we are on nightShift mode
if preferences.timeMode == Preferences.TimeMode.lightDarkMode.rawValue {
overrideNightOnDarkMode.isEnabled = false
}
} else {
overrideNightOnDarkMode.isEnabled = false
}
Expand Down Expand Up @@ -1039,6 +1043,12 @@ class PreferencesWindowController: NSWindowController, NSOutlineViewDataSource,

// MARK: - Time panel

@IBAction func overrideNightOnDarkModeClick(_ button: NSButton) {
let onState = (button.state == NSControl.StateValue.on)
preferences.darkModeNightOverride = onState
debugLog("UI overrideNightDarkMode: \(onState)")
}

@IBAction func enterCoordinatesButtonClick(_ sender: Any) {
if enterCoordinatesPanel.isVisible {
enterCoordinatesPanel.close()
Expand All @@ -1052,6 +1062,16 @@ class PreferencesWindowController: NSWindowController, NSOutlineViewDataSource,
}

@IBAction func timeModeChange(_ sender: NSButton?) {
debugLog("UI timeModeChange")
if sender == timeLightDarkModeRadio {
print("dis")
overrideNightOnDarkMode.isEnabled = false
} else {
if #available(OSX 10.14, *) {
overrideNightOnDarkMode.isEnabled = true
}
}

if sender == timeDisabledRadio {
preferences.timeMode = Preferences.TimeMode.disabled.rawValue
} else if sender == timeNightShiftRadio {
Expand Down
4 changes: 2 additions & 2 deletions Aerial/Source/Models/ManifestLoader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ class ManifestLoader {
"b4-2": "N008_C003_", // New York night 2

"b8-2": "A008_C007_", // San Francisco day 1
"b10-3": "A013_C005_", // San Francisco day 2
// "b10-3": , // San Francisco day 2
"b9-3": "A006_C003_", // San Francisco day 3
//"b8-3":"", San Francisco day 4 (no extra poi ?)
"b3-3": "A012_C014_", // San Francisco day 5
// maybe A013_C004 ?
"b4-3": "A013_C012_", // San Francisco day 6
"b4-3": "A013_C005_", // San Francisco day 6
"b6-4": "A004_C012_", // San Francisco night 1
"b7-3": "A007_C017_", // San Francisco night 2
"b5-3": "A015_C014_", // San Francisco night 3
Expand Down
11 changes: 7 additions & 4 deletions Resources/PreferencesWindow.xib
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ should appear</string>
</view>
</tabViewItem>
<tabViewItem label="Time" identifier="" id="PtY-yV-jgj">
<view key="view" id="ziy-Hg-uzO">
<view key="view" ambiguous="YES" id="ziy-Hg-uzO">
<rect key="frame" x="10" y="33" width="614" height="381"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
Expand Down Expand Up @@ -1149,12 +1149,15 @@ Shift, but macOS 10.12.4 or above and a compatible Mac are required) </string>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="NSHomeTemplate" id="lQX-Ux-Sz8"/>
</imageView>
<button toolTip="This will override the time settings to always show night videos if you have enabled dark mode" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="YJt-Nf-qyK">
<rect key="frame" x="8" y="7" width="264" height="18"/>
<rect key="frame" x="8" y="7" width="246" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<buttonCell key="cell" type="check" title="Always show night videos on dark mode" bezelStyle="regularSquare" imagePosition="left" inset="2" id="nZy-k8-5B4">
<buttonCell key="cell" type="check" title="Show only night videos in Dark Mode" bezelStyle="regularSquare" imagePosition="left" inset="2" id="nZy-k8-5B4">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="overrideNightOnDarkModeClick:" target="-2" id="PVR-uW-k3k"/>
</connections>
</button>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="a7p-Yo-yfa">
<rect key="frame" x="403" y="338" width="207" height="32"/>
Expand Down Expand Up @@ -1437,7 +1440,7 @@ Shift, but macOS 10.12.4 or above and a compatible Mac are required) </string>
</view>
</tabViewItem>
<tabViewItem label="Advanced" identifier="" id="asf-lu-1rA">
<view key="view" ambiguous="YES" id="303-Jh-DVp">
<view key="view" id="303-Jh-DVp">
<rect key="frame" x="10" y="33" width="614" height="381"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
Expand Down

0 comments on commit e276098

Please sign in to comment.