Commit f631d60b authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

MacOSX/VLC_app: Update and simplify to match current Framework state.

parent 0b319e41
{
IBClasses = (
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
{CLASS = NSSegmentedControl; LANGUAGE = ObjC; SUPERCLASS = NSControl; },
{CLASS = VLCCategoryListDataSource; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
{CLASS = VLCCategoryOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; },
{
CLASS = VLCController;
LANGUAGE = ObjC;
OUTLETS = {categoryList = id; detailList = id; detailSearchField = id; videoView = id; };
SUPERCLASS = NSObject;
},
{CLASS = VLCVideoView; LANGUAGE = ObjC; SUPERCLASS = NSView; }
);
IBVersion = 1;
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBClasses</key>
<array>
<dict>
<key>CLASS</key>
<string>VLCCategoryOutlineView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSOutlineView</string>
</dict>
<dict>
<key>CLASS</key>
<string>VLCController</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>categoryList</key>
<string>id</string>
<key>detailList</key>
<string>id</string>
<key>detailSearchField</key>
<string>id</string>
<key>videoView</key>
<string>id</string>
</dict>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
<dict>
<key>CLASS</key>
<string>FirstResponder</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
<dict>
<key>CLASS</key>
<string>VLCVideoView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSView</string>
</dict>
</array>
<key>IBVersion</key>
<string>1</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>269 541 530 314 0 0 1680 1028 </string>
<key>IBEditorPositions</key>
<dict>
<key>29</key>
<string>141 525 338 44 0 0 1680 1028 </string>
</dict>
<key>IBFramework Version</key>
<string>446.1</string>
<string>629</string>
<key>IBLastKnownRelativeProjectPath</key>
<string>../../VLC.xcodeproj</string>
<key>IBOldestOS</key>
<integer>5</integer>
<key>IBOpenObjects</key>
<array>
<integer>21</integer>
<integer>29</integer>
<integer>253</integer>
</array>
<key>IBSystem Version</key>
<string>8R218</string>
<string>9B18</string>
<key>targetFramework</key>
<string>IBCocoaFramework</string>
</dict>
</plist>
......@@ -3,20 +3,13 @@
archiveVersion = 1;
classes = {
};
objectVersion = 42;
objectVersion = 44;
objects = {
/* Begin PBXBuildFile section */
631220BC0C87F72D005CC6A4 /* VLC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 631220BB0C87F72D005CC6A4 /* VLC.framework */; };
631220C90C87F730005CC6A4 /* VLC.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 631220BB0C87F72D005CC6A4 /* VLC.framework */; };
635FDAEF0C8080B900CE5E69 /* VLCCategoryOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 635FDAED0C8080B900CE5E69 /* VLCCategoryOutlineView.m */; };
635FDAF00C8080B900CE5E69 /* VLCCategoryOutlineView.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 635FDAEE0C8080B900CE5E69 /* VLCCategoryOutlineView.h */; };
635FDB3D0C8083BC00CE5E69 /* VLCCategoryCell.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 635FDB3B0C8083BC00CE5E69 /* VLCCategoryCell.h */; };
635FDB3E0C8083BC00CE5E69 /* VLCCategoryCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 635FDB3C0C8083BC00CE5E69 /* VLCCategoryCell.m */; };
63C5518C0C7F663500B202D3 /* VLCController.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 63C5518A0C7F663500B202D3 /* VLCController.h */; };
630FBE2D0CF0B3940072CB10 /* VLC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 630FBE2C0CF0B3930072CB10 /* VLC.framework */; };
630FBE3C0CF0B3D80072CB10 /* VLC.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 630FBE2C0CF0B3930072CB10 /* VLC.framework */; };
63C5518D0C7F663500B202D3 /* VLCController.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C5518B0C7F663500B202D3 /* VLCController.m */; };
63C551900C7F6A2000B202D3 /* VLCCategoryListDataSource.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 63C5518E0C7F6A2000B202D3 /* VLCCategoryListDataSource.h */; };
63C551910C7F6A2000B202D3 /* VLCCategoryListDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C5518F0C7F6A2000B202D3 /* VLCCategoryListDataSource.m */; };
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
......@@ -30,11 +23,7 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
631220C90C87F730005CC6A4 /* VLC.framework in CopyFiles */,
63C5518C0C7F663500B202D3 /* VLCController.h in CopyFiles */,
63C551900C7F6A2000B202D3 /* VLCCategoryListDataSource.h in CopyFiles */,
635FDAF00C8080B900CE5E69 /* VLCCategoryOutlineView.h in CopyFiles */,
635FDB3D0C8083BC00CE5E69 /* VLCCategoryCell.h in CopyFiles */,
630FBE3C0CF0B3D80072CB10 /* VLC.framework in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -49,15 +38,9 @@
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
32CA4F630368D1EE00C91783 /* VLC_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLC_Prefix.pch; sourceTree = "<group>"; };
631220BB0C87F72D005CC6A4 /* VLC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = VLC.framework; path = ../Framework/VLC.framework; sourceTree = SOURCE_ROOT; };
635FDAED0C8080B900CE5E69 /* VLCCategoryOutlineView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = VLCCategoryOutlineView.m; sourceTree = "<group>"; };
635FDAEE0C8080B900CE5E69 /* VLCCategoryOutlineView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = VLCCategoryOutlineView.h; sourceTree = "<group>"; };
635FDB3B0C8083BC00CE5E69 /* VLCCategoryCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCCategoryCell.h; sourceTree = "<group>"; };
635FDB3C0C8083BC00CE5E69 /* VLCCategoryCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCCategoryCell.m; sourceTree = "<group>"; };
630FBE2C0CF0B3930072CB10 /* VLC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = VLC.framework; path = ../Framework/build/Release/VLC.framework; sourceTree = SOURCE_ROOT; };
63C5518A0C7F663500B202D3 /* VLCController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = VLCController.h; sourceTree = "<group>"; };
63C5518B0C7F663500B202D3 /* VLCController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = VLCController.m; sourceTree = "<group>"; };
63C5518E0C7F6A2000B202D3 /* VLCCategoryListDataSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = VLCCategoryListDataSource.h; sourceTree = "<group>"; };
63C5518F0C7F6A2000B202D3 /* VLCCategoryListDataSource.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = VLCCategoryListDataSource.m; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
8D1107320486CEB800E47090 /* VLC.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VLC.app; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
......@@ -68,7 +51,7 @@
buildActionMask = 2147483647;
files = (
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
631220BC0C87F72D005CC6A4 /* VLC.framework in Frameworks */,
630FBE2D0CF0B3940072CB10 /* VLC.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -80,12 +63,6 @@
children = (
63C5518A0C7F663500B202D3 /* VLCController.h */,
63C5518B0C7F663500B202D3 /* VLCController.m */,
63C5518E0C7F6A2000B202D3 /* VLCCategoryListDataSource.h */,
63C5518F0C7F6A2000B202D3 /* VLCCategoryListDataSource.m */,
635FDAEE0C8080B900CE5E69 /* VLCCategoryOutlineView.h */,
635FDAED0C8080B900CE5E69 /* VLCCategoryOutlineView.m */,
635FDB3B0C8083BC00CE5E69 /* VLCCategoryCell.h */,
635FDB3C0C8083BC00CE5E69 /* VLCCategoryCell.m */,
);
name = Classes;
sourceTree = "<group>";
......@@ -93,7 +70,7 @@
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
isa = PBXGroup;
children = (
631220BB0C87F72D005CC6A4 /* VLC.framework */,
630FBE2C0CF0B3930072CB10 /* VLC.framework */,
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
);
name = "Linked Frameworks";
......@@ -193,9 +170,11 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "VLC" */;
compatibilityVersion = "Xcode 3.0";
hasScannedForEncodings = 1;
mainGroup = 29B97314FDCFA39411CA2CEA /* VLC */;
projectDirPath = "";
projectRoot = "";
targets = (
8D1107260486CEB800E47090 /* VLC */,
);
......@@ -221,9 +200,6 @@
files = (
8D11072D0486CEB800E47090 /* main.m in Sources */,
63C5518D0C7F663500B202D3 /* VLCController.m in Sources */,
63C551910C7F6A2000B202D3 /* VLCCategoryListDataSource.m in Sources */,
635FDAEF0C8080B900CE5E69 /* VLCCategoryOutlineView.m in Sources */,
635FDB3E0C8083BC00CE5E69 /* VLCCategoryCell.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -257,6 +233,7 @@
"$(inherited)",
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_2)",
"\"$(SRCROOT)/../Framework/build/Release\"",
);
FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../..\"";
FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)/../Framework\"";
......@@ -280,6 +257,7 @@
"$(inherited)",
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_2)",
"\"$(SRCROOT)/../Framework/build/Release\"",
);
FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../..\"";
FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)/../Framework\"";
......
......@@ -22,89 +22,28 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/* this code needs rework, but it does nice thing */
#import <VLC/VLC.h>
#import "VLCController.h"
#import "VLCCategoryCell.h"
NSArrayController * treeController;
VLCPlaylist * currentPlaylist;
@implementation VLCController
- (void)awakeFromNib
{
[NSApp setDelegate:self];
[detailList setTarget:self];
[detailList setDoubleAction:@selector(detailListItemDoubleClicked:)];
[detailList setDataSource: [[VLCPlaylistDataSource alloc] initWithPlaylist:nil videoView:videoView]];
[detailList registerForDraggedTypes: [NSArray arrayWithObjects:NSFilenamesPboardType, NSURLPboardType, nil]];
[categoryList setTarget:self];
[categoryList setAction:@selector(categoryListItemClicked:)];
[[[categoryList tableColumns] objectAtIndex:0] setDataCell:[[[VLCCategoryCell alloc] init] autorelease]];
}
- (void)detailListItemDoubleClicked:(id)sender
{
if( [sender isKindOfClass:[NSTableView class]] && [sender selectedRow] >= 0)
{
[videoView setPlaylist: currentPlaylist];
[videoView playMedia: [[treeController selectedObjects] objectAtIndex: 0]];
}
}
- (void)categoryListItemClicked:(id)sender
{
VLCPlaylist * aPlaylist;
id selectedItem = [sender itemAtRow:[sender selectedRow]];
if([selectedItem isKindOfClass:[VLCMediaLibrary class]])
aPlaylist = [selectedItem allMedia];
else if([selectedItem isKindOfClass:[VLCMediaDiscoverer class]])
aPlaylist = [selectedItem playlist];
else if([selectedItem isKindOfClass:[VLCPlaylist class]])
aPlaylist = [selectedItem flatPlaylist];
else
{
return;
}
currentPlaylist= aPlaylist;
treeController = [[NSArrayController alloc] init]; /* XXX: We leak */
//[treeController setAutomaticallyPreparesContent: YES];
[[detailList dataSource] release];
NSLog(@"currentPlaylist %@", currentPlaylist);
[detailList setDataSource: [[VLCPlaylistDataSource alloc] initWithPlaylist:aPlaylist videoView:videoView]];
//[treeController setContent: [[VLCMediaLibrary sharedMediaLibrary] allMedia]];
[treeController bind:@"contentArray" toObject: aPlaylist
withKeyPath:@"items" options:nil];
NSTableColumn *tableColumn;
VLCMediaList * mediaList = [[VLCMediaList alloc] init];
[mediaList addMedia:[VLCMedia mediaWithURL:@"/dev/null"]];
NSArrayController * arrayController = [[NSArrayController alloc] init];
[arrayController bind:@"contentArray" toObject:mediaList withKeyPath:@"media" options:nil];
NSMutableDictionary *bindingOptions = [NSMutableDictionary dictionary];
[bindingOptions setObject:@"metaInformation.title contains[c] $value" forKey:NSPredicateFormatBindingOption];
[bindingOptions setObject:@"No Title" forKey:NSDisplayNameBindingOption];
[detailSearchField bind:@"predicate" toObject: treeController
withKeyPath:@"filterPredicate" options:bindingOptions];
//[treeController setChildrenKeyPath:@"subitems.items"];
[bindingOptions removeAllObjects];
[bindingOptions setObject:@"Search" forKey:@"NSNullPlaceholder"];
/* binding for "title" column */
tableColumn = [detailList tableColumnWithIdentifier:@"title"];
NSTableColumn * tableColumn = [detailList tableColumnWithIdentifier:@"title"];
[tableColumn bind:@"value" toObject: treeController
withKeyPath:@"arrangedObjects.metaInformation.title" options:bindingOptions];
[tableColumn bind:@"value" toObject: arrayController
withKeyPath:@"arrangedObjects.url" options:bindingOptions];
}
@end
@implementation VLCController (NSAppDelegating)
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
[self categoryListItemClicked: categoryList];
}
@end
@end
\ No newline at end of file
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