Commit fb0efa32 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: allow SQL-ML configuration

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 64119e13
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "components/simple_preferences.hpp" #include "components/simple_preferences.hpp"
#include "components/preferences_widgets.hpp" #include "components/preferences_widgets.hpp"
#include "dialogs/ml_configuration.hpp"
#include <vlc_config_cat.h> #include <vlc_config_cat.h>
#include <vlc_configuration.h> #include <vlc_configuration.h>
...@@ -548,6 +549,8 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -548,6 +549,8 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
ui.assoButton->hide(); ui.assoButton->hide();
ui.assocLabel->hide(); ui.assocLabel->hide();
#endif #endif
BUTTONACT( ui.sqlMLbtn, configML() );
/* interface */ /* interface */
char *psz_intf = config_GetPsz( p_intf, "intf" ); char *psz_intf = config_GetPsz( p_intf, "intf" );
if( psz_intf ) if( psz_intf )
...@@ -886,6 +889,13 @@ void SPrefsPanel::changeStyle( QString s_style ) ...@@ -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 #ifdef WIN32
#include <QDialogButtonBox> #include <QDialogButtonBox>
#include "util/registry.hpp" #include "util/registry.hpp"
......
...@@ -137,6 +137,7 @@ private slots: ...@@ -137,6 +137,7 @@ private slots:
void assoDialog(); void assoDialog();
void saveAsso(); void saveAsso();
#endif #endif
void configML();
void changeStyle( QString ); void changeStyle( QString );
}; };
......
...@@ -244,10 +244,6 @@ MLConfDialog::MLConfDialog( QWidget *parent, intf_thread_t *_p_intf ) ...@@ -244,10 +244,6 @@ MLConfDialog::MLConfDialog( QWidget *parent, intf_thread_t *_p_intf )
CONNECT( recursivity, toggled( bool ), model, setRecursivity( bool ) ); CONNECT( recursivity, toggled( bool ), model, setRecursivity( bool ) );
} }
MLConfDialog::~MLConfDialog()
{
}
void MLConfDialog::init() void MLConfDialog::init()
{ {
bool b_recursive = var_CreateGetBool( p_ml, "ml-recursive-scan" ); bool b_recursive = var_CreateGetBool( p_ml, "ml-recursive-scan" );
......
...@@ -85,17 +85,10 @@ public slots: ...@@ -85,17 +85,10 @@ public slots:
class MLConfDialog : public QVLCDialog class MLConfDialog : public QVLCDialog
{ {
Q_OBJECT; Q_OBJECT;
public: public:
static MLConfDialog * getInstance( intf_thread_t *p_intf ) MLConfDialog( QWidget *, intf_thread_t * );
{
if( !instance )
instance = new MLConfDialog( (QWidget *)p_intf->p_sys->p_mi, p_intf );
return instance;
}
virtual ~MLConfDialog();
private: private:
MLConfDialog( QWidget *, intf_thread_t * );
void init(); void init();
vlc_array_t *p_monitored_dirs; vlc_array_t *p_monitored_dirs;
......
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="2" column="0">
<widget class="QLabel" name="assocLabel"> <widget class="QLabel" name="assocLabel">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred"> <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
...@@ -262,7 +262,7 @@ ...@@ -262,7 +262,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="2" column="1">
<spacer name="horizontalSpacer_6"> <spacer name="horizontalSpacer_6">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
...@@ -275,7 +275,7 @@ ...@@ -275,7 +275,7 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="1" column="2"> <item row="2" column="2">
<widget class="QPushButton" name="assoButton"> <widget class="QPushButton" name="assoButton">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
...@@ -294,7 +294,7 @@ ...@@ -294,7 +294,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="3"> <item row="2" column="3">
<spacer name="horizontalSpacer_8"> <spacer name="horizontalSpacer_8">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
...@@ -307,6 +307,13 @@ ...@@ -307,6 +307,13 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="1" column="0">
<widget class="QPushButton" name="sqlMLbtn">
<property name="text">
<string>Configure Media Library</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
......
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