Commit 1e67e5ee authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4: implement forgotten function in ML

(cherry picked from commit ec6233e662b6af910aa676182fd52766f061000b)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent fa2877de
...@@ -37,11 +37,12 @@ ...@@ -37,11 +37,12 @@
OpenDialog *OpenDialog::instance = NULL; OpenDialog *OpenDialog::instance = NULL;
OpenDialog* OpenDialog::getInstance( QWidget *parent, intf_thread_t *p_intf, OpenDialog* OpenDialog::getInstance( QWidget *parent, intf_thread_t *p_intf,
bool b_rawInstance, int _action_flag, bool b_selectMode ) bool b_rawInstance, int _action_flag, bool b_selectMode, bool _b_pl )
{ {
/* Creation */ /* Creation */
if( !instance ) if( !instance )
instance = new OpenDialog( parent, p_intf, b_selectMode, _action_flag ); instance = new OpenDialog( parent, p_intf, b_selectMode,
_action_flag, _b_pl );
else if( !b_rawInstance ) else if( !b_rawInstance )
{ {
/* Request the instance but change small details: /* Request the instance but change small details:
...@@ -54,6 +55,7 @@ OpenDialog* OpenDialog::getInstance( QWidget *parent, intf_thread_t *p_intf, ...@@ -54,6 +55,7 @@ OpenDialog* OpenDialog::getInstance( QWidget *parent, intf_thread_t *p_intf,
if the call is correct */ if the call is correct */
} }
instance->i_action_flag = _action_flag; instance->i_action_flag = _action_flag;
instance->b_pl = _b_pl;
instance->setMenuAction(); instance->setMenuAction();
} }
return instance; return instance;
...@@ -62,9 +64,11 @@ OpenDialog* OpenDialog::getInstance( QWidget *parent, intf_thread_t *p_intf, ...@@ -62,9 +64,11 @@ OpenDialog* OpenDialog::getInstance( QWidget *parent, intf_thread_t *p_intf,
OpenDialog::OpenDialog( QWidget *parent, OpenDialog::OpenDialog( QWidget *parent,
intf_thread_t *_p_intf, intf_thread_t *_p_intf,
bool b_selectMode, bool b_selectMode,
int _action_flag ) : QVLCDialog( parent, _p_intf ) int _action_flag,
bool _b_pl) : QVLCDialog( parent, _p_intf )
{ {
i_action_flag = _action_flag; i_action_flag = _action_flag;
b_pl =_b_pl;
/* Workaround the Win32 Vout that put the video on top at regular times */ /* Workaround the Win32 Vout that put the video on top at regular times */
#ifdef WIN32 #ifdef WIN32
...@@ -332,7 +336,7 @@ void OpenDialog::finish( bool b_enqueue = false ) ...@@ -332,7 +336,7 @@ void OpenDialog::finish( bool b_enqueue = false )
/* FIXME: playlist_AddInput() can fail */ /* FIXME: playlist_AddInput() can fail */
playlist_AddInput( THEPL, p_input, playlist_AddInput( THEPL, p_input,
PLAYLIST_APPEND | ( b_start ? PLAYLIST_GO : PLAYLIST_PREPARSE ), PLAYLIST_APPEND | ( b_start ? PLAYLIST_GO : PLAYLIST_PREPARSE ),
PLAYLIST_END, true, pl_Unlocked ); PLAYLIST_END, b_pl ? true : false, pl_Unlocked );
vlc_gc_decref( p_input ); vlc_gc_decref( p_input );
} }
} }
......
...@@ -62,7 +62,8 @@ class OpenDialog : public QVLCDialog ...@@ -62,7 +62,8 @@ class OpenDialog : public QVLCDialog
Q_OBJECT; Q_OBJECT;
public: public:
static OpenDialog * getInstance( QWidget *parent, intf_thread_t *p_intf, static OpenDialog * getInstance( QWidget *parent, intf_thread_t *p_intf,
bool b_rawInstance = false, int _action_flag = 0, bool b_selectMode = false ); bool b_rawInstance = false, int _action_flag = 0,
bool b_selectMode = false, bool b_pl = true );
static void killInstance() static void killInstance()
{ {
...@@ -83,7 +84,7 @@ public slots: ...@@ -83,7 +84,7 @@ public slots:
private: private:
OpenDialog( QWidget *parent, intf_thread_t *, bool b_selectMode, OpenDialog( QWidget *parent, intf_thread_t *, bool b_selectMode,
int _action_flag = 0 ); int _action_flag = 0, bool b_pl = true );
static OpenDialog *instance; static OpenDialog *instance;
input_thread_t *p_input; input_thread_t *p_input;
...@@ -99,6 +100,7 @@ private: ...@@ -99,6 +100,7 @@ private:
CaptureOpenPanel *captureOpenPanel; CaptureOpenPanel *captureOpenPanel;
int i_action_flag; int i_action_flag;
bool b_pl;
QStringList SeparateEntries( QString ); QStringList SeparateEntries( QString );
QPushButton *cancelButton, *selectButton; QPushButton *cancelButton, *selectButton;
......
...@@ -336,9 +336,12 @@ void DialogsProvider::PLAppendDialog() ...@@ -336,9 +336,12 @@ void DialogsProvider::PLAppendDialog()
->showTab( OPEN_FILE_TAB ); ->showTab( OPEN_FILE_TAB );
} }
/* Unimplemmented yet - Usefull ? */
void DialogsProvider::MLAppendDialog() void DialogsProvider::MLAppendDialog()
{} {
OpenDialog::getInstance( p_intf->p_sys->p_mi, p_intf, false,
OPEN_AND_ENQUEUE, false, false )
->showTab( OPEN_FILE_TAB );
}
/** /**
* Simple open * Simple open
......
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