Commit cf3f7fdb authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Qt4: FileOpenPanel generates proper URLs, simplify

This fixes the streaming wizard. We can now remove a few make_URI()
calls.
parent 1bd04d54
...@@ -279,13 +279,13 @@ void FileOpenPanel::updateMRL() ...@@ -279,13 +279,13 @@ void FileOpenPanel::updateMRL()
for( int i = 0; i < ui.fileListWidg->count(); i++ ) for( int i = 0; i < ui.fileListWidg->count(); i++ )
{ {
if( !ui.fileListWidg->item( i )->text().isEmpty() ) if( !ui.fileListWidg->item( i )->text().isEmpty() )
fileList << ui.fileListWidg->item( i )->text(); fileList << toURI(ui.fileListWidg->item( i )->text());
} }
else else
{ {
fileList = dialogBox->selectedFiles(); fileList = dialogBox->selectedFiles();
for( int i = 0; i < fileList.count(); i++ ) for( int i = 0; i < fileList.count(); i++ )
fileList[i] = toNativeSeparators( fileList[i] ); fileList[i] = toURI( fileList[i] );
} }
/* Options */ /* Options */
......
...@@ -350,9 +350,7 @@ void OpenDialog::finish( bool b_enqueue = false ) ...@@ -350,9 +350,7 @@ void OpenDialog::finish( bool b_enqueue = false )
bool b_start = !i && !b_enqueue; bool b_start = !i && !b_enqueue;
input_item_t *p_input; input_item_t *p_input;
char* psz_uri = make_URI( qtu( itemsMRL[i] ), "file" ); p_input = input_item_New( p_intf, qtu( itemsMRL[i] ), NULL );
p_input = input_item_New( p_intf, psz_uri, NULL );
free( psz_uri );
/* Insert options only for the first element. /* Insert options only for the first element.
We don't know how to edit that anyway. */ We don't know how to edit that anyway. */
......
...@@ -729,10 +729,7 @@ void DialogsProvider::SDMenuAction( const QString& data ) ...@@ -729,10 +729,7 @@ void DialogsProvider::SDMenuAction( const QString& data )
**/ **/
void DialogsProvider::playMRL( const QString &mrl ) void DialogsProvider::playMRL( const QString &mrl )
{ {
char* psz_uri = make_URI( qtu(mrl), NULL ); playlist_Add( THEPL, qtu(mrl), NULL,
playlist_Add( THEPL, psz_uri, NULL,
PLAYLIST_APPEND | PLAYLIST_GO , PLAYLIST_END, true, false ); PLAYLIST_APPEND | PLAYLIST_GO , PLAYLIST_END, true, false );
free( psz_uri );
RecentsMRL::getInstance( p_intf )->addRecent( mrl ); RecentsMRL::getInstance( p_intf )->addRecent( mrl );
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment