E-mail: take fCheckMailCheckBox into account on save.

* Only the time you entered mattered (ie. 0 would have turned
  the auto check off).
This commit is contained in:
Axel Dörfler
2015-01-23 21:00:30 +01:00
parent 88fed28aff
commit ddf7ecfaa9
+7 -4
View File
@@ -445,10 +445,13 @@ ConfigWindow::_SaveSettings()
BMailSettings settings;
if (fSaveSettings) {
// figure out time interval
float floatInterval;
sscanf(fIntervalControl->Text(), "%f", &floatInterval);
bigtime_t interval = bigtime_t(60000000L * floatInterval);
bigtime_t interval = 0;
if (fCheckMailCheckBox->Value() == B_CONTROL_ON) {
// figure out time interval
float floatInterval;
sscanf(fIntervalControl->Text(), "%f", &floatInterval);
interval = bigtime_t(60000000L * floatInterval);
}
settings.SetAutoCheckInterval(interval);
settings.SetDaemonAutoStarts(!fAccounts.IsEmpty());