changed a few pages to not requiring to call save()

This commit is contained in:
csoler 2017-01-28 18:13:38 +01:00
parent 53a1993842
commit bd379e6b89
23 changed files with 166 additions and 217 deletions

View file

@ -30,24 +30,23 @@ ForumPage::ForumPage(QWidget * parent, Qt::WindowFlags flags)
/* Initialize GroupFrameSettingsWidget */
ui.groupFrameSettingsWidget->setOpenAllInNewTabText(tr("Open each forum in a new tab"));
connect(ui.setMsgToReadOnActivate,SIGNAL(toggled(bool)),this,SLOT(updateMsgReadOnActivate())) ;
connect(ui.expandNewMessages , SIGNAL(toggled(bool)), this, SLOT( updateExpandNewMessages()));
connect(ui.loadEmbeddedImages , SIGNAL(toggled(bool)), this, SLOT(updateLoadEmbeddedImage() ));
connect(ui.loadEmoticons , SIGNAL(toggled(bool)), this, SLOT( updateLoadEmoticons() ));
ui.groupFrameSettingsWidget->setType(GroupFrameSettings::Forum) ;
}
ForumPage::~ForumPage()
{
}
/** Saves the changes on this page */
bool ForumPage::save(QString &/*errmsg*/)
{
Settings->setForumMsgSetToReadOnActivate(ui.setMsgToReadOnActivate->isChecked());
Settings->setForumExpandNewMessages(ui.expandNewMessages->isChecked());
Settings->setForumLoadEmbeddedImages(ui.loadEmbeddedImages->isChecked());
Settings->setForumLoadEmoticons(ui.loadEmoticons->isChecked());
ui.groupFrameSettingsWidget->saveSettings(GroupFrameSettings::Forum);
return true;
}
void ForumPage::updateMsgReadOnActivate() { Settings->setForumMsgSetToReadOnActivate(ui.setMsgToReadOnActivate->isChecked()); }
void ForumPage::updateExpandNewMessages() { Settings->setForumExpandNewMessages( ui.expandNewMessages ->isChecked());}
void ForumPage::updateLoadEmbeddedImages() { Settings->setForumLoadEmbeddedImages( ui.loadEmbeddedImages ->isChecked());}
void ForumPage::updateLoadEmoticons() { Settings->setForumLoadEmoticons( ui.loadEmoticons ->isChecked()); }
/** Loads the settings for this page */
void ForumPage::load()