* qt open dialog: double click plays the selected file
authorYoann Peronneau <yoann@videolan.org>
Thu, 29 Mar 2007 21:53:33 +0000 (21:53 +0000)
committerYoann Peronneau <yoann@videolan.org>
Thu, 29 Mar 2007 21:53:33 +0000 (21:53 +0000)
modules/gui/qt4/components/open.cpp
modules/gui/qt4/components/open.hpp
modules/gui/qt4/dialogs/open.hpp

index a085c53..ce594d4 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "qt4.hpp"
 #include "components/open.hpp"
+#include "dialogs/open.hpp"
 #include "dialogs_provider.hpp"
 #include "util/customwidgets.hpp"
 
@@ -181,6 +182,10 @@ void FileOpenPanel::accept()
     if ( ui.fileInput->count() > 8 ) ui.fileInput->removeItem(0);
 }
 
+void FileOpenBox::accept()
+{
+    OpenDialog::getInstance( NULL, NULL )->play();
+}
 
 /* Function called by Open Dialog when clicked on cancel */
 void FileOpenPanel::clear()
index ef003f4..83ed6e9 100644 (file)
@@ -63,7 +63,7 @@ public:
         const QString &directory, const QString &filter ):
         QFileDialog( parent, caption, directory, filter ) {}
 public slots:
-    void accept() {}
+    void accept();
 };
 
 class FileOpenPanel: public OpenPanel
index 813d101..26440e8 100644 (file)
@@ -51,6 +51,8 @@ public:
 
     QString mrl;
     QString mainMRL;
+public slots:
+    void play();
 private:
     static OpenDialog *instance;
     input_thread_t *p_input;
@@ -69,7 +71,6 @@ private:
     QStringList SeparateEntries( QString );
 private slots:
     void cancel();
-    void play();
     void enqueue();
     void toggleAdvancedPanel();
     void updateMRL( QString );