#include "menus.hpp"
#include "recents.hpp"
#include "util/qt_dirs.hpp"
+#include "util/customwidgets.hpp" /* VLCKeyToString() */
+#include "main_interface.hpp"
/* The dialogs */
#include "dialogs/playlist.hpp"
#include "dialogs/toolbar.hpp"
#include "dialogs/plugins.hpp"
#include "dialogs/external.hpp"
+#include "dialogs/epg.hpp"
+#include "dialogs/errors.hpp"
#include <QEvent>
#include <QApplication>
#include <QSignalMapper>
#include <QFileDialog>
+#define I_OP_DIR_WINTITLE I_DIR_OR_FOLDER( N_("Open Directory"), \
+ N_("Open Folder") )
DialogsProvider* DialogsProvider::instance = NULL;
DialogsProvider::DialogsProvider( intf_thread_t *_p_intf ) :
- QObject( NULL ), p_intf( _p_intf )
+ QObject( NULL ), p_intf( _p_intf ),
+ popupMenu( NULL ),
+ videoPopupMenu( NULL ),
+ audioPopupMenu( NULL ),
+ miscPopupMenu( NULL )
{
b_isDying = false;
SDMapper = new QSignalMapper();
CONNECT( SDMapper, mapped (QString), this, SDMenuAction( QString ) );
- DialogHandler *dialogHandler = new DialogHandler (p_intf, this );
+ new DialogHandler (p_intf, this );
}
DialogsProvider::~DialogsProvider()
PlaylistDialog::killInstance();
MediaInfoDialog::killInstance();
MessagesDialog::killInstance();
- ExtendedDialog::killInstance();
BookmarksDialog::killInstance();
HelpDialog::killInstance();
#ifdef UPDATE_CHECK
UpdateDialog::killInstance();
#endif
+ PluginDialog::killInstance();
+ EpgDialog::killInstance();
delete menusMapper;
delete menusUpdateMapper;
delete SDMapper;
+
+ delete popupMenu;
+ delete videoPopupMenu;
+ delete audioPopupMenu;
+ delete miscPopupMenu;
}
void DialogsProvider::quit()
void DialogsProvider::customEvent( QEvent *event )
{
- if( event->type() == (int)DialogEvent_Type )
+ if( event->type() == DialogEvent::DialogEvent_Type )
{
DialogEvent *de = static_cast<DialogEvent*>(event);
switch( de->i_dialog )
bookmarksDialog(); break;
case INTF_DIALOG_EXTENDED:
extendedDialog(); break;
+ case INTF_DIALOG_SENDKEY:
+ sendKey( de->i_arg ); break;
#ifdef ENABLE_VLM
case INTF_DIALOG_VLM:
vlmDialog(); break;
#endif
case INTF_DIALOG_POPUPMENU:
- QVLCMenu::PopupMenu( p_intf, (de->i_arg != 0) ); break;
+ {
+ delete popupMenu; popupMenu = NULL;
+ bool show = (de->i_arg != 0);
+ if( show )
+ popupMenu = VLCMenuBar::PopupMenu( p_intf, show );
+ break;
+ }
case INTF_DIALOG_AUDIOPOPUPMENU:
- QVLCMenu::AudioPopupMenu( p_intf ); break;
+ {
+ delete audioPopupMenu; audioPopupMenu = NULL;
+ bool show = (de->i_arg != 0);
+ if( show )
+ audioPopupMenu = VLCMenuBar::AudioPopupMenu( p_intf, show );
+ break;
+ }
case INTF_DIALOG_VIDEOPOPUPMENU:
- QVLCMenu::VideoPopupMenu( p_intf ); break;
+ {
+ delete videoPopupMenu; videoPopupMenu = NULL;
+ bool show = (de->i_arg != 0);
+ if( show )
+ videoPopupMenu = VLCMenuBar::VideoPopupMenu( p_intf, show );
+ break;
+ }
case INTF_DIALOG_MISCPOPUPMENU:
- QVLCMenu::MiscPopupMenu( p_intf ); break;
+ {
+ delete miscPopupMenu; miscPopupMenu = NULL;
+ bool show = (de->i_arg != 0);
+ if( show )
+ miscPopupMenu = VLCMenuBar::MiscPopupMenu( p_intf, show );
+ break;
+ }
case INTF_DIALOG_WIZARD:
case INTF_DIALOG_STREAMWIZARD:
openAndStreamingDialogs(); break;
/****************************************************************************
* Individual simple dialogs
****************************************************************************/
+const QEvent::Type DialogEvent::DialogEvent_Type =
+ (QEvent::Type)QEvent::registerEventType();
+
void DialogsProvider::playlistDialog()
{
PlaylistDialog::getInstance( p_intf )->toggleVisible();
void DialogsProvider::extendedDialog()
{
- ExtendedDialog::getInstance( p_intf )->showTab( 0 );
+ ExtendedDialog *extDialog = ExtendedDialog::getInstance(p_intf );
+
+ if( !extDialog->isVisible() || /* Hidden */
+ extDialog->currentTab() != 0 ) /* wrong tab */
+ extDialog->showTab( 0 );
+ else
+ extDialog->hide();
}
void DialogsProvider::synchroDialog()
{
- ExtendedDialog::getInstance( p_intf )->showTab( 2 );
+ ExtendedDialog *extDialog = ExtendedDialog::getInstance(p_intf );
+
+ if( !extDialog->isVisible() || /* Hidden */
+ extDialog->currentTab() != 2 ) /* wrong tab */
+ extDialog->showTab( 2 );
+ else
+ extDialog->hide();
}
void DialogsProvider::messagesDialog()
void DialogsProvider::mediaInfoDialog()
{
- MediaInfoDialog::getInstance( p_intf )->showTab( 0 );
+ MediaInfoDialog::getInstance( p_intf )->showTab( MediaInfoDialog::META_PANEL );
}
void DialogsProvider::mediaCodecDialog()
{
- MediaInfoDialog::getInstance( p_intf )->showTab( 2 );
+ MediaInfoDialog::getInstance( p_intf )->showTab( MediaInfoDialog::INFO_PANEL );
}
void DialogsProvider::bookmarksDialog()
void DialogsProvider::pluginDialog()
{
- PluginDialog *diag = new PluginDialog( p_intf );
- diag->show();
+ PluginDialog::getInstance( p_intf )->toggleVisible();
+}
+
+void DialogsProvider::epgDialog()
+{
+ EpgDialog::getInstance( p_intf )->toggleVisible();
+}
+
+void DialogsProvider::setPopupMenu()
+{
+ delete popupMenu;
+ popupMenu = VLCMenuBar::PopupMenu( p_intf, true );
+}
+
+void DialogsProvider::destroyPopupMenu()
+{
+ delete popupMenu;
+ popupMenu = NULL;
}
/* Generic open file */
/* Save */
if( p_arg->b_save )
{
- QString file = QFileDialog::getSaveFileName( NULL, p_arg->psz_title,
+ QString file = QFileDialog::getSaveFileName( NULL,
+ qfu( p_arg->psz_title ),
p_intf->p_sys->filepath, extensions );
if( !file.isEmpty() )
{
else /* non-save mode */
{
QStringList files = QFileDialog::getOpenFileNames( NULL,
- p_arg->psz_title, p_intf->p_sys->filepath,
+ qfu( p_arg->psz_title ), p_intf->p_sys->filepath,
extensions );
p_arg->i_results = files.count();
p_arg->psz_results = (char **)malloc( p_arg->i_results * sizeof( char * ) );
i = 0;
foreach( const QString &file, files )
p_arg->psz_results[i++] = strdup( qtu( toNativeSepNoSlash( file ) ) );
+ if(i == 0)
+ p_intf->p_sys->filepath = QString::fromLatin1("");
+ else
+ p_intf->p_sys->filepath = qfu( p_arg->psz_results[i-1] );
}
/* Callback */
/**
* Simple open
***/
-QStringList DialogsProvider::showSimpleOpen( QString help,
+QStringList DialogsProvider::showSimpleOpen( const QString& help,
int filters,
- QString path )
+ const QString& path )
{
QString fileTypes = "";
if( filters & EXT_FILTER_MEDIA ) {
- ADD_FILTER_MEDIA( fileTypes );
+ ADD_EXT_FILTER( fileTypes, EXTENSIONS_MEDIA );
}
if( filters & EXT_FILTER_VIDEO ) {
- ADD_FILTER_VIDEO( fileTypes );
+ ADD_EXT_FILTER( fileTypes, EXTENSIONS_VIDEO );
}
if( filters & EXT_FILTER_AUDIO ) {
- ADD_FILTER_AUDIO( fileTypes );
+ ADD_EXT_FILTER( fileTypes, EXTENSIONS_AUDIO );
}
if( filters & EXT_FILTER_PLAYLIST ) {
- ADD_FILTER_PLAYLIST( fileTypes );
+ ADD_EXT_FILTER( fileTypes, EXTENSIONS_PLAYLIST );
}
if( filters & EXT_FILTER_SUBTITLE ) {
- ADD_FILTER_SUBTITLE( fileTypes );
+ ADD_EXT_FILTER( fileTypes, EXTENSIONS_SUBTITLE );
}
- ADD_FILTER_ALL( fileTypes );
+ ADD_EXT_FILTER( fileTypes, EXTENSIONS_ALL );
fileTypes.replace( ";*", " *");
- return QFileDialog::getOpenFileNames( NULL,
+ QStringList files = QFileDialog::getOpenFileNames( NULL,
help.isEmpty() ? qtr(I_OP_SEL_FILES ) : help,
path.isEmpty() ? p_intf->p_sys->filepath : path,
fileTypes );
+
+ if( !files.isEmpty() ) savedirpathFromFile( files.last() );
+
+ return files;
}
/**
void DialogsProvider::addFromSimple( bool pl, bool go)
{
QStringList files = DialogsProvider::showSimpleOpen();
- int i = 0;
+
+ bool first = go;
files.sort();
foreach( const QString &file, files )
{
- playlist_Add( THEPL, qtu( toNativeSeparators( file ) ), NULL,
- go ? ( PLAYLIST_APPEND | ( i ? 0 : PLAYLIST_GO ) |
- ( i ? PLAYLIST_PREPARSE : 0 ) )
- : ( PLAYLIST_APPEND | PLAYLIST_PREPARSE ),
- PLAYLIST_END,
- pl ? true : false, false );
- RecentsMRL::getInstance( p_intf )->addRecent(
- toNativeSeparators( file ) );
- i++;
+ QString url = toURI( toNativeSeparators( file ) );
+ Open::openMRL( p_intf, url, first, pl);
+ first = false;
}
}
addFromSimple( true, true ); /* Playlist and Go */
}
-void DialogsProvider::simplePLAppendDialog()
-{
- addFromSimple( true, false );
-}
-
-void DialogsProvider::simpleMLAppendDialog()
-{
- addFromSimple( false, false );
-}
-
/* Url & Clipboard */
/**
* Open a MRL.
**/
void DialogsProvider::openUrlDialog()
{
- OpenUrlDialog *oud = OpenUrlDialog::getInstance( p_intf->p_sys->p_mi,
- p_intf );
- if( oud->exec() == QDialog::Accepted )
+ OpenUrlDialog oud( p_intf );
+ if( oud.exec() != QDialog::Accepted )
+ return;
+
+ QString url = oud.url();
+ if( url.isEmpty() )
+ return;
+
+ if( !url.contains( qfu( "://" ) ) )
{
- QString url = oud->url();
- if( !url.isEmpty() )
- {
- playlist_Add( THEPL, qtu( url ),
- NULL, !oud->shouldEnqueue() ?
- ( PLAYLIST_APPEND | PLAYLIST_GO )
- : ( PLAYLIST_APPEND | PLAYLIST_PREPARSE ),
- PLAYLIST_END, true, false );
- RecentsMRL::getInstance( p_intf )->addRecent( url );
- }
+ char *uri = vlc_path2uri( qtu( url ), NULL );
+ if( uri == NULL )
+ return;
+ url = qfu(uri);
+ free( uri );
}
+
+ Open::openMRL( p_intf, qtu(url), !oud.shouldEnqueue() );
}
/* Directory */
**/
static void openDirectory( intf_thread_t *p_intf, bool pl, bool go )
{
- QString dir = QFileDialog::getExistingDirectory( NULL, qtr("Open Directory") );
+ QString uri = DialogsProvider::getDirectoryDialog( p_intf );
+ if( !uri.isEmpty() )
+ Open::openMRL( p_intf, uri, go, pl );
+}
+
+QString DialogsProvider::getDirectoryDialog( intf_thread_t *p_intf )
+{
+ QString dir = QFileDialog::getExistingDirectory( NULL,
+ qtr( I_OP_DIR_WINTITLE ), p_intf->p_sys->filepath );
+
+ if( dir.isEmpty() ) return QString();
+
+ p_intf->p_sys->filepath = dir;
- if (!dir.isEmpty() )
+ const char *scheme = "directory";
+ if( dir.endsWith( DIR_SEP "VIDEO_TS", Qt::CaseInsensitive ) )
+ scheme = "dvd";
+ else if( dir.endsWith( DIR_SEP "BDMV", Qt::CaseInsensitive ) )
{
- QString mrl = dir.endsWith( "VIDEO_TS", Qt::CaseInsensitive ) ?
- "dvd://" : "directory://" + toNativeSeparators( dir );
- input_item_t *p_input = input_item_New( THEPL, qtu( mrl ), NULL );
-
- /* FIXME: playlist_AddInput() can fail */
- playlist_AddInput( THEPL, p_input,
- go ? ( PLAYLIST_APPEND | PLAYLIST_GO ) : PLAYLIST_APPEND,
- PLAYLIST_END, pl, pl_Unlocked );
- RecentsMRL::getInstance( p_intf )->addRecent( mrl );
- if( !go )
- input_Read( THEPL, p_input, true );
- vlc_gc_decref( p_input );
+ scheme = "bluray";
+ dir.remove( "BDMV" );
}
+
+ char *uri = vlc_path2uri( qtu( toNativeSeparators( dir ) ), scheme );
+ if( unlikely(uri == NULL) )
+ return QString();
+
+ dir = qfu( uri );
+ free( uri );
+
+ RecentsMRL::getInstance( p_intf )->addRecent( dir );
+
+ return dir;
}
void DialogsProvider::PLOpenDir()
openDirectory( p_intf, true, false );
}
-void DialogsProvider::MLAppendDir()
-{
- openDirectory( p_intf, false , false );
-}
-
/****************
* Playlist *
****************/
}
}
-void DialogsProvider::saveAPlaylist()
+void DialogsProvider::saveAPlaylist(playlist_t *p_playlist, playlist_item_t *p_node)
{
- QFileDialog *qfd = new QFileDialog( NULL,
- qtr( "Save playlist as..." ),
- p_intf->p_sys->filepath,
- qtr( "XSPF playlist (*.xspf);; " ) +
- qtr( "M3U playlist (*.m3u);; " ) +
- qtr( "HTML playlist (*.html)" ) );
- qfd->setFileMode( QFileDialog::AnyFile );
- qfd->setAcceptMode( QFileDialog::AcceptSave );
- qfd->setConfirmOverwrite( true );
+ static const struct
+ {
+ char filter_name[14];
+ char filter_patterns[5];
+ char module[12];
+ } types[] = {
+ { N_("XSPF playlist"), "xspf", "export-xspf", },
+ { N_("M3U playlist"), "m3u", "export-m3u", },
+ { N_("M3U8 playlist"), "m3u8", "export-m3u8", },
+ { N_("HTML playlist"), "html", "export-html", },
+ };
+
+ QStringList filters;
+ QString ext = getSettings()->value( "last-playlist-ext" ).toString();
+
+ for( size_t i = 0; i < sizeof (types) / sizeof (types[0]); i++ )
+ {
+ QString tmp = qfu( vlc_gettext( types[i].filter_name ) ) + " (*." + types[i].filter_patterns + ")";
+ if( ext == qfu( types[i].filter_patterns ) )
+ filters.insert( 0, tmp );
+ else
+ filters.append( tmp );
+ }
+
+ QString selected;
+ QString file = QFileDialog::getSaveFileName( NULL,
+ qtr( "Save playlist as..." ),
+ p_intf->p_sys->filepath, filters.join( ";;" ),
+ &selected );
+ const char *psz_selected_module = NULL;
+ const char *psz_last_playlist_ext = NULL;
- if( qfd->exec() == QDialog::Accepted )
+ if( file.isEmpty() )
+ return;
+
+ /* First test if the file extension is set, and different to selected filter */
+ for( size_t i = 0; i < sizeof (types) / sizeof (types[0]); i++)
{
- if( qfd->selectedFiles().count() > 0 )
+ if ( file.endsWith( QString( "." ) + qfu( types[i].filter_patterns ) ) )
{
- static const char psz_xspf[] = "export-xspf",
- psz_m3u[] = "export-m3u",
- psz_html[] = "export-html";
- const char *psz_module;
-
- QString file = qfd->selectedFiles().first();
- QString filter = qfd->selectedFilter();
+ psz_selected_module = types[i].module;
+ psz_last_playlist_ext = types[i].filter_patterns;
+ break;
+ }
+ }
- if( file.contains( ".xsp" ) || filter.contains( "XSPF" ) )
- {
- psz_module = psz_xspf;
- if( !file.contains( ".xsp" ) )
- file.append( ".xspf" );
- }
- else if( file.contains( ".m3u" ) || filter.contains( "M3U" ) )
- {
- psz_module = psz_m3u;
- if( !file.contains( ".m3u" ) )
- file.append( ".m3u" );
- }
- else if( file.contains(".html" ) || filter.contains( "HTML" ) )
- {
- psz_module = psz_html;
- if( !file.contains( "html" ) )
- file.append( ".html" );
- }
- else
+ /* otherwise apply the selected extension */
+ if ( !psz_last_playlist_ext )
+ {
+ for( size_t i = 0; i < sizeof (types) / sizeof (types[0]); i++)
+ {
+ if ( selected.startsWith( qfu( vlc_gettext( types[i].filter_name ) ) ) )
{
- msg_Err( p_intf, "Impossible to recognise the file type" );
- delete qfd;
- return;
+ psz_selected_module = types[i].module;
+ psz_last_playlist_ext = types[i].filter_patterns;
+ /* Fix file extension */
+ file = file.append( QString( "." ) + qfu( psz_last_playlist_ext ) );
+ break;
}
-
- playlist_Export( THEPL, qtu( toNativeSeparators( file ) ),
- THEPL->p_local_category, psz_module);
}
}
- delete qfd;
+
+ if ( psz_selected_module )
+ {
+ playlist_Export( p_playlist, qtu( toNativeSeparators( file ) ),
+ p_node, psz_selected_module );
+ getSettings()->setValue( "last-playlist-ext", psz_last_playlist_ext );
+ }
+}
+
+void DialogsProvider::savePlayingToPlaylist()
+{
+ saveAPlaylist(THEPL, THEPL->p_playing);
+}
+
+void DialogsProvider::saveRecentsToPlaylist()
+{
+ playlist_item_t *p_node_recents = RecentsMRL::getInstance(p_intf)->toPlaylist(0);
+
+ if (p_node_recents == NULL)
+ {
+ msg_Warn(p_intf, "cannot create playlist from recents");
+ return;
+ }
+
+ saveAPlaylist(THEPL, p_node_recents);
+ playlist_NodeDelete(THEPL, p_node_recents, true, false);
}
/****************************************************************************
****************************************************************************/
void DialogsProvider::streamingDialog( QWidget *parent,
- QString mrl,
+ const QString& mrl,
bool b_transcode_only,
QStringList options )
{
- char *psz_soutoption;
+ QString soutoption;
/* Stream */
if( !b_transcode_only )
{
SoutDialog *s = new SoutDialog( parent, p_intf, mrl );
+ s->setAttribute( Qt::WA_QuitOnClose, false ); // See #4883
if( s->exec() == QDialog::Accepted )
{
- psz_soutoption = strdup( qtu( s->getMrl() ) );
+ soutoption = s->getMrl();
delete s;
}
else
} else {
/* Convert */
ConvertDialog *s = new ConvertDialog( parent, p_intf, mrl );
+ s->setAttribute( Qt::WA_QuitOnClose, false ); // See #4883
if( s->exec() == QDialog::Accepted )
{
- psz_soutoption = strdup( qtu( s->getMrl() ) );
+ soutoption = s->getMrl();
delete s;
}
else
}
/* Get SoutMRL */
- if( !EMPTY_STR( psz_soutoption ) )
+ if( !soutoption.isEmpty() )
{
- options += QString( psz_soutoption ).split( " :");
-
- /* Create Input */
- input_item_t *p_input;
- p_input = input_item_New( p_intf, qtu( mrl ), _("Streaming") );
-
- /* Add normal Options */
- for( int j = 0; j < options.size(); j++ )
- {
- QString qs = colon_unescape( options[j] );
- if( !qs.isEmpty() )
- {
- input_item_AddOption( p_input, qtu( qs ),
- VLC_INPUT_OPTION_TRUSTED );
- msg_Dbg( p_intf, "Adding option: %s", qtu( qs ) );
- }
- }
-
- /* Switch between enqueuing and starting the item */
- /* FIXME: playlist_AddInput() can fail */
- playlist_AddInput( THEPL, p_input,
- PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, true, pl_Unlocked );
- vlc_gc_decref( p_input );
+ options += soutoption.split( " :");
- RecentsMRL::getInstance( p_intf )->addRecent( mrl );
+ Open::openMRLwithOptions( p_intf, mrl, &options, true, true, _("Streaming") );
}
- free( psz_soutoption );
}
void DialogsProvider::openAndStreamingDialogs()
if( !p_item ) return;
char *path = input_item_GetURI( p_item );
- if( !path ) path = strdup( "" );
-
- char *sep = strrchr( path, DIR_SEP_CHAR );
- if( sep ) *sep = '\0';
+ char *path2 = NULL;
+ if( path )
+ {
+ path2 = make_path( path );
+ free( path );
+ if( path2 )
+ {
+ char *sep = strrchr( path2, DIR_SEP_CHAR );
+ if( sep ) *sep = '\0';
+ }
+ }
QStringList qsl = showSimpleOpen( qtr( "Open subtitles..." ),
EXT_FILTER_SUBTITLE,
- path );
- free( path );
+ qfu( path2 ) );
+ free( path2 );
foreach( const QString &qsFile, qsl )
{
- if( input_AddSubtitle( p_input, qtu( toNativeSeparators( qsFile ) ),
- true ) )
+ if( input_AddSubtitleOSD( p_input, qtu( toNativeSeparators( qsFile ) ),
+ true, true ) )
msg_Warn( p_intf, "unable to load subtitles from '%s'",
qtu( qsFile ) );
}
void DialogsProvider::menuAction( QObject *data )
{
- QVLCMenu::DoAction( data );
+ VLCMenuBar::DoAction( data );
}
void DialogsProvider::menuUpdateAction( QObject *data )
func->doFunc( p_intf );
}
-void DialogsProvider::SDMenuAction( QString data )
+void DialogsProvider::SDMenuAction( const QString& data )
{
- char *psz_sd = strdup( qtu( data ) );
- if( !playlist_IsServicesDiscoveryLoaded( THEPL, psz_sd ) )
- playlist_ServicesDiscoveryAdd( THEPL, psz_sd );
+ if( !playlist_IsServicesDiscoveryLoaded( THEPL, qtu( data ) ) )
+ playlist_ServicesDiscoveryAdd( THEPL, qtu( data ) );
else
- playlist_ServicesDiscoveryRemove( THEPL, psz_sd );
- free( psz_sd );
-}
-
-/**
- * Play the MRL contained in the Recently played menu.
- **/
-void DialogsProvider::playMRL( const QString &mrl )
-{
- playlist_Add( THEPL, qtu( mrl ) , NULL,
- PLAYLIST_APPEND | PLAYLIST_GO , PLAYLIST_END, true, false );
-
- RecentsMRL::getInstance( p_intf )->addRecent( mrl );
+ playlist_ServicesDiscoveryRemove( THEPL, qtu( data ) );
+}
+
+void DialogsProvider::sendKey( int key )
+{
+ // translate from a vlc keycode into a Qt sequence
+ QKeySequence kseq0( VLCKeyToString( key, true ) );
+
+ if( popupMenu == NULL )
+ {
+ // make sure at least a non visible popupmenu is available
+ popupMenu = VLCMenuBar::PopupMenu( p_intf, false );
+ if( unlikely( popupMenu == NULL ) )
+ return;
+ }
+
+ // test against key accelerators from the popupmenu
+ QList<QAction*> actions = popupMenu->findChildren<QAction*>();
+ for( int i = 0; i < actions.size(); i++ )
+ {
+ QAction* action = actions.at(i);
+ QKeySequence kseq = action->shortcut();
+ if( kseq == kseq0 )
+ {
+ action->trigger();
+ return;
+ }
+ }
+
+ // forward key to vlc core when not a key accelerator
+ var_SetInteger( p_intf->p_libvlc, "key-pressed", key );
}