#include "wizard.h"
#include "extended.h"
#include "bookmarks.h"
+#include "sfilters.h"
/*#include "update.h"*/
/*****************************************************************************
o_prefs = nil;
o_open = [[VLCOpen alloc] init];
o_wizard = [[VLCWizard alloc] init];
- o_extended = [[VLCExtended alloc] init];
+ o_extended = nil;
o_bookmarks = [[VLCBookmarks alloc] init];
+ o_sfilters = nil;
/*o_update = [[VLCUpdate alloc] init];*/
i_lastShownVolume = -1;
i_key = config_GetInt( p_intf, "key-next" );
[o_mi_next setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_next setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
- i_key = config_GetInt( p_intf, "key-jump+10sec" );
+ i_key = config_GetInt( p_intf, "key-jump+short" );
[o_mi_fwd setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_fwd setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
- i_key = config_GetInt( p_intf, "key-jump-10sec" );
+ i_key = config_GetInt( p_intf, "key-jump-short" );
[o_mi_bwd setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_bwd setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
- i_key = config_GetInt( p_intf, "key-jump+1min" );
+ i_key = config_GetInt( p_intf, "key-jump+medium" );
[o_mi_fwd1m setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_fwd1m setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
- i_key = config_GetInt( p_intf, "key-jump-1min" );
+ i_key = config_GetInt( p_intf, "key-jump-medium" );
[o_mi_bwd1m setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_bwd1m setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
- i_key = config_GetInt( p_intf, "key-jump+5min" );
+ i_key = config_GetInt( p_intf, "key-jump+long" );
[o_mi_fwd5m setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_fwd5m setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
- i_key = config_GetInt( p_intf, "key-jump-5min" );
+ i_key = config_GetInt( p_intf, "key-jump-long" );
[o_mi_bwd5m setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
[o_mi_bwd5m setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
i_key = config_GetInt( p_intf, "key-vol-up" );
nib_main_loaded = TRUE;
}
-- (void)dealloc
-{
- [o_about release];
- [o_prefs release];
- [o_open release];
- [o_extended release];
- [o_bookmarks release];
-
- [super dealloc];
-}
-
- (void)initStrings
{
[o_window setTitle: _NS("VLC - Controller")];
}
msleep( 500000 );
+ /* save the prefs if they were changed in the extended panel */
+ if (o_extended && [o_extended getConfigChanged])
+ {
+ [o_extended savePrefs];
+ }
+
+ /* release some other objects here, because it isn't sure whether dealloc
+ * will be called later on -- FK (10/6/05) */
+ if( nib_about_loaded && o_about )
+ [o_about release];
+
+ if( nib_open_loaded && o_open )
+ [o_open release];
+
+ if( nib_extended_loaded && o_extended )
+ {
+ [o_extended collapsAll];
+ [o_extended release];
+ }
+
+ if( nib_bookmarks_loaded && o_bookmarks )
+ [o_bookmarks release];
+
+ if( nib_wizard_loaded && o_wizard )
+ [o_wizard release];
+
if( o_img_pause_pressed != nil )
{
[o_img_pause_pressed release];
- (IBAction)showExtended:(id)sender
{
+ if ( o_extended == nil )
+ {
+ o_extended = [[VLCExtended alloc] init];
+ }
if (!nib_extended_loaded)
{
nib_extended_loaded = [NSBundle loadNibNamed:@"Extended" owner:self];
}
}
+- (IBAction)showSFilters:(id)sender
+{
+ if ( o_sfilters == nil )
+ {
+ o_sfilters = [[VLCsFilters alloc] init];
+ }
+ if (!nib_sfilters_loaded)
+ {
+ nib_sfilters_loaded = [NSBundle loadNibNamed:@"SFilters" owner:self];
+ [o_sfilters initStrings];
+ [o_sfilters showAsPanel];
+ } else {
+ [o_sfilters showAsPanel];
+ }
+}
+
- (IBAction)showBookmarks:(id)sender
{
/* we need the wizard-nib for the bookmarks's extract functionality */
if (!nib_wizard_loaded)
{
nib_wizard_loaded = [NSBundle loadNibNamed:@"Wizard" owner:self];
+ [o_wizard initStrings];
}
if (!nib_bookmarks_loaded)