Commit cdda8bc8 authored by Yoann Peronneau's avatar Yoann Peronneau

* qt: really implement DirectoryConfigControl

parent c61b8e61
......@@ -289,9 +289,12 @@ DirectoryConfigControl::DirectoryConfigControl( vlc_object_t *_p_this,
void DirectoryConfigControl::updateField()
{
text->setText( QFileDialog::getOpenFileName( NULL,
qtr( "Select File" ), qfu( p_this->p_libvlc->psz_homedir ),
NULL, 0, QFileDialog::ShowDirsOnly ) );
QString dir = QFileDialog::getExistingDirectory( NULL,
qtr( "Select Directory" ),
qfu( p_this->p_libvlc->psz_homedir ),
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks );
if( dir.isNull() ) return;
text->setText( dir );
}
/********* String / choice list **********/
......
......@@ -277,7 +277,6 @@ public slots:
virtual void updateField();
protected:
void finish();
private:
QLineEdit *text;
QLabel *label;
QPushButton *browse;
......@@ -292,15 +291,8 @@ public:
DirectoryConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QLineEdit *, QPushButton *, bool pwd );
virtual ~DirectoryConfigControl() {};
virtual QString getValue() { return text->text(); };
virtual void show() { text->show(); label->show(); browse->show(); }
virtual void hide() { text->hide(); label->hide(); browse->hide(); }
public slots:
virtual void updateField();
private:
QLineEdit *text;
QLabel *label;
QPushButton *browse;
};
class ModuleConfigControl : public VStringConfigControl
......
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