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

View file

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

View file

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

View file

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