#define WIZARD_OPTIONS_SAVING_LONGTEXT N_("Remember the options in the " \
"wizard during one session of VLC.")
+#define AUTOPLAY_OSX_TEST N_("Auto-playback of new items")
+#define AUTOPLAY_OSX_LONGTEXT N_("Start playback of new items immediately " \
+ "once they were added." )
+
vlc_module_begin();
set_description( _("Mac OS X interface") );
set_capability( "interface", 100 );
set_subcategory( SUBCAT_INTERFACE_MAIN );
add_bool( "macosx-embedded", 1, NULL, EMBEDDED_TEXT, EMBEDDED_LONGTEXT,
VLC_FALSE );
+ add_bool( "macosx-autoplay", 1, NULL, AUTOPLAY_OSX_TEST, AUTOPLAY_OSX_LONGTEXT,
+ VLC_FALSE );
add_bool( "macosx-wizard-keep", 1, NULL, WIZARD_OPTIONS_SAVING_TEXT,
WIZARD_OPTIONS_SAVING_LONGTEXT, VLC_TRUE );
/*****************************************************************************
* open.h: MacOS X module for vlc
*****************************************************************************
- * Copyright (C) 2002-2005 the VideoLAN team
+ * Copyright (C) 2002-2006 the VideoLAN team
* $Id$
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
* Derk-Jan Hartman <thedj@users.sourceforge.net>
+ * Felix K\9fhne <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
IBOutlet id o_output_ckbox;
IBOutlet id o_sout_options;
+
+ BOOL * b_autoplay;
}
+ (VLCOpen *)sharedInstance;
/*****************************************************************************
* open.m: MacOS X module for vlc
*****************************************************************************
- * Copyright (C) 2002-2005 the VideoLAN team
+ * Copyright (C) 2002-2006 the VideoLAN team
* $Id$
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
* Derk-Jan Hartman <thedj@users.sourceforge.net>
* Benjamin Pracht <bigben at videolan dot org>
+ * Felix K\9fhne <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
#include "playlist.h"
#include "open.h"
#include "output.h"
+#import <vlc/intf.h>
/*****************************************************************************
* GetEjectableMediaOfClass
- (void)openTarget:(int)i_type
{
int i_result;
+ intf_thread_t * p_intf = VLCIntf;
+
+ b_autoplay = (BOOL *)config_GetInt( VLCIntf, "macosx-autoplay" );
[o_tabview selectTabViewItemAtIndex: i_type];
[o_file_sub_ckbox setState: NSOffState];
o_dic = [NSMutableDictionary dictionaryWithObject: [o_mrl stringValue] forKey: @"ITEM_URL"];
if( [o_file_sub_ckbox state] == NSOnState )
{
- intf_thread_t * p_intf = VLCIntf;
module_config_t * p_item;
[o_options addObject: [NSString stringWithFormat: @"sub-file=%@", [o_file_sub_path stringValue]]];
@"access-filter=timeshift"]];
}
[o_dic setObject: (NSArray *)[o_options copy] forKey: @"ITEM_OPTIONS"];
- [o_playlist appendArray: [NSArray arrayWithObject: o_dic] atPos: -1 enqueue:NO];
+ if( b_autoplay )
+ [o_playlist appendArray: [NSArray arrayWithObject: o_dic] atPos: -1 enqueue:NO];
+ else
+ [o_playlist appendArray: [NSArray arrayWithObject: o_dic] atPos: -1 enqueue:YES];
}
}
{
NSOpenPanel *o_open_panel = [NSOpenPanel openPanel];
int i;
+ b_autoplay = (BOOL *)config_GetInt( VLCIntf, "macosx-autoplay" );
[o_open_panel setAllowsMultipleSelection: YES];
[o_open_panel setCanChooseDirectories: YES];
o_dic = [NSDictionary dictionaryWithObject:[o_values objectAtIndex:i] forKey:@"ITEM_URL"];
o_array = [o_array arrayByAddingObject: o_dic];
}
- [o_playlist appendArray: o_array atPos: -1 enqueue:NO];
+ if( b_autoplay )
+ [o_playlist appendArray: o_array atPos: -1 enqueue:NO];
+ else
+ [o_playlist appendArray: o_array atPos: -1 enqueue:YES];
}
}