Skip to content

Commit

Permalink
Tentative work on video name length (unfinished)
Browse files Browse the repository at this point in the history
  • Loading branch information
glouel committed Nov 15, 2018
1 parent 826719a commit 9dd721c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 38 deletions.
3 changes: 0 additions & 3 deletions Aerial/Source/Controllers/PreferencesWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1576,9 +1576,6 @@ class PreferencesWindowController: NSWindowController, NSOutlineViewDataSource,
count += 1
}
return count

//let city = item as! City
//return city.day.videos.count + city.night.videos.count
default:
return 0
}
Expand Down
27 changes: 0 additions & 27 deletions Aerial/Source/Models/AerialVideo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,33 +102,6 @@ class AerialVideo: CustomStringConvertible, Equatable {
}

return getClosestAvailable(wanted: preferences.videoFormat!)
/* // We need to return the closest available format, not pretty
if preferences.videoFormat == Preferences.VideoFormat.v4KHEVC.rawValue {
if url4KHEVC != "" {
return URL(string: self.url4KHEVC)!
} else if url1080pHEVC != "" {
return URL(string: self.url1080pHEVC)!
} else {
return URL(string: self.url1080pH264)!
}
} else if preferences.videoFormat == Preferences.VideoFormat.v1080pHEVC.rawValue {
if url1080pHEVC != "" {
return URL(string: self.url1080pHEVC)!
} else if url1080pH264 != "" {
return URL(string: self.url1080pH264)!
} else {
return URL(string: self.url4KHEVC)!
}
} else {
if url1080pH264 != "" {
return URL(string: self.url1080pH264)!
} else if url1080pHEVC != "" {
// With the latest versions, we should always have a H.264 fallback so this is just for future proofing
return URL(string: self.url1080pHEVC)!
} else {
return URL(string: self.url4KHEVC)!
}
}*/
}

func getClosestAvailable(wanted: Int) -> URL {
Expand Down
3 changes: 3 additions & 0 deletions Aerial/Source/Views/CheckCellView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ class CheckCellView: NSTableCellView {
addButton.isHidden = false
progressIndicator.isHidden = true
queuedImage.isHidden = true
//debugLog("w \(mainTextField.frame.height) \(mainTextField.bounds.height)")
//let size = CGSize(width: 120, height: mainTextField.frame.height)
//mainTextField.setBoundsSize(size)
}

if video!.url4KHEVC == "" {
Expand Down
16 changes: 8 additions & 8 deletions Resources/PreferencesWindow.xib
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
<font key="font" metaFont="system"/>
<tabViewItems>
<tabViewItem label="Videos" identifier="1" id="dfl-QA-fvD">
<view key="view" id="zsM-Ha-kCO">
<view key="view" ambiguous="YES" id="zsM-Ha-kCO">
<rect key="frame" x="10" y="33" width="614" height="381"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
Expand Down Expand Up @@ -216,7 +216,7 @@
</tableCellView>
<tableCellView identifier="CheckCell" id="X6H-3G-WWn" customClass="CheckCellView" customModule="Aerial" customModuleProvider="target">
<rect key="frame" x="1" y="31" width="274" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<autoresizingMask key="autoresizingMask" heightSizable="YES"/>
<subviews>
<button translatesAutoresizingMaskIntoConstraints="NO" id="4gS-Ev-A8c">
<rect key="frame" x="2" y="0.0" width="22" height="18"/>
Expand All @@ -225,7 +225,7 @@
<font key="font" metaFont="smallSystem"/>
</buttonCell>
</button>
<textField verticalHuggingPriority="750" allowsExpansionToolTips="YES" preferredMaxLayoutWidth="150" translatesAutoresizingMaskIntoConstraints="NO" id="5qU-xC-8TY">
<textField verticalHuggingPriority="750" allowsExpansionToolTips="YES" preferredMaxLayoutWidth="190" translatesAutoresizingMaskIntoConstraints="NO" id="5qU-xC-8TY">
<rect key="frame" x="25" y="2" width="84" height="14"/>
<textFieldCell key="cell" controlSize="small" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="hxB-gg-rAu">
<font key="font" metaFont="smallSystem"/>
Expand All @@ -234,7 +234,7 @@
</textFieldCell>
</textField>
<textField identifier="4K" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="rRY-qP-uBn">
<rect key="frame" x="246" y="1" width="26" height="17"/>
<rect key="frame" x="241" y="1" width="26" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES"/>
<textFieldCell key="cell" controlSize="small" lineBreakMode="clipping" borderStyle="border" alignment="center" title="4K" drawsBackground="YES" id="8vf-Ke-XDl" customClass="VerticallyAlignedTextFieldCell" customModule="Aerial" customModuleProvider="target">
<font key="font" metaFont="smallSystem"/>
Expand All @@ -243,7 +243,7 @@
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" fixedFrame="YES" mirrorLayoutDirectionWhenInternationalizing="always" translatesAutoresizingMaskIntoConstraints="NO" id="75k-VB-jeV">
<rect key="frame" x="219" y="-6" width="27" height="26"/>
<rect key="frame" x="214" y="-6" width="27" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES"/>
<buttonCell key="cell" type="round" title="+" bezelStyle="circular" imagePosition="overlaps" alignment="center" controlSize="small" borderStyle="border" baseWritingDirection="rightToLeft" userInterfaceLayoutDirection="rightToLeft" imageScaling="axesIndependently" inset="2" id="g2R-vU-3dF">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
Expand All @@ -254,11 +254,11 @@
</connections>
</button>
<progressIndicator wantsLayer="YES" fixedFrame="YES" maxValue="1" style="bar" translatesAutoresizingMaskIntoConstraints="NO" id="gBT-Ey-6hF">
<rect key="frame" x="202" y="-1" width="39" height="20"/>
<rect key="frame" x="196" y="-1" width="39" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES"/>
</progressIndicator>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="F3z-q1-m5V">
<rect key="frame" x="224" y="0.0" width="19" height="19"/>
<rect key="frame" x="217" y="0.0" width="19" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="NSStatusNone" id="eyv-8z-u69"/>
</imageView>
Expand Down Expand Up @@ -1323,7 +1323,7 @@ Shift, but macOS 10.12.4 or above and a compatible Mac are required) </string>
</view>
</tabViewItem>
<tabViewItem label="Cache" identifier="2" id="kp1-xv-zNG">
<view key="view" ambiguous="YES" id="93q-v8-yxM">
<view key="view" id="93q-v8-yxM">
<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 9dd721c

Please sign in to comment.