1
0
Fork 0
forked from len0rd/rockbox

Fix voicefile / talkfile generation windows not updating the displayed settings if the user used the "change" button.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16462 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2008-03-01 13:42:14 +00:00
parent dfac61e89c
commit 05f24a1ec4
4 changed files with 20 additions and 15 deletions

View file

@ -36,7 +36,7 @@ void CreateVoiceWindow::change()
Config *cw = new Config(this,4);
cw->setSettings(settings);
cw->show();
connect(cw, SIGNAL(settingsUpdated()), this, SIGNAL(settingsUpdated()));
connect(cw, SIGNAL(settingsUpdated()), this, SLOT(settingsUpdated()));
}
void CreateVoiceWindow::accept()
@ -58,7 +58,6 @@ void CreateVoiceWindow::accept()
voicecreator->setMountPoint(settings->mountpoint());
voicecreator->setTargetId(settings->curTargetId());
voicecreator->setLang(lang);
voicecreator->setProxy(m_proxy);
voicecreator->setWavtrimThreshold(wvThreshold);
//start creating
@ -66,11 +65,19 @@ void CreateVoiceWindow::accept()
}
/** @brief set settings object
*/
void CreateVoiceWindow::setSettings(RbSettings* sett)
{
settings = sett;
settingsUpdated();
}
/** @brief update displayed settings
*/
void CreateVoiceWindow::settingsUpdated(void)
{
// fill in language combobox
QStringList languages = settings->allLanguages();
languages.sort();

View file

@ -33,21 +33,17 @@ class CreateVoiceWindow : public QDialog
public:
CreateVoiceWindow(QWidget *parent = 0);
void setSettings(RbSettings* sett);
void setProxy(QUrl proxy){m_proxy = proxy;}
signals:
void settingsUpdated(void);
public slots:
void accept(void);
void change(void);
void settingsUpdated(void);
private:
VoiceFileCreator* voicecreator;
Ui::CreateVoiceFrm ui;
ProgressLoggerGui* logger;
RbSettings* settings;
QUrl m_proxy;
};
#endif

View file

@ -68,7 +68,7 @@ void InstallTalkWindow::change()
Config *cw = new Config(this,4);
cw->setSettings(settings);
cw->show();
connect(cw, SIGNAL(settingsUpdated()), this, SIGNAL(settingsUpdated()));
connect(cw, SIGNAL(settingsUpdated()), this, SLOT(settingsUpdated()));
}
void InstallTalkWindow::accept()
@ -109,7 +109,12 @@ void InstallTalkWindow::accept()
void InstallTalkWindow::setSettings(RbSettings* sett)
{
settings = sett;
settingsUpdated();
}
void InstallTalkWindow::settingsUpdated(void)
{
QString ttsName = settings->curTTS();
TTSBase* tts = TTSBase::getTTS(ttsName);
tts->setCfg(settings);
@ -131,6 +136,5 @@ void InstallTalkWindow::setSettings(RbSettings* sett)
ui.labelEncProfile->setText(tr("Selected Encoder: <b>%1</b>").arg("Invalid encoder configuration!"));
setTalkFolder(settings->lastTalkedFolder());
}

View file

@ -34,9 +34,6 @@ class InstallTalkWindow : public QDialog
InstallTalkWindow(QWidget *parent = 0);
void setSettings(RbSettings* sett);
signals:
void settingsUpdated(void);
public slots:
void accept(void);
void change(void);
@ -44,6 +41,7 @@ class InstallTalkWindow : public QDialog
private slots:
void browseFolder(void);
void setTalkFolder(QString folder);
void settingsUpdated(void);
private:
TalkFileCreator* talkcreator;