Commit dcb7543f authored by David Fuhrmann's avatar David Fuhrmann

macosx: Create custom resume dialog, refactor

Create own resume dialog, which acts the same way as a floating
window. Thus it does not disturb the user more than any
other VLC panel and consequently does not block the user in doing
other operations.

This fixes floating behaviour (#13886) any makes it more easy
to implement any other fancy_dialog_whatever we might add later.
Current design is a copy of the currently used alert window.

Also raised the timeout value to 10 secs as users are complaining
6 sec is not long enough.

close #13886
parent 42e04c77
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">101000</int>
<string key="IBDocument.SystemVersion">14E46</string>
<string key="IBDocument.InterfaceBuilderVersion">7706</string>
<string key="IBDocument.AppKitVersion">1348.17</string>
<string key="IBDocument.HIToolboxVersion">758.70</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">7706</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>NSButton</string>
<string>NSButtonCell</string>
<string>NSCustomObject</string>
<string>NSImageCell</string>
<string>NSImageView</string>
<string>NSTextField</string>
<string>NSTextFieldCell</string>
<string>NSView</string>
<string>NSWindowTemplate</string>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</array>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<object class="NSCustomObject" id="1001">
<string key="NSClassName">ResumeDialogController</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="1005">
<int key="NSWindowStyleMask">1</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{196, 240}, {650, 145}}</string>
<int key="NSWTFlags">-529006592</int>
<string key="NSWindowTitle"/>
<string key="NSWindowClass">NSWindow</string>
<nil key="NSViewClass"/>
<nil key="NSUserInterfaceItemIdentifier"/>
<object class="NSView" key="NSWindowView" id="1006">
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="NSTextField" id="646754310">
<reference key="NSNextResponder" ref="1006"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{102, 56}, {530, 44}}</string>
<reference key="NSSuperview" ref="1006"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="894576230"/>
<string key="NSReuseIdentifierKey">_NS:1535</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="903659412">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">272629760</int>
<string key="NSContents">Do you want to resume this file?</string>
<object class="NSFont" key="NSSupport">
<bool key="IBIsSystemFont">YES</bool>
<double key="NSSize">12</double>
<int key="NSfFlags">4883</int>
</object>
<string key="NSCellIdentifier">_NS:1535</string>
<reference key="NSControlView" ref="646754310"/>
<object class="NSColor" key="NSBackgroundColor" id="852787354">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
</object>
</object>
<object class="NSColor" key="NSTextColor" id="218786935">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlTextColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
</object>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
</object>
<object class="NSButton" id="894576230">
<reference key="NSNextResponder" ref="1006"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{98, 12}, {167, 32}}</string>
<reference key="NSSuperview" ref="1006"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="175095676"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="503070566">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Restart</string>
<object class="NSFont" key="NSSupport" id="629136848">
<bool key="IBIsSystemFont">YES</bool>
<double key="NSSize">13</double>
<int key="NSfFlags">1044</int>
</object>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="894576230"/>
<int key="NSButtonFlags">-2038284288</int>
<int key="NSButtonFlags2">129</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 class="NSButton" id="175095676">
<reference key="NSNextResponder" ref="1006"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{301, 12}, {173, 32}}</string>
<reference key="NSSuperview" ref="1006"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="817879477"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="268459134">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Always continue</string>
<reference key="NSSupport" ref="629136848"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="175095676"/>
<int key="NSButtonFlags">-2038284288</int>
<int key="NSButtonFlags2">129</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 class="NSButton" id="817879477">
<reference key="NSNextResponder" ref="1006"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{474, 12}, {162, 32}}</string>
<reference key="NSSuperview" ref="1006"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="642473102">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Continue</string>
<reference key="NSSupport" ref="629136848"/>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="817879477"/>
<int key="NSButtonFlags">-2038284288</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
<string type="base64-UTF8" key="NSKeyEquivalent">DQ</string>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSTextField" id="1008602593">
<reference key="NSNextResponder" ref="1006"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{102, 108}, {530, 17}}</string>
<reference key="NSSuperview" ref="1006"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="646754310"/>
<string key="NSReuseIdentifierKey">_NS:1535</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="774787260">
<int key="NSCellFlags">68157504</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents">Continue playback?</string>
<object class="NSFont" key="NSSupport">
<bool key="IBIsSystemFont">YES</bool>
<double key="NSSize">13</double>
<int key="NSfFlags">2072</int>
</object>
<string key="NSCellIdentifier">_NS:1535</string>
<reference key="NSControlView" ref="1008602593"/>
<reference key="NSBackgroundColor" ref="852787354"/>
<reference key="NSTextColor" ref="218786935"/>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
</object>
<object class="NSImageView" id="577885591">
<reference key="NSNextResponder" ref="1006"/>
<int key="NSvFlags">256</int>
<set class="NSMutableSet" key="NSDragTypes">
<string>Apple PDF pasteboard type</string>
<string>Apple PICT pasteboard type</string>
<string>Apple PNG pasteboard type</string>
<string>NSFilenamesPboardType</string>
<string>NeXT Encapsulated PostScript v1.2 pasteboard type</string>
<string>NeXT TIFF v4.0 pasteboard type</string>
</set>
<string key="NSFrame">{{20, 48}, {77, 77}}</string>
<reference key="NSSuperview" ref="1006"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1008602593"/>
<bool key="NSEnabled">YES</bool>
<object class="NSImageCell" key="NSCell" id="733508751">
<int key="NSCellFlags">134217728</int>
<int key="NSCellFlags2">33554432</int>
<object class="NSCustomResource" key="NSContents">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">vlc</string>
</object>
<int key="NSAlign">0</int>
<int key="NSScale">3</int>
<int key="NSStyle">0</int>
<bool key="NSAnimates">NO</bool>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<bool key="NSEditable">YES</bool>
</object>
</array>
<string key="NSFrameSize">{650, 145}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="577885591"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1680, 1027}}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<bool key="NSWindowIsRestorable">NO</bool>
</object>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array key="connectionRecords">
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">window</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="1005"/>
</object>
<int key="connectionID">35</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_always_resume_btn</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="175095676"/>
</object>
<int key="connectionID">36</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_restart_btn</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="894576230"/>
</object>
<int key="connectionID">37</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_resume_btn</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="817879477"/>
</object>
<int key="connectionID">38</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_text_lbl</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="646754310"/>
</object>
<int key="connectionID">49</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_title_lbl</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="1008602593"/>
</object>
<int key="connectionID">50</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">buttonClicked:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="894576230"/>
</object>
<int key="connectionID">52</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">buttonClicked:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="175095676"/>
</object>
<int key="connectionID">53</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">buttonClicked:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="817879477"/>
</object>
<int key="connectionID">54</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
<object class="IBObjectRecord">
<int key="objectID">0</int>
<array key="object" id="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="1005"/>
<array class="NSMutableArray" key="children">
<reference ref="1006"/>
</array>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">2</int>
<reference key="object" ref="1006"/>
<array class="NSMutableArray" key="children">
<reference ref="646754310"/>
<reference ref="1008602593"/>
<reference ref="577885591"/>
<reference ref="817879477"/>
<reference ref="175095676"/>
<reference ref="894576230"/>
</array>
<reference key="parent" ref="1005"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">3</int>
<reference key="object" ref="646754310"/>
<array class="NSMutableArray" key="children">
<reference ref="903659412"/>
</array>
<reference key="parent" ref="1006"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4</int>
<reference key="object" ref="903659412"/>
<reference key="parent" ref="646754310"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">9</int>
<reference key="object" ref="894576230"/>
<array class="NSMutableArray" key="children">
<reference ref="503070566"/>
</array>
<reference key="parent" ref="1006"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">10</int>
<reference key="object" ref="503070566"/>
<reference key="parent" ref="894576230"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">17</int>
<reference key="object" ref="175095676"/>
<array class="NSMutableArray" key="children">
<reference ref="268459134"/>
</array>
<reference key="parent" ref="1006"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">18</int>
<reference key="object" ref="268459134"/>
<reference key="parent" ref="175095676"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">21</int>
<reference key="object" ref="817879477"/>
<array class="NSMutableArray" key="children">
<reference ref="642473102"/>
</array>
<reference key="parent" ref="1006"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">22</int>
<reference key="object" ref="642473102"/>
<reference key="parent" ref="817879477"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">42</int>
<reference key="object" ref="1008602593"/>
<array class="NSMutableArray" key="children">
<reference ref="774787260"/>
</array>
<reference key="parent" ref="1006"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">43</int>
<reference key="object" ref="774787260"/>
<reference key="parent" ref="1008602593"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">55</int>
<reference key="object" ref="577885591"/>
<array class="NSMutableArray" key="children">
<reference ref="733508751"/>
</array>
<reference key="parent" ref="1006"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">56</int>
<reference key="object" ref="733508751"/>
<reference key="parent" ref="577885591"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="1.IBPersistedLastKnownCanvasPosition">{460, 380.5}</string>
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="1.IBWindowTemplateEditedContentRect">{{357, 418}, {480, 270}}</string>
<boolean value="NO" key="1.NSWindowTemplate.visibleAtLaunch"/>
<string key="10.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="17.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="18.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference key="2.IBNSViewMetadataGestureRecognizers" ref="0"/>
<string key="2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="21.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="22.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="42.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="43.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="55.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="56.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="9.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">93</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">ResumeDialogController</string>
<string key="superclassName">NSWindowController</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">buttonClicked:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">buttonClicked:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">buttonClicked:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="o_always_resume_btn">id</string>
<string key="o_restart_btn">id</string>
<string key="o_resume_btn">id</string>
<string key="o_text_lbl">id</string>
<string key="o_title_lbl">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="o_always_resume_btn">
<string key="name">o_always_resume_btn</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo" key="o_restart_btn">
<string key="name">o_restart_btn</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo" key="o_resume_btn">
<string key="name">o_resume_btn</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo" key="o_text_lbl">
<string key="name">o_text_lbl</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo" key="o_title_lbl">
<string key="name">o_title_lbl</string>
<string key="candidateClassName">id</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../../../../modules/gui/macosx/ResumeDialogController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">ResumeDialogController</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">buttonClicked:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">buttonClicked:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">buttonClicked:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../../../../modules/gui/macosx/ResumeDialogController.m</string>
</object>
</object>
</array>
<array class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<object class="IBPartialClassDescription">
<string key="className">NSActionCell</string>
<string key="superclassName">NSCell</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSActionCell.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSApplication</string>
<string key="superclassName">NSResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSApplication.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSButton</string>
<string key="superclassName">NSControl</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSButton.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSButtonCell</string>
<string key="superclassName">NSActionCell</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSButtonCell.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSCell</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSCell.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSControl</string>
<string key="superclassName">NSView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSControl.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSFormatter</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">Foundation.framework/Headers/NSFormatter.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSImageCell</string>
<string key="superclassName">NSCell</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSImageCell.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSImageView</string>
<string key="superclassName">NSControl</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSImageView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSMenu</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSMenu.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSResponder</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSResponder.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSTextField</string>
<string key="superclassName">NSControl</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSTextField.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSTextFieldCell</string>
<string key="superclassName">NSActionCell</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSTextFieldCell.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSView</string>
<string key="superclassName">NSResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSWindow</string>
<string key="superclassName">NSResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSWindow.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSWindowController</string>
<string key="superclassName">NSResponder</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">showWindow:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">showWindow:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">showWindow:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSWindowController.h</string>
</object>
</object>
</array>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
<bool key="IBDocument.previouslyAttemptedUpgradeToXcode5">NO</bool>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
<integer value="4600" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<string key="NS.key.0">vlc</string>
<string key="NS.object.0">{512, 512}</string>
</object>
</data>
</archive>
......@@ -22,6 +22,8 @@
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
1C15C7DC1B5146DB003AB729 /* ResumeDialogController.h in Sources */ = {isa = PBXBuildFile; fileRef = 633121CA1B51122700E636DA /* ResumeDialogController.h */; };
1C15C7DD1B5146DB003AB729 /* ResumeDialogController.m in Sources */ = {isa = PBXBuildFile; fileRef = 633121CB1B51122700E636DA /* ResumeDialogController.m */; };
1C57690E19DC93620099F5A6 /* topbar_background.png in Resources */ = {isa = PBXBuildFile; fileRef = 1C57690D19DC93620099F5A6 /* topbar_background.png */; };
1C88BA5419DC7B2200645190 /* yosemite-window-close-graphite.png in Resources */ = {isa = PBXBuildFile; fileRef = 1C88BA2419DC7B2200645190 /* yosemite-window-close-graphite.png */; };
1C88BA5519DC7B2200645190 /* yosemite-window-close-graphite@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1C88BA2519DC7B2200645190 /* yosemite-window-close-graphite@2x.png */; };
......@@ -457,6 +459,7 @@
1CE5ED2419DD6AB700FCEFD3 /* lion-window-fullscreen-over@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1CE5ED1E19DD6AB700FCEFD3 /* lion-window-fullscreen-over@2x.png */; };
1CE5ED2519DD6AB700FCEFD3 /* lion-window-fullscreen.png in Resources */ = {isa = PBXBuildFile; fileRef = 1CE5ED1F19DD6AB700FCEFD3 /* lion-window-fullscreen.png */; };
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 */; };
7D3F6525188051F2005776C4 /* BWQuincyMain.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7D3F6523188051F2005776C4 /* BWQuincyMain.xib */; };
7D8BB0B71830311300FAE9B7 /* DebugMessageVisualizer.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7D8BB0B51830311300FAE9B7 /* DebugMessageVisualizer.xib */; };
7D8BB0BA1830367200FAE9B7 /* PlaylistMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7D8BB0B81830367200FAE9B7 /* PlaylistMenu.xib */; };
......@@ -1248,6 +1251,9 @@
5CCED71314C0D4A90057F8D1 /* ExtensionsManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ExtensionsManager.m; path = ../../../modules/gui/macosx/ExtensionsManager.m; sourceTree = SOURCE_ROOT; };
5CCED71414C0D4A90057F8D1 /* VLCUIWidgets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCUIWidgets.h; path = ../../../modules/gui/macosx/VLCUIWidgets.h; sourceTree = SOURCE_ROOT; };
5CCED71514C0D4A90057F8D1 /* VLCUIWidgets.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCUIWidgets.m; path = ../../../modules/gui/macosx/VLCUIWidgets.m; sourceTree = SOURCE_ROOT; };
633121CA1B51122700E636DA /* ResumeDialogController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ResumeDialogController.h; path = ../../../modules/gui/macosx/ResumeDialogController.h; sourceTree = "<group>"; };
633121CB1B51122700E636DA /* ResumeDialogController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ResumeDialogController.m; path = ../../../modules/gui/macosx/ResumeDialogController.m; sourceTree = "<group>"; };
633121CF1B5112C300E636DA /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/ResumeDialog.xib; sourceTree = "<group>"; };
7D3F6524188051F2005776C4 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/BWQuincyMain.xib; sourceTree = "<group>"; };
7D3F652618805297005776C4 /* BWQuincyManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BWQuincyManager.h; path = ../../../modules/gui/macosx/BWQuincyManager.h; sourceTree = SOURCE_ROOT; };
7D3F652718805297005776C4 /* BWQuincyManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = BWQuincyManager.m; path = ../../../modules/gui/macosx/BWQuincyManager.m; sourceTree = SOURCE_ROOT; };
......@@ -1886,6 +1892,8 @@
8E9CA1A406D7DEE800B7186C /* prefs_widgets.m */,
8ED6C28503E2EB1C0059A3A7 /* prefs.h */,
8ED6C28603E2EB1C0059A3A7 /* prefs.m */,
633121CA1B51122700E636DA /* ResumeDialogController.h */,
633121CB1B51122700E636DA /* ResumeDialogController.m */,
CC461F6C160078340022423C /* SharedDialogs.h */,
CC461F6D160078340022423C /* SharedDialogs.m */,
CCB24D5E0D54BBAE004D780C /* simple_prefs.h */,
......@@ -2934,6 +2942,7 @@
CCD83E4213FEA143004F1652 /* Wizard.xib */,
CCD83E2B13FE9B90004F1652 /* MainMenu.xib */,
CC0663371566CD5A003A411C /* ConvertAndSave.xib */,
633121CE1B5112C300E636DA /* ResumeDialog.xib */,
CC461F73160084A10022423C /* SharedDialogs.xib */,
7D8BB0B51830311300FAE9B7 /* DebugMessageVisualizer.xib */,
7D8BB0B81830367200FAE9B7 /* PlaylistMenu.xib */,
......@@ -3848,6 +3857,7 @@
1CE5ED2119DD6AB700FCEFD3 /* lion-window-fullscreen-on.png in Resources */,
1C88BC9019DC7CB300645190 /* ys-fs_exit_fullscreen.png in Resources */,
1C88BB2A19DC7C7800645190 /* ys-fullscreen-one-button.png in Resources */,
633121D01B5112C300E636DA /* ResumeDialog.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -3889,6 +3899,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1C15C7DC1B5146DB003AB729 /* ResumeDialogController.h in Sources */,
1C15C7DD1B5146DB003AB729 /* ResumeDialogController.m in Sources */,
1CCB5F511A62A724004C3E90 /* about.h in Sources */,
1CCB5F521A62A724004C3E90 /* about.m in Sources */,
1CCB5F531A62A724004C3E90 /* AddonListDataSource.h in Sources */,
......@@ -4004,6 +4016,14 @@
name = Help.xib;
sourceTree = "<group>";
};
633121CE1B5112C300E636DA /* ResumeDialog.xib */ = {
isa = PBXVariantGroup;
children = (
633121CF1B5112C300E636DA /* English */,
);
name = ResumeDialog.xib;
sourceTree = "<group>";
};
7D3F6523188051F2005776C4 /* BWQuincyMain.xib */ = {
isa = PBXVariantGroup;
children = (
......
......@@ -57,6 +57,7 @@ libmacosx_plugin_la_SOURCES = \
prefs_widgets.h prefs_widgets.m \
PXSourceList.h PXSourceList.m \
PXSourceListDataSource.h PXSourceListDelegate.h \
ResumeDialogController.h ResumeDialogController.m \
SideBarItem.h SideBarItem.m \
SharedDialogs.h SharedDialogs.m \
simple_prefs.h simple_prefs.m \
......
/*****************************************************************************
* ResumeDialogController.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2015 VLC authors and VideoLAN
*
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
* David Fuhrmann <david dot fuhrmann at googlemail dot com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import <Cocoa/Cocoa.h>
#import <vlc_common.h>
#import <vlc_input.h>
enum ResumeResult {
RESUME_RESTART,
RESUME_ALWAYS,
RESUME_NOW
};
typedef void(^CompletionBlock)(enum ResumeResult);
@interface ResumeDialogController : NSWindowController
{
IBOutlet id o_title_lbl;
IBOutlet id o_text_lbl;
IBOutlet id o_restart_btn;
IBOutlet id o_resume_btn;
IBOutlet id o_always_resume_btn;
int currentResumeTimeout;
CompletionBlock completionBlock;
}
- (IBAction)buttonClicked:(id)sender;
- (void)showWindowWithItem:(input_item_t *)p_item withLastPosition:(NSInteger)pos completionBlock:(CompletionBlock)block;
- (void)updateCocoaWindowLevel:(NSInteger)i_level;
@end
/*****************************************************************************
* ResumeDialogController.m: MacOS X interface module
*****************************************************************************
* Copyright (C) 2015 VLC authors and VideoLAN
*
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
* David Fuhrmann <david dot fuhrmann at googlemail dot com>
*
* 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 "ResumeDialogController.h"
#import "intf.h"
#import "StringUtility.h"
@implementation ResumeDialogController
- (id)init
{
self = [super initWithWindowNibName:@"ResumeDialog"];
if (self) {
}
return self;
}
- (void)windowDidLoad
{
[o_title_lbl setStringValue:_NS("Continue playback?")];
[o_resume_btn setTitle:_NS("Continue")];
[o_always_resume_btn setTitle:_NS("Always continue")];
}
- (void)showWindowWithItem:(input_item_t *)p_item withLastPosition:(NSInteger)pos completionBlock:(CompletionBlock)block
{
NSWindow *w = [self window];
if ([w isVisible]) {
msg_Err(VLCIntf, "Resume dialog in use already");
return;
}
currentResumeTimeout = 10;
completionBlock = [block copy];
NSString *o_restartButtonLabel = _NS("Restart playback");
o_restartButtonLabel = [o_restartButtonLabel stringByAppendingFormat:@" (%d)", currentResumeTimeout];
[o_restart_btn setTitle:o_restartButtonLabel];
char *psz_title_name = input_item_GetTitleFbName(p_item);
NSString *o_title = toNSStr(psz_title_name);
free(psz_title_name);
NSString *labelString = [NSString stringWithFormat:_NS("Playback of \"%@\" will continue at %@"), o_title, [[VLCStringUtility sharedInstance] stringForTime:pos]];
[o_text_lbl setStringValue:labelString];
NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:1
target:self
selector:@selector(updateAlertWindow:)
userInfo:nil
repeats:YES];
[w setLevel:[[[VLCMain sharedInstance] voutController] currentStatusWindowLevel]];
[w center];
[w makeKeyAndOrderFront:nil];
}
- (void)updateAlertWindow:(NSTimer *)timer
{
--currentResumeTimeout;
if (currentResumeTimeout <= 0) {
[self buttonClicked:o_restart_btn];
[timer invalidate];
timer = nil;
}
NSString *buttonLabel = _NS("Restart playback");
buttonLabel = [buttonLabel stringByAppendingFormat:@" (%d)", currentResumeTimeout];
[o_restart_btn setTitle:buttonLabel];
}
- (IBAction)buttonClicked:(id)sender
{
enum ResumeResult resumeResult;
if (sender == o_restart_btn)
resumeResult = RESUME_RESTART;
else if (sender == o_resume_btn)
resumeResult = RESUME_NOW;
else
resumeResult = RESUME_ALWAYS;
[[self window] close];
if (completionBlock) {
completionBlock(resumeResult);
[completionBlock release];
completionBlock = nil;
}
}
- (void)updateCocoaWindowLevel:(NSInteger)i_level
{
if (self.window && [self.window isVisible] && [self.window level] != i_level)
[self.window setLevel: i_level];
}
@end
......@@ -33,6 +33,8 @@
#import "playlistinfo.h"
#import "bookmarks.h"
#import "TrackSynchronization.h"
#import "ResumeDialogController.h"
#import "playlist.h"
@implementation VLCVoutWindowController
......@@ -422,6 +424,8 @@
[[[VLCMain sharedInstance] info] updateCocoaWindowLevel:i_currentFloatingWindowLevel];
[[VLCBookmarks sharedInstance] updateCocoaWindowLevel:i_currentFloatingWindowLevel];
[[VLCTrackSynchronization sharedInstance] updateCocoaWindowLevel:i_currentFloatingWindowLevel];
[[[VLCMain sharedInstance] resumeDialog] updateCocoaWindowLevel:i_currentFloatingWindowLevel];
}
@synthesize currentStatusWindowLevel=i_currentFloatingWindowLevel;
......
......@@ -66,6 +66,7 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
@class VLCMainMenu;
@class VLCPlaylist;
@class InputManager;
@class ResumeDialogController;
@interface VLCMain : NSObject <NSWindowDelegate, NSApplicationDelegate>
{
......@@ -82,6 +83,8 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
id o_eyetv; /* VLCEyeTVController */
id o_bookmarks; /* VLCBookmarks */
id o_coreinteraction; /* VLCCoreInteraction */
ResumeDialogController *o_resume_dialog;
BOOL nib_main_loaded; /* main nibfile */
BOOL nib_open_loaded; /* open nibfile */
BOOL nib_about_loaded; /* about nibfile */
......@@ -135,6 +138,7 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
- (VLCInfo *)info;
- (id)wizard;
- (id)coreDialogProvider;
- (ResumeDialogController *)resumeDialog;
- (id)eyeTVController;
- (id)appleRemoteController;
- (void)setActiveVideoPlayback:(BOOL)b_value;
......
......@@ -66,6 +66,7 @@
#import "ExtensionsManager.h"
#import "BWQuincyManager.h"
#import "ControlsBar.h"
#import "ResumeDialogController.h"
#import "VideoEffects.h"
#import "AudioEffects.h"
......@@ -795,6 +796,8 @@ static VLCMain *_o_sharedMainInstance = nil;
if (!o_bookmarks)
[o_bookmarks release];
[o_resume_dialog release];
[o_coredialogs release];
[o_eyetv release];
[o_remote release];
......@@ -1359,6 +1362,14 @@ static VLCMain *_o_sharedMainInstance = nil;
return o_coredialogs;
}
- (ResumeDialogController *)resumeDialog
{
if (!o_resume_dialog)
o_resume_dialog = [[ResumeDialogController alloc] init];
return o_resume_dialog;
}
- (id)eyeTVController
{
return o_eyetv;
......
......@@ -52,6 +52,8 @@
#import "MainMenu.h"
#import "CoreInteraction.h"
#import "ResumeDialogController.h"
#include <vlc_keys.h>
#import <vlc_interface.h>
#include <vlc_url.h>
......@@ -995,41 +997,28 @@
if (settingValue == 2) // never resume
return;
NSInteger returnValue = NSAlertErrorReturn;
if (settingValue == 0) { // ask
char *psz_title_name = input_item_GetTitleFbName(p_item);
NSString *o_title = toNSStr(psz_title_name);
free(psz_title_name);
currentResumeTimeout = 6;
NSString *o_restartButtonLabel = _NS("Restart playback");
o_restartButtonLabel = [o_restartButtonLabel stringByAppendingFormat:@" (%d)", currentResumeTimeout];
NSAlert *theAlert = [NSAlert alertWithMessageText:_NS("Continue playback?") defaultButton:_NS("Continue") alternateButton:o_restartButtonLabel otherButton:_NS("Always continue") informativeTextWithFormat:_NS("Playback of \"%@\" will continue at %@"), o_title, [[VLCStringUtility sharedInstance] stringForTime:lastPosition.intValue]];
NSTimer *timer = [NSTimer timerWithTimeInterval:1
target:self
selector:@selector(updateAlertWindow:)
userInfo:theAlert
repeats:YES];
[[NSRunLoop currentRunLoop] addTimer:timer forMode:NSModalPanelRunLoopMode];
returnValue = [theAlert runModal];
[timer invalidate];
CompletionBlock completionBlock = ^(enum ResumeResult result) {
// restart button was pressed or timeout happened
if (returnValue == NSAlertAlternateReturn ||
returnValue == NSRunAbortedResponse)
if (result == RESUME_RESTART)
return;
}
mtime_t lastPos = (mtime_t)lastPosition.intValue * 1000000;
msg_Dbg(VLCIntf, "continuing playback at %lld", lastPos);
var_SetInteger(p_input_thread, "time", lastPos);
if (returnValue == NSAlertOtherReturn)
if (result == RESUME_ALWAYS)
config_PutInt(VLCIntf, "macosx-continue-playback", 1);
};
if (settingValue == 1) { // always
completionBlock(RESUME_NOW);
return;
}
[[[VLCMain sharedInstance] resumeDialog] showWindowWithItem:p_item
withLastPosition:lastPosition.intValue
completionBlock:completionBlock];
}
- (void)storePlaybackPositionForItem:(input_thread_t *)p_input_thread
......
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