summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2007-08-29 17:31:43 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2007-08-29 17:31:43 +0000
commit1bee8956196d7aca58cd8a475a0da77d2aa3dac6 (patch)
treee4596e89ee349b47d9137a18cfd1b086a2e1660e /rbutil
parent673a74bfe534b368382a3c700bc09c20ef5e9f09 (diff)
downloadrockbox-1bee8956196d7aca58cd8a475a0da77d2aa3dac6.tar.gz
rockbox-1bee8956196d7aca58cd8a475a0da77d2aa3dac6.zip
Make it possible to browse for an encoder binary.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14519 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/configure.cpp25
-rw-r--r--rbutil/rbutilqt/configure.h1
2 files changed, 24 insertions, 2 deletions
diff --git a/rbutil/rbutilqt/configure.cpp b/rbutil/rbutilqt/configure.cpp
index ca7fb94612..05d0352498 100644
--- a/rbutil/rbutilqt/configure.cpp
+++ b/rbutil/rbutilqt/configure.cpp
@@ -67,10 +67,9 @@ Config::Config(QWidget *parent) : QDialog(parent)
connect(ui.buttonCacheBrowse, SIGNAL(clicked()), this, SLOT(browseCache()));
connect(ui.buttonCacheClear, SIGNAL(clicked()), this, SLOT(cacheClear()));
connect(ui.browseTts, SIGNAL(clicked()), this, SLOT(browseTts()));
+ connect(ui.browseEncoder, SIGNAL(clicked()), this, SLOT(browseEnc()));
connect(ui.comboEncoder, SIGNAL(currentIndexChanged(int)), this, SLOT(updateEncOpts(int)));
connect(ui.comboTts, SIGNAL(currentIndexChanged(int)), this, SLOT(updateTtsOpts(int)));
-
-
}
@@ -612,3 +611,25 @@ void Config::browseTts()
}
}
+
+
+void Config::browseEnc()
+{
+ BrowseDirtree browser(this);
+ browser.setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot);
+
+ if(QFileInfo(ui.encoderExecutable->text()).isDir())
+ {
+ QDir d(ui.encoderExecutable->text());
+ browser.setDir(d);
+ }
+ if(browser.exec() == QDialog::Accepted)
+ {
+ qDebug() << browser.getSelected();
+ QString exe = browser.getSelected();
+ if(!QFileInfo(exe).isExecutable())
+ return;
+ ui.encoderExecutable->setText(exe);
+ }
+
+}
diff --git a/rbutil/rbutilqt/configure.h b/rbutil/rbutilqt/configure.h
index ee7ff08604..f0bb20f418 100644
--- a/rbutil/rbutilqt/configure.h
+++ b/rbutil/rbutilqt/configure.h
@@ -64,6 +64,7 @@ class Config : public QDialog
void setCache(QString);
void cacheClear(void);
void browseTts(void);
+ void browseEnc(void);
void updateTtsOpts(int);
void updateEncOpts(int);
};