Commit 06e1cd04 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fill the side bar with SDs, etc.

note: playlist view isn't connected to the side bar yet
parent 0084be7d
......@@ -21,13 +21,13 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="283"/>
<integer value="24"/>
<integer value="2730"/>
<integer value="1617"/>
<integer value="915"/>
<integer value="4596"/>
<integer value="21"/>
<integer value="283"/>
<integer value="4596"/>
<integer value="1617"/>
<integer value="2730"/>
<integer value="24"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
......@@ -495,6 +495,7 @@
<int key="NSvFlags">290</int>
<string key="NSFrame">{{222, 10}, {184, 15}}</string>
<reference key="NSSuperview" ref="429932428"/>
<bool key="NSViewCanDrawConcurrently">YES</bool>
<bool key="NSEnabled">YES</bool>
<object class="NSSliderCell" key="NSCell" id="276068486">
<int key="NSCellFlags">-2079981824</int>
......@@ -665,32 +666,31 @@
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSScrollView" id="506374457">
<object class="NSScrollView" id="979766179">
<reference key="NSNextResponder" ref="824340487"/>
<int key="NSvFlags">274</int>
<int key="NSvFlags">4370</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSClipView" id="644916584">
<reference key="NSNextResponder" ref="506374457"/>
<object class="NSClipView" id="18556274">
<reference key="NSNextResponder" ref="979766179"/>
<int key="NSvFlags">2304</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSOutlineView" id="83182032">
<reference key="NSNextResponder" ref="644916584"/>
<int key="NSvFlags">4370</int>
<string key="NSFrameSize">{123, 273}</string>
<reference key="NSSuperview" ref="644916584"/>
<object class="NSOutlineView" id="1064884668">
<reference key="NSNextResponder" ref="18556274"/>
<int key="NSvFlags">4352</int>
<string key="NSFrameSize">{121, 272}</string>
<reference key="NSSuperview" ref="18556274"/>
<bool key="NSEnabled">YES</bool>
<object class="_NSCornerView" key="NSCornerView">
<nil key="NSNextResponder"/>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{200, 0}, {16, 17}}</string>
<string key="NSFrame">{{198, 0}, {16, 17}}</string>
</object>
<object class="NSMutableArray" key="NSTableColumns">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTableColumn" id="950807616">
<string key="NSIdentifier">name</string>
<double key="NSWidth">120</double>
<object class="NSTableColumn" id="291003631">
<double key="NSWidth">118</double>
<double key="NSMinWidth">16</double>
<double key="NSMaxWidth">1000</double>
<object class="NSTableHeaderCell" key="NSHeaderCell">
......@@ -716,11 +716,16 @@
</object>
</object>
</object>
<object class="NSTextFieldCell" key="NSDataCell" id="806672982">
<object class="NSTextFieldCell" key="NSDataCell" id="1022116109">
<int key="NSCellFlags">337772096</int>
<int key="NSCellFlags2">2048</int>
<reference key="NSSupport" ref="26"/>
<reference key="NSControlView" ref="83182032"/>
<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="1064884668"/>
<object class="NSColor" key="NSBackgroundColor" id="885475112">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
......@@ -739,7 +744,8 @@
</object>
<int key="NSResizingMask">3</int>
<bool key="NSIsResizeable">YES</bool>
<reference key="NSTableView" ref="83182032"/>
<bool key="NSIsEditable">YES</bool>
<reference key="NSTableView" ref="1064884668"/>
</object>
</object>
<double key="NSIntercellSpacingWidth">3</double>
......@@ -768,57 +774,54 @@
</object>
</object>
<double key="NSRowHeight">20</double>
<int key="NSTvFlags">37748736</int>
<int key="NSTvFlags">-633339904</int>
<reference key="NSDelegate"/>
<reference key="NSDataSource"/>
<int key="NSColumnAutoresizingStyle">5</int>
<int key="NSColumnAutoresizingStyle">4</int>
<int key="NSDraggingSourceMaskForLocal">15</int>
<int key="NSDraggingSourceMaskForNonLocal">0</int>
<bool key="NSAllowsTypeSelect">NO</bool>
<bool key="NSAllowsTypeSelect">YES</bool>
<int key="NSTableViewSelectionHighlightStyle">1</int>
<int key="NSTableViewDraggingDestinationStyle">1</int>
<int key="NSTableViewGroupRowStyle">1</int>
<bool key="NSOutlineViewAutoresizesOutlineColumnKey">NO</bool>
<float key="NSOutlineViewIndentationPerLevelKey">14</float>
</object>
</object>
<string key="NSFrameSize">{122, 273}</string>
<reference key="NSSuperview" ref="506374457"/>
<reference key="NSNextKeyView" ref="83182032"/>
<reference key="NSDocView" ref="83182032"/>
<string key="NSFrame">{{1, 1}, {121, 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>
<object class="NSScroller" id="1024767070">
<reference key="NSNextResponder" ref="506374457"/>
<object class="NSScroller" id="252983915">
<reference key="NSNextResponder" ref="979766179"/>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{200, 0}, {15, 496}}</string>
<reference key="NSSuperview" ref="506374457"/>
<reference key="NSTarget" ref="506374457"/>
<string key="NSFrame">{{198, 17}, {15, 539}}</string>
<reference key="NSSuperview" ref="979766179"/>
<reference key="NSTarget" ref="979766179"/>
<string key="NSAction">_doScroller:</string>
<double key="NSPercent">0.99798790000000004</double>
<double key="NSPercent">0.99824869999999999</double>
</object>
<object class="NSScroller" id="677088452">
<reference key="NSNextResponder" ref="506374457"/>
<object class="NSScroller" id="11557666">
<reference key="NSNextResponder" ref="979766179"/>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{-100, -100}, {128, 15}}</string>
<reference key="NSSuperview" ref="506374457"/>
<bool key="NSEnabled">YES</bool>
<string key="NSFrame">{{1, 556}, {212, 15}}</string>
<reference key="NSSuperview" ref="979766179"/>
<int key="NSsFlags">1</int>
<reference key="NSTarget" ref="506374457"/>
<reference key="NSTarget" ref="979766179"/>
<string key="NSAction">_doScroller:</string>
<double key="NSCurValue">0.0046511629999999998</double>
<double key="NSPercent">0.88888889999999998</double>
<double key="NSPercent">0.9953052</double>
</object>
</object>
<string key="NSFrameSize">{122, 273}</string>
<string key="NSFrame">{{-1, 0}, {123, 274}}</string>
<reference key="NSSuperview" ref="824340487"/>
<reference key="NSNextKeyView" ref="644916584"/>
<int key="NSsFlags">133776</int>
<reference key="NSVScroller" ref="1024767070"/>
<reference key="NSHScroller" ref="677088452"/>
<reference key="NSContentView" ref="644916584"/>
<bytes key="NSScrollAmts">AAAAAAAAAABBoAAAQaAAAA</bytes>
<reference key="NSNextKeyView" ref="18556274"/>
<int key="NSsFlags">133682</int>
<reference key="NSVScroller" ref="252983915"/>
<reference key="NSHScroller" ref="11557666"/>
<reference key="NSContentView" ref="18556274"/>
<bytes key="NSScrollAmts">QSAAAEEgAABBoAAAQaAAAA</bytes>
</object>
</object>
<string key="NSFrameSize">{122, 274}</string>
......@@ -916,7 +919,7 @@
</object>
<object class="NSScrollView" id="915491793">
<reference key="NSNextResponder" ref="440594360"/>
<int key="NSvFlags">274</int>
<int key="NSvFlags">4370</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSClipView" id="343242432">
......@@ -926,7 +929,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSOutlineView" id="23448837">
<reference key="NSNextResponder" ref="343242432"/>
<int key="NSvFlags">274</int>
<int key="NSvFlags">4370</int>
<string key="NSFrameSize">{480, 236}</string>
<reference key="NSSuperview" ref="343242432"/>
<bool key="NSEnabled">YES</bool>
......@@ -6859,14 +6862,6 @@ LCAuLi4</string>
</object>
<int key="connectionID">4679</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_sidebar_view</string>
<reference key="source" ref="498338108"/>
<reference key="destination" ref="83182032"/>
</object>
<int key="connectionID">4690</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_split_view</string>
......@@ -6915,6 +6910,30 @@ LCAuLi4</string>
</object>
<int key="connectionID">4704</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">dataSource</string>
<reference key="source" ref="1064884668"/>
<reference key="destination" ref="498338108"/>
</object>
<int key="connectionID">4719</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="1064884668"/>
<reference key="destination" ref="498338108"/>
</object>
<int key="connectionID">4720</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_sidebar_view</string>
<reference key="source" ref="498338108"/>
<reference key="destination" ref="1064884668"/>
</object>
<int key="connectionID">4721</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
......@@ -6974,9 +6993,9 @@ LCAuLi4</string>
<reference ref="533732100"/>
<reference ref="202538583"/>
<reference ref="704525034"/>
<reference ref="664576649"/>
<reference ref="784705424"/>
<reference ref="788281303"/>
<reference ref="664576649"/>
</object>
<reference key="parent" ref="498338108"/>
</object>
......@@ -9314,7 +9333,7 @@ LCAuLi4</string>
<reference key="object" ref="824340487"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="506374457"/>
<reference ref="979766179"/>
</object>
<reference key="parent" ref="302568132"/>
</object>
......@@ -9323,10 +9342,10 @@ LCAuLi4</string>
<reference key="object" ref="440594360"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="915491793"/>
<reference ref="447614808"/>
<reference ref="596740638"/>
<reference ref="609070979"/>
<reference ref="915491793"/>
</object>
<reference key="parent" ref="302568132"/>
</object>
......@@ -9444,50 +9463,6 @@ LCAuLi4</string>
<reference key="object" ref="600721723"/>
<reference key="parent" ref="596740638"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4683</int>
<reference key="object" ref="506374457"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="83182032"/>
<reference ref="1024767070"/>
<reference ref="677088452"/>
</object>
<reference key="parent" ref="824340487"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4684</int>
<reference key="object" ref="83182032"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="950807616"/>
</object>
<reference key="parent" ref="506374457"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4685</int>
<reference key="object" ref="1024767070"/>
<reference key="parent" ref="506374457"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4686</int>
<reference key="object" ref="677088452"/>
<reference key="parent" ref="506374457"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4687</int>
<reference key="object" ref="950807616"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="806672982"/>
</object>
<reference key="parent" ref="83182032"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4688</int>
<reference key="object" ref="806672982"/>
<reference key="parent" ref="950807616"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4692</int>
<reference key="object" ref="447614808"/>
......@@ -9526,6 +9501,50 @@ LCAuLi4</string>
<reference key="object" ref="664576649"/>
<reference key="parent" ref="429932428"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4713</int>
<reference key="object" ref="979766179"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="1064884668"/>
<reference ref="11557666"/>
<reference ref="252983915"/>
</object>
<reference key="parent" ref="824340487"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4714</int>
<reference key="object" ref="1064884668"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="291003631"/>
</object>
<reference key="parent" ref="979766179"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4715</int>
<reference key="object" ref="11557666"/>
<reference key="parent" ref="979766179"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4716</int>
<reference key="object" ref="252983915"/>
<reference key="parent" ref="979766179"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4717</int>
<reference key="object" ref="291003631"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="1022116109"/>
</object>
<reference key="parent" ref="1064884668"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4718</int>
<reference key="object" ref="1022116109"/>
<reference key="parent" ref="291003631"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
......@@ -10191,20 +10210,6 @@ LCAuLi4</string>
<string>4681.IBPluginDependency</string>
<string>4682.IBPluginDependency</string>
<string>4682.IBViewBoundsToFrameTransform</string>
<string>4683.IBPluginDependency</string>
<string>4683.IBViewBoundsToFrameTransform</string>
<string>4683.ImportedFromIB2</string>
<string>4684.CustomClassName</string>
<string>4684.IBPluginDependency</string>
<string>4684.ImportedFromIB2</string>
<string>4685.IBPluginDependency</string>
<string>4685.IBShouldRemoveOnLegacySave</string>
<string>4686.IBPluginDependency</string>
<string>4686.IBShouldRemoveOnLegacySave</string>
<string>4687.IBPluginDependency</string>
<string>4687.ImportedFromIB2</string>
<string>4688.IBPluginDependency</string>
<string>4688.IBShouldRemoveOnLegacySave</string>
<string>4692.IBPluginDependency</string>
<string>4692.IBViewBoundsToFrameTransform</string>
<string>4693.IBPluginDependency</string>
......@@ -10213,6 +10218,13 @@ LCAuLi4</string>
<string>4695.IBPluginDependency</string>
<string>4701.IBPluginDependency</string>
<string>4701.IBViewBoundsToFrameTransform</string>
<string>4713.IBPluginDependency</string>
<string>4714.CustomClassName</string>
<string>4714.IBPluginDependency</string>
<string>4715.IBPluginDependency</string>
<string>4716.IBPluginDependency</string>
<string>4717.IBPluginDependency</string>
<string>4718.IBPluginDependency</string>
<string>5.IBPluginDependency</string>
<string>5.ImportedFromIB2</string>
<string>56.IBPluginDependency</string>
......@@ -10684,7 +10696,7 @@ LCAuLi4</string>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDxYAAwggAAA</bytes>
<bytes key="NSTransformStruct">P4AAAL+AAABDZgAAweAAAA</bytes>
</object>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
......@@ -10844,7 +10856,7 @@ LCAuLi4</string>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCQAAAw2cAAA</bytes>
<bytes key="NSTransformStruct">P4AAAL+AAAC/gAAAw3wAAA</bytes>
</object>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
......@@ -10980,22 +10992,6 @@ LCAuLi4</string>
<bytes key="NSTransformStruct">AUKuAAAAAAAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAADCLAAAw4MLAA</bytes>
</object>
<integer value="1"/>
<string>PXSourceList</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">AUMCAABDZQAAA</bytes>
</object>
......@@ -11010,6 +11006,13 @@ LCAuLi4</string>
<bytes key="NSTransformStruct">AUMMAABBoAAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>PXSourceList</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>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
......@@ -11075,7 +11078,7 @@ LCAuLi4</string>
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">4704</int>
<int key="maxID">4721</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
......
......@@ -472,6 +472,8 @@
CCC593790AB4A9FB0004FF52 /* embeddedwindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = embeddedwindow.m; path = ../../../modules/gui/macosx/embeddedwindow.m; sourceTree = SOURCE_ROOT; };
CCC895830D9A8A82005AE59C /* eyetv.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = eyetv.m; path = ../../../modules/access/eyetv.m; sourceTree = SOURCE_ROOT; };
CCC896B90D9AA9E8005AE59C /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = Resources/English.lproj/MediaInfo.nib; sourceTree = "<group>"; };
CCCDDEEF13E870BB00A35661 /* SideBarItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SideBarItem.h; path = ../../../modules/gui/macosx/SideBarItem.h; sourceTree = "<group>"; };
CCCDDEF013E870BB00A35661 /* SideBarItem.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SideBarItem.m; path = ../../../modules/gui/macosx/SideBarItem.m; sourceTree = "<group>"; };
CCCE366D13817E4500694F2A /* VideoEffects.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VideoEffects.h; path = ../../../modules/gui/macosx/VideoEffects.h; sourceTree = "<group>"; };
CCCE366E13817E4500694F2A /* VideoEffects.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = VideoEffects.m; path = ../../../modules/gui/macosx/VideoEffects.m; sourceTree = "<group>"; };
CCD590F010E5B73200D39094 /* dialogProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dialogProvider.h; path = ../../../modules/gui/macosx_dialog_provider/dialogProvider.h; sourceTree = SOURCE_ROOT; };
......@@ -813,6 +815,8 @@
CC0CD0E413DE0EB500B0D90D /* PXSourceList */ = {
isa = PBXGroup;
children = (
CCCDDEEF13E870BB00A35661 /* SideBarItem.h */,
CCCDDEF013E870BB00A35661 /* SideBarItem.m */,
CC0CD0DF13DE0EAE00B0D90D /* PXSourceList.h */,
CC0CD0E013DE0EAE00B0D90D /* PXSourceList.m */,
CC0CD0E113DE0EAE00B0D90D /* PXSourceListDataSource.h */,
......
......@@ -25,9 +25,14 @@
*****************************************************************************/
#import <Cocoa/Cocoa.h>
#import "PXSourceList.h"
#import <vlc_input.h>
@interface VLCMainWindow : NSWindow {
#ifndef MAC_OS_X_VERSION_10_6
@protocol NSWindowDelegate <NSObject> @end
#endif
@interface VLCMainWindow : NSWindow <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate> {
IBOutlet id o_play_btn;
IBOutlet id o_bwd_btn;
IBOutlet id o_fwd_btn;
......@@ -82,6 +87,7 @@
NSTimeInterval last_bwd_event;
BOOL just_triggered_next;
BOOL just_triggered_previous;
NSMutableArray *o_sidebaritems;
}
+ (VLCMainWindow *)sharedInstance;
......
......@@ -31,10 +31,12 @@
#import "MainMenu.h"
#import "misc.h"
#import "controls.h" // TODO: remove me
#import "SideBarItem.h"
#import <vlc_playlist.h>
#import <vlc_aout_intf.h>
#import <vlc_url.h>
#import <vlc_strings.h>
#import <vlc_services_discovery.h>
@implementation VLCMainWindow
static VLCMainWindow *_o_sharedInstance = nil;
......@@ -93,11 +95,13 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)dealloc
{
config_PutInt( VLCIntf->p_libvlc, "volume", i_lastShownVolume );
[o_sidebaritems release];
[super dealloc];
}
- (void)awakeFromNib
{
/* setup the styled interface */
b_dark_interface = config_GetInt( VLCIntf, "macosx-interfacestyle" );
i_lastShownVolume = -1;
......@@ -195,10 +199,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_repeat_btn setAlternateImage: o_repeat_pressed_img];
[o_shuffle_btn setImage: o_shuffle_img];
[o_shuffle_btn setAlternateImage: o_shuffle_pressed_img];
[o_play_btn setImage: o_play_img];
[o_play_btn setAlternateImage: o_play_pressed_img];
/* interface builder action */
[o_video_view setFrame: [o_split_view frame]];
[self setDelegate: self];
[self setExcludedFromWindowsMenu: YES];
......@@ -207,8 +211,79 @@ static VLCMainWindow *_o_sharedInstance = nil;
[self setTitle: _NS("VLC media player")];
[o_playlist_btn setEnabled:NO];
/* reset the interface */
[self updateVolumeSlider];
[self updateTimeSlider];
/* create the sidebar */
o_sidebaritems = [[NSMutableArray alloc] init];
SideBarItem *libraryItem = [SideBarItem itemWithTitle:_NS("LIBRARY") identifier:@"library"];
SideBarItem *playlistItem = [SideBarItem itemWithTitle:_NS("Playlist") identifier:@"playlist"];
SideBarItem *mycompItem = [SideBarItem itemWithTitle:_NS("MY COMPUTER") identifier:@"mycomputer"];
SideBarItem *devicesItem = [SideBarItem itemWithTitle:_NS("DEVICES") identifier:@"devices"];
SideBarItem *lanItem = [SideBarItem itemWithTitle:_NS("LOCAL NETWORK") identifier:@"localnetwork"];
SideBarItem *internetItem = [SideBarItem itemWithTitle:_NS("INTERNET") identifier:@"internet"];
/* SD subnodes, inspired by the Qt4 intf */
char **ppsz_longnames;
int *p_categories;
char **ppsz_names = vlc_sd_GetNames( pl_Get( VLCIntf ), &ppsz_longnames, &p_categories );
if (!ppsz_names)
msg_Err( VLCIntf, "no sd item found" ); //TODO
char **ppsz_name = ppsz_names, **ppsz_longname = ppsz_longnames;
int *p_category = p_categories;
NSMutableArray *internetItems = [[NSMutableArray alloc] init];
NSMutableArray *devicesItems = [[NSMutableArray alloc] init];
NSMutableArray *lanItems = [[NSMutableArray alloc] init];
NSMutableArray *mycompItems = [[NSMutableArray alloc] init];
for (; *ppsz_name; ppsz_name++, ppsz_longname++, p_category++)
{
switch (*p_category) {
case SD_CAT_INTERNET:
[internetItems addObject: [SideBarItem itemWithTitle: [NSString stringWithCString: *ppsz_longname encoding: NSUTF8StringEncoding] identifier: [NSString stringWithCString: *ppsz_name encoding: NSUTF8StringEncoding]]];
break;
case SD_CAT_DEVICES:
[devicesItems addObject: [SideBarItem itemWithTitle: [NSString stringWithCString: *ppsz_longname encoding: NSUTF8StringEncoding] identifier: [NSString stringWithCString: *ppsz_name encoding: NSUTF8StringEncoding]]];
break;
case SD_CAT_LAN:
[lanItems addObject: [SideBarItem itemWithTitle: [NSString stringWithCString: *ppsz_longname encoding: NSUTF8StringEncoding] identifier: [NSString stringWithCString: *ppsz_name encoding: NSUTF8StringEncoding]]];
break;
case SD_CAT_MYCOMPUTER: