</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="5132"/>
- <integer value="5260"/>
<integer value="2730"/>
<integer value="4850"/>
+ <integer value="5238"/>
+ <integer value="5260"/>
+ <integer value="2"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<nil key="NSUserInterfaceItemIdentifier"/>
<string key="NSWindowContentMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
<object class="NSView" key="NSWindowView" id="429932428">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<string key="NSFrame">{{1, 1}, {199, 272}}</string>
<reference key="NSSuperview" ref="979766179"/>
+ <reference key="NSNextKeyView" ref="1064884668"/>
<reference key="NSDocView" ref="1064884668"/>
<reference key="NSBGColor" ref="885475112"/>
<int key="NScvFlags">4</int>
</object>
<string key="NSFrameSize">{201, 274}</string>
<reference key="NSSuperview" ref="824340487"/>
+ <reference key="NSNextKeyView" ref="18556274"/>
<int key="NSsFlags">133650</int>
<reference key="NSVScroller" ref="252983915"/>
<reference key="NSHScroller" ref="11557666"/>
</object>
<string key="NSFrame">{{1, 17}, {402, 236}}</string>
<reference key="NSSuperview" ref="915491793"/>
+ <reference key="NSNextKeyView" ref="23448837"/>
<reference key="NSDocView" ref="23448837"/>
<reference key="NSBGColor" ref="885475112"/>
<int key="NScvFlags">4</int>
</object>
<string key="NSFrame">{{1, 0}, {402, 17}}</string>
<reference key="NSSuperview" ref="915491793"/>
+ <reference key="NSNextKeyView" ref="823165105"/>
<reference key="NSDocView" ref="823165105"/>
<reference key="NSBGColor" ref="885475112"/>
<int key="NScvFlags">4</int>
</object>
<string key="NSFrameSize">{404, 254}</string>
<reference key="NSSuperview" ref="440594360"/>
+ <reference key="NSNextKeyView" ref="343242432"/>
<int key="NSsFlags">133682</int>
<reference key="NSVScroller" ref="573737110"/>
<reference key="NSHScroller" ref="297523533"/>
</object>
</object>
<string key="NSFrameSize">{604, 310}</string>
+ <reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
<string key="NSMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
<reference key="NSOnImage" ref="447396056"/>
<reference key="NSMixedImage" ref="100133332"/>
</object>
+ <object class="NSMenuItem" id="35710136">
+ <reference key="NSMenu" ref="815243229"/>
+ <string key="NSTitle">Show Sidebar</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="447396056"/>
+ <reference key="NSMixedImage" ref="100133332"/>
+ </object>
<object class="NSMenuItem" id="710935977">
<reference key="NSMenu" ref="815243229"/>
<bool key="NSIsDisabled">YES</bool>
</object>
<int key="connectionID">5412</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">o_mi_toggleSidebar</string>
+ <reference key="source" ref="651263286"/>
+ <reference key="destination" ref="35710136"/>
+ </object>
+ <int key="connectionID">5415</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">toggleSidebar:</string>
+ <reference key="source" ref="651263286"/>
+ <reference key="destination" ref="35710136"/>
+ </object>
+ <int key="connectionID">5416</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<reference ref="709859089"/>
<reference ref="710935977"/>
<reference ref="338106467"/>
+ <reference ref="35710136"/>
</object>
<reference key="parent" ref="939296045"/>
</object>
<reference key="object" ref="634067619"/>
<reference key="parent" ref="1056513052"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">5413</int>
+ <reference key="object" ref="35710136"/>
+ <reference key="parent" ref="815243229"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<string>5335.IBViewBoundsToFrameTransform</string>
<string>5339.IBPluginDependency</string>
<string>5409.IBPluginDependency</string>
+ <string>5413.IBPluginDependency</string>
<string>56.IBPluginDependency</string>
<string>56.ImportedFromIB2</string>
<string>57.IBEditorWindowLastContentRect</string>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
- <string>{{762, 736}, {518, 20}}</string>
+ <string>{{487, 663}, {518, 20}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{616, 901}, {260, 73}}</string>
+ <string>{{631, 570}, {260, 93}}</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>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
<string>{{329, 186}, {267, 263}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">5412</int>
+ <int key="maxID">5416</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<string>togglePlaylistColumnTable:</string>
<string>togglePlaymodeButtons:</string>
<string>toggleRecord:</string>
+ <string>toggleSidebar:</string>
<string>toggleVar:</string>
<string>viewAbout:</string>
<string>viewErrorsAndWarnings:</string>
<string>id</string>
<string>id</string>
<string>id</string>
+ <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string>togglePlaylistColumnTable:</string>
<string>togglePlaymodeButtons:</string>
<string>toggleRecord:</string>
+ <string>toggleSidebar:</string>
<string>toggleVar:</string>
<string>viewAbout:</string>
<string>viewErrorsAndWarnings:</string>
<string key="name">toggleRecord:</string>
<string key="candidateClassName">id</string>
</object>
+ <object class="IBActionInfo">
+ <string key="name">toggleSidebar:</string>
+ <string key="candidateClassName">id</string>
+ </object>
<object class="IBActionInfo">
<string key="name">toggleVar:</string>
<string key="candidateClassName">id</string>
<string>o_mi_title</string>
<string>o_mi_toggleJumpButtons</string>
<string>o_mi_togglePlaymodeButtons</string>
+ <string>o_mi_toggleSidebar</string>
<string>o_mi_trackSynchronization</string>
<string>o_mi_videoeffects</string>
<string>o_mi_videotrack</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
+ <string>NSMenuItem</string>
<string>NSMenu</string>
<string>NSMenu</string>
<string>NSMenu</string>
<string>o_mi_title</string>
<string>o_mi_toggleJumpButtons</string>
<string>o_mi_togglePlaymodeButtons</string>
+ <string>o_mi_toggleSidebar</string>
<string>o_mi_trackSynchronization</string>
<string>o_mi_videoeffects</string>
<string>o_mi_videotrack</string>
<string key="name">o_mi_togglePlaymodeButtons</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">o_mi_toggleSidebar</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
<object class="IBToOneOutletInfo">
<string key="name">o_mi_trackSynchronization</string>
<string key="candidateClassName">NSMenuItem</string>
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(someWindowWillClose:) name: NSWindowWillCloseNotification object: nil];
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(someWindowWillMiniaturize:) name: NSWindowWillMiniaturizeNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(applicationWillTerminate:) name: NSApplicationWillTerminateNotification object: nil];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mainSplitViewWillResizeSubviews:) name:NSSplitViewWillResizeSubviewsNotification object:o_split_view];
- [o_split_view setAutosaveName:@"10thanniversary-splitview"];
if (b_splitviewShouldBeHidden) {
[self hideSplitView];
i_lastSplitViewHeight = 300;
[self resizeWindow];
}
- // update fs button to reflect state for next startup
- if (var_InheritBool(pl_Get(VLCIntf), "fullscreen")) {
+ /* update fs button to reflect state for next startup */
+ if (var_InheritBool(pl_Get(VLCIntf), "fullscreen"))
[o_controls_bar setFullscreenState:YES];
- }
+
+ /* restore split view */
+ i_lastLeftSplitViewWidth = 200;
+ /* trick NSSplitView implementation, which pretends to know better than us */
+ if (!config_GetInt(VLCIntf, "macosx-show-sidebar"))
+ [self performSelector:@selector(toggleLeftSubSplitView) withObject:nil afterDelay:0.05];
}
#pragma mark -
+#pragma mark appearance management
- (VLCMainWindowControlsBar *)controlsBar;
{
- (void)applicationWillTerminate:(NSNotification *)notification
{
+ config_PutInt(VLCIntf, "macosx-show-sidebar", ![o_split_view isSubviewCollapsed:o_left_split_view]);
+
[self saveFrameUsingName: [self frameAutosaveName]];
}
return YES;
}
+- (void)mainSplitViewWillResizeSubviews:(id)object
+{
+ i_lastLeftSplitViewWidth = [o_left_split_view frame].size.width;
+ config_PutInt(VLCIntf, "macosx-show-sidebar", ![o_split_view isSubviewCollapsed:o_left_split_view]);
+ [[[VLCMain sharedInstance] mainMenu] updateSidebarMenuItem];
+}
+
+- (void)toggleLeftSubSplitView
+{
+ [o_split_view adjustSubviews];
+ if ([o_split_view isSubviewCollapsed:o_left_split_view])
+ [o_split_view setPosition:i_lastLeftSplitViewWidth ofDividerAtIndex:0];
+ else
+ [o_split_view setPosition:[o_split_view minPossiblePositionOfDividerAtIndex:0] ofDividerAtIndex:0];
+}
+
#pragma mark -
#pragma mark Side Bar Data handling
/* taken under BSD-new from the PXSourceList sample project, adapted for VLC */