Commit 697f59f3 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: split debug messages handling from VLCMain and the Main Menu nib

parent 04cb7d2a
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1060</int>
<string key="IBDocument.SystemVersion">12F45</string>
<string key="IBDocument.InterfaceBuilderVersion">851</string>
<string key="IBDocument.AppKitVersion">1187.40</string>
<string key="IBDocument.HIToolboxVersion">626.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">851</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="5"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1001">
<string key="NSClassName">VLCDebugMessageVisualizer</string>
</object>
<object class="NSCustomObject" id="1003">
<string key="NSClassName">FirstResponder</string>
</object>
<object class="NSCustomObject" id="1004">
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSWindowTemplate" id="401114513">
<int key="NSWindowStyleMask">27</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{316, 323}, {599, 368}}</string>
<int key="NSWTFlags">-260571136</int>
<string key="NSWindowTitle">Messages</string>
<string key="NSWindowClass">NSPanel</string>
<object class="NSMutableString" key="NSViewClass">
<characters key="NS.bytes">View</characters>
</object>
<nil key="NSUserInterfaceItemIdentifier"/>
<string key="NSWindowContentMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
<string key="NSWindowContentMinSize">{599, 368}</string>
<object class="NSView" key="NSWindowView" id="1048939372">
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="775495558">
<reference key="NSNextResponder" ref="1048939372"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{7, 7}, {185, 28}}</string>
<reference key="NSSuperview" ref="1048939372"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="844951024">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">138018816</int>
<string key="NSContents">Save this Log...</string>
<object class="NSFont" key="NSSupport" id="26">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">11</double>
<int key="NSfFlags">3088</int>
</object>
<reference key="NSControlView" ref="775495558"/>
<int key="NSButtonFlags">-2038284288</int>
<int key="NSButtonFlags2">1</int>
<object class="NSFont" key="NSAlternateImage">
<string key="NSName">Helvetica</string>
<double key="NSSize">11</double>
<int key="NSfFlags">16</int>
</object>
<string key="NSAlternateContents"/>
<object class="NSMutableString" key="NSKeyEquivalent">
<characters key="NS.bytes"/>
</object>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSScrollView" id="306263536">
<reference key="NSNextResponder" ref="1048939372"/>
<int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSClipView" id="1014768605">
<reference key="NSNextResponder" ref="306263536"/>
<int key="NSvFlags">2304</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTableView" id="277989700">
<reference key="NSNextResponder" ref="1014768605"/>
<int key="NSvFlags">256</int>
<string key="NSFrameSize">{601, 328}</string>
<reference key="NSSuperview" ref="1014768605"/>
<string key="NSReuseIdentifierKey">_NS:1843</string>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<bool key="NSControlAllowsExpansionToolTips">YES</bool>
<object class="_NSCornerView" key="NSCornerView">
<nil key="NSNextResponder"/>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{224, 0}, {16, 17}}</string>
<string key="NSReuseIdentifierKey">_NS:1848</string>
</object>
<object class="NSMutableArray" key="NSTableColumns">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTableColumn" id="181733707">
<double key="NSWidth">598</double>
<double key="NSMinWidth">40</double>
<double key="NSMaxWidth">1000</double>
<object class="NSTableHeaderCell" key="NSHeaderCell">
<int key="NSCellFlags">612368448</int>
<int key="NSCellFlags2">2048</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="26"/>
<object class="NSColor" key="NSBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes>
</object>
<object class="NSColor" key="NSTextColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">headerTextColor</string>
<object class="NSColor" key="NSColor" id="274564326">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
</object>
</object>
<object class="NSTextFieldCell" key="NSDataCell" id="437315334">
<int key="NSCellFlags">603979840</int>
<int key="NSCellFlags2">1073747968</int>
<string key="NSContents">Text Cell</string>
<object class="NSFont" key="NSSupport">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">11</double>
<int key="NSfFlags">16</int>
</object>
<reference key="NSControlView" ref="277989700"/>
<object class="NSColor" key="NSBackgroundColor" id="535117701">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlDarkShadowColor</string>
<reference key="NSColor" ref="274564326"/>
</object>
<object class="NSColor" key="NSTextColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">selectedInactiveColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
</object>
</object>
</object>
<int key="NSResizingMask">3</int>
<bool key="NSIsResizeable">YES</bool>
<reference key="NSTableView" ref="277989700"/>
</object>
</object>
<double key="NSIntercellSpacingWidth">3</double>
<double key="NSIntercellSpacingHeight">2</double>
<object class="NSColor" key="NSBackgroundColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">shadowColor</string>
<reference key="NSColor" ref="274564326"/>
</object>
<object class="NSColor" key="NSGridColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MCAwIDAAA</bytes>
</object>
<double key="NSRowHeight">17</double>
<int key="NSTvFlags">306184192</int>
<reference key="NSDelegate"/>
<reference key="NSDataSource"/>
<int key="NSColumnAutoresizingStyle">4</int>
<int key="NSDraggingSourceMaskForLocal">15</int>
<int key="NSDraggingSourceMaskForNonLocal">0</int>
<bool key="NSAllowsTypeSelect">NO</bool>
<int key="NSTableViewDraggingDestinationStyle">0</int>
<int key="NSTableViewGroupRowStyle">1</int>
</object>
</object>
<string key="NSFrameSize">{601, 328}</string>
<reference key="NSSuperview" ref="306263536"/>
<reference key="NSNextKeyView" ref="277989700"/>
<string key="NSReuseIdentifierKey">_NS:1841</string>
<reference key="NSDocView" ref="277989700"/>
<reference key="NSBGColor" ref="535117701"/>
<int key="NScvFlags">4</int>
</object>
<object class="NSScroller" id="1045466685">
<reference key="NSNextResponder" ref="306263536"/>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{224, 17}, {15, 102}}</string>
<reference key="NSSuperview" ref="306263536"/>
<string key="NSReuseIdentifierKey">_NS:1860</string>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<reference key="NSTarget" ref="306263536"/>
<string key="NSAction">_doScroller:</string>
<double key="NSPercent">0.99690402476780182</double>
</object>
<object class="NSScroller" id="112989513">
<reference key="NSNextResponder" ref="306263536"/>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{1, 299.97265625}, {597.5703125, 15}}</string>
<reference key="NSSuperview" ref="306263536"/>
<string key="NSReuseIdentifierKey">_NS:1862</string>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSsFlags">1</int>
<reference key="NSTarget" ref="306263536"/>
<string key="NSAction">_doScroller:</string>
<double key="NSPercent">0.99833887043189373</double>
</object>
</object>
<string key="NSFrame">{{-1, 41}, {601, 328}}</string>
<reference key="NSSuperview" ref="1048939372"/>
<reference key="NSNextKeyView" ref="1014768605"/>
<string key="NSReuseIdentifierKey">_NS:1839</string>
<int key="NSsFlags">133680</int>
<reference key="NSVScroller" ref="1045466685"/>
<reference key="NSHScroller" ref="112989513"/>
<reference key="NSContentView" ref="1014768605"/>
<bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
<double key="NSMinMagnification">0.25</double>
<double key="NSMaxMagnification">4</double>
<double key="NSMagnification">1</double>
</object>
<object class="NSButton" id="736767163">
<reference key="NSNextResponder" ref="1048939372"/>
<int key="NSvFlags">289</int>
<string key="NSFrame">{{560, 4}, {32, 32}}</string>
<reference key="NSSuperview" ref="1048939372"/>
<string key="NSReuseIdentifierKey">_NS:4108</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="840968986">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">131072</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="26"/>
<string key="NSCellIdentifier">_NS:4108</string>
<reference key="NSControlView" ref="736767163"/>
<int key="NSButtonFlags">-2033975296</int>
<int key="NSButtonFlags2">135</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
</object>
<string key="NSFrameSize">{599, 368}</string>
<reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
<string key="NSMinSize">{599, 384}</string>
<string key="NSMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
<string key="NSFrameAutosaveName">messages</string>
<bool key="NSWindowIsRestorable">YES</bool>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_msgs_panel</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="401114513"/>
</object>
<int key="connectionID">13</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">saveDebugLog:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="775495558"/>
</object>
<int key="connectionID">15</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_msgs_refresh_btn</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="736767163"/>
</object>
<int key="connectionID">17</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">updateMessagesPanel:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="736767163"/>
</object>
<int key="connectionID">18</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_msgs_save_btn</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="775495558"/>
</object>
<int key="connectionID">19</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_msgs_table</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="277989700"/>
</object>
<int key="connectionID">20</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">dataSource</string>
<reference key="source" ref="277989700"/>
<reference key="destination" ref="1001"/>
</object>
<int key="connectionID">21</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="277989700"/>
<reference key="destination" ref="1001"/>
</object>
<int key="connectionID">22</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<reference key="object" ref="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="1001"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="1003"/>
<reference key="parent" ref="0"/>
<string key="objectName">First Responder</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-3</int>
<reference key="object" ref="1004"/>
<reference key="parent" ref="0"/>
<string key="objectName">Application</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">1</int>
<reference key="object" ref="401114513"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="1048939372"/>
</object>
<reference key="parent" ref="0"/>
<string key="objectName">Messages</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">2</int>
<reference key="object" ref="1048939372"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="775495558"/>
<reference ref="736767163"/>
<reference ref="306263536"/>
</object>
<reference key="parent" ref="401114513"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">3</int>
<reference key="object" ref="775495558"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="844951024"/>
</object>
<reference key="parent" ref="1048939372"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4</int>
<reference key="object" ref="736767163"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="840968986"/>
</object>
<reference key="parent" ref="1048939372"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">5</int>
<reference key="object" ref="306263536"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="277989700"/>
<reference ref="112989513"/>
<reference ref="1045466685"/>
</object>
<reference key="parent" ref="1048939372"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">6</int>
<reference key="object" ref="277989700"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="181733707"/>
</object>
<reference key="parent" ref="306263536"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">7</int>
<reference key="object" ref="112989513"/>
<reference key="parent" ref="306263536"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">8</int>
<reference key="object" ref="1045466685"/>
<reference key="parent" ref="306263536"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">9</int>
<reference key="object" ref="181733707"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="437315334"/>
</object>
<reference key="parent" ref="277989700"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">10</int>
<reference key="object" ref="437315334"/>
<reference key="parent" ref="181733707"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">11</int>
<reference key="object" ref="840968986"/>
<reference key="parent" ref="736767163"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">12</int>
<reference key="object" ref="844951024"/>
<reference key="parent" ref="775495558"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.IBPluginDependency</string>
<string>-2.IBPluginDependency</string>
<string>-3.IBPluginDependency</string>
<string>1.IBEditorWindowLastContentRect</string>
<string>1.IBPluginDependency</string>
<string>1.IBWindowTemplateEditedContentRect</string>
<string>1.ImportedFromIB2</string>
<string>1.windowTemplate.hasMinSize</string>
<string>1.windowTemplate.minSize</string>
<string>10.IBPluginDependency</string>
<string>11.IBPluginDependency</string>
<string>12.IBPluginDependency</string>
<string>2.IBPluginDependency</string>
<string>2.ImportedFromIB2</string>
<string>3.IBPluginDependency</string>
<string>3.IBViewBoundsToFrameTransform</string>
<string>3.ImportedFromIB2</string>
<string>4.IBPluginDependency</string>
<string>4.IBViewBoundsToFrameTransform</string>
<string>5.IBPluginDependency</string>
<string>5.IBViewBoundsToFrameTransform</string>
<string>6.IBPluginDependency</string>
<string>7.IBPluginDependency</string>
<string>8.IBPluginDependency</string>
<string>9.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{146, 181}, {599, 368}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{146, 181}, {599, 368}}</string>
<boolean value="YES"/>
<boolean value="YES"/>
<string>{599, 368}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDPwAAwgQAAA</bytes>
</object>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABECkAAwhwAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCRAAAw5kAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">22</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">VLCDebugMessageVisualizer</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>saveDebugLog:</string>
<string>updateMessagesPanel:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>saveDebugLog:</string>
<string>updateMessagesPanel:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
<string key="name">saveDebugLog:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">updateMessagesPanel:</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>_msgs_panel</string>
<string>_msgs_refresh_btn</string>
<string>_msgs_save_btn</string>
<string>_msgs_table</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSWindow</string>
<string>NSButton</string>
<string>NSButton</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>_msgs_panel</string>
<string>_msgs_refresh_btn</string>
<string>_msgs_save_btn</string>
<string>_msgs_table</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">_msgs_panel</string>
<string key="candidateClassName">NSWindow</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_msgs_refresh_btn</string>
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_msgs_save_btn</string>
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">_msgs_table</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBDocumentRelativeSource</string>
<string key="minorKey">../../../../../modules/gui/macosx/DebugMessageVisualizer.h</string>
</object>
</object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
<integer value="3000" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<nil key="IBDocument.LastKnownRelativeProjectPath"/>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
</data>
</archive>
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
7D8BB0B21830244B00FAE9B7 /* CrashReporter.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7D8BB0B01830244B00FAE9B7 /* CrashReporter.xib */; }; 7D8BB0B21830244B00FAE9B7 /* CrashReporter.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7D8BB0B01830244B00FAE9B7 /* CrashReporter.xib */; };
7D8BB0B71830311300FAE9B7 /* DebugMessageVisualizer.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7D8BB0B51830311300FAE9B7 /* DebugMessageVisualizer.xib */; };
7DFFA16C16124F38001AF89F /* effects-one-button-pressed-dark.png in Resources */ = {isa = PBXBuildFile; fileRef = 7DFFA16A16124F38001AF89F /* effects-one-button-pressed-dark.png */; }; 7DFFA16C16124F38001AF89F /* effects-one-button-pressed-dark.png in Resources */ = {isa = PBXBuildFile; fileRef = 7DFFA16A16124F38001AF89F /* effects-one-button-pressed-dark.png */; };
7DFFA16D16124F38001AF89F /* effects-one-button-pressed-dark@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7DFFA16B16124F38001AF89F /* effects-one-button-pressed-dark@2x.png */; }; 7DFFA16D16124F38001AF89F /* effects-one-button-pressed-dark@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7DFFA16B16124F38001AF89F /* effects-one-button-pressed-dark@2x.png */; };
CC04323D13B246DF00D7D52E /* effects-double-buttons_dark.png in Resources */ = {isa = PBXBuildFile; fileRef = CC04321313B246DF00D7D52E /* effects-double-buttons_dark.png */; }; CC04323D13B246DF00D7D52E /* effects-double-buttons_dark.png in Resources */ = {isa = PBXBuildFile; fileRef = CC04321313B246DF00D7D52E /* effects-double-buttons_dark.png */; };
...@@ -470,6 +471,9 @@ ...@@ -470,6 +471,9 @@
7D5B7B20182FDA0300DB4869 /* CrashReporter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CrashReporter.m; path = ../../../modules/gui/macosx/CrashReporter.m; sourceTree = "<group>"; }; 7D5B7B20182FDA0300DB4869 /* CrashReporter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CrashReporter.m; path = ../../../modules/gui/macosx/CrashReporter.m; sourceTree = "<group>"; };
7D7DC2CA182E86D9008C9E3E /* darwinvlc.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = darwinvlc.c; path = ../../../bin/darwinvlc.c; sourceTree = "<group>"; }; 7D7DC2CA182E86D9008C9E3E /* darwinvlc.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = darwinvlc.c; path = ../../../bin/darwinvlc.c; sourceTree = "<group>"; };
7D8BB0B11830244B00FAE9B7 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/CrashReporter.xib; sourceTree = "<group>"; }; 7D8BB0B11830244B00FAE9B7 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/CrashReporter.xib; sourceTree = "<group>"; };
7D8BB0B318302AC000FAE9B7 /* DebugMessageVisualizer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DebugMessageVisualizer.h; path = ../../../modules/gui/macosx/DebugMessageVisualizer.h; sourceTree = "<group>"; };
7D8BB0B418302AC000FAE9B7 /* DebugMessageVisualizer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = DebugMessageVisualizer.m; path = ../../../modules/gui/macosx/DebugMessageVisualizer.m; sourceTree = "<group>"; };
7D8BB0B61830311300FAE9B7 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/DebugMessageVisualizer.xib; sourceTree = "<group>"; };
7DFFA16A16124F38001AF89F /* effects-one-button-pressed-dark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "effects-one-button-pressed-dark.png"; path = "Resources/mainwindow_dark/effects-one-button-pressed-dark.png"; sourceTree = "<group>"; }; 7DFFA16A16124F38001AF89F /* effects-one-button-pressed-dark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "effects-one-button-pressed-dark.png"; path = "Resources/mainwindow_dark/effects-one-button-pressed-dark.png"; sourceTree = "<group>"; };
7DFFA16B16124F38001AF89F /* effects-one-button-pressed-dark@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "effects-one-button-pressed-dark@2x.png"; path = "Resources/mainwindow_dark/effects-one-button-pressed-dark@2x.png"; sourceTree = "<group>"; }; 7DFFA16B16124F38001AF89F /* effects-one-button-pressed-dark@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "effects-one-button-pressed-dark@2x.png"; path = "Resources/mainwindow_dark/effects-one-button-pressed-dark@2x.png"; sourceTree = "<group>"; };
8E49720006417F6800370C9F /* playlistinfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = playlistinfo.h; path = ../../../modules/gui/macosx/playlistinfo.h; sourceTree = SOURCE_ROOT; }; 8E49720006417F6800370C9F /* playlistinfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = playlistinfo.h; path = ../../../modules/gui/macosx/playlistinfo.h; sourceTree = SOURCE_ROOT; };
...@@ -1065,6 +1069,8 @@ ...@@ -1065,6 +1069,8 @@
8ED6C27E03E2EB1C0059A3A7 /* macosx.m */, 8ED6C27E03E2EB1C0059A3A7 /* macosx.m */,
8ED6C27C03E2EB1C0059A3A7 /* intf.h */, 8ED6C27C03E2EB1C0059A3A7 /* intf.h */,
8ED6C27D03E2EB1C0059A3A7 /* intf.m */, 8ED6C27D03E2EB1C0059A3A7 /* intf.m */,
7D8BB0B318302AC000FAE9B7 /* DebugMessageVisualizer.h */,
7D8BB0B418302AC000FAE9B7 /* DebugMessageVisualizer.m */,
7D5B7B1F182FDA0300DB4869 /* CrashReporter.h */, 7D5B7B1F182FDA0300DB4869 /* CrashReporter.h */,
7D5B7B20182FDA0300DB4869 /* CrashReporter.m */, 7D5B7B20182FDA0300DB4869 /* CrashReporter.m */,
CC448A5A13B61D49009F72E0 /* MainMenu.h */, CC448A5A13B61D49009F72E0 /* MainMenu.h */,
...@@ -1783,6 +1789,7 @@ ...@@ -1783,6 +1789,7 @@
CC0663371566CD5A003A411C /* ConvertAndSave.xib */, CC0663371566CD5A003A411C /* ConvertAndSave.xib */,
CC461F73160084A10022423C /* SharedDialogs.xib */, CC461F73160084A10022423C /* SharedDialogs.xib */,
7D8BB0B01830244B00FAE9B7 /* CrashReporter.xib */, 7D8BB0B01830244B00FAE9B7 /* CrashReporter.xib */,
7D8BB0B51830311300FAE9B7 /* DebugMessageVisualizer.xib */,
); );
name = xibs; name = xibs;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1937,6 +1944,7 @@ ...@@ -1937,6 +1944,7 @@
CC04337D13B28B8200D7D52E /* progression-fill-right.png in Resources */, CC04337D13B28B8200D7D52E /* progression-fill-right.png in Resources */,
CC04337E13B28B8200D7D52E /* progression-knob.png in Resources */, CC04337E13B28B8200D7D52E /* progression-knob.png in Resources */,
CC04337F13B28B8200D7D52E /* progression-track-wrapper-left.png in Resources */, CC04337F13B28B8200D7D52E /* progression-track-wrapper-left.png in Resources */,
7D8BB0B71830311300FAE9B7 /* DebugMessageVisualizer.xib in Resources */,
CC04338013B28B8200D7D52E /* progression-track-wrapper-middle.png in Resources */, CC04338013B28B8200D7D52E /* progression-track-wrapper-middle.png in Resources */,
CC04338113B28B8200D7D52E /* progression-track-wrapper-right.png in Resources */, CC04338113B28B8200D7D52E /* progression-track-wrapper-right.png in Resources */,
CC04338213B28B8200D7D52E /* repeat-all-pressed.png in Resources */, CC04338213B28B8200D7D52E /* repeat-all-pressed.png in Resources */,
...@@ -2273,6 +2281,14 @@ ...@@ -2273,6 +2281,14 @@
name = CrashReporter.xib; name = CrashReporter.xib;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
7D8BB0B51830311300FAE9B7 /* DebugMessageVisualizer.xib */ = {
isa = PBXVariantGroup;
children = (
7D8BB0B61830311300FAE9B7 /* English */,
);
name = DebugMessageVisualizer.xib;
sourceTree = "<group>";
};
CC0663371566CD5A003A411C /* ConvertAndSave.xib */ = { CC0663371566CD5A003A411C /* ConvertAndSave.xib */ = {
isa = PBXVariantGroup; isa = PBXVariantGroup;
children = ( children = (
......
/*****************************************************************************
* DebugMessageVisualizer.h: Mac OS X interface crash reporter
*****************************************************************************
* Copyright (C) 2004-2013 VLC authors and VideoLAN
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne at videolan dot org>
* Pierre d'Herbemont <pdherbemont # videolan org>
* Derk-Jan Hartman <hartman at videolan.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>
@interface VLCDebugMessageVisualizer : NSObject
{
IBOutlet NSWindow * _msgs_panel;
IBOutlet NSButton * _msgs_save_btn;
IBOutlet NSButton * _msgs_refresh_btn;
IBOutlet id _msgs_table;
}
+ (VLCDebugMessageVisualizer *)sharedInstance;
- (void)showPanel;
- (IBAction)updateMessagesPanel:(id)sender;
- (IBAction)saveDebugLog:(id)sender;
@end
/*****************************************************************************
* DebugMessageVisualizer.m: Mac OS X interface crash reporter
*****************************************************************************
* Copyright (C) 2004-2013 VLC authors and VideoLAN
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne at videolan dot org>
* Pierre d'Herbemont <pdherbemont # videolan org>
* Derk-Jan Hartman <hartman at videolan.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 "DebugMessageVisualizer.h"
#import "intf.h"
#import <vlc_common.h>
static void MsgCallback(void *data, int type, const vlc_log_t *item, const char *format, va_list ap);
/*****************************************************************************
* 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.
*****************************************************************************/
@interface VLCDebugMessageVisualizer () <NSWindowDelegate>
{
NSMutableArray * _msg_arr;
NSLock * _msg_lock;
}
- (void)processReceivedlibvlcMessage:(const vlc_log_t *) item ofType: (int)i_type withStr: (char *)str;
@end
static void MsgCallback(void *data, int type, const vlc_log_t *item, const char *format, va_list ap)
{
int canc = vlc_savecancel();
char *str;
if (vasprintf(&str, format, ap) == -1) {
vlc_restorecancel(canc);
return;
}
NSAutoreleasePool *_pool = [[NSAutoreleasePool alloc] init];
[[VLCDebugMessageVisualizer sharedInstance] processReceivedlibvlcMessage: item ofType: type withStr: str];
[_pool release];
vlc_restorecancel(canc);
free(str);
}
@implementation VLCDebugMessageVisualizer
static VLCDebugMessageVisualizer *_sharedMainInstance = nil;
+ (VLCDebugMessageVisualizer *)sharedInstance
{
return _sharedMainInstance ? _sharedMainInstance : [[self alloc] init];
}
- (id)init
{
if (_sharedMainInstance)
[self dealloc];
else {
_sharedMainInstance = [super init];
_msg_lock = [[NSLock alloc] init];
_msg_arr = [[NSMutableArray arrayWithCapacity:600] retain];
BOOL loaded = [NSBundle loadNibNamed:@"DebugMessageVisualizer" owner:self];
}
return _sharedMainInstance;
}
- (void)awakeFromNib
{
[_msgs_panel setExcludedFromWindowsMenu: YES];
[_msgs_panel setDelegate: self];
[_msgs_panel setTitle: _NS("Messages")];
[_msgs_save_btn setTitle: _NS("Save this Log...")];
[_msgs_refresh_btn setImage: [NSImage imageNamed: NSImageNameRefreshTemplate]];
}
- (void)dealloc
{
[_msg_arr removeAllObjects];
[_msg_arr release];
_msg_arr = NULL;
[_msg_lock release];
[super dealloc];
}
#pragma mark - UI interaction
- (void)showPanel
{
/* subscribe to LibVLCCore's messages */
vlc_LogSet(VLCIntf->p_libvlc, MsgCallback, NULL);
/* show panel */
[_msgs_panel makeKeyAndOrderFront:nil];
}
- (IBAction)updateMessagesPanel:(id)sender
{
[self windowDidBecomeKey:nil];
}
- (void)windowDidBecomeKey:(NSNotification *)notification
{
[_msgs_table reloadData];
[_msgs_table scrollRowToVisible: [_msg_arr count] - 1];
}
- (void)windowWillClose:(NSNotification *)notification
{
/* unsubscribe from LibVLCCore's messages */
vlc_LogSet( VLCIntf->p_libvlc, NULL, NULL );
}
- (IBAction)saveDebugLog:(id)sender
{
NSSavePanel * saveFolderPanel = [[NSSavePanel alloc] init];
[saveFolderPanel setCanSelectHiddenExtension: NO];
[saveFolderPanel setCanCreateDirectories: YES];
[saveFolderPanel setAllowedFileTypes: [NSArray arrayWithObject:@"rtf"]];
[saveFolderPanel setNameFieldStringValue:[NSString stringWithFormat: _NS("VLC Debug Log (%s).rtf"), VERSION_MESSAGE]];
[saveFolderPanel beginSheetModalForWindow: _msgs_panel completionHandler:^(NSInteger returnCode) {
if (returnCode == NSOKButton) {
NSUInteger count = [_msg_arr count];
NSMutableAttributedString * string = [[NSMutableAttributedString alloc] init];
for (NSUInteger i = 0; i < count; i++)
[string appendAttributedString: [_msg_arr objectAtIndex:i]];
NSData *data = [string RTFFromRange:NSMakeRange(0, [string length])
documentAttributes:[NSDictionary dictionaryWithObject: NSRTFTextDocumentType forKey: NSDocumentTypeDocumentAttribute]];
if ([data writeToFile: [[saveFolderPanel URL] path] atomically: YES] == NO)
msg_Warn(VLCIntf, "Error while saving the debug log");
[string release];
}
}];
[saveFolderPanel release];
}
#pragma mark - data handling
- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView
{
if (aTableView == _msgs_table)
return [_msg_arr count];
return 0;
}
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
{
NSMutableAttributedString *result = NULL;
[_msg_lock lock];
if (rowIndex < [_msg_arr count])
result = [_msg_arr objectAtIndex:rowIndex];
[_msg_lock unlock];
if (result != NULL)
return result;
else
return @"";
}
- (void)processReceivedlibvlcMessage:(const vlc_log_t *) item ofType: (int)i_type withStr: (char *)str
{
if (_msg_arr) {
NSColor *_white = [NSColor whiteColor];
NSColor *_red = [NSColor redColor];
NSColor *_yellow = [NSColor yellowColor];
NSColor *_gray = [NSColor grayColor];
NSString * firstString, * secondString;
NSColor * pp_color[4] = { _white, _red, _yellow, _gray };
static const char * ppsz_type[4] = { ": ", " error: ", " warning: ", " debug: " };
NSDictionary *_attr;
NSMutableAttributedString *_msg_color;
[_msg_lock lock];
if ([_msg_arr count] > 600) {
[_msg_arr removeObjectAtIndex: 0];
[_msg_arr removeObjectAtIndex: 1];
}
if (!item->psz_module)
return;
if (!str)
return;
firstString = [NSString stringWithFormat:@"%s%s", item->psz_module, ppsz_type[i_type]];
secondString = [NSString stringWithFormat:@"%@%s\n", firstString, str];
_attr = [NSDictionary dictionaryWithObject: pp_color[i_type] forKey: NSForegroundColorAttributeName];
_msg_color = [[NSMutableAttributedString alloc] initWithString: secondString attributes: _attr];
_attr = [NSDictionary dictionaryWithObject: pp_color[3] forKey: NSForegroundColorAttributeName];
[_msg_color setAttributes: _attr range: NSMakeRange(0, [firstString length])];
[_msg_arr addObject: [_msg_color autorelease]];
[_msg_lock unlock];
}
}
@end
...@@ -287,6 +287,7 @@ ...@@ -287,6 +287,7 @@
- (IBAction)openForum:(id)sender; - (IBAction)openForum:(id)sender;
- (IBAction)openDonate:(id)sender; - (IBAction)openDonate:(id)sender;
- (IBAction)viewErrorsAndWarnings:(id)sender; - (IBAction)viewErrorsAndWarnings:(id)sender;
- (IBAction)showMessagesPanel:(id)showMessagesPanel;
- (void)setPlay; - (void)setPlay;
- (void)setPause; - (void)setPause;
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#import "ControlsBar.h" #import "ControlsBar.h"
#import "ExtensionsManager.h" #import "ExtensionsManager.h"
#import "ConvertAndSave.h" #import "ConvertAndSave.h"
#import "DebugMessageVisualizer.h"
@implementation VLCMainMenu @implementation VLCMainMenu
static VLCMainMenu *_o_sharedInstance = nil; static VLCMainMenu *_o_sharedInstance = nil;
...@@ -1104,6 +1105,11 @@ static VLCMainMenu *_o_sharedInstance = nil; ...@@ -1104,6 +1105,11 @@ static VLCMainMenu *_o_sharedInstance = nil;
[[[VLCMain sharedInstance] simplePreferences] showSimplePrefsWithLevel:i_level]; [[[VLCMain sharedInstance] simplePreferences] showSimplePrefsWithLevel:i_level];
} }
- (IBAction)showMessagesPanel:(id)showMessagesPanel
{
[[VLCDebugMessageVisualizer sharedInstance] showPanel];
}
#pragma mark - #pragma mark -
#pragma mark Help and Docs #pragma mark Help and Docs
......
...@@ -85,5 +85,7 @@ SOURCES_macosx = \ ...@@ -85,5 +85,7 @@ SOURCES_macosx = \
VLCVoutWindowController.h \ VLCVoutWindowController.h \
CrashReporter.m \ CrashReporter.m \
CrashReporter.h \ CrashReporter.h \
DebugMessageVisualizer.m \
DebugMessageVisualizer.h \
iTunes.h \ iTunes.h \
$(NULL) $(NULL)
...@@ -110,15 +110,6 @@ struct intf_sys_t ...@@ -110,15 +110,6 @@ struct intf_sys_t
IBOutlet VLCControls * o_controls; /* VLCControls */ IBOutlet VLCControls * o_controls; /* VLCControls */
IBOutlet VLCPlaylist * o_playlist; /* VLCPlaylist */ IBOutlet VLCPlaylist * o_playlist; /* VLCPlaylist */
/* messages panel */
IBOutlet NSWindow * o_msgs_panel; /* messages panel */
NSMutableArray * o_msg_arr; /* messages array */
NSLock * o_msg_lock; /* messages lock */
BOOL b_msg_arr_changed; /* did the array change? */
IBOutlet NSButton * o_msgs_save_btn; /* save the log as rtf */
IBOutlet NSButton * o_msgs_refresh_btn; /* update the panel */
IBOutlet id o_msgs_table;
AppleRemote * o_remote; AppleRemote * o_remote;
BOOL b_remote_button_hold; /* true as long as the user holds the left,right,plus or minus on the remote control */ BOOL b_remote_button_hold; /* true as long as the user holds the left,right,plus or minus on the remote control */
...@@ -187,10 +178,6 @@ struct intf_sys_t ...@@ -187,10 +178,6 @@ struct intf_sys_t
- (void)updateDelays; - (void)updateDelays;
- (void)initStrings; - (void)initStrings;
- (IBAction)saveDebugLog:(id)sender;
- (IBAction)showMessagesPanel:(id)sender;
- (IBAction)updateMessagesPanel:(id)sender;
- (void)processReceivedlibvlcMessage:(const vlc_log_t *) item ofType: (int)type withStr: (char *)str; - (void)processReceivedlibvlcMessage:(const vlc_log_t *) item ofType: (int)type withStr: (char *)str;
- (void)updateTogglePlaylistState; - (void)updateTogglePlaylistState;
......
...@@ -82,8 +82,6 @@ static void updateProgressPanel (void *, const char *, float); ...@@ -82,8 +82,6 @@ static void updateProgressPanel (void *, const char *, float);
static bool checkProgressPanel (void *); static bool checkProgressPanel (void *);
static void destroyProgressPanel (void *); static void destroyProgressPanel (void *);
static void MsgCallback(void *data, int type, const vlc_log_t *item, const char *format, va_list ap);
static int InputEvent(vlc_object_t *, const char *, static int InputEvent(vlc_object_t *, const char *,
vlc_value_t, vlc_value_t, void *); vlc_value_t, vlc_value_t, void *);
static int PLItemChanged(vlc_object_t *, const char *, static int PLItemChanged(vlc_object_t *, const char *,
...@@ -318,29 +316,6 @@ static void Run(intf_thread_t *p_intf) ...@@ -318,29 +316,6 @@ static void Run(intf_thread_t *p_intf)
#pragma mark - #pragma mark -
#pragma mark Variables Callback #pragma mark Variables Callback
/*****************************************************************************
* 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)
{
int canc = vlc_savecancel();
char *str;
if (vasprintf(&str, format, ap) == -1) {
vlc_restorecancel(canc);
return;
}
NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init];
[[VLCMain sharedInstance] processReceivedlibvlcMessage: item ofType: type withStr: str];
[o_pool release];
vlc_restorecancel(canc);
free(str);
}
static int InputEvent(vlc_object_t *p_this, const char *psz_var, static int InputEvent(vlc_object_t *p_this, const char *psz_var,
vlc_value_t oldval, vlc_value_t new_val, void *param) vlc_value_t oldval, vlc_value_t new_val, void *param)
{ {
...@@ -413,7 +388,6 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var, ...@@ -413,7 +388,6 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var,
break; break;
default: default:
//msg_Warn(p_this, "unhandled input event (%lld)", new_val.i_int);
break; break;
} }
...@@ -658,9 +632,6 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -658,9 +632,6 @@ static VLCMain *_o_sharedMainInstance = nil;
p_intf = NULL; p_intf = NULL;
p_current_input = p_input_changed = NULL; p_current_input = p_input_changed = NULL;
o_msg_lock = [[NSLock alloc] init];
o_msg_arr = [[NSMutableArray arrayWithCapacity: 600] retain];
o_open = [[VLCOpen alloc] init]; o_open = [[VLCOpen alloc] init];
o_coredialogs = [[VLCCoreDialogProvider alloc] init]; o_coredialogs = [[VLCCoreDialogProvider alloc] init];
o_info = [[VLCInfo alloc] init]; o_info = [[VLCInfo alloc] init];
...@@ -706,9 +677,6 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -706,9 +677,6 @@ static VLCMain *_o_sharedMainInstance = nil;
if (nib_main_loaded) if (nib_main_loaded)
return; return;
[o_msgs_panel setExcludedFromWindowsMenu: YES];
[o_msgs_panel setDelegate: self];
p_playlist = pl_Get(p_intf); p_playlist = pl_Get(p_intf);
val.b_bool = false; val.b_bool = false;
...@@ -754,8 +722,6 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -754,8 +722,6 @@ static VLCMain *_o_sharedMainInstance = nil;
[o_remote setClickCountEnabledButtons: kRemoteButtonPlay]; [o_remote setClickCountEnabledButtons: kRemoteButtonPlay];
[o_remote setDelegate: _o_sharedMainInstance]; [o_remote setDelegate: _o_sharedMainInstance];
[o_msgs_refresh_btn setImage: [NSImage imageNamed: NSImageNameRefreshTemplate]];
/* yeah, we are done */ /* yeah, we are done */
b_nativeFullscreenMode = NO; b_nativeFullscreenMode = NO;
#ifdef MAC_OS_X_VERSION_10_7 #ifdef MAC_OS_X_VERSION_10_7
...@@ -777,8 +743,6 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -777,8 +743,6 @@ static VLCMain *_o_sharedMainInstance = nil;
[[VLCApplication sharedApplication] setApplicationIconImage: [NSImage imageNamed:@"vlc-xmas"]]; [[VLCApplication sharedApplication] setApplicationIconImage: [NSImage imageNamed:@"vlc-xmas"]];
} }
[self initStrings];
nib_main_loaded = TRUE; nib_main_loaded = TRUE;
} }
...@@ -833,16 +797,6 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -833,16 +797,6 @@ static VLCMain *_o_sharedMainInstance = nil;
[[self playlist] playItem:nil]; [[self playlist] playItem:nil];
} }
- (void)initStrings
{
if (!p_intf)
return;
/* messages panel */
[o_msgs_panel setTitle: _NS("Messages")];
[o_msgs_save_btn setTitle: _NS("Save this Log...")];
}
#pragma mark - #pragma mark -
#pragma mark Termination #pragma mark Termination
...@@ -944,20 +898,14 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -944,20 +898,14 @@ static VLCMain *_o_sharedMainInstance = nil;
/* unsubscribe from libvlc's debug messages */ /* unsubscribe from libvlc's debug messages */
vlc_LogSet(p_intf->p_libvlc, NULL, NULL); vlc_LogSet(p_intf->p_libvlc, NULL, NULL);
[o_msg_arr removeAllObjects];
[o_msg_arr release];
o_msg_arr = NULL;
[o_usedHotkeys release]; [o_usedHotkeys release];
o_usedHotkeys = NULL; o_usedHotkeys = NULL;
[o_mediaKeyController release]; [o_mediaKeyController release];
[o_msg_lock release];
/* write cached user defaults to disk */ /* write cached user defaults to disk */
[[NSUserDefaults standardUserDefaults] synchronize]; [[NSUserDefaults standardUserDefaults] synchronize];
[o_mainmenu release]; [o_mainmenu release];
libvlc_Quit(p_intf->p_libvlc); libvlc_Quit(p_intf->p_libvlc);
...@@ -1801,123 +1749,6 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -1801,123 +1749,6 @@ static VLCMain *_o_sharedMainInstance = nil;
execl(path, path, NULL); execl(path, path, NULL);
} }
#pragma mark -
#pragma mark Errors, warnings and messages
- (IBAction)updateMessagesPanel:(id)sender
{
[self windowDidBecomeKey:nil];
}
- (IBAction)showMessagesPanel:(id)sender
{
/* subscribe to LibVLCCore's messages */
vlc_LogSet(p_intf->p_libvlc, MsgCallback, NULL);
/* show panel */
[o_msgs_panel makeKeyAndOrderFront: sender];
}
- (void)windowDidBecomeKey:(NSNotification *)o_notification
{
[o_msgs_table reloadData];
[o_msgs_table scrollRowToVisible: [o_msg_arr count] - 1];
}
- (void)windowWillClose:(NSNotification *)o_notification
{
/* unsubscribe from LibVLCCore's messages */
vlc_LogSet( p_intf->p_libvlc, NULL, NULL );
}
- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView
{
if (aTableView == o_msgs_table)
return [o_msg_arr count];
return 0;
}
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
{
NSMutableAttributedString *result = NULL;
[o_msg_lock lock];
if (rowIndex < [o_msg_arr count])
result = [o_msg_arr objectAtIndex:rowIndex];
[o_msg_lock unlock];
if (result != NULL)
return result;
else
return @"";
}
- (void)processReceivedlibvlcMessage:(const vlc_log_t *) item ofType: (int)i_type withStr: (char *)str
{
if (o_msg_arr) {
NSColor *o_white = [NSColor whiteColor];
NSColor *o_red = [NSColor redColor];
NSColor *o_yellow = [NSColor yellowColor];
NSColor *o_gray = [NSColor grayColor];
NSString * firstString, * secondString;
NSColor * pp_color[4] = { o_white, o_red, o_yellow, o_gray };
static const char * ppsz_type[4] = { ": ", " error: ", " warning: ", " debug: " };
NSDictionary *o_attr;
NSMutableAttributedString *o_msg_color;
[o_msg_lock lock];
if ([o_msg_arr count] > 600) {
[o_msg_arr removeObjectAtIndex: 0];
[o_msg_arr removeObjectAtIndex: 1];
}
if (!item->psz_module)
return;
if (!str)
return;
firstString = [NSString stringWithFormat:@"%s%s", item->psz_module, ppsz_type[i_type]];
secondString = [NSString stringWithFormat:@"%@%s\n", firstString, str];
o_attr = [NSDictionary dictionaryWithObject: pp_color[i_type] forKey: NSForegroundColorAttributeName];
o_msg_color = [[NSMutableAttributedString alloc] initWithString: secondString attributes: o_attr];
o_attr = [NSDictionary dictionaryWithObject: pp_color[3] forKey: NSForegroundColorAttributeName];
[o_msg_color setAttributes: o_attr range: NSMakeRange(0, [firstString length])];
[o_msg_arr addObject: [o_msg_color autorelease]];
b_msg_arr_changed = YES;
[o_msg_lock unlock];
}
}
- (IBAction)saveDebugLog:(id)sender
{
NSSavePanel * saveFolderPanel = [[NSSavePanel alloc] init];
[saveFolderPanel setCanSelectHiddenExtension: NO];
[saveFolderPanel setCanCreateDirectories: YES];
[saveFolderPanel setAllowedFileTypes: [NSArray arrayWithObject:@"rtf"]];
[saveFolderPanel setNameFieldStringValue:[NSString stringWithFormat: _NS("VLC Debug Log (%s).rtf"), VERSION_MESSAGE]];
[saveFolderPanel beginSheetModalForWindow: o_msgs_panel completionHandler:^(NSInteger returnCode) {
if (returnCode == NSOKButton) {
NSUInteger count = [o_msg_arr count];
NSMutableAttributedString * string = [[NSMutableAttributedString alloc] init];
for (NSUInteger i = 0; i < count; i++)
[string appendAttributedString: [o_msg_arr objectAtIndex:i]];
NSData *data = [string RTFFromRange:NSMakeRange(0, [string length])
documentAttributes:[NSDictionary dictionaryWithObject: NSRTFTextDocumentType forKey: NSDocumentTypeDocumentAttribute]];
if ([data writeToFile: [[saveFolderPanel URL] path] atomically: YES] == NO)
msg_Warn(p_intf, "Error while saving the debug log");
[string release];
}
}];
[saveFolderPanel release];
}
#pragma mark - #pragma mark -
#pragma mark Playlist toggling #pragma mark Playlist toggling
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment