X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=projects%2Fmacosx%2Fvlc_app%2FSources%2FVLCController.m;fp=projects%2Fmacosx%2Fvlc_app%2FSources%2FVLCController.m;h=0000000000000000000000000000000000000000;hb=b030f616ac60ae0310fa23f3d9201bd3421b4df3;hp=53dea37067b77d59213aa66ca165e61f3bdd2e18;hpb=32ef2433f17430e2fca6f9a32aebf7030c4e2e6d;p=vlc diff --git a/projects/macosx/vlc_app/Sources/VLCController.m b/projects/macosx/vlc_app/Sources/VLCController.m deleted file mode 100644 index 53dea37067..0000000000 --- a/projects/macosx/vlc_app/Sources/VLCController.m +++ /dev/null @@ -1,105 +0,0 @@ -/***************************************************************************** - * VLCController.m: VLC.app main controller - ***************************************************************************** - * Copyright (C) 2007 Pierre d'Herbemont - * Copyright (C) 2007 the VideoLAN team - * $Id$ - * - * Authors: Pierre d'Herbemont - * - * 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 - -#import "VLCController.h" -#import "VLCAppAdditions.h" -#import "VLCValueTransformer.h" - -@interface VLCController () -@property (readwrite,retain) NSArray * categories; -@end - -/****************************************************************************** - * VLCBrowsableVideoView - */ -@implementation VLCController -@synthesize categories; - -- (void)awakeFromNib -{ - /*********************************** - * Register our bindings value transformer - */ - VLCFloat10000FoldTransformer *float100fold; - float100fold = [[[VLCFloat10000FoldTransformer alloc] init] autorelease]; - [NSValueTransformer setValueTransformer:(id)float100fold forName:@"Float10000FoldTransformer"]; - VLCNonNilAsBoolTransformer *nonNilAsBool; - nonNilAsBool = [[[VLCNonNilAsBoolTransformer alloc] init] autorelease]; - [NSValueTransformer setValueTransformer:(id)nonNilAsBool forName:@"NonNilAsBoolTransformer"]; - VLCURLToRepresentedFileNameTransformer *urlToRepresentedFileName; - urlToRepresentedFileName = [[[VLCURLToRepresentedFileNameTransformer alloc] init] autorelease]; - [NSValueTransformer setValueTransformer:(id)urlToRepresentedFileName forName:@"URLToRepresentedFileNameTransformer"]; - VLCSelectionIndexToDescriptionTransformer *indexToDescription; - indexToDescription = [[[VLCSelectionIndexToDescriptionTransformer alloc] init] autorelease]; - [NSValueTransformer setValueTransformer:(id)indexToDescription forName:@"SelectionIndexToDescriptionTransformer"]; - - /*********************************** - * categories: Main content - */ - NSArray * mediaDiscoverers = [NSArray arrayWithObjects: - [[[VLCMediaDiscoverer alloc] initWithName:@"shoutcasttv"] autorelease], - [[[VLCMediaDiscoverer alloc] initWithName:@"shoutcast"] autorelease], - [[[VLCMediaDiscoverer alloc] initWithName:@"sap"] autorelease], - [[[VLCMediaDiscoverer alloc] initWithName:@"freebox"] autorelease], nil]; - - self.categories = [NSArray arrayWithObjects: - [NSMutableDictionary dictionaryWithObjectsAndKeys: - [@"Service Discovery" uppercaseString], @"descriptionInCategoriesList", - @"Service Discovery", @"descriptionInVideoView", - [NSNumber numberWithBool:NO], @"selectableInCategoriesList", - mediaDiscoverers, @"childrenInCategoriesList", - mediaDiscoverers, @"childrenInVideoView", - nil], - [VLCMedia mediaAsNodeWithName:@"Playlist"], - nil]; - - /* Execution will continue in applicationDidFinishLaunching */ - [NSApp setDelegate:self]; -} - -- (void)newMainWindow:(id)sender -{ - if (![NSBundle loadNibNamed:@"MainWindow" owner:self]) - { - NSLog(@"Warning! Could not load MainWindow file.\n"); - } - /* We are done. Should be on screen if Visible at launch time is checked */ -} - -- (void)addPlaylist:(id)sender -{ - // TODO - NSLog(@"unimplemented!"); -} - -@end - -@implementation VLCController (NSAppDelegate) -- (void)applicationDidFinishLaunching:(NSNotification *)notification -{ - [self newMainWindow: self]; -} -@end