mirror of https://code.videolan.org/videolan/vlc
macosx: Remove the dark titlebar view
For now, this is not needed anymore as the dark mode is gone.
This commit is contained in:
parent
67587d2c17
commit
f0d15924fa
|
@ -33,7 +33,6 @@
|
|||
1C3113BC1E508C6900D4DD76 /* VLCKeyboardBacklightControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DF812F01B555C8E0052293C /* VLCKeyboardBacklightControl.m */; };
|
||||
1C3113BD1E508C6900D4DD76 /* macosx.m in Sources */ = {isa = PBXBuildFile; fileRef = 8ED6C27E03E2EB1C0059A3A7 /* macosx.m */; };
|
||||
1C3113C11E508C6900D4DD76 /* VLCMainWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = CC448A6313B68A0B009F72E0 /* VLCMainWindow.m */; };
|
||||
1C3113C31E508C6900D4DD76 /* VLCMainWindowTitleView.m in Sources */ = {isa = PBXBuildFile; fileRef = CC017A0C14A4C8AF00C09A4F /* VLCMainWindowTitleView.m */; };
|
||||
1C3113C51E508C6900D4DD76 /* misc.m in Sources */ = {isa = PBXBuildFile; fileRef = 8ED6C28003E2EB1C0059A3A7 /* misc.m */; };
|
||||
1C3113C71E508C6900D4DD76 /* VLCOpenWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8ED6C28203E2EB1C0059A3A7 /* VLCOpenWindowController.m */; };
|
||||
1C3113C91E508C6900D4DD76 /* VLCOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E55FB800459B0FD00FB3317 /* VLCOutput.m */; };
|
||||
|
@ -459,8 +458,6 @@
|
|||
8ED6C28403E2EB1C0059A3A7 /* VLCPlaylist.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCPlaylist.m; sourceTree = "<group>"; };
|
||||
8ED6C28503E2EB1C0059A3A7 /* prefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = prefs.h; sourceTree = "<group>"; };
|
||||
8ED6C28603E2EB1C0059A3A7 /* prefs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = prefs.m; sourceTree = "<group>"; };
|
||||
CC017A0B14A4C8AF00C09A4F /* VLCMainWindowTitleView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCMainWindowTitleView.h; sourceTree = "<group>"; };
|
||||
CC017A0C14A4C8AF00C09A4F /* VLCMainWindowTitleView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCMainWindowTitleView.m; sourceTree = "<group>"; };
|
||||
CC0663341566C34C003A411C /* VLCConvertAndSaveWindowController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = VLCConvertAndSaveWindowController.h; sourceTree = "<group>"; };
|
||||
CC0663351566C34C003A411C /* VLCConvertAndSaveWindowController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = VLCConvertAndSaveWindowController.m; sourceTree = "<group>"; };
|
||||
CC0CD0DF13DE0EAE00B0D90D /* PXSourceList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PXSourceList.h; sourceTree = "<group>"; };
|
||||
|
@ -1060,8 +1057,6 @@
|
|||
7D5678EF1D5BA397002698F3 /* VLCMainWindowControlsBar.m */,
|
||||
CC448A6213B68A0B009F72E0 /* VLCMainWindow.h */,
|
||||
CC448A6313B68A0B009F72E0 /* VLCMainWindow.m */,
|
||||
CC017A0B14A4C8AF00C09A4F /* VLCMainWindowTitleView.h */,
|
||||
CC017A0C14A4C8AF00C09A4F /* VLCMainWindowTitleView.m */,
|
||||
);
|
||||
name = "Main Window";
|
||||
sourceTree = "<group>";
|
||||
|
@ -1488,7 +1483,7 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = C2F2A6EA09588F1B00018C74 /* Build configuration list for PBXProject "VLC" */;
|
||||
buildConfigurationList = C2F2A6EA09588F1B00018C74 /* Build configuration list for PBXProject "vlc" */;
|
||||
compatibilityVersion = "Xcode 6.3";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
|
@ -1593,7 +1588,6 @@
|
|||
1C3113BD1E508C6900D4DD76 /* macosx.m in Sources */,
|
||||
1C3113C11E508C6900D4DD76 /* VLCMainWindow.m in Sources */,
|
||||
6B0292E61F43256300A50082 /* VLCBottomBarView.m in Sources */,
|
||||
1C3113C31E508C6900D4DD76 /* VLCMainWindowTitleView.m in Sources */,
|
||||
1C3113C51E508C6900D4DD76 /* misc.m in Sources */,
|
||||
1C3113C71E508C6900D4DD76 /* VLCOpenWindowController.m in Sources */,
|
||||
1C3113C91E508C6900D4DD76 /* VLCOutput.m in Sources */,
|
||||
|
@ -1869,7 +1863,7 @@
|
|||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Default;
|
||||
};
|
||||
C2F2A6EA09588F1B00018C74 /* Build configuration list for PBXProject "VLC" */ = {
|
||||
C2F2A6EA09588F1B00018C74 /* Build configuration list for PBXProject "vlc" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C2F2A6EB09588F1B00018C74 /* Development */,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
SUFFIXES += .xib
|
||||
|
||||
libmacosx_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS) -fobjc-exceptions -fobjc-arc
|
||||
libmacosx_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS) -fobjc-exceptions -fobjc-arc
|
||||
libmacosx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)' \
|
||||
-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,CoreServices \
|
||||
-Wl,-framework,AVFoundation -Wl,-framework,CoreMedia -Wl,-framework,IOKit \
|
||||
|
@ -36,7 +36,6 @@ libmacosx_plugin_la_SOURCES = \
|
|||
gui/macosx/VLCKeyboardBacklightControl.h gui/macosx/VLCKeyboardBacklightControl.m \
|
||||
gui/macosx/macosx.m \
|
||||
gui/macosx/VLCMainMenu.h gui/macosx/VLCMainMenu.m \
|
||||
gui/macosx/VLCMainWindowTitleView.h gui/macosx/VLCMainWindowTitleView.m \
|
||||
gui/macosx/misc.h gui/macosx/misc.m \
|
||||
gui/macosx/NSSound+VLCAdditions.h gui/macosx/NSSound+VLCAdditions.m \
|
||||
gui/macosx/NSScreen+VLCAdditions.h gui/macosx/NSScreen+VLCAdditions.m \
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="17D47" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14113" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14113"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="NSWindowController">
|
||||
|
@ -20,95 +22,6 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="363" height="239"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="1" userLabel="Detached Title View" customClass="VLCMainWindowTitleView">
|
||||
<rect key="frame" x="0.0" y="217" width="363" height="22"/>
|
||||
<subviews>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="24" customClass="VLCCustomWindowCloseButton">
|
||||
<rect key="frame" x="7" y="3" width="14" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="HAp-cx-URj"/>
|
||||
<constraint firstAttribute="width" constant="14" id="LNf-Qy-TG9"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="bevel" bezelStyle="regularSquare" imagePosition="only" alignment="left" imageScaling="axesIndependently" inset="2" id="33" customClass="VLCWindowButtonCell">
|
||||
<behavior key="behavior" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="buttonAction:" target="1" id="53"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="25" customClass="VLCCustomWindowMinimizeButton">
|
||||
<rect key="frame" x="27" y="3" width="14" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="4re-Vn-YFb"/>
|
||||
<constraint firstAttribute="width" constant="14" id="PBv-gC-vlV"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="bevel" bezelStyle="regularSquare" imagePosition="only" alignment="left" imageScaling="axesIndependently" inset="2" id="32" customClass="VLCWindowButtonCell">
|
||||
<behavior key="behavior" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="buttonAction:" target="1" id="38"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="26" customClass="VLCCustomWindowZoomButton">
|
||||
<rect key="frame" x="47" y="3" width="14" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="2tY-4g-xst"/>
|
||||
<constraint firstAttribute="width" constant="14" id="YKz-Lu-TFt"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="bevel" bezelStyle="regularSquare" imagePosition="only" alignment="left" imageScaling="axesIndependently" inset="2" id="31" customClass="VLCWindowButtonCell">
|
||||
<behavior key="behavior" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="buttonAction:" target="1" id="52"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="27" customClass="VLCCustomWindowFullscreenButton">
|
||||
<rect key="frame" x="345" y="3" width="14" height="15"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="14" id="dit-fr-XIj"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="center" state="on" inset="2" id="30" customClass="VLCWindowButtonCell">
|
||||
<behavior key="behavior" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="buttonAction:" target="1" id="55"/>
|
||||
</connections>
|
||||
</button>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="28" customClass="VLCWindowTitleTextField">
|
||||
<rect key="frame" x="65" y="3" width="224" height="17"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="center" title="VLC media player" allowsEditingTextAttributes="YES" usesSingleLineMode="YES" id="29">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="22" id="6c1-oq-5vw"/>
|
||||
<constraint firstAttribute="right" secondItem="27" secondAttribute="right" constant="4" id="EUa-A3-U77"/>
|
||||
<constraint firstItem="26" firstAttribute="left" secondItem="25" secondAttribute="right" constant="6" id="EgY-Oe-oRg"/>
|
||||
<constraint firstItem="28" firstAttribute="centerY" secondItem="1" secondAttribute="centerY" id="FVC-gH-9JQ"/>
|
||||
<constraint firstItem="25" firstAttribute="left" secondItem="24" secondAttribute="right" constant="6" id="JgK-vs-BrQ"/>
|
||||
<constraint firstItem="25" firstAttribute="centerY" secondItem="1" secondAttribute="centerY" id="Lw5-nW-6lW"/>
|
||||
<constraint firstItem="24" firstAttribute="left" secondItem="1" secondAttribute="left" constant="7" id="NvG-rV-YhY"/>
|
||||
<constraint firstItem="27" firstAttribute="centerY" secondItem="1" secondAttribute="centerY" id="YIS-Te-ToL"/>
|
||||
<constraint firstItem="24" firstAttribute="centerY" secondItem="1" secondAttribute="centerY" id="aUJ-zT-GaH"/>
|
||||
<constraint firstItem="27" firstAttribute="left" secondItem="28" secondAttribute="right" constant="58" id="pUY-UB-1Wm"/>
|
||||
<constraint firstItem="26" firstAttribute="centerY" secondItem="1" secondAttribute="centerY" id="rKd-Tw-gjS"/>
|
||||
<constraint firstItem="28" firstAttribute="left" secondItem="26" secondAttribute="right" constant="6" id="uRA-WS-6cJ"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<outlet property="fullscreenButton" destination="27" id="Q7Q-c7-2mT"/>
|
||||
<outlet property="greenButton" destination="26" id="ene-pt-Lib"/>
|
||||
<outlet property="redButton" destination="24" id="gRU-rk-buI"/>
|
||||
<outlet property="titleLabel" destination="28" id="hLC-1g-oFA"/>
|
||||
<outlet property="yellowButton" destination="25" id="RzQ-RH-CMN"/>
|
||||
</connections>
|
||||
</customView>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="5" customClass="VLCBottomBarView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="363" height="36"/>
|
||||
<subviews>
|
||||
|
@ -224,15 +137,12 @@
|
|||
</constraints>
|
||||
</customView>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="63" customClass="VLCVoutView">
|
||||
<rect key="frame" x="0.0" y="36" width="363" height="181"/>
|
||||
<rect key="frame" x="0.0" y="36" width="363" height="203"/>
|
||||
</customView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="5" firstAttribute="leading" secondItem="4" secondAttribute="leading" id="9Ml-c7-Mey"/>
|
||||
<constraint firstItem="1" firstAttribute="leading" secondItem="4" secondAttribute="leading" id="Ax8-ub-dBJ"/>
|
||||
<constraint firstItem="1" firstAttribute="top" secondItem="4" secondAttribute="top" id="F0d-2K-Uhn"/>
|
||||
<constraint firstItem="63" firstAttribute="top" secondItem="1" secondAttribute="bottom" priority="999" id="FwP-Fl-7P6"/>
|
||||
<constraint firstItem="63" firstAttribute="top" secondItem="4" secondAttribute="top" priority="750" id="SR5-da-lz7">
|
||||
<constraint firstItem="63" firstAttribute="top" secondItem="4" secondAttribute="top" id="SR5-da-lz7">
|
||||
<attributedString key="userComments">
|
||||
<fragment content="Optional constraint if no titlebar">
|
||||
<attributes>
|
||||
|
@ -248,15 +158,12 @@
|
|||
<constraint firstAttribute="trailing" secondItem="63" secondAttribute="trailing" id="b8X-Kc-BfD"/>
|
||||
<constraint firstAttribute="trailing" secondItem="5" secondAttribute="trailing" id="jZw-zr-cck"/>
|
||||
<constraint firstAttribute="bottom" secondItem="5" secondAttribute="bottom" id="mhi-VL-aFb"/>
|
||||
<constraint firstAttribute="trailing" secondItem="1" secondAttribute="trailing" id="qhH-vy-333"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="controlsBar" destination="3" id="69"/>
|
||||
<outlet property="titlebarView" destination="1" id="70"/>
|
||||
<outlet property="videoView" destination="63" id="68"/>
|
||||
<outlet property="videoViewBottomConstraint" destination="VbV-nq-qDN" id="twJ-2J-MZX"/>
|
||||
<outlet property="videoViewTopConstraint" destination="FwP-Fl-7P6" id="aVJ-aJ-MxQ"/>
|
||||
</connections>
|
||||
</window>
|
||||
<customObject id="3" userLabel="Detached Window Controls Bar" customClass="VLCControlsBarCommon">
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="17D47" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14113" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<development version="7000" identifier="xcode"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14113"/>
|
||||
<capability name="box content view" minToolsVersion="7.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="NSWindowController">
|
||||
|
@ -22,116 +23,27 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="716" height="333"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="4850" customClass="VLCMainWindowTitleView">
|
||||
<rect key="frame" x="0.0" y="311" width="716" height="22"/>
|
||||
<subviews>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="4895" customClass="VLCCustomWindowCloseButton">
|
||||
<rect key="frame" x="7" y="3" width="14" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="14" id="RZv-ag-rGe"/>
|
||||
<constraint firstAttribute="height" constant="16" id="qJu-ND-mkX"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="bevel" bezelStyle="regularSquare" imagePosition="only" alignment="center" state="on" imageScaling="axesIndependently" inset="2" id="4904" customClass="VLCWindowButtonCell">
|
||||
<behavior key="behavior" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="buttonAction:" target="4850" id="4917"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="4896" customClass="VLCCustomWindowMinimizeButton">
|
||||
<rect key="frame" x="27" y="3" width="14" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="ARN-CQ-jIu"/>
|
||||
<constraint firstAttribute="width" constant="14" id="ejR-g1-Kfq"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="bevel" bezelStyle="regularSquare" imagePosition="only" alignment="center" imageScaling="axesIndependently" inset="2" id="4903" customClass="VLCWindowButtonCell">
|
||||
<behavior key="behavior" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="buttonAction:" target="4850" id="4916"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="4897" customClass="VLCCustomWindowZoomButton">
|
||||
<rect key="frame" x="47" y="3" width="14" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="14" id="aFX-QU-2FJ"/>
|
||||
<constraint firstAttribute="height" constant="16" id="h7s-Kd-KA9"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="bevel" bezelStyle="regularSquare" imagePosition="only" alignment="center" imageScaling="axesIndependently" inset="2" id="4902" customClass="VLCWindowButtonCell">
|
||||
<behavior key="behavior" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="buttonAction:" target="4850" id="4915"/>
|
||||
</connections>
|
||||
</button>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="4899" customClass="VLCWindowTitleTextField">
|
||||
<rect key="frame" x="65" y="3" width="577" height="17"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="center" title="VLC media player" allowsEditingTextAttributes="YES" usesSingleLineMode="YES" id="4900">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="4898" customClass="VLCCustomWindowFullscreenButton">
|
||||
<rect key="frame" x="698" y="3" width="14" height="15"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="14" id="f3g-MG-7Ed"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" alignment="center" state="on" inset="2" id="4901" customClass="VLCWindowButtonCell">
|
||||
<behavior key="behavior" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="buttonAction:" target="4850" id="4914"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="4897" firstAttribute="centerY" secondItem="4850" secondAttribute="centerY" id="2ij-98-UM8"/>
|
||||
<constraint firstItem="4895" firstAttribute="centerY" secondItem="4850" secondAttribute="centerY" id="5L5-iR-hzi"/>
|
||||
<constraint firstItem="4895" firstAttribute="left" secondItem="4850" secondAttribute="left" constant="7" id="5rk-de-0OR"/>
|
||||
<constraint firstItem="4896" firstAttribute="centerY" secondItem="4850" secondAttribute="centerY" id="ObI-6s-vN3"/>
|
||||
<constraint firstAttribute="right" secondItem="4898" secondAttribute="right" constant="4" id="P0a-sl-gz9"/>
|
||||
<constraint firstItem="4899" firstAttribute="centerY" secondItem="4850" secondAttribute="centerY" id="S8e-hh-HbK"/>
|
||||
<constraint firstItem="4898" firstAttribute="left" secondItem="4899" secondAttribute="right" constant="58" id="TnQ-Lu-s8V"/>
|
||||
<constraint firstItem="4897" firstAttribute="left" secondItem="4896" secondAttribute="right" constant="6" id="XTh-J6-ocw"/>
|
||||
<constraint firstAttribute="height" constant="22" id="buN-9i-9oy"/>
|
||||
<constraint firstItem="4896" firstAttribute="left" secondItem="4895" secondAttribute="right" constant="6" id="jS6-Nc-Whc"/>
|
||||
<constraint firstItem="4898" firstAttribute="centerY" secondItem="4850" secondAttribute="centerY" id="tj5-SN-vII"/>
|
||||
<constraint firstItem="4899" firstAttribute="left" secondItem="4897" secondAttribute="right" constant="6" id="wQh-pU-b7u"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<outlet property="fullscreenButton" destination="4898" id="lbk-lI-Uov"/>
|
||||
<outlet property="greenButton" destination="4897" id="2J9-uI-vLb"/>
|
||||
<outlet property="redButton" destination="4895" id="ktq-aJ-S89"/>
|
||||
<outlet property="titleLabel" destination="4899" id="44w-AH-65I"/>
|
||||
<outlet property="yellowButton" destination="4896" id="aib-Yt-4kE"/>
|
||||
</connections>
|
||||
</customView>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="3Bj-Gx-5iu" userLabel="Middle Content">
|
||||
<rect key="frame" x="0.0" y="36" width="716" height="275"/>
|
||||
<rect key="frame" x="0.0" y="36" width="716" height="297"/>
|
||||
<subviews>
|
||||
<customView hidden="YES" focusRingType="none" translatesAutoresizingMaskIntoConstraints="NO" id="4665" customClass="VLCVoutView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="716" height="275"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="716" height="297"/>
|
||||
</customView>
|
||||
<splitView autosaveName="mainWindowSplitView" dividerStyle="thin" vertical="YES" translatesAutoresizingMaskIntoConstraints="NO" id="4680" customClass="VLCMainWindowSplitView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="716" height="275"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="716" height="297"/>
|
||||
<subviews>
|
||||
<customView id="4681">
|
||||
<rect key="frame" x="0.0" y="0.0" width="238" height="275"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="238" height="297"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<scrollView focusRingType="none" autohidesScrollers="YES" horizontalLineScroll="20" horizontalPageScroll="10" verticalLineScroll="20" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4713">
|
||||
<rect key="frame" x="0.0" y="0.0" width="238" height="275"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="238" height="297"/>
|
||||
<clipView key="contentView" drawsBackground="NO" id="3dd-Re-96d">
|
||||
<rect key="frame" x="1" y="1" width="236" height="273"/>
|
||||
<rect key="frame" x="1" y="1" width="236" height="295"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<outlineView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" selectionHighlightStyle="sourceList" columnReordering="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" rowHeight="20" indentationPerLevel="14" autoresizesOutlineColumn="YES" outlineTableColumn="4717" id="4714" customClass="PXSourceList">
|
||||
<rect key="frame" x="0.0" y="0.0" width="203" height="20"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="236" height="295"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
|
||||
<size key="intercellSpacing" width="3" height="0.0"/>
|
||||
<color key="backgroundColor" name="_sourceListBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
|
@ -173,11 +85,11 @@
|
|||
</constraints>
|
||||
</customView>
|
||||
<customView id="4682">
|
||||
<rect key="frame" x="239" y="0.0" width="477" height="275"/>
|
||||
<rect key="frame" x="239" y="0.0" width="477" height="297"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="gff-CR-TiL" userLabel="Header View">
|
||||
<rect key="frame" x="0.0" y="252" width="477" height="23"/>
|
||||
<rect key="frame" x="0.0" y="274" width="477" height="23"/>
|
||||
<subviews>
|
||||
<imageView translatesAutoresizingMaskIntoConstraints="NO" id="4692">
|
||||
<rect key="frame" x="0.0" y="-4" width="477" height="27"/>
|
||||
|
@ -219,20 +131,20 @@
|
|||
</constraints>
|
||||
</customView>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="U2A-0F-udY" userLabel="Inner content view">
|
||||
<rect key="frame" x="0.0" y="0.0" width="477" height="252"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="477" height="274"/>
|
||||
<subviews>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="4722" userLabel="Dropzone">
|
||||
<rect key="frame" x="0.0" y="0.0" width="477" height="252"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="477" height="274"/>
|
||||
<subviews>
|
||||
<imageView translatesAutoresizingMaskIntoConstraints="NO" id="4731" customClass="VLCDropDisabledImageView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="477" height="252"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="477" height="274"/>
|
||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="axesIndependently" image="dropzone-background" id="4732"/>
|
||||
</imageView>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="5605" customClass="VLCDragDropView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="477" height="252"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="477" height="274"/>
|
||||
<subviews>
|
||||
<box autoresizesSubviews="NO" transparent="YES" title="Box" borderType="none" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="4739">
|
||||
<rect key="frame" x="89" y="10" width="300" height="230"/>
|
||||
<box autoresizesSubviews="NO" borderType="none" title="Box" titlePosition="noTitle" transparent="YES" translatesAutoresizingMaskIntoConstraints="NO" id="4739">
|
||||
<rect key="frame" x="89" y="21" width="300" height="230"/>
|
||||
<view key="contentView" id="pxq-Tn-LtA">
|
||||
<rect key="frame" x="0.0" y="0.0" width="300" height="230"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
|
@ -298,13 +210,13 @@
|
|||
</constraints>
|
||||
</customView>
|
||||
<scrollView focusRingType="none" autohidesScrollers="YES" horizontalLineScroll="17" horizontalPageScroll="10" verticalLineScroll="17" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4372">
|
||||
<rect key="frame" x="0.0" y="0.0" width="477" height="252"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="477" height="274"/>
|
||||
<clipView key="contentView" id="wTX-wO-asx">
|
||||
<rect key="frame" x="1" y="0.0" width="475" height="251"/>
|
||||
<rect key="frame" x="1" y="0.0" width="475" height="273"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<outlineView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="reverseSequential" alternatingRowBackgroundColors="YES" autosaveColumns="NO" rowHeight="15" headerView="4373" indentationPerLevel="16" autoresizesOutlineColumn="YES" outlineTableColumn="4380" id="4376" customClass="VLCPlaylistView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="475" height="228"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="475" height="250"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<size key="intercellSpacing" width="3" height="2"/>
|
||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
|
@ -720,17 +632,13 @@
|
|||
</customView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="4850" firstAttribute="top" secondItem="2" secondAttribute="top" id="0hK-vP-S7V"/>
|
||||
<constraint firstAttribute="trailing" secondItem="4850" secondAttribute="trailing" id="1Te-pH-1Va"/>
|
||||
<constraint firstItem="3Bj-Gx-5iu" firstAttribute="top" secondItem="2" secondAttribute="top" priority="750" id="1tZ-Wy-sCS"/>
|
||||
<constraint firstItem="3Bj-Gx-5iu" firstAttribute="top" secondItem="2" secondAttribute="top" id="1tZ-Wy-sCS"/>
|
||||
<constraint firstItem="4756" firstAttribute="leading" secondItem="2" secondAttribute="leading" id="557-Ee-bES"/>
|
||||
<constraint firstAttribute="trailing" secondItem="3Bj-Gx-5iu" secondAttribute="trailing" id="7zX-eF-Vez"/>
|
||||
<constraint firstAttribute="bottom" secondItem="4756" secondAttribute="bottom" id="HK1-1U-ca3"/>
|
||||
<constraint firstAttribute="bottom" secondItem="3Bj-Gx-5iu" secondAttribute="bottom" priority="750" id="OGC-NR-LLR"/>
|
||||
<constraint firstItem="3Bj-Gx-5iu" firstAttribute="leading" secondItem="2" secondAttribute="leading" id="XkA-TM-ova"/>
|
||||
<constraint firstItem="4850" firstAttribute="leading" secondItem="2" secondAttribute="leading" id="YnQ-ht-C3F"/>
|
||||
<constraint firstItem="4756" firstAttribute="top" secondItem="3Bj-Gx-5iu" secondAttribute="bottom" priority="999" id="ZVn-EJ-9CG"/>
|
||||
<constraint firstItem="3Bj-Gx-5iu" firstAttribute="top" secondItem="4850" secondAttribute="bottom" priority="999" id="jue-fS-RgT"/>
|
||||
<constraint firstAttribute="trailing" secondItem="4756" secondAttribute="trailing" id="uz3-RG-aAD"/>
|
||||
</constraints>
|
||||
</view>
|
||||
|
@ -766,10 +674,8 @@
|
|||
<outlet property="splitViewLeft" destination="4681" id="ryK-3z-wuu"/>
|
||||
<outlet property="splitViewRight" destination="4682" id="REX-fd-CCP"/>
|
||||
<outlet property="tableViewToPodcastConstraint" destination="AIy-oz-19u" id="NaG-yj-Yoh"/>
|
||||
<outlet property="titlebarView" destination="4850" id="5625"/>
|
||||
<outlet property="videoView" destination="4665" id="5622"/>
|
||||
<outlet property="videoViewBottomConstraint" destination="ZVn-EJ-9CG" id="8F2-BP-yVS"/>
|
||||
<outlet property="videoViewTopConstraint" destination="jue-fS-RgT" id="r7T-dB-Gsi"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="465" y="507.5"/>
|
||||
</window>
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#import "Windows.h"
|
||||
#import "misc.h"
|
||||
#import "VLCFSPanelController.h"
|
||||
#import "VLCMainWindowTitleView.h"
|
||||
|
||||
@class VLCDetachedVideoWindow;
|
||||
@class VLCMainWindowControlsBar;
|
||||
|
|
|
@ -1,90 +0,0 @@
|
|||
/*****************************************************************************
|
||||
* MainWindowTitle.h: MacOS X interface module
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2011-2012 Felix Paul Kühne
|
||||
* $Id$
|
||||
*
|
||||
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "misc.h"
|
||||
|
||||
/*****************************************************************************
|
||||
* VLCMainWindowTitleView
|
||||
*****************************************************************************/
|
||||
|
||||
@class VLCCustomWindowCloseButton;
|
||||
@class VLCCustomWindowMinimizeButton;
|
||||
@class VLCCustomWindowZoomButton;
|
||||
@class VLCCustomWindowFullscreenButton;
|
||||
@class VLCWindowTitleTextField;
|
||||
|
||||
@interface VLCMainWindowTitleView : VLCThreePartImageView
|
||||
|
||||
@property (readwrite, strong) IBOutlet VLCCustomWindowCloseButton *redButton;
|
||||
@property (readwrite, strong) IBOutlet VLCCustomWindowMinimizeButton *yellowButton;
|
||||
@property (readwrite, strong) IBOutlet VLCCustomWindowZoomButton *greenButton;
|
||||
@property (readwrite, strong) IBOutlet VLCCustomWindowFullscreenButton *fullscreenButton;
|
||||
@property (readwrite, strong) IBOutlet VLCWindowTitleTextField *titleLabel;
|
||||
|
||||
@property (readonly) NSButton * closeButton;
|
||||
@property (readonly) NSButton * minimizeButton;
|
||||
@property (readonly) NSButton * zoomButton;
|
||||
|
||||
- (void)informModifierPressed:(BOOL)b_is_altkey;
|
||||
- (void)loadButtonIcons;
|
||||
- (IBAction)buttonAction:(id)sender;
|
||||
- (void)setWindowTitle:(NSString *)title;
|
||||
- (void)setWindowButtonOver:(BOOL)b_value;
|
||||
- (void)setWindowFullscreenButtonOver:(BOOL)b_value;
|
||||
|
||||
@end
|
||||
|
||||
@interface VLCWindowButtonCell : NSButtonCell
|
||||
|
||||
@end
|
||||
|
||||
@interface VLCCustomWindowButtonPrototype : NSButton
|
||||
|
||||
- (NSArray*)extendedAccessibilityAttributeNames: (NSArray*)theAttributeNames;
|
||||
- (id)extendedAccessibilityAttributeValue: (NSString*)theAttributeName;
|
||||
- (NSNumber*)extendedAccessibilityIsAttributeSettable: (NSString*)theAttributeName;
|
||||
|
||||
@end
|
||||
|
||||
@interface VLCCustomWindowCloseButton : VLCCustomWindowButtonPrototype
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface VLCCustomWindowMinimizeButton : VLCCustomWindowButtonPrototype
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface VLCCustomWindowZoomButton : VLCCustomWindowButtonPrototype
|
||||
|
||||
@end
|
||||
|
||||
@interface VLCCustomWindowFullscreenButton : VLCCustomWindowButtonPrototype
|
||||
|
||||
@end
|
||||
|
||||
@interface VLCWindowTitleTextField : NSTextField
|
||||
|
||||
@end
|
|
@ -1,566 +0,0 @@
|
|||
/*****************************************************************************
|
||||
* MainWindowTitle.m: MacOS X interface module
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2011-2012 Felix Paul Kühne
|
||||
* $Id$
|
||||
*
|
||||
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
|
||||
#import <vlc_common.h>
|
||||
#import "VLCMain.h"
|
||||
#import "VLCMainWindowTitleView.h"
|
||||
#import "VLCCoreInteraction.h"
|
||||
#import "CompatibilityFixes.h"
|
||||
#import <SystemConfiguration/SystemConfiguration.h> // for the revealInFinder clone
|
||||
|
||||
/*****************************************************************************
|
||||
* VLCMainWindowTitleView
|
||||
*
|
||||
* this is our title bar, which can do anything a title should do
|
||||
* it relies on the VLCWindowButtonCell to display the correct traffic light
|
||||
* states, since we can't capture the mouse-moved events here correctly
|
||||
*****************************************************************************/
|
||||
|
||||
@interface VLCMainWindowTitleView()
|
||||
{
|
||||
NSImage *_redImage;
|
||||
NSImage *_redHoverImage;
|
||||
NSImage *_redOnClickImage;
|
||||
NSImage * _yellowImage;
|
||||
NSImage * _yellowHoverImage;
|
||||
NSImage * _yellowOnClickImage;
|
||||
NSImage * _greenImage;
|
||||
NSImage * _greenHoverImage;
|
||||
NSImage * _greenOnClickImage;
|
||||
// yosemite fullscreen images
|
||||
NSImage * _fullscreenImage;
|
||||
NSImage * _fullscreenHoverImage;
|
||||
NSImage * _fullscreenOnClickImage;
|
||||
// old native fullscreen images
|
||||
NSImage * _oldFullscreenImage;
|
||||
NSImage * _oldFullscreenHoverImage;
|
||||
NSImage * _oldFullscreenOnClickImage;
|
||||
|
||||
NSShadow * _windowTitleShadow;
|
||||
NSDictionary * _windowTitleAttributesDictionary;
|
||||
|
||||
BOOL b_nativeFullscreenMode;
|
||||
|
||||
// state to determine correct image for green bubble
|
||||
BOOL b_alt_pressed;
|
||||
BOOL b_mouse_over;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation VLCMainWindowTitleView
|
||||
|
||||
- (id)init
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
if (self) {
|
||||
_windowTitleAttributesDictionary = [NSDictionary dictionaryWithObjectsAndKeys: [NSColor whiteColor], NSForegroundColorAttributeName, [NSFont titleBarFontOfSize:12.0], NSFontAttributeName, nil];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||
}
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
b_nativeFullscreenMode = var_InheritBool(getIntf(), "macosx-nativefullscreenmode");
|
||||
|
||||
if (!b_nativeFullscreenMode || OSX_YOSEMITE_AND_HIGHER) {
|
||||
[_fullscreenButton setHidden: YES];
|
||||
}
|
||||
|
||||
[self setAutoresizesSubviews: YES];
|
||||
[self setImagesLeft:imageFromRes(@"topbar-dark-left") middle: imageFromRes(@"topbar-dark-center-fill") right:imageFromRes(@"topbar-dark-right")];
|
||||
|
||||
[self loadButtonIcons];
|
||||
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(controlTintChanged:) name: NSControlTintDidChangeNotification object: nil];
|
||||
}
|
||||
|
||||
- (void)controlTintChanged:(NSNotification *)notification
|
||||
{
|
||||
[self loadButtonIcons];
|
||||
|
||||
[_redButton setNeedsDisplay];
|
||||
[_yellowButton setNeedsDisplay];
|
||||
[_greenButton setNeedsDisplay];
|
||||
}
|
||||
|
||||
- (void)informModifierPressed:(BOOL)b_is_altkey;
|
||||
{
|
||||
BOOL b_state_changed = b_alt_pressed != b_is_altkey;
|
||||
|
||||
b_alt_pressed = b_is_altkey;
|
||||
|
||||
if (b_state_changed) {
|
||||
[self updateGreenButton];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSImage *)getButtonImage:(NSString *)o_id
|
||||
{
|
||||
NSString *o_name = @"";
|
||||
if (OSX_YOSEMITE_AND_HIGHER) {
|
||||
o_name = @"yosemite-";
|
||||
} else { // OSX_LION_AND_HIGHER, OSX_MOUNTAIN_LION_AND_HIGHER, OSX_MAVERICKS_AND_HIGHER
|
||||
o_name = @"lion-";
|
||||
}
|
||||
|
||||
o_name = [o_name stringByAppendingString:o_id];
|
||||
|
||||
if ([NSColor currentControlTint] != NSBlueControlTint) {
|
||||
o_name = [o_name stringByAppendingString:@"-graphite"];
|
||||
}
|
||||
|
||||
return [NSImage imageNamed:o_name];
|
||||
}
|
||||
|
||||
- (void)loadButtonIcons
|
||||
{
|
||||
_redImage = [self getButtonImage:@"window-close"];
|
||||
_redHoverImage = [self getButtonImage:@"window-close-over"];
|
||||
_redOnClickImage = [self getButtonImage:@"window-close-on"];
|
||||
_yellowImage = [self getButtonImage:@"window-minimize"];
|
||||
_yellowHoverImage = [self getButtonImage:@"window-minimize-over"];
|
||||
_yellowOnClickImage = [self getButtonImage:@"window-minimize-on"];
|
||||
_greenImage = [self getButtonImage:@"window-zoom"];
|
||||
_greenHoverImage = [self getButtonImage:@"window-zoom-over"];
|
||||
_greenOnClickImage = [self getButtonImage:@"window-zoom-on"];
|
||||
|
||||
// these files are only available in the yosemite variant
|
||||
if (OSX_YOSEMITE_AND_HIGHER) {
|
||||
_fullscreenImage = [self getButtonImage:@"window-fullscreen"];
|
||||
_fullscreenHoverImage = [self getButtonImage:@"window-fullscreen-over"];
|
||||
_fullscreenOnClickImage = [self getButtonImage:@"window-fullscreen-on"];
|
||||
}
|
||||
|
||||
// old native fullscreen images are not available in graphite style
|
||||
// thus they are loaded directly here
|
||||
_oldFullscreenImage = [NSImage imageNamed:@"lion-window-fullscreen"];
|
||||
_oldFullscreenOnClickImage = [NSImage imageNamed:@"lion-window-fullscreen-on"];
|
||||
_oldFullscreenHoverImage = [NSImage imageNamed:@"lion-window-fullscreen-over"];
|
||||
|
||||
[_redButton setImage: _redImage];
|
||||
[_redButton setAlternateImage: _redHoverImage];
|
||||
[[_redButton cell] setShowsBorderOnlyWhileMouseInside: YES];
|
||||
[[_redButton cell] setTag: 0];
|
||||
[_yellowButton setImage: _yellowImage];
|
||||
[_yellowButton setAlternateImage: _yellowHoverImage];
|
||||
[[_yellowButton cell] setShowsBorderOnlyWhileMouseInside: YES];
|
||||
[[_yellowButton cell] setTag: 1];
|
||||
|
||||
[self updateGreenButton];
|
||||
[[_greenButton cell] setShowsBorderOnlyWhileMouseInside: YES];
|
||||
[[_greenButton cell] setTag: 2];
|
||||
|
||||
[_fullscreenButton setImage: _oldFullscreenImage];
|
||||
[_fullscreenButton setAlternateImage: _oldFullscreenHoverImage];
|
||||
[[_fullscreenButton cell] setShowsBorderOnlyWhileMouseInside: YES];
|
||||
[[_fullscreenButton cell] setTag: 3];
|
||||
}
|
||||
|
||||
- (void)updateGreenButton
|
||||
{
|
||||
// default image for old version, or if native fullscreen is
|
||||
// disabled on yosemite, or if alt key is pressed
|
||||
if (!OSX_YOSEMITE_AND_HIGHER || !b_nativeFullscreenMode || b_alt_pressed) {
|
||||
|
||||
if (b_mouse_over) {
|
||||
[_greenButton setImage: _greenHoverImage];
|
||||
[_greenButton setAlternateImage: _greenOnClickImage];
|
||||
} else {
|
||||
[_greenButton setImage: _greenImage];
|
||||
[_greenButton setAlternateImage: _greenOnClickImage];
|
||||
}
|
||||
} else {
|
||||
|
||||
if (b_mouse_over) {
|
||||
[_greenButton setImage: _fullscreenHoverImage];
|
||||
[_greenButton setAlternateImage: _fullscreenOnClickImage];
|
||||
} else {
|
||||
[_greenButton setImage: _fullscreenImage];
|
||||
[_greenButton setAlternateImage: _fullscreenOnClickImage];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)mouseDownCanMoveWindow
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (IBAction)buttonAction:(id)sender
|
||||
{
|
||||
if (sender == _redButton)
|
||||
[[self window] performClose: sender];
|
||||
else if (sender == _yellowButton)
|
||||
[[self window] miniaturize: sender];
|
||||
else if (sender == _greenButton) {
|
||||
if (OSX_YOSEMITE_AND_HIGHER && b_nativeFullscreenMode && !b_alt_pressed) {
|
||||
[[self window] toggleFullScreen:self];
|
||||
} else {
|
||||
[[self window] performZoom: sender];
|
||||
}
|
||||
} else if (sender == _fullscreenButton) {
|
||||
// same action as native fs button
|
||||
[[self window] toggleFullScreen:self];
|
||||
|
||||
} else
|
||||
msg_Err(getIntf(), "unknown button action sender");
|
||||
|
||||
[self setWindowButtonOver: NO];
|
||||
[self setWindowFullscreenButtonOver: NO];
|
||||
}
|
||||
|
||||
- (void)setWindowTitle:(NSString *)title
|
||||
{
|
||||
if (!_windowTitleShadow) {
|
||||
_windowTitleShadow = [[NSShadow alloc] init];
|
||||
[_windowTitleShadow setShadowColor:[NSColor colorWithCalibratedWhite:1.0 alpha:0.5]];
|
||||
[_windowTitleShadow setShadowOffset:NSMakeSize(0.0, -1.5)];
|
||||
[_windowTitleShadow setShadowBlurRadius:0.5];
|
||||
}
|
||||
|
||||
NSMutableAttributedString *attributedTitleString = [[NSMutableAttributedString alloc] initWithString:title attributes: _windowTitleAttributesDictionary];
|
||||
NSUInteger i_titleLength = [title length];
|
||||
|
||||
[attributedTitleString addAttribute:NSShadowAttributeName value:_windowTitleShadow range:NSMakeRange(0, i_titleLength)];
|
||||
[attributedTitleString setAlignment: NSCenterTextAlignment range:NSMakeRange(0, i_titleLength)];
|
||||
[_titleLabel setAttributedStringValue:attributedTitleString];
|
||||
}
|
||||
|
||||
- (void)setWindowButtonOver:(BOOL)b_value
|
||||
{
|
||||
b_mouse_over = b_value;
|
||||
if (b_value) {
|
||||
[_redButton setImage: _redHoverImage];
|
||||
[_yellowButton setImage: _yellowHoverImage];
|
||||
} else {
|
||||
[_redButton setImage: _redImage];
|
||||
[_yellowButton setImage: _yellowImage];
|
||||
}
|
||||
|
||||
[self updateGreenButton];
|
||||
}
|
||||
|
||||
- (void)setWindowFullscreenButtonOver:(BOOL)b_value
|
||||
{
|
||||
if (b_value)
|
||||
[_fullscreenButton setImage: _oldFullscreenHoverImage];
|
||||
else
|
||||
[_fullscreenButton setImage: _oldFullscreenImage];
|
||||
}
|
||||
|
||||
- (void)mouseDown:(NSEvent *)event
|
||||
{
|
||||
NSPoint ml = [self convertPoint: [event locationInWindow] fromView: self];
|
||||
if (([[self window] frame].size.height - ml.y) <= 22. && [event clickCount] == 2) {
|
||||
//Get settings from "System Preferences" > "Appearance" > "Double-click on windows title bar to minimize"
|
||||
NSString *const MDAppleMiniaturizeOnDoubleClickKey = @"AppleMiniaturizeOnDoubleClick";
|
||||
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
|
||||
[userDefaults addSuiteNamed:NSGlobalDomain];
|
||||
|
||||
if ([[userDefaults objectForKey:MDAppleMiniaturizeOnDoubleClickKey] boolValue])
|
||||
[[self window] miniaturize:self];
|
||||
}
|
||||
|
||||
[super mouseDown: event];
|
||||
}
|
||||
|
||||
- (NSButton*)closeButton
|
||||
{
|
||||
return _redButton;
|
||||
}
|
||||
|
||||
- (NSButton*)minimizeButton
|
||||
{
|
||||
return _yellowButton;
|
||||
}
|
||||
|
||||
- (NSButton*)zoomButton
|
||||
{
|
||||
return _greenButton;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
/*****************************************************************************
|
||||
* VLCWindowButtonCell
|
||||
*
|
||||
* since the title bar cannot fetch these mouse events (the more top-level
|
||||
* NSButton is unable fetch them as well), we are using a subclass of the
|
||||
* button cell to do so. It's set in the nib for the respective objects.
|
||||
*****************************************************************************/
|
||||
|
||||
@implementation VLCWindowButtonCell
|
||||
|
||||
- (void)mouseEntered:(NSEvent *)theEvent
|
||||
{
|
||||
if ([self tag] == 3)
|
||||
[(VLCMainWindowTitleView *)[[self controlView] superview] setWindowFullscreenButtonOver: YES];
|
||||
else
|
||||
[(VLCMainWindowTitleView *)[[self controlView] superview] setWindowButtonOver: YES];
|
||||
}
|
||||
|
||||
- (void)mouseExited:(NSEvent *)theEvent
|
||||
{
|
||||
if ([self tag] == 3)
|
||||
[(VLCMainWindowTitleView *)[[self controlView] superview] setWindowFullscreenButtonOver: NO];
|
||||
else
|
||||
[(VLCMainWindowTitleView *)[[self controlView] superview] setWindowButtonOver: NO];
|
||||
}
|
||||
|
||||
/* accessibility stuff */
|
||||
- (NSArray*)accessibilityAttributeNames {
|
||||
NSArray *theAttributeNames = [super accessibilityAttributeNames];
|
||||
id theControlView = [self controlView];
|
||||
return ([theControlView respondsToSelector: @selector(extendedAccessibilityAttributeNames:)] ? [theControlView extendedAccessibilityAttributeNames: theAttributeNames] : theAttributeNames); // ask the cell's control view (i.e., the button) for additional attribute values
|
||||
}
|
||||
|
||||
- (id)accessibilityAttributeValue: (NSString*)theAttributeName {
|
||||
id theControlView = [self controlView];
|
||||
if ([theControlView respondsToSelector: @selector(extendedAccessibilityAttributeValue:)]) {
|
||||
id theValue = [theControlView extendedAccessibilityAttributeValue: theAttributeName];
|
||||
if (theValue) {
|
||||
return theValue; // if this is an extended attribute value we added, return that -- otherwise, fall back to super's implementation
|
||||
}
|
||||
}
|
||||
return [super accessibilityAttributeValue: theAttributeName];
|
||||
}
|
||||
|
||||
- (BOOL)accessibilityIsAttributeSettable: (NSString*)theAttributeName {
|
||||
id theControlView = [self controlView];
|
||||
if ([theControlView respondsToSelector: @selector(extendedAccessibilityIsAttributeSettable:)]) {
|
||||
NSNumber *theValue = [theControlView extendedAccessibilityIsAttributeSettable: theAttributeName];
|
||||
if (theValue)
|
||||
return [theValue boolValue]; // same basic strategy we use in -accessibilityAttributeValue:
|
||||
}
|
||||
return [super accessibilityIsAttributeSettable: theAttributeName];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* custom window buttons to support the accessibility stuff
|
||||
*****************************************************************************/
|
||||
|
||||
@implementation VLCCustomWindowButtonPrototype
|
||||
+ (Class)cellClass {
|
||||
return [VLCWindowButtonCell class];
|
||||
}
|
||||
|
||||
- (NSArray*)extendedAccessibilityAttributeNames: (NSArray*)theAttributeNames {
|
||||
return ([theAttributeNames containsObject: NSAccessibilitySubroleAttribute] ? theAttributeNames : [theAttributeNames arrayByAddingObject: NSAccessibilitySubroleAttribute]); // run-of-the-mill button cells don't usually have a Subrole attribute, so we add that attribute
|
||||
}
|
||||
|
||||
- (id)extendedAccessibilityAttributeValue: (NSString*)theAttributeName {
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSNumber*)extendedAccessibilityIsAttributeSettable: (NSString*)theAttributeName {
|
||||
return ([theAttributeName isEqualToString: NSAccessibilitySubroleAttribute] ? [NSNumber numberWithBool:NO] : nil); // make the Subrole attribute we added non-settable
|
||||
}
|
||||
|
||||
- (void)accessibilityPerformAction: (NSString*)theActionName {
|
||||
if ([theActionName isEqualToString: NSAccessibilityPressAction]) {
|
||||
if ([self isEnabled])
|
||||
[self performClick: nil];
|
||||
} else
|
||||
[super accessibilityPerformAction: theActionName];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation VLCCustomWindowCloseButton
|
||||
- (id)extendedAccessibilityAttributeValue: (NSString*)theAttributeName {
|
||||
return ([theAttributeName isEqualToString: NSAccessibilitySubroleAttribute] ? NSAccessibilityCloseButtonAttribute : nil);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation VLCCustomWindowMinimizeButton
|
||||
- (id)extendedAccessibilityAttributeValue: (NSString*)theAttributeName {
|
||||
return ([theAttributeName isEqualToString: NSAccessibilitySubroleAttribute] ? NSAccessibilityMinimizeButtonAttribute : nil);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation VLCCustomWindowZoomButton
|
||||
- (id)extendedAccessibilityAttributeValue: (NSString*)theAttributeName {
|
||||
return ([theAttributeName isEqualToString: NSAccessibilitySubroleAttribute] ? NSAccessibilityZoomButtonAttribute : nil);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation VLCCustomWindowFullscreenButton
|
||||
- (id)extendedAccessibilityAttributeValue: (NSString*)theAttributeName {
|
||||
return ([theAttributeName isEqualToString: NSAccessibilitySubroleAttribute] ? NSAccessibilityFullScreenButtonAttribute : nil);
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@interface VLCWindowTitleTextField()
|
||||
{
|
||||
NSMenu *_contextMenu;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation VLCWindowTitleTextField
|
||||
|
||||
- (void)showRightClickMenuWithEvent:(NSEvent *)o_event
|
||||
{
|
||||
NSURL * representedURL = [[self window] representedURL];
|
||||
if (!representedURL)
|
||||
return;
|
||||
|
||||
NSArray * pathComponents;
|
||||
pathComponents = [representedURL pathComponents];
|
||||
|
||||
if (!pathComponents)
|
||||
return;
|
||||
|
||||
_contextMenu = [[NSMenu alloc] initWithTitle: [[NSFileManager defaultManager] displayNameAtPath: [representedURL path]]];
|
||||
|
||||
NSUInteger count = [pathComponents count];
|
||||
NSImage * icon;
|
||||
NSMenuItem * currentItem;
|
||||
NSMutableString * currentPath;
|
||||
NSSize iconSize = NSMakeSize(16., 16.);
|
||||
for (NSUInteger i = count - 1; i > 0; i--) {
|
||||
currentPath = [NSMutableString stringWithCapacity:1024];
|
||||
for (NSUInteger y = 0; y < i; y++)
|
||||
[currentPath appendFormat: @"/%@", [pathComponents objectAtIndex:y + 1]];
|
||||
|
||||
[_contextMenu addItemWithTitle: [[NSFileManager defaultManager] displayNameAtPath: currentPath] action:@selector(revealInFinder:) keyEquivalent:@""];
|
||||
currentItem = [_contextMenu itemAtIndex:[_contextMenu numberOfItems] - 1];
|
||||
[currentItem setTarget: self];
|
||||
|
||||
icon = [[NSWorkspace sharedWorkspace] iconForFile:currentPath];
|
||||
[icon setSize: iconSize];
|
||||
[currentItem setImage: icon];
|
||||
}
|
||||
|
||||
if ([[pathComponents objectAtIndex:1] isEqualToString:@"Volumes"]) {
|
||||
/* we don't want to show the Volumes item, since the Cocoa does it neither */
|
||||
currentItem = [_contextMenu itemWithTitle:[[NSFileManager defaultManager] displayNameAtPath: @"/Volumes"]];
|
||||
if (currentItem)
|
||||
[_contextMenu removeItem: currentItem];
|
||||
} else {
|
||||
/* we're on the boot drive, so add it since it isn't part of the components */
|
||||
[_contextMenu addItemWithTitle: [[NSFileManager defaultManager] displayNameAtPath:@"/"] action:@selector(revealInFinder:) keyEquivalent:@""];
|
||||
currentItem = [_contextMenu itemAtIndex: [_contextMenu numberOfItems] - 1];
|
||||
icon = [[NSWorkspace sharedWorkspace] iconForFile:@"/"];
|
||||
[icon setSize: iconSize];
|
||||
[currentItem setImage: icon];
|
||||
[currentItem setTarget: self];
|
||||
}
|
||||
|
||||
/* add the computer item */
|
||||
[_contextMenu addItemWithTitle:(NSString*)CFBridgingRelease(SCDynamicStoreCopyComputerName(NULL, NULL)) action:@selector(revealInFinder:) keyEquivalent:@""];
|
||||
currentItem = [_contextMenu itemAtIndex: [_contextMenu numberOfItems] - 1];
|
||||
icon = [NSImage imageNamed: NSImageNameComputer];
|
||||
[icon setSize: iconSize];
|
||||
[currentItem setImage: icon];
|
||||
[currentItem setTarget: self];
|
||||
|
||||
// center the context menu similar to the white interface
|
||||
CGFloat menuWidth = [_contextMenu size].width;
|
||||
NSRect windowFrame = [[self window] frame];
|
||||
NSPoint point;
|
||||
|
||||
CGFloat fullButtonWidth = 0.;
|
||||
if([[VLCMain sharedInstance] nativeFullscreenMode])
|
||||
fullButtonWidth = 20.;
|
||||
|
||||
// assumes 60 px for the window buttons
|
||||
point.x = (windowFrame.size.width - 60. - fullButtonWidth) / 2. - menuWidth / 2. + 60. - 20.;
|
||||
point.y = windowFrame.size.height + 1.;
|
||||
if (point.x < 0)
|
||||
point.x = 10;
|
||||
|
||||
NSEvent *fakeMouseEvent = [NSEvent mouseEventWithType:NSRightMouseDown
|
||||
location:point
|
||||
modifierFlags:0
|
||||
timestamp:0
|
||||
windowNumber:[[self window] windowNumber]
|
||||
context:nil
|
||||
eventNumber:0
|
||||
clickCount:0
|
||||
pressure:0];
|
||||
[NSMenu popUpContextMenu: _contextMenu withEvent: fakeMouseEvent forView: [self superview]];
|
||||
}
|
||||
|
||||
- (IBAction)revealInFinder:(id)sender
|
||||
{
|
||||
NSUInteger count = [_contextMenu numberOfItems];
|
||||
NSUInteger selectedItem = [_contextMenu indexOfItem: sender];
|
||||
|
||||
if (selectedItem == count - 1) { // the fake computer item
|
||||
[[NSWorkspace sharedWorkspace] selectFile: @"/" inFileViewerRootedAtPath: @""];
|
||||
return;
|
||||
}
|
||||
|
||||
NSURL * representedURL = [[self window] representedURL];
|
||||
if (! representedURL)
|
||||
return;
|
||||
|
||||
if (selectedItem == 0) { // the actual file, let's save time
|
||||
[[NSWorkspace sharedWorkspace] selectFile: [representedURL path] inFileViewerRootedAtPath: [representedURL path]];
|
||||
return;
|
||||
}
|
||||
|
||||
NSArray * pathComponents;
|
||||
pathComponents = [representedURL pathComponents];
|
||||
if (!pathComponents)
|
||||
return;
|
||||
|
||||
NSMutableString * currentPath;
|
||||
currentPath = [NSMutableString stringWithCapacity:1024];
|
||||
selectedItem = count - selectedItem;
|
||||
|
||||
/* fix for non-startup volumes */
|
||||
if ([[pathComponents objectAtIndex:1] isEqualToString:@"Volumes"])
|
||||
selectedItem += 1;
|
||||
|
||||
for (NSUInteger y = 1; y < selectedItem; y++)
|
||||
[currentPath appendFormat: @"/%@", [pathComponents objectAtIndex:y]];
|
||||
|
||||
[[NSWorkspace sharedWorkspace] selectFile: currentPath inFileViewerRootedAtPath: currentPath];
|
||||
}
|
||||
|
||||
- (void)rightMouseDown:(NSEvent *)o_event
|
||||
{
|
||||
if ([o_event type] == NSRightMouseDown)
|
||||
[self showRightClickMenuWithEvent:o_event];
|
||||
|
||||
[super mouseDown: o_event];
|
||||
}
|
||||
|
||||
@end
|
|
@ -62,8 +62,6 @@ static const float f_min_video_height = 70.0;
|
|||
|
||||
@interface VLCVideoWindowCommon : VLCWindow <NSWindowDelegate, NSAnimationDelegate>
|
||||
|
||||
@property (nonatomic, weak) IBOutlet VLCMainWindowTitleView *titlebarView; // only set in main or detached window
|
||||
@property (weak) IBOutlet NSLayoutConstraint *videoViewTopConstraint;
|
||||
@property (weak) IBOutlet NSLayoutConstraint *videoViewBottomConstraint;
|
||||
|
||||
@property (nonatomic, weak) IBOutlet VLCVoutView* videoView;
|
||||
|
|
|
@ -255,11 +255,6 @@
|
|||
[self setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
|
||||
}
|
||||
|
||||
if (self.titlebarView) {
|
||||
[self.titlebarView removeFromSuperview];
|
||||
self.titlebarView = nil;
|
||||
}
|
||||
|
||||
[super awakeFromNib];
|
||||
}
|
||||
|
||||
|
@ -528,17 +523,6 @@
|
|||
[self setLevel: i_originalLevel];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Key events
|
||||
|
||||
- (void)flagsChanged:(NSEvent *)theEvent
|
||||
{
|
||||
BOOL b_alt_pressed = ([theEvent modifierFlags] & NSAlternateKeyMask) != 0;
|
||||
[self.titlebarView informModifierPressed: b_alt_pressed];
|
||||
|
||||
[super flagsChanged:theEvent];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Lion native fullscreen handling
|
||||
|
||||
|
@ -1023,28 +1007,4 @@
|
|||
[self hasBecomeFullscreen];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Accessibility stuff
|
||||
|
||||
- (NSArray *)accessibilityAttributeNames
|
||||
{
|
||||
if (!self.titlebarView)
|
||||
return [super accessibilityAttributeNames];
|
||||
|
||||
static NSMutableArray *attributes = nil;
|
||||
if (attributes == nil) {
|
||||
attributes = [[super accessibilityAttributeNames] mutableCopy];
|
||||
NSArray *appendAttributes = [NSArray arrayWithObjects:NSAccessibilitySubroleAttribute,
|
||||
NSAccessibilityCloseButtonAttribute,
|
||||
NSAccessibilityMinimizeButtonAttribute,
|
||||
NSAccessibilityZoomButtonAttribute, nil];
|
||||
|
||||
for(NSString *attribute in appendAttributes) {
|
||||
if (![attributes containsObject:attribute])
|
||||
[attributes addObject:attribute];
|
||||
}
|
||||
}
|
||||
return attributes;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue