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

Qt: allow SQL-ML configuration


Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 64119e13
......@@ -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"
......
......@@ -137,6 +137,7 @@ private slots:
void assoDialog();
void saveAsso();
#endif
void configML();
void changeStyle( QString );
};
......
......@@ -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" );
......
......@@ -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;
......
......@@ -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>
......
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