mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-15 08:02:34 -05:00
Make it possible to browse for an encoder binary.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14519 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
673a74bfe5
commit
1bee895619
2 changed files with 24 additions and 2 deletions
|
|
@ -67,10 +67,9 @@ Config::Config(QWidget *parent) : QDialog(parent)
|
||||||
connect(ui.buttonCacheBrowse, SIGNAL(clicked()), this, SLOT(browseCache()));
|
connect(ui.buttonCacheBrowse, SIGNAL(clicked()), this, SLOT(browseCache()));
|
||||||
connect(ui.buttonCacheClear, SIGNAL(clicked()), this, SLOT(cacheClear()));
|
connect(ui.buttonCacheClear, SIGNAL(clicked()), this, SLOT(cacheClear()));
|
||||||
connect(ui.browseTts, SIGNAL(clicked()), this, SLOT(browseTts()));
|
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.comboEncoder, SIGNAL(currentIndexChanged(int)), this, SLOT(updateEncOpts(int)));
|
||||||
connect(ui.comboTts, SIGNAL(currentIndexChanged(int)), this, SLOT(updateTtsOpts(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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,7 @@ class Config : public QDialog
|
||||||
void setCache(QString);
|
void setCache(QString);
|
||||||
void cacheClear(void);
|
void cacheClear(void);
|
||||||
void browseTts(void);
|
void browseTts(void);
|
||||||
|
void browseEnc(void);
|
||||||
void updateTtsOpts(int);
|
void updateTtsOpts(int);
|
||||||
void updateEncOpts(int);
|
void updateEncOpts(int);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue