#include "dialogs_provider.hpp"
#include "recents.hpp"
+#include "util/qt_dirs.hpp"
#include <QTabWidget>
#include <QGridLayout>
#include <QRegExp>
#include <QMenu>
+#define DEBUG_QT 1
+
OpenDialog *OpenDialog::instance = NULL;
OpenDialog* OpenDialog::getInstance( QWidget *parent, intf_thread_t *p_intf,
/* Basic Creation of the Window */
ui.setupUi( this );
- setWindowTitle( qtr( "Open a Media" ) );
+ setWindowTitle( qtr( "Open Media" ) );
/* Tab definition and creation */
fileOpenPanel = new FileOpenPanel( this, p_intf );
newCachingMethod( "file-caching" );
setMinimumSize( sizeHint() );
+ setMaximumWidth( 900 );
resize( getSettings()->value( "opendialog-size", QSize( 500, 490 ) ).toSize() );
}
if( i == 0 )
{
/* Take options from the UI, not from what we stored */
- QStringList optionsList = ui.advancedLineInput->text().split( ":" );
+ QStringList optionsList = ui.advancedLineInput->text().split( " :" );
/* Insert options */
for( int j = 0; j < optionsList.size(); j++ )
{
- QString qs = optionsList[j].trimmed();
+ QString qs = colon_unescape( optionsList[j] );
if( !qs.isEmpty() )
{
- input_item_AddOption( p_input, qtu( qs ), VLC_INPUT_OPTION_TRUSTED );
- // msg_Err( p_intf, "Here %s", qtu( qs ));
+ input_item_AddOption( p_input, qtu( qs ),
+ VLC_INPUT_OPTION_TRUSTED );
+#ifdef DEBUG_QT
+ msg_Warn( p_intf, "Input option: %s", qtu( qs ) );
+#endif
}
}
}
void OpenDialog::stream( bool b_transcode_only )
{
- QString soutMRL = getMRL();
+ QString soutMRL = getMRL( false );
if( soutMRL.isEmpty() ) return;
toggleVisible();
/* Dbg and send :D */
msg_Dbg( p_intf, "MRL passed to the Sout: %s", qtu( soutMRL ) );
- THEDP->streamingDialog( this, soutMRL, b_transcode_only );
+ THEDP->streamingDialog( this, soutMRL, b_transcode_only,
+ ui.advancedLineInput->text().split( ":" ) );
}
/* Update the MRL */