macOS: Rework log window
authorMarvin Scholz <epirat07@gmail.com>
Mon, 9 Jan 2017 12:20:45 +0000 (13:20 +0100)
committerMarvin Scholz <epirat07@gmail.com>
Fri, 27 Jan 2017 18:43:24 +0000 (19:43 +0100)
extras/package/macosx/Resources/Button-Icons/VLCClearLogTemplate.pdf [new file with mode: 0644]
extras/package/macosx/Resources/Button-Icons/VLCSaveTemplate.pdf [new file with mode: 0644]
extras/package/macosx/Resources/English.lproj/DebugMessageVisualizer.xib [deleted file]
extras/package/macosx/Resources/English.lproj/LogMessageWindow.xib [new file with mode: 0644]
extras/package/macosx/package.mak
extras/package/macosx/vlc.xcodeproj/project.pbxproj
modules/gui/macosx/VLCDebugMessageWindowController.h
modules/gui/macosx/VLCDebugMessageWindowController.m

diff --git a/extras/package/macosx/Resources/Button-Icons/VLCClearLogTemplate.pdf b/extras/package/macosx/Resources/Button-Icons/VLCClearLogTemplate.pdf
new file mode 100644 (file)
index 0000000..827ba74
Binary files /dev/null and b/extras/package/macosx/Resources/Button-Icons/VLCClearLogTemplate.pdf differ
diff --git a/extras/package/macosx/Resources/Button-Icons/VLCSaveTemplate.pdf b/extras/package/macosx/Resources/Button-Icons/VLCSaveTemplate.pdf
new file mode 100644 (file)
index 0000000..be85ea5
Binary files /dev/null and b/extras/package/macosx/Resources/Button-Icons/VLCSaveTemplate.pdf differ
diff --git a/extras/package/macosx/Resources/English.lproj/DebugMessageVisualizer.xib b/extras/package/macosx/Resources/English.lproj/DebugMessageVisualizer.xib
deleted file mode 100644 (file)
index f0982fd..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
-    <dependencies>
-        <development version="7000" identifier="xcode"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="VLCDebugMessageWindowController">
-            <connections>
-                <outlet property="clearButton" destination="RCj-GY-IGn" id="bi1-74-dyp"/>
-                <outlet property="messageTable" destination="6" id="BzW-Qh-PMq"/>
-                <outlet property="refreshButton" destination="4" id="bdj-c0-rau"/>
-                <outlet property="saveButton" destination="3" id="WDG-KN-R01"/>
-                <outlet property="window" destination="1" id="24"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <window title="Messages" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" hidesOnDeactivate="YES" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="messages" animationBehavior="default" id="1" userLabel="Messages" customClass="NSPanel">
-            <windowStyleMask key="styleMask" titled="YES" closable="YES" resizable="YES" utility="YES"/>
-            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="316" y="323" width="599" height="368"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
-            <value key="minSize" type="size" width="599" height="368"/>
-            <view key="contentView" id="2">
-                <rect key="frame" x="0.0" y="0.0" width="599" height="368"/>
-                <autoresizingMask key="autoresizingMask"/>
-                <subviews>
-                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3">
-                        <rect key="frame" x="7" y="6" width="107" height="28"/>
-                        <buttonCell key="cell" type="push" title="Save this Log..." bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" inset="2" id="12">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="smallSystem"/>
-                        </buttonCell>
-                        <connections>
-                            <action selector="saveDebugLog:" target="-2" id="15"/>
-                        </connections>
-                    </button>
-                    <scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5">
-                        <rect key="frame" x="-1" y="41" width="601" height="328"/>
-                        <clipView key="contentView" id="05u-WN-jV3">
-                            <rect key="frame" x="0.0" y="0.0" width="601" height="328"/>
-                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                            <subviews>
-                                <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" typeSelect="NO" enabled="NO" id="6">
-                                    <rect key="frame" x="0.0" y="0.0" width="601" height="19"/>
-                                    <autoresizingMask key="autoresizingMask"/>
-                                    <size key="intercellSpacing" width="3" height="2"/>
-                                    <color key="backgroundColor" name="shadowColor" catalog="System" colorSpace="catalog"/>
-                                    <color key="gridColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
-                                    <tableColumns>
-                                        <tableColumn editable="NO" width="598" minWidth="40" maxWidth="1000" id="9">
-                                            <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" enabled="NO" borderStyle="border" alignment="left">
-                                                <font key="font" metaFont="smallSystem"/>
-                                                <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
-                                                <color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
-                                            </tableHeaderCell>
-                                            <textFieldCell key="dataCell" lineBreakMode="truncatingTail" enabled="NO" allowsUndo="NO" alignment="left" title="Text Cell" allowsEditingTextAttributes="YES" id="10">
-                                                <font key="font" metaFont="smallSystem"/>
-                                                <color key="textColor" name="secondarySelectedControlColor" catalog="System" colorSpace="catalog"/>
-                                                <color key="backgroundColor" name="controlDarkShadowColor" catalog="System" colorSpace="catalog"/>
-                                            </textFieldCell>
-                                            <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
-                                        </tableColumn>
-                                    </tableColumns>
-                                    <connections>
-                                        <outlet property="dataSource" destination="-2" id="21"/>
-                                        <outlet property="delegate" destination="-2" id="22"/>
-                                    </connections>
-                                </tableView>
-                            </subviews>
-                            <color key="backgroundColor" name="controlDarkShadowColor" catalog="System" colorSpace="catalog"/>
-                        </clipView>
-                        <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="7">
-                            <rect key="frame" x="1" y="299.97265625" width="598" height="15"/>
-                            <autoresizingMask key="autoresizingMask"/>
-                        </scroller>
-                        <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="8">
-                            <rect key="frame" x="224" y="17" width="15" height="102"/>
-                            <autoresizingMask key="autoresizingMask"/>
-                        </scroller>
-                    </scrollView>
-                    <button horizontalHuggingPriority="750" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4">
-                        <rect key="frame" x="560" y="4" width="32" height="32"/>
-                        <buttonCell key="cell" type="round" bezelStyle="circular" imagePosition="only" alignment="left" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" id="11">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="smallSystem"/>
-                        </buttonCell>
-                        <connections>
-                            <action selector="updateMessagesPanel:" target="-2" id="18"/>
-                        </connections>
-                    </button>
-                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="RCj-GY-IGn">
-                        <rect key="frame" x="112" y="6" width="54" height="28"/>
-                        <buttonCell key="cell" type="push" title="Clear" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" inset="2" id="Q3G-xK-ViK">
-                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                            <font key="font" metaFont="smallSystem"/>
-                        </buttonCell>
-                        <connections>
-                            <action selector="clearLog:" target="-2" id="ScR-bR-HCe"/>
-                        </connections>
-                    </button>
-                </subviews>
-                <constraints>
-                    <constraint firstItem="3" firstAttribute="leading" secondItem="2" secondAttribute="leading" constant="12" id="05f-Xh-tfu"/>
-                    <constraint firstAttribute="bottom" secondItem="4" secondAttribute="bottom" constant="11" id="7zt-QH-rJp"/>
-                    <constraint firstItem="5" firstAttribute="top" secondItem="2" secondAttribute="top" constant="-1" id="Ads-nH-X1f"/>
-                    <constraint firstItem="RCj-GY-IGn" firstAttribute="leading" secondItem="3" secondAttribute="trailing" constant="8" id="aeD-b6-0an"/>
-                    <constraint firstAttribute="trailing" secondItem="4" secondAttribute="trailing" constant="13" id="iHM-MS-G0X"/>
-                    <constraint firstAttribute="bottom" secondItem="5" secondAttribute="bottom" constant="41" id="iuv-rO-dhp"/>
-                    <constraint firstItem="RCj-GY-IGn" firstAttribute="centerY" secondItem="4" secondAttribute="centerY" id="mN8-Nc-5OU"/>
-                    <constraint firstItem="3" firstAttribute="centerY" secondItem="RCj-GY-IGn" secondAttribute="centerY" id="qS9-lu-mTh"/>
-                    <constraint firstItem="5" firstAttribute="leading" secondItem="2" secondAttribute="leading" constant="-1" id="u5w-ec-jpB"/>
-                    <constraint firstAttribute="trailing" secondItem="5" secondAttribute="trailing" constant="-1" id="upq-hj-ceP"/>
-                </constraints>
-            </view>
-            <connections>
-                <outlet property="delegate" destination="-2" id="25"/>
-            </connections>
-        </window>
-    </objects>
-</document>
diff --git a/extras/package/macosx/Resources/English.lproj/LogMessageWindow.xib b/extras/package/macosx/Resources/English.lproj/LogMessageWindow.xib
new file mode 100644 (file)
index 0000000..0f2306f
--- /dev/null
@@ -0,0 +1,462 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11762" systemVersion="16C67" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <development version="7000" identifier="xcode"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11762"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="VLCDebugMessageWindowController">
+            <connections>
+                <outlet property="arrayController" destination="0Or-bh-QJU" id="Wo9-Rk-Jkb"/>
+                <outlet property="clipView" destination="jLc-G4-HUQ" id="UtI-Q9-OBb"/>
+                <outlet property="detailView" destination="ESj-Mw-X94" id="YDo-hQ-k1t"/>
+                <outlet property="messageTable" destination="Cpc-IS-2Wn" id="epz-ce-UQA"/>
+                <outlet property="splitView" destination="5ZT-Oc-K6D" id="K9Q-Lz-SNd"/>
+                <outlet property="toggleDetailsButton" destination="VaY-7B-tp1" id="lW9-9j-u0o"/>
+                <outlet property="window" destination="QvC-M9-y7g" id="pQ6-y6-C04"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" hidesOnDeactivate="YES" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="QvC-M9-y7g">
+            <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
+            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
+            <rect key="contentRect" x="196" y="240" width="480" height="330"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1280" height="777"/>
+            <view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
+                <rect key="frame" x="0.0" y="0.0" width="480" height="330"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <splitView arrangesAllSubviews="NO" dividerStyle="thin" translatesAutoresizingMaskIntoConstraints="NO" id="5ZT-Oc-K6D">
+                        <rect key="frame" x="0.0" y="0.0" width="480" height="330"/>
+                        <subviews>
+                            <customView id="dx0-3n-J3G">
+                                <rect key="frame" x="0.0" y="0.0" width="480" height="231"/>
+                                <autoresizingMask key="autoresizingMask"/>
+                                <subviews>
+                                    <scrollView wantsLayer="YES" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" translatesAutoresizingMaskIntoConstraints="NO" id="yUO-yn-8Au">
+                                        <rect key="frame" x="0.0" y="0.0" width="480" height="231"/>
+                                        <clipView key="contentView" wantsLayer="YES" id="jLc-G4-HUQ">
+                                            <rect key="frame" x="1" y="0.0" width="478" height="230"/>
+                                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                            <subviews>
+                                                <tableView wantsLayer="YES" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnSelection="YES" autosaveColumns="NO" rowSizeStyle="automatic" headerView="XuL-0o-TLH" viewBased="YES" id="Cpc-IS-2Wn">
+                                                    <rect key="frame" x="0.0" y="0.0" width="478" height="207"/>
+                                                    <autoresizingMask key="autoresizingMask"/>
+                                                    <size key="intercellSpacing" width="3" height="2"/>
+                                                    <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                                    <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
+                                                    <tableColumns>
+                                                        <tableColumn width="60" minWidth="40" maxWidth="1000" id="1UD-vH-uqq">
+                                                            <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="Type">
+                                                                <font key="font" metaFont="smallSystem"/>
+                                                                <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
+                                                                <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
+                                                            </tableHeaderCell>
+                                                            <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="AyV-dx-4BJ">
+                                                                <font key="font" metaFont="system"/>
+                                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                                                <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                                            </textFieldCell>
+                                                            <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
+                                                            <prototypeCellViews>
+                                                                <tableCellView id="9bi-ti-5pD">
+                                                                    <rect key="frame" x="1" y="1" width="60" height="17"/>
+                                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                                    <subviews>
+                                                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ltO-uq-R24">
+                                                                            <rect key="frame" x="0.0" y="0.0" width="60" height="17"/>
+                                                                            <textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Debug" id="Nqw-Jt-xHZ">
+                                                                                <font key="font" metaFont="system"/>
+                                                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                                                                <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                                                                            </textFieldCell>
+                                                                            <connections>
+                                                                                <binding destination="9bi-ti-5pD" name="value" keyPath="objectValue.type" id="K3E-xf-XY7"/>
+                                                                            </connections>
+                                                                        </textField>
+                                                                    </subviews>
+                                                                    <constraints>
+                                                                        <constraint firstItem="ltO-uq-R24" firstAttribute="centerX" secondItem="9bi-ti-5pD" secondAttribute="centerX" id="Jbh-69-Y52"/>
+                                                                        <constraint firstItem="ltO-uq-R24" firstAttribute="leading" secondItem="9bi-ti-5pD" secondAttribute="leading" constant="2" id="h9p-ci-qtq"/>
+                                                                        <constraint firstItem="ltO-uq-R24" firstAttribute="centerY" secondItem="9bi-ti-5pD" secondAttribute="centerY" id="ydk-Ul-jnC"/>
+                                                                    </constraints>
+                                                                    <connections>
+                                                                        <outlet property="textField" destination="ltO-uq-R24" id="4S4-Pe-1Fw"/>
+                                                                    </connections>
+                                                                </tableCellView>
+                                                            </prototypeCellViews>
+                                                        </tableColumn>
+                                                        <tableColumn width="90" minWidth="40" maxWidth="1000" id="ybR-8n-0YS">
+                                                            <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="Component">
+                                                                <font key="font" metaFont="smallSystem"/>
+                                                                <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
+                                                                <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
+                                                            </tableHeaderCell>
+                                                            <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="9I1-Fr-zgH">
+                                                                <font key="font" metaFont="system"/>
+                                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                                                <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                                            </textFieldCell>
+                                                            <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
+                                                            <prototypeCellViews>
+                                                                <tableCellView id="0rr-qZ-Zvp">
+                                                                    <rect key="frame" x="64" y="1" width="90" height="17"/>
+                                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                                    <subviews>
+                                                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KgY-wU-75V">
+                                                                            <rect key="frame" x="0.0" y="0.0" width="90" height="17"/>
+                                                                            <textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="macosx" id="pG7-rA-7gk">
+                                                                                <font key="font" metaFont="system"/>
+                                                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                                                                <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                                                                            </textFieldCell>
+                                                                            <connections>
+                                                                                <binding destination="0rr-qZ-Zvp" name="value" keyPath="objectValue.component" id="RLi-Wk-qxN"/>
+                                                                            </connections>
+                                                                        </textField>
+                                                                    </subviews>
+                                                                    <constraints>
+                                                                        <constraint firstItem="KgY-wU-75V" firstAttribute="centerX" secondItem="0rr-qZ-Zvp" secondAttribute="centerX" id="FPR-ei-gmq"/>
+                                                                        <constraint firstItem="KgY-wU-75V" firstAttribute="centerY" secondItem="0rr-qZ-Zvp" secondAttribute="centerY" id="cXG-Pu-tLG"/>
+                                                                        <constraint firstItem="KgY-wU-75V" firstAttribute="leading" secondItem="0rr-qZ-Zvp" secondAttribute="leading" constant="2" id="kC7-bV-Owq"/>
+                                                                    </constraints>
+                                                                    <connections>
+                                                                        <outlet property="textField" destination="KgY-wU-75V" id="8vk-PW-OpN"/>
+                                                                    </connections>
+                                                                </tableCellView>
+                                                            </prototypeCellViews>
+                                                        </tableColumn>
+                                                        <tableColumn identifier="" width="319" minWidth="40" maxWidth="3.4028234663852886e+38" id="B4u-CM-hUN">
+                                                            <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Message">
+                                                                <font key="font" metaFont="smallSystem"/>
+                                                                <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
+                                                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                                                            </tableHeaderCell>
+                                                            <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="kzv-op-WJz">
+                                                                <font key="font" metaFont="system"/>
+                                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                                                <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                                            </textFieldCell>
+                                                            <tableColumnResizingMask key="resizingMask" resizeWithTable="YES"/>
+                                                            <prototypeCellViews>
+                                                                <tableCellView id="mKk-vl-YgV">
+                                                                    <rect key="frame" x="157" y="1" width="319" height="17"/>
+                                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                                    <subviews>
+                                                                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hdT-qU-xRy">
+                                                                            <rect key="frame" x="0.0" y="0.0" width="319" height="17"/>
+                                                                            <textFieldCell key="cell" lineBreakMode="truncatingTail" truncatesLastVisibleLine="YES" sendsActionOnEndEditing="YES" title="Placeholder for the actual log message, this can be quite long, so let's see how this will look." id="ed5-yc-Kp5">
+                                                                                <font key="font" metaFont="system"/>
+                                                                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                                                                <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                                                                            </textFieldCell>
+                                                                            <connections>
+                                                                                <binding destination="mKk-vl-YgV" name="value" keyPath="objectValue.message" id="we4-tt-HRr"/>
+                                                                            </connections>
+                                                                        </textField>
+                                                                    </subviews>
+                                                                    <constraints>
+                                                                        <constraint firstItem="hdT-qU-xRy" firstAttribute="centerX" secondItem="mKk-vl-YgV" secondAttribute="centerX" id="QZr-L7-voS"/>
+                                                                        <constraint firstItem="hdT-qU-xRy" firstAttribute="leading" secondItem="mKk-vl-YgV" secondAttribute="leading" constant="2" id="ikE-8d-7yL"/>
+                                                                        <constraint firstItem="hdT-qU-xRy" firstAttribute="centerY" secondItem="mKk-vl-YgV" secondAttribute="centerY" id="zI4-39-X4r"/>
+                                                                    </constraints>
+                                                                    <connections>
+                                                                        <outlet property="textField" destination="hdT-qU-xRy" id="q2u-f1-07g"/>
+                                                                    </connections>
+                                                                </tableCellView>
+                                                            </prototypeCellViews>
+                                                        </tableColumn>
+                                                    </tableColumns>
+                                                    <connections>
+                                                        <binding destination="0Or-bh-QJU" name="content" keyPath="arrangedObjects" id="bfz-qL-npi"/>
+                                                        <binding destination="0Or-bh-QJU" name="selectionIndexes" keyPath="selectionIndexes" previousBinding="bfz-qL-npi" id="0PB-hg-dtN"/>
+                                                        <outlet property="delegate" destination="-2" id="kgg-BI-zM4"/>
+                                                    </connections>
+                                                </tableView>
+                                            </subviews>
+                                        </clipView>
+                                        <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="o6S-IE-ZZL">
+                                            <rect key="frame" x="1" y="-16" width="0.0" height="16"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                        </scroller>
+                                        <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="SpV-Sx-vZw">
+                                            <rect key="frame" x="-15" y="0.0" width="16" height="0.0"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                        </scroller>
+                                        <tableHeaderView key="headerView" id="XuL-0o-TLH">
+                                            <rect key="frame" x="0.0" y="0.0" width="478" height="23"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                        </tableHeaderView>
+                                    </scrollView>
+                                </subviews>
+                                <constraints>
+                                    <constraint firstItem="yUO-yn-8Au" firstAttribute="leading" secondItem="dx0-3n-J3G" secondAttribute="leading" id="D1j-S0-cdE"/>
+                                    <constraint firstItem="yUO-yn-8Au" firstAttribute="top" secondItem="dx0-3n-J3G" secondAttribute="top" id="RTh-YQ-hJU"/>
+                                    <constraint firstAttribute="trailing" secondItem="yUO-yn-8Au" secondAttribute="trailing" id="ag7-ZE-cB2"/>
+                                    <constraint firstAttribute="bottom" secondItem="yUO-yn-8Au" secondAttribute="bottom" id="ens-Qm-i98"/>
+                                </constraints>
+                            </customView>
+                            <customView id="ESj-Mw-X94">
+                                <rect key="frame" x="0.0" y="232" width="480" height="98"/>
+                                <autoresizingMask key="autoresizingMask"/>
+                                <subviews>
+                                    <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gAc-zn-uSr">
+                                        <rect key="frame" x="110" y="69" width="352" height="17"/>
+                                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="right" title="debug" placeholderString="Type" id="URV-0p-IuP">
+                                            <font key="font" metaFont="system"/>
+                                            <color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
+                                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                                        </textFieldCell>
+                                        <connections>
+                                            <binding destination="0Or-bh-QJU" name="value" keyPath="selection.type" id="qUO-gT-OT1">
+                                                <dictionary key="options">
+                                                    <string key="NSNoSelectionPlaceholder" base64-UTF8="YES">
+IA
+</string>
+                                                </dictionary>
+                                            </binding>
+                                        </connections>
+                                    </textField>
+                                    <textField horizontalHuggingPriority="100" verticalHuggingPriority="750" horizontalCompressionResistancePriority="200" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hRN-Hm-oJ6">
+                                        <rect key="frame" x="18" y="51" width="388" height="17"/>
+                                        <textFieldCell key="cell" lineBreakMode="truncatingHead" selectable="YES" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="left" title="foo.c:21" placeholderString="Type" id="ff0-T1-m5Y">
+                                            <font key="font" metaFont="system"/>
+                                            <color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
+                                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                                        </textFieldCell>
+                                        <connections>
+                                            <binding destination="0Or-bh-QJU" name="value" keyPath="selection.position" id="l9O-cX-idn">
+                                                <dictionary key="options">
+                                                    <string key="NSNoSelectionPlaceholder" base64-UTF8="YES">
+IA
+</string>
+                                                </dictionary>
+                                            </binding>
+                                        </connections>
+                                    </textField>
+                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yQr-Pj-2OQ">
+                                        <rect key="frame" x="18" y="69" width="88" height="17"/>
+                                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="left" title="videotoolbox" placeholderString="Component" id="evj-05-leN">
+                                            <font key="font" metaFont="systemBold"/>
+                                            <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                                        </textFieldCell>
+                                        <connections>
+                                            <binding destination="0Or-bh-QJU" name="value" keyPath="selection.component" id="Q3A-LF-9BY">
+                                                <dictionary key="options">
+                                                    <bool key="NSAllowsEditingMultipleValuesSelection" value="NO"/>
+                                                </dictionary>
+                                            </binding>
+                                        </connections>
+                                    </textField>
+                                    <scrollView borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Pfg-HK-E4H">
+                                        <rect key="frame" x="20" y="8" width="440" height="35"/>
+                                        <clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="cZ6-B4-AVY">
+                                            <rect key="frame" x="0.0" y="0.0" width="440" height="35"/>
+                                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                            <subviews>
+                                                <textView editable="NO" drawsBackground="NO" importsGraphics="NO" richText="NO" findStyle="bar" allowsNonContiguousLayout="YES" smartInsertDelete="YES" id="EVR-Ey-aSl">
+                                                    <rect key="frame" x="0.0" y="0.0" width="440" height="35"/>
+                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                    <size key="minSize" width="440" height="35"/>
+                                                    <size key="maxSize" width="471" height="10000000"/>
+                                                    <color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                                    <connections>
+                                                        <binding destination="0Or-bh-QJU" name="value" keyPath="selection.message" id="CJ3-x9-Rf9">
+                                                            <dictionary key="options">
+                                                                <bool key="NSAllowsEditingMultipleValuesSelection" value="NO"/>
+                                                                <bool key="NSConditionallySetsEditable" value="NO"/>
+                                                            </dictionary>
+                                                        </binding>
+                                                    </connections>
+                                                </textView>
+                                            </subviews>
+                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                        </clipView>
+                                        <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="7Yp-wp-He8">
+                                            <rect key="frame" x="-100" y="-100" width="87" height="18"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                        </scroller>
+                                        <scroller key="verticalScroller" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="77p-aR-RnN">
+                                            <rect key="frame" x="424" y="0.0" width="16" height="35"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                        </scroller>
+                                    </scrollView>
+                                    <textField horizontalHuggingPriority="105" verticalHuggingPriority="750" horizontalCompressionResistancePriority="201" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YjO-49-ed6">
+                                        <rect key="frame" x="410" y="51" width="52" height="17"/>
+                                        <textFieldCell key="cell" lineBreakMode="truncatingTail" selectable="YES" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="right" title="doFoo()" placeholderString="Type" id="tjV-0Y-iBf">
+                                            <font key="font" metaFont="system"/>
+                                            <color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
+                                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                                        </textFieldCell>
+                                        <connections>
+                                            <binding destination="0Or-bh-QJU" name="value" keyPath="selection.func" id="7hC-0w-bVD">
+                                                <dictionary key="options">
+                                                    <string key="NSNoSelectionPlaceholder" base64-UTF8="YES">
+IA
+</string>
+                                                </dictionary>
+                                            </binding>
+                                        </connections>
+                                    </textField>
+                                </subviews>
+                                <constraints>
+                                    <constraint firstItem="gAc-zn-uSr" firstAttribute="top" secondItem="ESj-Mw-X94" secondAttribute="top" constant="12" id="18d-J7-NTf"/>
+                                    <constraint firstItem="Pfg-HK-E4H" firstAttribute="top" secondItem="hRN-Hm-oJ6" secondAttribute="bottom" constant="8" id="24q-jK-9J7"/>
+                                    <constraint firstItem="YjO-49-ed6" firstAttribute="leading" secondItem="hRN-Hm-oJ6" secondAttribute="trailing" constant="8" id="2Tf-Pg-VfZ"/>
+                                    <constraint firstAttribute="trailing" secondItem="Pfg-HK-E4H" secondAttribute="trailing" constant="20" id="3Aw-EY-Jgz"/>
+                                    <constraint firstItem="Pfg-HK-E4H" firstAttribute="leading" secondItem="ESj-Mw-X94" secondAttribute="leading" constant="20" id="70O-DF-o0V"/>
+                                    <constraint firstItem="hRN-Hm-oJ6" firstAttribute="top" secondItem="yQr-Pj-2OQ" secondAttribute="bottom" constant="1" id="DuB-hS-nqq"/>
+                                    <constraint firstAttribute="bottom" secondItem="Pfg-HK-E4H" secondAttribute="bottom" constant="8" id="Qib-Os-QkT"/>
+                                    <constraint firstItem="yQr-Pj-2OQ" firstAttribute="leading" secondItem="ESj-Mw-X94" secondAttribute="leading" constant="20" id="TSY-7b-Iud"/>
+                                    <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="90" id="ZBi-FO-86D"/>
+                                    <constraint firstItem="YjO-49-ed6" firstAttribute="top" secondItem="gAc-zn-uSr" secondAttribute="bottom" constant="1" id="ZEg-Kz-hvV"/>
+                                    <constraint firstItem="gAc-zn-uSr" firstAttribute="leading" secondItem="yQr-Pj-2OQ" secondAttribute="trailing" constant="8" id="ZdG-le-RDN"/>
+                                    <constraint firstItem="yQr-Pj-2OQ" firstAttribute="top" secondItem="ESj-Mw-X94" secondAttribute="top" constant="12" id="jFW-Cm-1og"/>
+                                    <constraint firstItem="hRN-Hm-oJ6" firstAttribute="leading" secondItem="ESj-Mw-X94" secondAttribute="leading" constant="20" id="lSl-p0-QFt"/>
+                                    <constraint firstAttribute="height" relation="lessThanOrEqual" constant="200" id="ldX-ic-gvG"/>
+                                    <constraint firstAttribute="trailing" secondItem="YjO-49-ed6" secondAttribute="trailing" constant="20" id="qHC-VC-lrB"/>
+                                    <constraint firstItem="YjO-49-ed6" firstAttribute="leading" secondItem="hRN-Hm-oJ6" secondAttribute="trailing" constant="8" id="u6b-x9-u0Q"/>
+                                    <constraint firstAttribute="trailing" secondItem="gAc-zn-uSr" secondAttribute="trailing" constant="20" id="xhv-EZ-pdm"/>
+                                </constraints>
+                            </customView>
+                        </subviews>
+                        <holdingPriorities>
+                            <real value="250"/>
+                            <real value="250"/>
+                        </holdingPriorities>
+                        <connections>
+                            <outlet property="delegate" destination="-2" id="x0g-og-x4y"/>
+                        </connections>
+                    </splitView>
+                </subviews>
+                <constraints>
+                    <constraint firstItem="5ZT-Oc-K6D" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" id="7L1-68-b19"/>
+                    <constraint firstAttribute="bottom" secondItem="5ZT-Oc-K6D" secondAttribute="bottom" id="MO5-1x-w2m"/>
+                    <constraint firstItem="5ZT-Oc-K6D" firstAttribute="leading" secondItem="EiT-Mj-1SZ" secondAttribute="leading" id="UdA-KY-oNS"/>
+                    <constraint firstAttribute="trailing" secondItem="5ZT-Oc-K6D" secondAttribute="trailing" id="VBn-UL-8Od"/>
+                </constraints>
+            </view>
+            <toolbar key="toolbar" implicitIdentifier="8D6305A4-7404-4A0D-9515-2B68530B5D7F" autosavesConfiguration="NO" displayMode="iconOnly" sizeMode="regular" id="HkO-0c-Zi1">
+                <allowedToolbarItems>
+                    <toolbarItem implicitItemIdentifier="NSToolbarSpaceItem" id="kAx-MM-EeR"/>
+                    <toolbarItem implicitItemIdentifier="NSToolbarFlexibleSpaceItem" id="D2F-Ah-mBO"/>
+                    <toolbarItem implicitItemIdentifier="DED22896-62F8-4A8C-87D1-207BDD8C3D12" label="Clear" paletteLabel="Clear" image="VLCClearLogTemplate" id="hpb-18-o94">
+                        <nil key="toolTip"/>
+                        <size key="minSize" width="42" height="28"/>
+                        <size key="maxSize" width="42" height="32"/>
+                        <button key="view" verticalHuggingPriority="750" id="zr5-l7-GjP">
+                            <rect key="frame" x="0.0" y="14" width="42" height="28"/>
+                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                            <buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="VLCClearLogTemplate" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="fwS-lM-cr8">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
+                            <connections>
+                                <action selector="clearLog:" target="-2" id="gwF-8n-ILU"/>
+                            </connections>
+                        </button>
+                    </toolbarItem>
+                    <toolbarItem implicitItemIdentifier="CFEE69DF-B707-4816-908C-42EA4D3B7B70" label="" paletteLabel="" id="Lc1-7Q-7DY">
+                        <nil key="toolTip"/>
+                        <size key="minSize" width="100" height="22"/>
+                        <size key="maxSize" width="120" height="22"/>
+                        <searchField key="view" wantsLayer="YES" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" textCompletion="NO" id="JpS-Ua-CDA">
+                            <rect key="frame" x="0.0" y="14" width="120" height="22"/>
+                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                            <searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" placeholderString="Filter" usesSingleLineMode="YES" bezelStyle="round" id="LXB-gm-PNe">
+                                <font key="font" metaFont="system"/>
+                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                            </searchFieldCell>
+                            <connections>
+                                <binding destination="0Or-bh-QJU" name="predicate" keyPath="filterPredicate" id="fzs-HA-BGz">
+                                    <dictionary key="options">
+                                        <string key="NSDisplayName">Filter</string>
+                                        <string key="NSPredicateFormat">message contains $value || component == $value</string>
+                                    </dictionary>
+                                </binding>
+                            </connections>
+                        </searchField>
+                    </toolbarItem>
+                    <toolbarItem implicitItemIdentifier="9A3E885E-18F4-404E-BD7E-276CBAADC258" label="Save..." paletteLabel="Save..." image="VLCSaveTemplate" id="FN6-f1-moV">
+                        <nil key="toolTip"/>
+                        <size key="minSize" width="42" height="28"/>
+                        <size key="maxSize" width="42" height="32"/>
+                        <button key="view" verticalHuggingPriority="750" id="wEO-3t-jcc">
+                            <rect key="frame" x="1" y="14" width="42" height="28"/>
+                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                            <buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="VLCSaveTemplate" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="iFC-ts-0dh">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
+                            <connections>
+                                <action selector="saveDebugLog:" target="-2" id="OiE-6J-t1b"/>
+                            </connections>
+                        </button>
+                    </toolbarItem>
+                    <toolbarItem implicitItemIdentifier="DEDC42C7-F153-4D85-9698-3C6F6EFBFFA2" label="Refresh" paletteLabel="Refresh" image="NSRefreshTemplate" id="FcB-hY-pNL">
+                        <nil key="toolTip"/>
+                        <size key="minSize" width="42" height="28"/>
+                        <size key="maxSize" width="42" height="32"/>
+                        <button key="view" verticalHuggingPriority="750" id="K2Y-Ne-xDL">
+                            <rect key="frame" x="3" y="14" width="42" height="28"/>
+                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                            <buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="NSRefreshTemplate" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="8tT-Kp-NaB">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
+                            <connections>
+                                <action selector="refreshLog:" target="-2" id="GTh-U4-bJb"/>
+                            </connections>
+                        </button>
+                    </toolbarItem>
+                    <toolbarItem implicitItemIdentifier="0194FC70-2254-4C34-B21A-F008708D71B6" label="Details" paletteLabel="Details" image="NSQuickLookTemplate" id="Je0-kI-Toi">
+                        <nil key="toolTip"/>
+                        <size key="minSize" width="42" height="25"/>
+                        <size key="maxSize" width="42" height="25"/>
+                        <button key="view" verticalHuggingPriority="750" id="VaY-7B-tp1">
+                            <rect key="frame" x="1" y="14" width="42" height="25"/>
+                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                            <buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="NSQuickLookTemplate" imagePosition="overlaps" alignment="center" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="GsM-bi-gac">
+                                <behavior key="behavior" pushIn="YES" changeContents="YES" lightByContents="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
+                            <connections>
+                                <action selector="toggleDetails:" target="-2" id="CQr-LC-Rbb"/>
+                            </connections>
+                        </button>
+                    </toolbarItem>
+                </allowedToolbarItems>
+                <defaultToolbarItems>
+                    <toolbarItem reference="hpb-18-o94"/>
+                    <toolbarItem reference="FN6-f1-moV"/>
+                    <toolbarItem reference="Je0-kI-Toi"/>
+                    <toolbarItem reference="D2F-Ah-mBO"/>
+                    <toolbarItem reference="Lc1-7Q-7DY"/>
+                </defaultToolbarItems>
+            </toolbar>
+            <point key="canvasLocation" x="139" y="192"/>
+        </window>
+        <arrayController editable="NO" selectsInsertedObjects="NO" id="0Or-bh-QJU">
+            <declaredKeys>
+                <string>component</string>
+                <string>message</string>
+                <string>type</string>
+                <string>image</string>
+            </declaredKeys>
+            <connections>
+                <binding destination="-2" name="contentArray" keyPath="self.messagesArray" id="nWK-kZ-4HF"/>
+            </connections>
+        </arrayController>
+    </objects>
+    <resources>
+        <image name="NSQuickLookTemplate" width="19" height="12"/>
+        <image name="NSRefreshTemplate" width="11" height="15"/>
+        <image name="VLCClearLogTemplate" width="30" height="30"/>
+        <image name="VLCSaveTemplate" width="30" height="30"/>
+    </resources>
+</document>
index 2d18fa1..767a0b5 100644 (file)
@@ -757,6 +757,8 @@ EXTRA_DIST += \
        extras/package/macosx/Resources/Button-Icons/VLCVolumeOffTemplate.pdf \
        extras/package/macosx/Resources/Button-Icons/VLCVolumeOnTemplate.pdf \
        extras/package/macosx/Resources/Button-Icons/VLCVolumeOffTemplate.pdf \
+       extras/package/macosx/Resources/Button-Icons/VLCClearLogTemplate.pdf \
+       extras/package/macosx/Resources/Button-Icons/VLCSaveTemplate.pdf \
        extras/package/macosx/Resources/vlc.scriptSuite \
        extras/package/macosx/Resources/vlc.scriptTerminology \
        extras/package/macosx/VLC.entitlements \
index daddc6b..6c3f61e 100644 (file)
                1CE5ED2619DD6AB700FCEFD3 /* lion-window-fullscreen@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1CE5ED2019DD6AB700FCEFD3 /* lion-window-fullscreen@2x.png */; };
                633121D01B5112C300E636DA /* ResumeDialog.xib in Resources */ = {isa = PBXBuildFile; fileRef = 633121CE1B5112C300E636DA /* ResumeDialog.xib */; };
                6B13E2A81BC67678001AD24A /* VLCScrollingClipView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B13E2A71BC67678001AD24A /* VLCScrollingClipView.m */; };
+               6B1C62EE1E16CCBE009B87EE /* LogMessageWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6B1C62EC1E16CCBE009B87EE /* LogMessageWindow.xib */; };
+               6B1C62F31E18217B009B87EE /* VLCClearLogTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 6B1C62F21E18217B009B87EE /* VLCClearLogTemplate.pdf */; };
+               6B1C62F51E18267C009B87EE /* VLCSaveTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 6B1C62F41E18267C009B87EE /* VLCSaveTemplate.pdf */; };
                6B2260501D82DE5400D2DD26 /* vlc-xmas.icns in Resources */ = {isa = PBXBuildFile; fileRef = 6B22604F1D82DE5400D2DD26 /* vlc-xmas.icns */; };
                6B3F8D2C1CE58E0E002A4998 /* VLCNextTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 6B3F8D281CE58E0E002A4998 /* VLCNextTemplate.pdf */; };
                6B3F8D2D1CE58E0E002A4998 /* VLCPauseTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 6B3F8D291CE58E0E002A4998 /* VLCPauseTemplate.pdf */; };
                7D3F6525188051F2005776C4 /* BWQuincyMain.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7D3F6523188051F2005776C4 /* BWQuincyMain.xib */; };
                7D5678ED1D5BA1DC002698F3 /* VLCApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D5678EC1D5BA1DC002698F3 /* VLCApplication.m */; };
                7D5678F01D5BA397002698F3 /* VLCMainWindowControlsBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D5678EF1D5BA397002698F3 /* VLCMainWindowControlsBar.m */; };
-               7D8BB0B71830311300FAE9B7 /* DebugMessageVisualizer.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7D8BB0B51830311300FAE9B7 /* DebugMessageVisualizer.xib */; };
                7D8BB0BA1830367200FAE9B7 /* PlaylistMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7D8BB0B81830367200FAE9B7 /* PlaylistMenu.xib */; };
                7D8BB0C01830393300FAE9B7 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7D8BB0BE1830393300FAE9B7 /* MainWindow.xib */; };
                7D9516B71C60B69200D14E1A /* VLCStatusBarIconMainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7D9516B51C60B69200D14E1A /* VLCStatusBarIconMainMenu.xib */; };
                633121CF1B5112C300E636DA /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/ResumeDialog.xib; sourceTree = "<group>"; };
                6B13E2A61BC67678001AD24A /* VLCScrollingClipView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCScrollingClipView.h; path = ../../../modules/gui/macosx/VLCScrollingClipView.h; sourceTree = "<group>"; };
                6B13E2A71BC67678001AD24A /* VLCScrollingClipView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCScrollingClipView.m; path = ../../../modules/gui/macosx/VLCScrollingClipView.m; sourceTree = "<group>"; };
+               6B1C62ED1E16CCBE009B87EE /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/LogMessageWindow.xib; sourceTree = "<group>"; };
+               6B1C62F21E18217B009B87EE /* VLCClearLogTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = VLCClearLogTemplate.pdf; path = "Resources/Button-Icons/VLCClearLogTemplate.pdf"; sourceTree = "<group>"; };
+               6B1C62F41E18267C009B87EE /* VLCSaveTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = VLCSaveTemplate.pdf; path = "Resources/Button-Icons/VLCSaveTemplate.pdf"; sourceTree = "<group>"; };
                6B22604F1D82DE5400D2DD26 /* vlc-xmas.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = "vlc-xmas.icns"; path = "Resources/icons/vlc-xmas.icns"; sourceTree = "<group>"; };
                6B3F8D281CE58E0E002A4998 /* VLCNextTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = VLCNextTemplate.pdf; path = Resources/vlcmenubaricon/VLCNextTemplate.pdf; sourceTree = "<group>"; };
                6B3F8D291CE58E0E002A4998 /* VLCPauseTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = VLCPauseTemplate.pdf; path = Resources/vlcmenubaricon/VLCPauseTemplate.pdf; sourceTree = "<group>"; };
                7D871D391B5E684D000B56C0 /* helpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = helpers.h; path = ../../../modules/gui/macosx/helpers.h; sourceTree = "<group>"; };
                7D8BB0B318302AC000FAE9B7 /* VLCDebugMessageWindowController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VLCDebugMessageWindowController.h; path = ../../../modules/gui/macosx/VLCDebugMessageWindowController.h; sourceTree = SOURCE_ROOT; };
                7D8BB0B418302AC000FAE9B7 /* VLCDebugMessageWindowController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = VLCDebugMessageWindowController.m; path = ../../../modules/gui/macosx/VLCDebugMessageWindowController.m; sourceTree = SOURCE_ROOT; };
-               7D8BB0B61830311300FAE9B7 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/DebugMessageVisualizer.xib; sourceTree = "<group>"; };
                7D8BB0B91830367200FAE9B7 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/PlaylistMenu.xib; sourceTree = "<group>"; };
                7D8BB0BF1830393300FAE9B7 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/MainWindow.xib; sourceTree = "<group>"; };
                7D9516B61C60B69200D14E1A /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/VLCStatusBarIconMainMenu.xib; sourceTree = "<group>"; };
                                6B8CD3FF1DA2FE7C0087C27A /* VLCVolumeOnTemplate.pdf */,
                                6B8CD4021DA304050087C27A /* VLCFullscreenOffTemplate.pdf */,
                                6B8CD4031DA304050087C27A /* VLCFullscreenOnTemplate.pdf */,
+                               6B1C62F21E18217B009B87EE /* VLCClearLogTemplate.pdf */,
+                               6B1C62F41E18267C009B87EE /* VLCSaveTemplate.pdf */,
                                7D9516BB1C60B6C700D14E1A /* status bar item */,
                                1C88BA9D19DC7C7800645190 /* mainwindow_yosemite */,
                                CC0432C213B2479E00D7D52E /* mainwindow */,
                                1C9465971B77B9FC007C965A /* PopupPanel.xib */,
                                1C9465991B77B9FC007C965A /* TextfieldPanel.xib */,
                                1C51BDE31B7A221B0056B9AA /* TimeSelectionPanel.xib */,
-                               7D8BB0B51830311300FAE9B7 /* DebugMessageVisualizer.xib */,
+                               6B1C62EC1E16CCBE009B87EE /* LogMessageWindow.xib */,
                                7D8BB0B81830367200FAE9B7 /* PlaylistMenu.xib */,
                                7D8BB0BE1830393300FAE9B7 /* MainWindow.xib */,
                                7DE88F281831396A00CD9DA2 /* PlaylistAccessoryView.xib */,
                                1C88BC3C19DC7C8100645190 /* ys-repeat_dark@2x.png in Resources */,
                                CC04337913B28B8200D7D52E /* playlist-btn-pressed.png in Resources */,
                                CC04337A13B28B8200D7D52E /* playlist-btn.png in Resources */,
