Commit ccee49c7 authored by Felix Paul Kühne's avatar Felix Paul Kühne

legacy OS X intf: removed unfinished VLM interface

The existing code only managed to display some windows without any functionality.
parent ef7ac2f8
......@@ -12,8 +12,8 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="81"/>
<integer value="21"/>
<integer value="57"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
......@@ -615,15 +615,6 @@
<reference key="NSOnImage" ref="447396056"/>
<reference key="NSMixedImage" ref="100133332"/>
</object>
<object class="NSMenuItem" id="348588140">
<reference key="NSMenu" ref="1050252183"/>
<string key="NSTitle">VLM Configuration</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="447396056"/>
<reference key="NSMixedImage" ref="100133332"/>
</object>
<object class="NSMenuItem" id="630566305">
<reference key="NSMenu" ref="1050252183"/>
<string key="NSTitle">Streaming/Exporting Wizard...</string>
......@@ -7751,22 +7742,6 @@ LCAuLi4</string>
</object>
<int key="connectionID">4047</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">showVLM:</string>
<reference key="source" ref="199714555"/>
<reference key="destination" ref="348588140"/>
</object>
<int key="connectionID">4049</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_mi_open_vlm</string>
<reference key="source" ref="199714555"/>
<reference key="destination" ref="348588140"/>
</object>
<int key="connectionID">4050</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">downloadCoverArt:</string>
......@@ -8238,7 +8213,6 @@ LCAuLi4</string>
<reference ref="571184165"/>
<reference ref="252497091"/>
<reference ref="764543718"/>
<reference ref="348588140"/>
</object>
<reference key="parent" ref="13508166"/>
</object>
......@@ -8339,11 +8313,6 @@ LCAuLi4</string>
<reference key="object" ref="764543718"/>
<reference key="parent" ref="1050252183"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4048</int>
<reference key="object" ref="348588140"/>
<reference key="parent" ref="1050252183"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">217</int>
<reference key="object" ref="987792194"/>
......@@ -11610,8 +11579,6 @@ LCAuLi4</string>
<string>3945.ImportedFromIB2</string>
<string>3946.IBPluginDependency</string>
<string>3946.ImportedFromIB2</string>
<string>4048.IBPluginDependency</string>
<string>4048.ImportedFromIB2</string>
<string>413.IBPluginDependency</string>
<string>413.ImportedFromIB2</string>
<string>4147.IBPluginDependency</string>
......@@ -11735,7 +11702,6 @@ LCAuLi4</string>
<string>4368.IBShouldRemoveOnLegacySave</string>
<string>4369.IBPluginDependency</string>
<string>4369.IBShouldRemoveOnLegacySave</string>
<string>4370.IBPluginDependency</string>
<string>446.IBPluginDependency</string>
<string>446.ImportedFromIB2</string>
<string>5.IBPluginDependency</string>
......@@ -11759,6 +11725,7 @@ LCAuLi4</string>
<string>79.ImportedFromIB2</string>
<string>801.IBPluginDependency</string>
<string>801.ImportedFromIB2</string>
<string>81.IBEditorWindowLastContentRect</string>
<string>81.IBPluginDependency</string>
<string>81.ImportedFromIB2</string>
<string>816.IBPluginDependency</string>
......@@ -12021,9 +11988,9 @@ LCAuLi4</string>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
<string>{{42, 670}, {338, 29}}</string>
<string>{{350, 670}, {338, 29}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{42, 670}, {338, 29}}</string>
<string>{{350, 670}, {338, 29}}</string>
<boolean value="YES"/>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
......@@ -12438,8 +12405,6 @@ LCAuLi4</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>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
......@@ -12543,7 +12508,6 @@ LCAuLi4</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
......@@ -12566,6 +12530,7 @@ LCAuLi4</string>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
<string>{{408, 471}, {297, 243}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
......
......@@ -169,7 +169,6 @@
CC62B9600FC600E90077BB8C /* play_big_down.png in Resources */ = {isa = PBXBuildFile; fileRef = CC62B9580FC600E90077BB8C /* play_big_down.png */; };
CC62B9610FC600E90077BB8C /* play_big.png in Resources */ = {isa = PBXBuildFile; fileRef = CC62B9590FC600E90077BB8C /* play_big.png */; };
CC8062641021F8790021EB9A /* dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = CC8062631021F8790021EB9A /* dsa_pub.pem */; };
CCB60A420E6E5E3F00407004 /* VLM.nib in Resources */ = {isa = PBXBuildFile; fileRef = CCB60A400E6E5E3F00407004 /* VLM.nib */; };
CCBE999F0F922C51000705F8 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CCBE999E0F922C51000705F8 /* CoreServices.framework */; };
CCD90F4E0E87C86D0034564A /* add_schedule.png in Resources */ = {isa = PBXBuildFile; fileRef = CCD90F4B0E87C86D0034564A /* add_schedule.png */; };
CCD90F4F0E87C86D0034564A /* add_vod.png in Resources */ = {isa = PBXBuildFile; fileRef = CCD90F4C0E87C86D0034564A /* add_vod.png */; };
......@@ -310,8 +309,6 @@
CC4ED9B00ABE07C800CA4CC5 /* repeat_single_embedded_blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = repeat_single_embedded_blue.png; path = Resources/repeat_single_embedded_blue.png; sourceTree = "<group>"; };
CC4ED9B10ABE07C800CA4CC5 /* shuffle_embedded_blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = shuffle_embedded_blue.png; path = Resources/shuffle_embedded_blue.png; sourceTree = "<group>"; };
CC4ED9B20ABE07C800CA4CC5 /* shuffle_embedded.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = shuffle_embedded.png; path = Resources/shuffle_embedded.png; sourceTree = "<group>"; };
CC61608A0FCC2FDF00D71FB1 /* vlm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = vlm.h; path = ../../../modules/gui/macosx/vlm.h; sourceTree = SOURCE_ROOT; };
CC61608B0FCC2FDF00D71FB1 /* vlm.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = vlm.m; path = ../../../modules/gui/macosx/vlm.m; sourceTree = SOURCE_ROOT; };
CC62B8C50FC5787D0077BB8C /* aiff.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = aiff.icns; path = Resources/aiff.icns; sourceTree = "<group>"; };
CC62B8C60FC5787D0077BB8C /* audio.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = audio.icns; path = Resources/audio.icns; sourceTree = "<group>"; };
CC62B8C70FC5787D0077BB8C /* flv.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = flv.icns; path = Resources/flv.icns; sourceTree = "<group>"; };
......@@ -363,7 +360,6 @@
CC6C01B90DDF3EBC00C7D754 /* darwin_specific.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = darwin_specific.c; path = ../../../src/misc/darwin_specific.c; sourceTree = SOURCE_ROOT; };
CC6C01BA0DDF3EEC00C7D754 /* auhal.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = auhal.c; path = ../../../modules/audio_output/auhal.c; sourceTree = SOURCE_ROOT; };
CC6C01BB0DDF3F0700C7D754 /* opengl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = opengl.c; path = ../../../modules/video_output/opengl.c; sourceTree = SOURCE_ROOT; };
CC6C01BC0DDF3F0700C7D754 /* opengllayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = opengllayer.m; path = ../../../modules/video_output/opengllayer.m; sourceTree = SOURCE_ROOT; };
CC6C01BD0DDF3F2100C7D754 /* quartztext.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = quartztext.c; path = ../../../modules/misc/quartztext.c; sourceTree = SOURCE_ROOT; };
CC6D8D9C0A878DED006F2BBE /* AppleRemote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppleRemote.h; path = ../../../modules/gui/macosx/AppleRemote.h; sourceTree = SOURCE_ROOT; };
CC6D8D9D0A878DED006F2BBE /* AppleRemote.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppleRemote.m; path = ../../../modules/gui/macosx/AppleRemote.m; sourceTree = SOURCE_ROOT; };
......@@ -378,7 +374,6 @@
CC965D5F0DA5880F0088F222 /* display_right.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = display_right.png; path = Resources/display_right.png; sourceTree = "<group>"; };
CCB24D5D0D54BBAE004D780C /* simple_prefs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; name = simple_prefs.m; path = ../../../modules/gui/macosx/simple_prefs.m; sourceTree = SOURCE_ROOT; };
CCB24D5E0D54BBAE004D780C /* simple_prefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = simple_prefs.h; path = ../../../modules/gui/macosx/simple_prefs.h; sourceTree = SOURCE_ROOT; };
CCB60A410E6E5E3F00407004 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = Resources/English.lproj/VLM.nib; sourceTree = "<group>"; };
CCBE999E0F922C51000705F8 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
CCC593780AB4A9FB0004FF52 /* embeddedwindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = embeddedwindow.h; path = ../../../modules/gui/macosx/embeddedwindow.h; sourceTree = SOURCE_ROOT; };
CCC593790AB4A9FB0004FF52 /* embeddedwindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = embeddedwindow.m; path = ../../../modules/gui/macosx/embeddedwindow.m; sourceTree = SOURCE_ROOT; };
......@@ -544,8 +539,6 @@
CCC593790AB4A9FB0004FF52 /* embeddedwindow.m */,
2AEF857609A5FEC900130822 /* fspanel.h */,
2AEF857709A5FEC900130822 /* fspanel.m */,
CC61608A0FCC2FDF00D71FB1 /* vlm.h */,
CC61608B0FCC2FDF00D71FB1 /* vlm.m */,
CC6EDD4F0B9CA2140096068A /* eyetv.h */,
CC6EDD500B9CA2140096068A /* eyetv.m */,
CCB24D5E0D54BBAE004D780C /* simple_prefs.h */,
......@@ -785,7 +778,6 @@
children = (
CC6C01BD0DDF3F2100C7D754 /* quartztext.c */,
CC6C01BB0DDF3F0700C7D754 /* opengl.c */,
CC6C01BC0DDF3F0700C7D754 /* opengllayer.m */,
CC6C01B90DDF3EBC00C7D754 /* darwin_specific.c */,
CC6C01BA0DDF3EEC00C7D754 /* auhal.c */,
CCC895830D9A8A82005AE59C /* eyetv.m */,
......@@ -855,7 +847,6 @@
children = (
CCF11B520F8BFB520088542D /* ErrorPanel.nib */,
CC0FB34A0F8BED1100F057F7 /* CoreDialogs.nib */,
CCB60A400E6E5E3F00407004 /* VLM.nib */,
CCC896B80D9AA9E8005AE59C /* MediaInfo.nib */,
DCA00AA7075F948800E6BF46 /* About.nib */,
F74F13EA02C2A79C01EE194C /* MainMenu.nib */,
......@@ -1067,7 +1058,6 @@
CC402F3D0E00ABBB006A4BA4 /* display_middle.png in Resources */,
CC402F3E0E00ABBB006A4BA4 /* display_left.png in Resources */,
CC402F3F0E00ABBB006A4BA4 /* display_right.png in Resources */,
CCB60A420E6E5E3F00407004 /* VLM.nib in Resources */,
CCD90F4E0E87C86D0034564A /* add_schedule.png in Resources */,
CCD90F4F0E87C86D0034564A /* add_vod.png in Resources */,
CCD90F500E87C86D0034564A /* add_broadcast.png in Resources */,
......@@ -1097,14 +1087,6 @@
name = CoreDialogs.nib;
sourceTree = "<group>";
};
CCB60A400E6E5E3F00407004 /* VLM.nib */ = {
isa = PBXVariantGroup;
children = (
CCB60A410E6E5E3F00407004 /* English */,
);
name = VLM.nib;
sourceTree = "<group>";
};
CCC896B80D9AA9E8005AE59C /* MediaInfo.nib */ = {
isa = PBXVariantGroup;
children = (
......
......@@ -54,7 +54,5 @@ SOURCES_macosx = \
fspanel.h \
eyetv.h \
eyetv.m \
vlm.h \
vlm.m \
$(NULL)
......@@ -106,9 +106,6 @@ struct intf_sys_t
id o_wizard; /* VLCWizard */
id o_extended; /* VLCExtended */
id o_bookmarks; /* VLCBookmarks */
#ifdef ENABLE_VLM
id o_vlm; /* VLCVLMController */
#endif
id o_embedded_list; /* VLCEmbeddedList*/
id o_coredialogs; /* VLCCoreDialogProvider */
VLCInformation * o_info; /* VLCInformation */
......@@ -121,9 +118,6 @@ struct intf_sys_t
BOOL nib_bookmarks_loaded; /* bookmarks nibfile */
BOOL nib_prefs_loaded; /* preferences nibfile */
BOOL nib_info_loaded; /* information panel nibfile */
#ifdef ENABLE_VLM
BOOL nib_vlm_loaded; /* VLM Panel nibfile */
#endif
BOOL nib_coredialogs_loaded; /* CoreDialogs nibfile */
IBOutlet VLCControllerWindow * o_window; /* main window */
......@@ -199,7 +193,6 @@ struct intf_sys_t
IBOutlet NSMenuItem * o_mi_open_recent;
IBOutlet NSMenuItem * o_mi_open_recent_cm;
IBOutlet NSMenuItem * o_mi_open_wizard;
IBOutlet NSMenuItem * o_mi_open_vlm;
IBOutlet NSMenu * o_mu_edit;
IBOutlet NSMenuItem * o_mi_cut;
......@@ -398,7 +391,6 @@ struct intf_sys_t
- (IBAction)intfOpenCapture:(id)sender;
- (IBAction)showWizard:(id)sender;
- (IBAction)showVLM:(id)sender;
- (IBAction)showExtended:(id)sender;
- (IBAction)showBookmarks:(id)sender;
......
......@@ -52,9 +52,6 @@
#import "AppleRemote.h"
#import "eyetv.h"
#import "simple_prefs.h"
#ifdef ENABLE_VLM
#import "vlm.h"
#endif
#import <AddressBook/AddressBook.h> /* for crashlog send mechanism */
#import <IOKit/hidsystem/ev_keymap.h> /* for the media key support */
......@@ -353,9 +350,6 @@ static VLCMain *_o_sharedMainInstance = nil;
o_prefs = nil;
o_open = [[VLCOpen alloc] init];
o_wizard = [[VLCWizard alloc] init];
#ifdef ENABLE_VLM
o_vlm = [[VLCVLMController alloc] init];
#endif
o_extended = nil;
o_bookmarks = [[VLCBookmarks alloc] init];
o_embedded_list = [[VLCEmbeddedList alloc] init];
......@@ -1449,13 +1443,6 @@ static unsigned int VLCModifiersToCocoa( unsigned int i_key )
return nil;
}
#ifdef ENABLE_VLM
- (id)vlm
{
return o_vlm;
}
#endif
- (id)bookmarks
{
if( o_bookmarks )
......@@ -2188,20 +2175,6 @@ end:
}
}
- (IBAction)showVLM:(id)sender
{
#ifdef ENABLE_VLM
if( !nib_vlm_loaded )
nib_vlm_loaded = [NSBundle loadNibNamed:@"VLM" owner: NSApp];
[o_vlm showVLMWindow];
#else
NSAlert *theAlert;
theAlert = [NSAlert alertWithMessageText:_NS("VLM not available") defaultButton:_NS("OK") alternateButton:nil otherButton:nil informativeTextWithFormat:_NS("The VideoLAN Manager was not enabled in this version of VLC.")];
[theAlert runModal];
#endif
}
- (IBAction)showExtended:(id)sender
{
if( o_extended == nil )
......
/*****************************************************************************
* vlm.h: VLM Configuration panel for Mac OS X
*****************************************************************************
* Copyright (c) 2008 the VideoLAN team
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne@videolan.org>
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# import "config.h"
#endif
#ifdef ENABLE_VLM
#import <Cocoa/Cocoa.h>
#import "intf.h"
#import <vlc_vlm.h>
@interface VLCVLMController : NSObject
{
/* broadcast panel */
IBOutlet NSButton *o_bcast_add_btn;
IBOutlet NSBox *o_bcast_box;
IBOutlet NSButton *o_bcast_cancel_btn;
IBOutlet NSButton *o_bcast_enable_ckb;
IBOutlet NSButton *o_bcast_input_btn;
IBOutlet NSTextField *o_bcast_input_fld;
IBOutlet NSButton *o_bcast_loop_ckb;
IBOutlet NSTextField *o_bcast_name_fld;
IBOutlet NSButton *o_bcast_output_btn;
IBOutlet NSTextField *o_bcast_output_fld;
IBOutlet NSPanel *o_bcast_panel;
/* schedule panel */
IBOutlet id o_sched_add_btn;
IBOutlet id o_sched_box;
IBOutlet id o_sched_cancel_btn;
IBOutlet NSDatePicker *o_sched_date_datePicker;
IBOutlet NSTextField *o_sched_date_lbl;
IBOutlet NSButton *o_sched_input_btn;
IBOutlet NSTextField *o_sched_input_fld;
IBOutlet NSTextField *o_sched_input_lbl;
IBOutlet NSTextField *o_sched_name_fld;
IBOutlet NSTextField *o_sched_name_lbl;
IBOutlet NSButton *o_sched_output_btn;
IBOutlet NSTextField *o_sched_output_fld;
IBOutlet NSTextField *o_sched_output_lbl;
IBOutlet NSTextField *o_sched_repeat_fld;
IBOutlet NSTextField *o_sched_repeat_lbl;
IBOutlet NSDatePicker *o_sched_repeatDelay_datePicker;
IBOutlet id o_sched_time_box;
IBOutlet NSWindow *o_sched_panel;
/* VLM Window */
IBOutlet NSTableView *o_vlm_list;
IBOutlet NSWindow *o_vlm_win;
/* VOD Panel */
IBOutlet NSButton *o_vod_add_btn;
IBOutlet id o_vod_box;
IBOutlet NSButton *o_vod_cancel_btn;
IBOutlet NSButton *o_vod_input_btn;
IBOutlet NSTextField *o_vod_input_fld;
IBOutlet NSTextField *o_vod_input_lbl;
IBOutlet NSButton *o_vod_loop_ckb;
IBOutlet NSTextField *o_vod_name_fld;
IBOutlet NSTextField *o_vod_name_lbl;
IBOutlet NSButton *o_vod_output_btn;
IBOutlet NSTextField *o_vod_output_fld;
IBOutlet NSTextField *o_vod_output_lbl;
IBOutlet NSWindow *o_vod_panel;
}
+ (VLCVLMController *)sharedInstance;
/* toolbar */
- (NSToolbarItem *) toolbar: (NSToolbar *)o_toolbar
itemForItemIdentifier: (NSString *)o_itemIdent
willBeInsertedIntoToolbar: (BOOL)b_willBeInserted;
- (NSArray *)toolbarDefaultItemIdentifiers: (NSToolbar *)toolbar;
- (NSArray *)toolbarAllowedItemIdentifiers: (NSToolbar *)toolbar;
- (void)showVLMWindow;
- (void)initStrings;
- (void)addBcast;
- (void)addVOD;
- (void)addSched;
- (IBAction)bcastButtonAction:(id)sender;
- (IBAction)listDoubleClickAction:(id)sender;
- (IBAction)schedButtonAction:(id)sender;
- (IBAction)vodButtonAction:(id)sender;
- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex;
@end
#endif
\ No newline at end of file
/*****************************************************************************
* vlm.m: VLM Configuration panel for Mac OS X
*****************************************************************************
* Copyright (c) 2008 the VideoLAN team
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne at videolan dot org>
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#import "vlm.h"
#ifdef ENABLE_VLM
static NSString * VLCVLMToolbarIdentifier = @"Our VLM Toolbar Identifier";
static NSString * VLCVODToolbarIdentifier = @"VLM Item";
static NSString * VLCSchedToolbarIdentifier = @"Sched Item";
static NSString * VLCBcastToolbarIdentifier = @"Bcast Item";
@implementation VLCVLMController
static VLCVLMController *_o_sharedInstance = nil;
+ (VLCVLMController *)sharedInstance
{
return _o_sharedInstance ? _o_sharedInstance : [[self alloc] init];
}
- (id)init
{
if( _o_sharedInstance )
[self dealloc];
else
{
_o_sharedInstance = [super init];
}
return _o_sharedInstance;
}
- (void)awakeFromNib
{
[self initStrings];
/* setup the toolbar */
NSToolbar * o_vlm_toolbar = [[[NSToolbar alloc] initWithIdentifier: VLCVLMToolbarIdentifier] autorelease];
[o_vlm_toolbar setAllowsUserCustomization: NO];
[o_vlm_toolbar setAutosavesConfiguration: NO];
[o_vlm_toolbar setDisplayMode: NSToolbarDisplayModeIconAndLabel];
[o_vlm_toolbar setSizeMode: NSToolbarSizeModeRegular];
[o_vlm_toolbar setDelegate: self];
[o_vlm_win setToolbar: o_vlm_toolbar];
}
#define CreateToolbarItem( o_name, o_desc, o_img, sel ) \
o_toolbarItem = create_toolbar_item(o_itemIdent, o_name, o_desc, o_img, self, @selector(sel));
static inline NSToolbarItem *
create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_desc, NSString * o_img, id target, SEL selector )
{
NSToolbarItem *o_toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier: o_itemIdent] autorelease]; \
[o_toolbarItem setLabel: o_name];
[o_toolbarItem setPaletteLabel: o_desc];
[o_toolbarItem setToolTip: o_desc];
[o_toolbarItem setImage: [NSImage imageNamed: o_img]];
[o_toolbarItem setTarget: target];
[o_toolbarItem setAction: selector];
[o_toolbarItem setEnabled: YES];
[o_toolbarItem setAutovalidates: YES];
return o_toolbarItem;
}
- (NSToolbarItem *) toolbar: (NSToolbar *)o_vlm_toolbar
itemForItemIdentifier: (NSString *)o_itemIdent
willBeInsertedIntoToolbar: (BOOL)b_willBeInserted
{
NSToolbarItem *o_toolbarItem = nil;
if( [o_itemIdent isEqual: VLCVODToolbarIdentifier] )
{
CreateToolbarItem( _NS("Video On Demand"), _NS("Video On Demand"), @"add_vod", addVOD );
}
else if( [o_itemIdent isEqual: VLCSchedToolbarIdentifier] )
{
CreateToolbarItem( _NS("Schedule"), _NS("Schedule"), @"add_schedule", addSched );
}
else if( [o_itemIdent isEqual: VLCBcastToolbarIdentifier] )
{
CreateToolbarItem( _NS("Broadcast"), _NS("Broadcast"), @"add_broadcast", addBcast );
}
return o_toolbarItem;
}
- (NSArray *)toolbarDefaultItemIdentifiers: (NSToolbar *)toolbar
{
return [NSArray arrayWithObjects: VLCBcastToolbarIdentifier, VLCSchedToolbarIdentifier, VLCVODToolbarIdentifier, NSToolbarFlexibleSpaceItemIdentifier, nil];
}
- (NSArray *)toolbarAllowedItemIdentifiers: (NSToolbar *)toolbar
{
return [NSArray arrayWithObjects: VLCBcastToolbarIdentifier, VLCSchedToolbarIdentifier, VLCVODToolbarIdentifier, NSToolbarFlexibleSpaceItemIdentifier, nil];
}
- (void)initStrings
{
/* not implemented */
}
- (void)showVLMWindow
{
[o_vlm_win makeKeyAndOrderFront: self];
}
- (void)addBcast
{
[NSApp beginSheet: o_bcast_panel modalForWindow: o_vlm_win
modalDelegate: self didEndSelector: nil contextInfo: nil];
}
- (void)addVOD
{
[NSApp beginSheet: o_vod_panel modalForWindow: o_vlm_win
modalDelegate: self didEndSelector: nil contextInfo: nil];
}
- (void)addSched
{
[NSApp beginSheet: o_sched_panel modalForWindow: o_vlm_win
modalDelegate: self didEndSelector: nil contextInfo: nil];
}
- (IBAction)bcastButtonAction:(id)sender
{
[NSApp endSheet: o_bcast_panel];
[o_bcast_panel close];
}
- (IBAction)listDoubleClickAction:(id)sender
{
}
- (IBAction)schedButtonAction:(id)sender
{
[NSApp endSheet: o_sched_panel];
[o_sched_panel close];
}
- (IBAction)vodButtonAction:(id)sender
{
[NSApp endSheet: o_vod_panel];
[o_vod_panel close];
}
- (int)numberOfRowsInTableView:(NSTableView *)aTableView
{
return 0;
}
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
{