Skip to content
Permalink
Browse files

Revert "Fix #2326"

Yeah, I didn't fix it.

This reverts commit e602a57.
  • Loading branch information...
saagarjha committed May 29, 2019
1 parent e602a57 commit cf0d27101da8634025f6602591194e1d318ee0c9
Showing with 9 additions and 31 deletions.
  1. +9 −22 iina/Base.lproj/PrefUIViewController.xib
  2. +0 −8 iina/MainWindowController.swift
  3. +0 −1 iina/Preference.swift
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.55" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.55"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -1045,11 +1045,11 @@
<point key="canvasLocation" x="19" y="-265"/>
</customView>
<customView id="1fz-oP-RhZ">
<rect key="frame" x="0.0" y="0.0" width="588" height="141"/>
<rect key="frame" x="0.0" y="0.0" width="588" height="119"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<textField identifier="SectionTitlePictureInPicture" horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ghC-br-cK9">
<rect key="frame" x="-2" y="99" width="124" height="34"/>
<rect key="frame" x="-2" y="77" width="124" height="34"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" id="G8w-J7-1q1">
<font key="font" metaFont="systemBold"/>
<string key="title">Picture-in-
@@ -1059,7 +1059,7 @@ Picture:</string>
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="A7f-Up-23R">
<rect key="frame" x="118" y="28" width="425" height="18"/>
<rect key="frame" x="118" y="6" width="425" height="18"/>
<buttonCell key="cell" type="check" title="Toggle Picture-in-Picture by minimizing/un-minimizing the window" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="baY-O6-fcB">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
@@ -1069,15 +1069,15 @@ Picture:</string>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="l21-mq-zWd">
<rect key="frame" x="118" y="116" width="209" height="17"/>
<rect key="frame" x="118" y="94" width="209" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="When entering Picture-in-Picture:" id="EUd-RD-g0T">
<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>
<box title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="eTQ-fy-fNJ">
<rect key="frame" x="117" y="56" width="466" height="56"/>
<rect key="frame" x="117" y="34" width="466" height="56"/>
<view key="contentView" id="ucO-5V-y9Y">
<rect key="frame" x="3" y="3" width="460" height="50"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -1148,36 +1148,23 @@ Picture:</string>
</constraints>
</view>
</box>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6jT-ao-ep5">
<rect key="frame" x="118" y="6" width="310" height="18"/>
<buttonCell key="cell" type="check" title="Enter Picture-in-Picture when switching spaces" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="7gM-dr-eqv">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<binding destination="lH7-Vv-0M1" name="value" keyPath="values.enterPipWhenSwitchingSpaces" id="mmR-8o-i9k"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstItem="ghC-br-cK9" firstAttribute="top" secondItem="1fz-oP-RhZ" secondAttribute="top" constant="8" id="5nx-h9-8G4"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="A7f-Up-23R" secondAttribute="trailing" id="6vX-hX-s1z"/>
<constraint firstItem="ghC-br-cK9" firstAttribute="leading" secondItem="1fz-oP-RhZ" secondAttribute="leading" id="A1p-op-Aj1"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="6jT-ao-ep5" secondAttribute="trailing" id="F0Z-2c-GBi"/>
<constraint firstItem="eTQ-fy-fNJ" firstAttribute="top" secondItem="l21-mq-zWd" secondAttribute="bottom" constant="6" id="IVY-I6-WXc"/>
<constraint firstAttribute="bottom" secondItem="A7f-Up-23R" secondAttribute="bottom" constant="8" id="KI3-bx-05m"/>
<constraint firstAttribute="trailing" secondItem="eTQ-fy-fNJ" secondAttribute="trailing" constant="8" id="KZx-Lw-Sfh"/>
<constraint firstItem="6jT-ao-ep5" firstAttribute="top" secondItem="A7f-Up-23R" secondAttribute="bottom" constant="8" id="LDS-9q-sdX"/>
<constraint firstItem="l21-mq-zWd" firstAttribute="top" secondItem="ghC-br-cK9" secondAttribute="top" id="N7b-nm-9lF"/>
<constraint firstItem="l21-mq-zWd" firstAttribute="leading" secondItem="1fz-oP-RhZ" secondAttribute="leading" constant="120" id="Soe-cB-SYk"/>
<constraint firstItem="A7f-Up-23R" firstAttribute="leading" secondItem="eTQ-fy-fNJ" secondAttribute="leading" id="XVe-n6-qzG"/>
<constraint firstItem="A7f-Up-23R" firstAttribute="top" secondItem="eTQ-fy-fNJ" secondAttribute="bottom" constant="16" id="Xso-UC-S3D"/>
<constraint firstAttribute="bottom" secondItem="6jT-ao-ep5" secondAttribute="bottom" constant="8" id="eWS-76-O76"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="l21-mq-zWd" secondAttribute="trailing" id="l5H-rO-WnB"/>
<constraint firstItem="ghC-br-cK9" firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="1fz-oP-RhZ" secondAttribute="leading" constant="120" id="pTG-PR-Adh"/>
<constraint firstItem="6jT-ao-ep5" firstAttribute="leading" secondItem="A7f-Up-23R" secondAttribute="leading" id="rQn-cR-JDk"/>
<constraint firstItem="eTQ-fy-fNJ" firstAttribute="leading" secondItem="l21-mq-zWd" secondAttribute="leading" id="xog-r6-yIL"/>
</constraints>
<point key="canvasLocation" x="6" y="987.5"/>
<point key="canvasLocation" x="6" y="977"/>
</customView>
</objects>
<resources>
@@ -709,14 +709,6 @@ class MainWindowController: NSWindowController, NSWindowDelegate {
self.player.togglePause(true)
}
})

if #available(macOS 10.12, *) {
NSWorkspace.shared.notificationCenter.addObserver(forName: NSWorkspace.activeSpaceDidChangeNotification, object: nil, queue: nil, using: { [unowned self] _ in
if Preference.bool(for: .enterPipWhenSwitchingSpaces) {
self.enterPIP()
}
})
}
}

deinit {
@@ -138,7 +138,6 @@ struct Preference {
static let windowBehaviorWhenPip = Key("windowBehaviorWhenPip")
static let pauseWhenPip = Key("pauseWhenPip")
static let togglePipByMinimizingWindow = Key("togglePipByMinimizingWindow")
static let enterPipWhenSwitchingSpaces = Key("enterPipWhenSwitchingSpaces")

// Codec

0 comments on commit cf0d271

Please sign in to comment.
You can’t perform that action at this time.