diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp index b957b730af3698df669ef9f9be8d7b1fa854672a..f923866a5a4a47e015ea0dea36b02d48bd9fd409 100644 --- a/modules/gui/qt4/components/simple_preferences.cpp +++ b/modules/gui/qt4/components/simple_preferences.cpp @@ -29,6 +29,7 @@ #include "components/simple_preferences.hpp" #include "components/preferences_widgets.hpp" +#include "dialogs/ml_configuration.hpp" #include <vlc_config_cat.h> #include <vlc_configuration.h> @@ -548,6 +549,8 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ui.assoButton->hide(); ui.assocLabel->hide(); #endif + BUTTONACT( ui.sqlMLbtn, configML() ); + /* interface */ char *psz_intf = config_GetPsz( p_intf, "intf" ); if( psz_intf ) @@ -886,6 +889,13 @@ void SPrefsPanel::changeStyle( QString s_style ) }; } +void SPrefsPanel::configML() +{ + MLConfDialog *mld = new MLConfDialog( this, p_intf ); + mld->exec(); + delete mld; +} + #ifdef WIN32 #include <QDialogButtonBox> #include "util/registry.hpp" diff --git a/modules/gui/qt4/components/simple_preferences.hpp b/modules/gui/qt4/components/simple_preferences.hpp index a709f74e5bffd65e57e375b2badbf0b5e4718ed5..7307a7668ac8387cd6e274d6490aef646fedeca2 100644 --- a/modules/gui/qt4/components/simple_preferences.hpp +++ b/modules/gui/qt4/components/simple_preferences.hpp @@ -137,6 +137,7 @@ private slots: void assoDialog(); void saveAsso(); #endif + void configML(); void changeStyle( QString ); }; diff --git a/modules/gui/qt4/dialogs/ml_configuration.cpp b/modules/gui/qt4/dialogs/ml_configuration.cpp index 7fa9d384fc5de220d9ee09a1f57b607425adf668..2380b7b7cca953e06d3410905f882c24dfb11b30 100644 --- a/modules/gui/qt4/dialogs/ml_configuration.cpp +++ b/modules/gui/qt4/dialogs/ml_configuration.cpp @@ -244,10 +244,6 @@ MLConfDialog::MLConfDialog( QWidget *parent, intf_thread_t *_p_intf ) CONNECT( recursivity, toggled( bool ), model, setRecursivity( bool ) ); } -MLConfDialog::~MLConfDialog() -{ -} - void MLConfDialog::init() { bool b_recursive = var_CreateGetBool( p_ml, "ml-recursive-scan" ); diff --git a/modules/gui/qt4/dialogs/ml_configuration.hpp b/modules/gui/qt4/dialogs/ml_configuration.hpp index 43ab69dcb0a65220a29c956bd44bd2d650295075..5cefc6d17ab8e486e8276246d051ef5f400221b1 100644 --- a/modules/gui/qt4/dialogs/ml_configuration.hpp +++ b/modules/gui/qt4/dialogs/ml_configuration.hpp @@ -85,17 +85,10 @@ public slots: class MLConfDialog : public QVLCDialog { Q_OBJECT; - public: - static MLConfDialog * getInstance( intf_thread_t *p_intf ) - { - if( !instance ) - instance = new MLConfDialog( (QWidget *)p_intf->p_sys->p_mi, p_intf ); - return instance; - } - virtual ~MLConfDialog(); +public: + MLConfDialog( QWidget *, intf_thread_t * ); private: - MLConfDialog( QWidget *, intf_thread_t * ); void init(); vlc_array_t *p_monitored_dirs; diff --git a/modules/gui/qt4/ui/sprefs_interface.ui b/modules/gui/qt4/ui/sprefs_interface.ui index 268734dcb0f3b789f53efd98ce0ea9ef5022c7f8..a463ebf770f999619db4e469f67aa11d0d62ddc5 100644 --- a/modules/gui/qt4/ui/sprefs_interface.ui +++ b/modules/gui/qt4/ui/sprefs_interface.ui @@ -246,7 +246,7 @@ </property> </widget> </item> - <item row="1" column="0"> + <item row="2" column="0"> <widget class="QLabel" name="assocLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> @@ -262,7 +262,7 @@ </property> </widget> </item> - <item row="1" column="1"> + <item row="2" column="1"> <spacer name="horizontalSpacer_6"> <property name="orientation"> <enum>Qt::Horizontal</enum> @@ -275,7 +275,7 @@ </property> </spacer> </item> - <item row="1" column="2"> + <item row="2" column="2"> <widget class="QPushButton" name="assoButton"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> @@ -294,7 +294,7 @@ </property> </widget> </item> - <item row="1" column="3"> + <item row="2" column="3"> <spacer name="horizontalSpacer_8"> <property name="orientation"> <enum>Qt::Horizontal</enum> @@ -307,6 +307,13 @@ </property> </spacer> </item> + <item row="1" column="0"> + <widget class="QPushButton" name="sqlMLbtn"> + <property name="text"> + <string>Configure Media Library</string> + </property> + </widget> + </item> </layout> </widget> </item>