+ bool accepted = true;
+
+ m_automaticUpdateEnabled = enabled;
+
+ //Show automatic update confirmation dialog
+ if (m_automaticUpdateFirstStart && m_gps->isRunning() && m_automaticUpdateEnabled) {
+ m_ui->showEnableAutomaticUpdateLocationDialog(
+ tr("Do you want to enable automatic location update with %1 min update interval?")
+ .arg(updateIntervalMsecs/1000/60));
+ m_automaticUpdateFirstStart = false;
+ }
+ else {
+ if (!m_automaticUpdateFirstStart && m_automaticUpdateEnabled && accepted)
+ m_ui->buildInformationBox(tr("Automatic location update enabled"));
+
+ if (accepted && m_gps->isRunning() && m_automaticUpdateEnabled) {
+ if (updateIntervalMsecs < MIN_UPDATE_INTERVAL_MSECS)
+ m_automaticUpdateIntervalTimer->setInterval(MIN_UPDATE_INTERVAL_MSECS);
+ else
+ m_automaticUpdateIntervalTimer->setInterval(updateIntervalMsecs);