2
2
* dialogs_provider.cpp : Dialog Provider
3
3
*****************************************************************************
4
4
* Copyright (C) 2006-2009 the VideoLAN team
5
* $Id: 13dbbfa86a924d4c4f736f2700162957174b6372 $
5
* $Id: 797b9edad339a69a50d46b30701427774d2010d8 $
7
7
* Authors: Clément Stenac <zorglub@videolan.org>
8
8
* Jean-Baptiste Kempf <jb@videolan.org>
498
498
QString dir = QFileDialog::getExistingDirectory( NULL, qtr( I_OP_DIR_WINTITLE ), p_intf->p_sys->filepath );
502
QString mrl = (dir.endsWith( "VIDEO_TS", Qt::CaseInsensitive ) ?
503
"dvd://" : "directory://")
504
+ toNativeSeparators( dir );
505
input_item_t *p_input = input_item_New( THEPL, qtu( mrl ), NULL );
507
/* FIXME: playlist_AddInput() can fail */
508
playlist_AddInput( THEPL, p_input,
509
go ? ( PLAYLIST_APPEND | PLAYLIST_GO ) : PLAYLIST_APPEND,
503
char *uri = make_URI( qtu( dir ) );
504
if( unlikely(uri == NULL) )
507
RecentsMRL::getInstance( p_intf )->addRecent( qfu(uri) );
509
input_item_t *p_input = input_item_New( THEPL, uri, NULL );
511
if( unlikely( p_input == NULL ) )
514
/* FIXME: playlist_AddInput() can fail */
515
playlist_AddInput( THEPL, p_input,
516
go ? ( PLAYLIST_APPEND | PLAYLIST_GO ) : PLAYLIST_APPEND,
510
517
PLAYLIST_END, pl, pl_Unlocked );
511
RecentsMRL::getInstance( p_intf )->addRecent( mrl );
513
input_Read( THEPL, p_input );
514
vlc_gc_decref( p_input );
519
input_Read( THEPL, p_input );
520
vlc_gc_decref( p_input );
518
523
void DialogsProvider::PLOpenDir()