diff options
Diffstat (limited to 'src/dialog.cpp')
-rw-r--r-- | src/dialog.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/dialog.cpp b/src/dialog.cpp index 08af827..5e68e10 100644 --- a/src/dialog.cpp +++ b/src/dialog.cpp @@ -55,8 +55,10 @@ Dialog::Dialog(QWidget *parent) // ui->filterEdit->installEventFilter(this); QCoreApplication::instance()->installEventFilter(this); - ui->helpBox->hide(); - ui->newsBox->hide(); + if (!UserConfig::isNewsHelpOpen()) { + ui->helpBox->hide(); + ui->newsBox->hide(); + } ui->lblAutoQuit->hide(); this->addStatusString(STR_LOADING); @@ -194,6 +196,7 @@ void Dialog::on_treeView_doubleClicked(const QModelIndex& index) } UserConfig::addLastSession(s->uuid().isEmpty() ? s->shortDescription() : s->uuid()); UserConfig::setLastTab(activeTab_); + UserConfig::setNewsHelpOpen(!ui->helpBox->isHidden()); centerTimer_->stop(); // Stop the auto-center/auto-quit timer, so we don't kill the session :> setVisible(false); } else { @@ -422,7 +425,7 @@ void Dialog::onCenterTimer() { } else if (autoQuit_ < 60) { ui->lblAutoQuit->setText(trUtf8("Auto logout in %1").arg(autoQuit_)); ui->lblAutoQuit->show(); - } else if (ui->lblAutoQuit->isVisible()) { + } else if (!ui->lblAutoQuit->isHidden()) { ui->lblAutoQuit->hide(); } } @@ -550,7 +553,7 @@ void Dialog::downloadData(const QString& locationIds) { + infoNode.text() + "</p>")); } - if (UserConfig::getLastNewsTime() < timestamp.toTime_t()) { + if (ui->helpBox->isHidden() && UserConfig::getLastNewsTime() < timestamp.toTime_t()) { // show news if not seen before on_helpNewsButton_clicked(); } @@ -797,7 +800,7 @@ void Dialog::setListModel(SessionTreeModel *model) { } void Dialog::on_helpNewsButton_clicked() { - if (ui->helpBox->isVisible()) { + if (!ui->helpBox->isHidden()) { ui->helpBox->hide(); ui->newsBox->hide(); } else { |