]> git.sesse.net Git - vlc/commitdiff
Qt4: implement forgotten function in ML
authorJean-Baptiste Kempf <jb@videolan.org>
Fri, 12 Sep 2008 00:10:24 +0000 (17:10 -0700)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 12 Sep 2008 00:13:24 +0000 (17:13 -0700)
(cherry picked from commit ec6233e662b6af910aa676182fd52766f061000b)

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/gui/qt4/dialogs/open.cpp
modules/gui/qt4/dialogs/open.hpp
modules/gui/qt4/dialogs_provider.cpp

index 56567e5005299f4b6fa608a6e0c77220e8f3c34c..d46df3e5415e745744946ef8ddf3c6ec0447cdf8 100644 (file)
 OpenDialog *OpenDialog::instance = NULL;
 
 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 */
     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 )
     {
         /* Request the instance but change small details:
@@ -54,6 +55,7 @@ OpenDialog* OpenDialog::getInstance( QWidget *parent, intf_thread_t *p_intf,
                                       if the call is correct */
         }
         instance->i_action_flag = _action_flag;
+        instance->b_pl = _b_pl;
         instance->setMenuAction();
     }
     return instance;
@@ -62,9 +64,11 @@ OpenDialog* OpenDialog::getInstance( QWidget *parent, intf_thread_t *p_intf,
 OpenDialog::OpenDialog( QWidget *parent,
                         intf_thread_t *_p_intf,
                         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;
+    b_pl =_b_pl;
 
     /* Workaround the Win32 Vout that put the video on top at regular times */
 #ifdef WIN32
@@ -332,7 +336,7 @@ void OpenDialog::finish( bool b_enqueue = false )
             /* FIXME: playlist_AddInput() can fail */
             playlist_AddInput( THEPL, p_input,
                 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 );
         }
     }
index 291207e3d4a65641d62c9ee0446df0c4126426c4..ba4bb26e149ec539204bb0d317c74c78ccb6bd05 100644 (file)
@@ -62,7 +62,8 @@ class OpenDialog : public QVLCDialog
     Q_OBJECT;
 public:
     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()
     {
@@ -83,7 +84,7 @@ public slots:
 
 private:
     OpenDialog( QWidget *parent, intf_thread_t *, bool b_selectMode,
-                int _action_flag = 0 );
+                int _action_flag = 0, bool b_pl = true );
 
     static OpenDialog *instance;
     input_thread_t *p_input;
@@ -99,6 +100,7 @@ private:
     CaptureOpenPanel *captureOpenPanel;
 
     int i_action_flag;
+    bool b_pl;
     QStringList SeparateEntries( QString );
 
     QPushButton *cancelButton, *selectButton;
index 1443b4e09dc0cf33060f78d5a317b618c61fa00d..258da872e9b00d8b7f881fabc886148b2b274b1e 100644 (file)
@@ -336,9 +336,12 @@ void DialogsProvider::PLAppendDialog()
                             ->showTab( OPEN_FILE_TAB );
 }
 
-/* Unimplemmented yet - Usefull ? */
 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