Commit 8664e302 authored by Yoann Peronneau's avatar Yoann Peronneau

* qt open dialog: double click plays the selected file

parent ef627df2
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "qt4.hpp" #include "qt4.hpp"
#include "components/open.hpp" #include "components/open.hpp"
#include "dialogs/open.hpp"
#include "dialogs_provider.hpp" #include "dialogs_provider.hpp"
#include "util/customwidgets.hpp" #include "util/customwidgets.hpp"
...@@ -181,6 +182,10 @@ void FileOpenPanel::accept() ...@@ -181,6 +182,10 @@ void FileOpenPanel::accept()
if ( ui.fileInput->count() > 8 ) ui.fileInput->removeItem(0); 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 */ /* Function called by Open Dialog when clicked on cancel */
void FileOpenPanel::clear() void FileOpenPanel::clear()
......
...@@ -63,7 +63,7 @@ public: ...@@ -63,7 +63,7 @@ public:
const QString &directory, const QString &filter ): const QString &directory, const QString &filter ):
QFileDialog( parent, caption, directory, filter ) {} QFileDialog( parent, caption, directory, filter ) {}
public slots: public slots:
void accept() {} void accept();
}; };
class FileOpenPanel: public OpenPanel class FileOpenPanel: public OpenPanel
......
...@@ -51,6 +51,8 @@ public: ...@@ -51,6 +51,8 @@ public:
QString mrl; QString mrl;
QString mainMRL; QString mainMRL;
public slots:
void play();
private: private:
static OpenDialog *instance; static OpenDialog *instance;
input_thread_t *p_input; input_thread_t *p_input;
...@@ -69,7 +71,6 @@ private: ...@@ -69,7 +71,6 @@ private:
QStringList SeparateEntries( QString ); QStringList SeparateEntries( QString );
private slots: private slots:
void cancel(); void cancel();
void play();
void enqueue(); void enqueue();
void toggleAdvancedPanel(); void toggleAdvancedPanel();
void updateMRL( QString ); void updateMRL( QString );
......
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