[vlc-devel] commit: Qt4: implement forgotten function in ML (Jean-Baptiste Kempf )

git version control git at videolan.org
Fri Sep 12 02:09:17 CEST 2008


vlc | branch: 0.9-bugfix | Jean-Baptiste Kempf <jb at videolan.org> | Thu Sep 11 17:10:24 2008 -0700| [ec6233e662b6af910aa676182fd52766f061000b] | committer: Jean-Baptiste Kempf 

Qt4: implement forgotten function in ML

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ec6233e662b6af910aa676182fd52766f061000b
---

 modules/gui/qt4/dialogs/open.cpp     |   12 ++++++++----
 modules/gui/qt4/dialogs/open.hpp     |    6 ++++--
 modules/gui/qt4/dialogs_provider.cpp |    7 +++++--
 3 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/modules/gui/qt4/dialogs/open.cpp b/modules/gui/qt4/dialogs/open.cpp
index ddf42ae..1daf24d 100644
--- a/modules/gui/qt4/dialogs/open.cpp
+++ b/modules/gui/qt4/dialogs/open.cpp
@@ -37,11 +37,12 @@
 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
@@ -334,7 +338,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 );
         }
     }
diff --git a/modules/gui/qt4/dialogs/open.hpp b/modules/gui/qt4/dialogs/open.hpp
index 291207e..ba4bb26 100644
--- a/modules/gui/qt4/dialogs/open.hpp
+++ b/modules/gui/qt4/dialogs/open.hpp
@@ -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;
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index 1443b4e..258da87 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -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




More information about the vlc-devel mailing list