+                               6B1C62F31E18217B009B87EE /* VLCClearLogTemplate.pdf in Resources */,
                                CC04337B13B28B8200D7D52E /* progression-fill-left.png in Resources */,
                                1C88BC0219DC7C8100645190 /* ys-forward-6btns-dark@2x.png in Resources */,
                                1C88BC2419DC7C8100645190 /* ys-progressbar-fill-left_dark@2x.png in Resources */,
                                1CE5ED2519DD6AB700FCEFD3 /* lion-window-fullscreen.png in Resources */,
                                CC04337E13B28B8200D7D52E /* progression-knob.png in Resources */,
                                CC04337F13B28B8200D7D52E /* progression-track-wrapper-left.png in Resources */,
-                               7D8BB0B71830311300FAE9B7 /* DebugMessageVisualizer.xib in Resources */,
                                1C88BA9219DC7C5D00645190 /* ys-sidebar-local@2x.png in Resources */,
                                1C88BB4519DC7C7800645190 /* ys-progression-fill-left@2x.png in Resources */,
                                CC04338013B28B8200D7D52E /* progression-track-wrapper-middle.png in Resources */,
                                1C88BC4E19DC7C8100645190 /* ys-topbar-dark-right@2x.png in Resources */,
                                1C88BA7119DC7B2200645190 /* yosemite-window-minimize-on@2x.png in Resources */,
                                1C88BC4019DC7C8100645190 /* ys-shuffle-blue_dark@2x.png in Resources */,
+                               6B1C62EE1E16CCBE009B87EE /* LogMessageWindow.xib in Resources */,
                                CC0433D013B28C8C00D7D52E /* spref_cone_Hotkeys_64.png in Resources */,
                                CC0433D113B28C8C00D7D52E /* spref_cone_Input_64.png in Resources */,
                                1C88BC1219DC7C8100645190 /* ys-pause_dark@2x.png in Resources */,
                                CC919097159B4BB800E634A7 /* fullscreen-double-buttons_dark@2x.png in Resources */,
                                1C88BB2E19DC7C7800645190 /* ys-next-6btns.png in Resources */,
                                CC919098159B4BB800E634A7 /* fullscreen-double-buttons-pressed_dark@2x.png in Resources */,
+                               6B1C62F51E18267C009B87EE /* VLCSaveTemplate.pdf in Resources */,
                                1C88BA6119DC7B2200645190 /* yosemite-window-fullscreen-graphite@2x.png in Resources */,
                                CC919099159B4BB800E634A7 /* fullscreen-one-button-pressed_dark@2x.png in Resources */,
                                CC91909C159B4BB800E634A7 /* bottom-background_dark@2x.png in Resources */,
                        name = ResumeDialog.xib;
                        sourceTree = "<group>";
                };
+               6B1C62EC1E16CCBE009B87EE /* LogMessageWindow.xib */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               6B1C62ED1E16CCBE009B87EE /* English */,
+                       );
+                       name = LogMessageWindow.xib;
+                       sourceTree = "<group>";
+               };
                6BBBB8AC1D108A87001BD9BA /* VLCRendererDialog.xib */ = {
                        isa = PBXVariantGroup;
                        children = (
                        name = BWQuincyMain.xib;
                        sourceTree = "<group>";
                };
-               7D8BB0B51830311300FAE9B7 /* DebugMessageVisualizer.xib */ = {
-                       isa = PBXVariantGroup;
-                       children = (
-                               7D8BB0B61830311300FAE9B7 /* English */,
-                       );
-                       name = DebugMessageVisualizer.xib;
-                       sourceTree = "<group>";
-               };
                7D8BB0B81830367200FAE9B7 /* PlaylistMenu.xib */ = {
                        isa = PBXVariantGroup;
                        children = (
index a06318d..075e90d 100644 (file)
 @property (assign) IBOutlet NSButton *saveButton;
 @property (assign) IBOutlet NSButton *clearButton;
 @property (assign) IBOutlet NSButton *refreshButton;
+@property (assign) IBOutlet NSButton *toggleDetailsButton;
+@property (assign) IBOutlet NSSplitView *splitView;
+@property (assign) IBOutlet NSView *detailView;
+@property (assign) IBOutlet NSArrayController *arrayController;
 
-- (void)showWindow:(id)sender;
-
-- (IBAction)updateMessagesPanel:(id)sender;
 - (IBAction)saveDebugLog:(id)sender;
+- (IBAction)refreshLog:(id)sender;
 - (IBAction)clearLog:(id)sender;
 
 @end
index d5b48c6..e8002cf 100644 (file)
 #import "VLCMain.h"
 #import <vlc_common.h>
 
-static void MsgCallback(void *data, int type, const vlc_log_t *item, const char *format, va_list ap);
+@interface VLCDebugMessageWindowController () <NSWindowDelegate>
 
-/*****************************************************************************
- * MsgCallback: Callback triggered by the core once a new debug message is
- * ready to be displayed. We store everything in a NSArray in our Cocoa part
- * of this file.
- *****************************************************************************/
+/* This array stores messages that are managed by the arrayController */
+@property (retain) NSMutableArray *messagesArray;
 
-@interface VLCDebugMessageWindowController () <NSWindowDelegate>
-{
-    NSMutableArray * _messageArray;
-}
-- (void)appendMessage:(NSMutableAttributedString *) message;
+/* This array stores messages before they are added to the messagesArray on refresh */
+@property (retain) NSMutableArray *messageBuffer;
+
+/* We do not want to refresh the table for every message, as that would be very frequent when
+ * there are a lot of messages, therefore we use a timer to refresh the table with new data
+ * from the messageBuffer every now and then, which is much more efficient and still fast
+ * enough for a good user experience
+ */
+@property (retain) NSTimer        *refreshTimer;
+
+- (void)addMessage:(NSDictionary *)message;
 
 @end
 
+/*
+ * MsgCallback: Callback triggered by the core once a new debug message is
+ * ready to be displayed. We store everything in a NSArray in our Cocoa part
+ * of this file.
+ */
 static void MsgCallback(void *data, int type, const vlc_log_t *item, const char *format, va_list ap)
 {
     @autoreleasepool {
+        int state;
+        char *msg;
+        VLCDebugMessageWindowController *controller = (__bridge VLCDebugMessageWindowController*)data;
+        static NSString *types[4] = { @"info", @"error", @"warning", @"debug" };
 
-        VLCDebugMessageWindowController *visualizer = (__bridge VLCDebugMessageWindowController*)data;
-
-        int canc = vlc_savecancel();
-        char *str;
-        if (vasprintf(&str, format, ap) == -1) {
-            vlc_restorecancel(canc);
+        if (vasprintf(&msg, format, ap) == -1) {
             return;
         }
 
-        if (!item->psz_module)
-            return;
-        if (!str)
+        if (!item->psz_module || !msg) {
+            free(msg);
             return;
+        }
 
-        NSColor *_white = [NSColor whiteColor];
-        NSColor *_red = [NSColor redColor];
-        NSColor *_yellow = [NSColor yellowColor];
-        NSColor *_gray = [NSColor grayColor];
-
-        NSColor * pp_color[4] = { _white, _red, _yellow, _gray };
-        static const char * ppsz_type[4] = { ": ", " error: ", " warning: ", " debug: " };
-
-
-        NSString *firstString = [NSString stringWithFormat:@"%s%s", item->psz_module, ppsz_type[type]];
-        NSString *secondString = [NSString stringWithFormat:@"%@%s\n", firstString, str];
-
-        NSDictionary *colorAttrib = [NSDictionary dictionaryWithObject: pp_color[type]  forKey: NSForegroundColorAttributeName];
-        NSMutableAttributedString *coloredMsg = [[NSMutableAttributedString alloc] initWithString: secondString attributes: colorAttrib];
-        colorAttrib = [NSDictionary dictionaryWithObject: pp_color[3] forKey: NSForegroundColorAttributeName];
-        [coloredMsg setAttributes: colorAttrib range: NSMakeRange(0, [firstString length])];
-
-        [visualizer performSelectorOnMainThread:@selector(appendMessage:) withObject:coloredMsg waitUntilDone:NO];
-
-        vlc_restorecancel(canc);
-        free(str);
+        NSString *position = [NSString stringWithFormat:@"%s:%i", item->file, item->line];
+
+        NSDictionary *messageDict = @{
+                                      @"type"       : types[type],
+                                      @"message"    : toNSStr(msg),
+                                      @"component"  : toNSStr(item->psz_module),
+                                      @"position"   : position,
+                                      @"func"       : toNSStr(item->func)
+                                      };
+        [controller addMessage:messageDict];
+        free(msg);
     }
 }
 
@@ -89,56 +86,121 @@ static void MsgCallback(void *data, int type, const vlc_log_t *item, const char
 
 - (id)init
 {
-    self = [super initWithWindowNibName:@"DebugMessageVisualizer"];
+    self = [super initWithWindowNibName:@"LogMessageWindow"];
     if (self) {
-        _messageArray = [NSMutableArray arrayWithCapacity:600];
+        _messagesArray = [[NSMutableArray alloc] initWithCapacity:500];
+        _messageBuffer = [[NSMutableArray alloc] initWithCapacity:100];
     }
     return self;
 }
 
 - (void)dealloc
 {
-    vlc_LogSet( getIntf()->obj.libvlc, NULL, NULL );
+    if (getIntf())
+        vlc_LogSet( getIntf()->obj.libvlc, NULL, NULL );
 }
 
 - (void)windowDidLoad
 {
-    [self.window setExcludedFromWindowsMenu: YES];
-    [self.window setDelegate: self];
-    [self.window setTitle: _NS("Messages")];
-    [_saveButton setTitle: _NS("Save this Log...")];
-    [_clearButton setTitle:_NS("Clear")];
-    [_refreshButton setImage: [NSImage imageNamed: NSImageNameRefreshTemplate]];
+    [self.window setExcludedFromWindowsMenu:YES];
+    [self.window setDelegate:self];
+    [self.window setTitle:_NS("Messages")];
+
+#define setupButton(target, title, desc)                                              \
+    [target accessibilitySetOverrideValue:title                                       \
+                             forAttribute:NSAccessibilityTitleAttribute];             \
+    [target accessibilitySetOverrideValue:desc                                        \
+                             forAttribute:NSAccessibilityDescriptionAttribute];       \
+    [target setToolTip:desc];
+
+    setupButton(_saveButton,
+                _NS("Save log"),
+                _NS("Click to save the debug log to a file."));
+    setupButton(_refreshButton,
+                _NS("Refresh log"),
+                _NS("Click to frefresh the log output."));
+    setupButton(_clearButton,
+                _NS("Clear log"),
+                _NS("Click to clear the log output."));
+    setupButton(_toggleDetailsButton,
+                _NS("Toggle details"),
+                _NS("Click to show/hide details about a log message."));
+
+#undef setupButton
 }
 
-#pragma mark - UI interaction
-
 - (void)showWindow:(id)sender
 {
-    /* subscribe to LibVLCCore's messages */
-    vlc_LogSet(getIntf()->obj.libvlc, MsgCallback, (__bridge void*)self);
+    // Do nothing if window is already visible
+    if ([self.window isVisible]) {
+        return [super showWindow:sender];
+    }
 
-    [super showWindow:sender];
+    // Subscribe to LibVLCCore's messages
+    vlc_LogSet(getIntf()->obj.libvlc, MsgCallback, (__bridge void*)self);
+    _refreshTimer = [NSTimer scheduledTimerWithTimeInterval:0.3
+                                                     target:self
+                                                   selector:@selector(appendMessageBuffer)
+                                                   userInfo:nil
+                                                    repeats:YES];
+    return [super showWindow:sender];
 }
 
-- (IBAction)updateMessagesPanel:(id)sender
+- (void)windowWillClose:(NSNotification *)notification
 {
-    [[NSNotificationCenter defaultCenter] postNotificationName:NSWindowDidBecomeKeyNotification object:self.window];
+    // Unsubscribe from LibVLCCore's messages
+    vlc_LogSet( getIntf()->obj.libvlc, NULL, NULL );
+
+    // Remove all messages
+    [self clearMessageBuffer];
+    [self clearMessageTable];
+
+    // Invalidate timer
+    [_refreshTimer invalidate];
+    _refreshTimer = nil;
 }
 
-- (void)windowDidBecomeKey:(NSNotification *)notification
+#pragma mark -
+#pragma mark Delegate methods
+
+/*
+ * Called when a row is added to the table
+ * We use this to set the correct background color for the row, depending on the
+ * message type.
+ */
+- (void)tableView:(NSTableView *)tableView didAddRowView:(NSTableRowView *)rowView forRow:(NSInteger)row
 {
-    [_messageTable reloadData];
-    [_messageTable scrollRowToVisible: [_messageArray count] - 1];
+    // Initialize background colors
+    static NSDictionary *colors = nil;
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        colors = @{
+                   @"info"     : [NSColor colorWithCalibratedRed:0.65 green:0.91 blue:1.0 alpha:0.7],
+                   @"error"    : [NSColor colorWithCalibratedRed:1.0 green:0.49 blue:0.45 alpha:0.5],
+                   @"warning"  : [NSColor colorWithCalibratedRed:1.0 green:0.88 blue:0.45 alpha:0.7],
+                   @"debug"    : [NSColor colorWithCalibratedRed:0.96 green:0.96 blue:0.96 alpha:0.5]
+                   };
+    });
+
+    // Lookup color for message type
+    NSDictionary *message = [[_arrayController arrangedObjects] objectAtIndex:row];
+    rowView.backgroundColor = [colors objectForKey:[message objectForKey:@"type"]];
 }
 
-- (void)windowWillClose:(NSNotification *)notification
+- (void)splitViewDidResizeSubviews:(NSNotification *)notification
 {
-    /* unsubscribe from LibVLCCore's messages */
-    vlc_LogSet( getIntf()->obj.libvlc, NULL, NULL );
-    [_messageArray removeAllObjects];
+    if ([_splitView isSubviewCollapsed:_detailView]) {
+        [_toggleDetailsButton setState:NSOffState];
+    } else {
+        [_toggleDetailsButton setState:NSOnState];
+    }
 }
 
+#pragma mark -
+#pragma mark UI actions
+
+/* Save debug log to file action
+ */
 - (IBAction)saveDebugLog:(id)sender
 {
     NSSavePanel * saveFolderPanel = [[NSSavePanel alloc] init];
@@ -148,50 +210,138 @@ static void MsgCallback(void *data, int type, const vlc_log_t *item, const char
     [saveFolderPanel setAllowedFileTypes: [NSArray arrayWithObject:@"txt"]];
     [saveFolderPanel setNameFieldStringValue:[NSString stringWithFormat: _NS("VLC Debug Log (%s).txt"), VERSION_MESSAGE]];
     [saveFolderPanel beginSheetModalForWindow: self.window completionHandler:^(NSInteger returnCode) {
-        if (returnCode == NSOKButton) {
-            NSUInteger count = [_messageArray count];
-            NSMutableString *string = [[NSMutableString alloc] init];
-            for (NSUInteger i = 0; i < count; i++)
-                [string appendString: [[_messageArray objectAtIndex:i] string]];
-
-            NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding];
-            if ([data writeToFile: [[saveFolderPanel URL] path] atomically: YES] == NO)
-                msg_Warn(getIntf(), "Error while saving the debug log");
+        if (returnCode != NSOKButton) {
+            return;
         }
+        NSMutableString *string = [[NSMutableString alloc] init];
+
+        for (NSDictionary *line in _messagesArray) {
+            NSString *message = [NSString stringWithFormat:@"%@ %@ %@\n",
+                                 [line objectForKey:@"component"],
+                                 [line objectForKey:@"type"],
+                                 [line objectForKey:@"message"]];
+            [string appendString:message];
+        }
+        NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding];
+        if ([data writeToFile: [[saveFolderPanel URL] path] atomically: YES] == NO)
+            msg_Warn(getIntf(), "Error while saving the debug log");
     }];
 }
 
+/* Clear log action
+ */
 - (IBAction)clearLog:(id)sender
 {
-    [_messageArray removeAllObjects];
+    // Unregister handler
+    vlc_LogSet(getIntf()->obj.libvlc, NULL, NULL);
+
+    // Remove all messages
+    [self clearMessageBuffer];
+    [self clearMessageTable];
 
     // Reregister handler, to write new header to log
-    vlc_LogSet(getIntf()->obj.libvlc, NULL, NULL);
     vlc_LogSet(getIntf()->obj.libvlc, MsgCallback, (__bridge void*)self);
+}
 
-    [_messageTable reloadData];
+/* Refresh log action
+ */
+- (IBAction)refreshLog:(id)sender
+{
+    [self appendMessageBuffer];
+    [_messageTable scrollToEndOfDocument:self];
 }
 
-#pragma mark - data handling
+/* Show/Hide details action
+ */
+- (IBAction)toggleDetails:(id)sender
+{
+    if ([_splitView isSubviewCollapsed:_detailView]) {
+        [_detailView setHidden:NO];
+    } else {
+        [_detailView setHidden:YES];
+    }
+}
 
-- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView
+/* Called when the user hits CMD + C or copy is clicked in the edit menu
+ */
+- (void) copy:(id)sender {
+    NSPasteboard *pasteBoard = [NSPasteboard generalPasteboard];
+    [pasteBoard clearContents];
+    for (NSDictionary *line in [_arrayController selectedObjects]) {
+        NSString *message = [NSString stringWithFormat:@"%@ %@ %@",
+                             [line objectForKey:@"component"],
+                             [line objectForKey:@"type"],
+                             [line objectForKey:@"message"]];
+        [pasteBoard writeObjects:@[message]];
+    }
+}
+
+#pragma mark -
+#pragma mark UI validation
+
+/* Validate the copy menu item
+ */
+- (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)anItem
 {
-    return [_messageArray count];
+    SEL theAction = [anItem action];
+
+    if (theAction == @selector(copy:)) {
+        if ([[_arrayController selectedObjects] count] > 0) {
+            return YES;
+        }
+        return NO;
+    }
+    /* Indicate that we handle the validation method,
+     * even if we don’t implement the action
+     */
+    return YES;
 }
 
-- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
+#pragma mark -
+#pragma mark Data handling
+
+/** 
+ Adds a message to the messageBuffer, it does not has to be called from the main thread, as
+ items are only added to the messageArray on refresh.
+ */
+- (void)addMessage:(NSDictionary *)messageDict
 {
-    return [_messageArray objectAtIndex:rowIndex];
+    @synchronized (_messageBuffer) {
+        [_messageBuffer addObject:messageDict];
+    }
 }
 
-- (void)appendMessage:(NSMutableAttributedString *) message
+/**
+ Clears the message buffer
+ */
+- (void)clearMessageBuffer
 {
-    if ([_messageArray count] > 1000000) {
-        [_messageArray removeObjectAtIndex: 0];
-        [_messageArray removeObjectAtIndex: 1];
+    @synchronized (_messageBuffer) {
+        [_messageBuffer removeAllObjects];
     }
+}
+
+/**
+ Clears all messages in the message table by removing all items from the arrayController
+ */
+- (void)clearMessageTable
+{
+    NSRange range = NSMakeRange(0, [[_arrayController arrangedObjects] count]);
+    [_arrayController removeObjectsAtArrangedObjectIndexes:[NSIndexSet indexSetWithIndexesInRange:range]];
+}
 
-    [_messageArray addObject:message];
+/**
+ Appends all messages from the buffer to the arrayController and clears the buffer
+ */
+- (void)appendMessageBuffer
+{
+    if ([_messagesArray count] > 1000000) {
+        [_messagesArray removeObjectsInRange:NSMakeRange(0, 2)];
+    }
+    @synchronized (_messageBuffer) {
+        [_arrayController addObjects:_messageBuffer];
+        [_messageBuffer removeAllObjects];
+    }
 }
 
 @end