Summary: | problem with display of frequency "Never" setting | ||
---|---|---|---|
Product: | [Applications] akregator | Reporter: | John Belmonte <john> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Patch fixes conversion to int |
Description
John Belmonte
2005-11-12 21:36:15 UTC
Confirmed for current 3.5 branch. Created attachment 13409 [details]
Patch fixes conversion to int
Neither is the number text field disabled when the edit dialog is opened for a feed whose update interval has been set to "Never" previously. Felix Yeah, that's another bug that can now be seen. SVN commit 481501 by osterfeld: fix autofetch setting "never". Fix the enabling/disabling of widgets in the dialog. The toUint()/toInt() error was spotted by Eckhart Woerner BUG: 116203 M +1 -1 feed.cpp M +21 -11 propertiesdialog.cpp --- branches/KDE/3.5/kdepim/akregator/src/feed.cpp #481500:481501 @@ -133,7 +133,7 @@ QString htmlUrl = e.attribute("htmlUrl"); QString description = e.attribute("description"); - int fetchInterval = e.attribute("fetchInterval").toUInt(); + int fetchInterval = e.attribute("fetchInterval").toInt(); ArchiveMode archiveMode = stringToArchiveMode(e.attribute("archiveMode")); int maxArticleAge = e.attribute("maxArticleAge").toUInt(); int maxArticleNumber = e.attribute("maxArticleNumber").toUInt(); --- branches/KDE/3.5/kdepim/akregator/src/propertiesdialog.cpp #481500:481501 @@ -223,43 +223,53 @@ widget->urlEdit->setText(url); } -void FeedPropertiesDialog::setAutoFetch(bool w) +void FeedPropertiesDialog::setAutoFetch(bool customFetchEnabled) { - widget->upChkbox->setChecked(w); - widget->updateSpinBox->setEnabled(w); + widget->upChkbox->setChecked(customFetchEnabled); + widget->updateComboBox->setEnabled(customFetchEnabled); + + if (widget->updateSpinBox->value() > -1) + widget->updateSpinBox->setEnabled(customFetchEnabled); + else + widget->updateSpinBox->setEnabled(false); } -void FeedPropertiesDialog::setFetchInterval(int i) +void FeedPropertiesDialog::setFetchInterval(int interval) { - if (i == -1) + if (interval == -1) // never update { widget->updateSpinBox->setValue(0); + widget->updateSpinBox->setDisabled(true); widget->updateComboBox->setCurrentItem(3); // never return; } - if (i == 0) + if (interval == 0) { widget->updateSpinBox->setValue(0); + widget->updateSpinBox->setEnabled(widget->upChkbox->isChecked()); widget->updateComboBox->setCurrentItem(0); // minutes return; } - if (i % (60*24) == 0) + if (interval % (60*24) == 0) { - widget->updateSpinBox->setValue(i / (60*24) ); + widget->updateSpinBox->setValue(interval / (60*24) ); + widget->updateSpinBox->setEnabled(widget->upChkbox->isChecked()); widget->updateComboBox->setCurrentItem(2); // days return; } - if (i % 60 == 0) + if (interval % 60 == 0) { - widget->updateSpinBox->setValue(i / 60 ); + widget->updateSpinBox->setValue(interval / 60 ); + widget->updateSpinBox->setEnabled(widget->upChkbox->isChecked()); widget->updateComboBox->setCurrentItem(1); // hours return; } - widget->updateSpinBox->setValue(i); + widget->updateSpinBox->setValue(interval); + widget->updateSpinBox->setEnabled(widget->upChkbox->isChecked()); widget->updateComboBox->setCurrentItem(0); // minutes } SVN commit 481504 by osterfeld: forwardport of 116203 (fix "never" setting) CCBUG: 116203 M +1 -1 feed.cpp M +21 -11 propertiesdialog.cpp --- trunk/KDE/kdepim/akregator/src/feed.cpp #481503:481504 @@ -132,7 +132,7 @@ QString htmlUrl = e.attribute("htmlUrl"); QString description = e.attribute("description"); - int fetchInterval = e.attribute("fetchInterval").toUInt(); + int fetchInterval = e.attribute("fetchInterval").toInt(); ArchiveMode archiveMode = stringToArchiveMode(e.attribute("archiveMode")); int maxArticleAge = e.attribute("maxArticleAge").toUInt(); int maxArticleNumber = e.attribute("maxArticleNumber").toUInt(); --- trunk/KDE/kdepim/akregator/src/propertiesdialog.cpp #481503:481504 @@ -225,43 +225,53 @@ widget->urlEdit->setText(url); } -void FeedPropertiesDialog::setAutoFetch(bool w) +void FeedPropertiesDialog::setAutoFetch(bool customFetchEnabled) { - widget->upChkbox->setChecked(w); - widget->updateSpinBox->setEnabled(w); + widget->upChkbox->setChecked(customFetchEnabled); + widget->updateComboBox->setEnabled(customFetchEnabled); + + if (widget->updateSpinBox->value() > -1) + widget->updateSpinBox->setEnabled(customFetchEnabled); + else + widget->updateSpinBox->setEnabled(false); } -void FeedPropertiesDialog::setFetchInterval(int i) +void FeedPropertiesDialog::setFetchInterval(int interval) { - if (i == -1) + if (interval == -1) // never update { widget->updateSpinBox->setValue(0); + widget->updateSpinBox->setDisabled(true); widget->updateComboBox->setCurrentItem(3); // never return; } - if (i == 0) + if (interval == 0) { widget->updateSpinBox->setValue(0); + widget->updateSpinBox->setEnabled(widget->upChkbox->isChecked()); widget->updateComboBox->setCurrentItem(0); // minutes return; } - if (i % (60*24) == 0) + if (interval % (60*24) == 0) { - widget->updateSpinBox->setValue(i / (60*24) ); + widget->updateSpinBox->setValue(interval / (60*24) ); + widget->updateSpinBox->setEnabled(widget->upChkbox->isChecked()); widget->updateComboBox->setCurrentItem(2); // days return; } - if (i % 60 == 0) + if (interval % 60 == 0) { - widget->updateSpinBox->setValue(i / 60 ); + widget->updateSpinBox->setValue(interval / 60 ); + widget->updateSpinBox->setEnabled(widget->upChkbox->isChecked()); widget->updateComboBox->setCurrentItem(1); // hours return; } - widget->updateSpinBox->setValue(i); + widget->updateSpinBox->setValue(interval); + widget->updateSpinBox->setEnabled(widget->upChkbox->isChecked()); widget->updateComboBox->setCurrentItem(0); // minutes } |