_checks[C_ShowHint] = settings.value ("checks/hint", _checks[C_ShowHint]).toBool ();
_checks[C_UpdateOnWiFi] = settings.value ("checks/updateOnWifi", _checks[C_UpdateOnWiFi]).toBool ();
_checks[C_UpdateOnGSM] = settings.value ("checks/updateOnGSM", _checks[C_UpdateOnGSM]).toBool ();
+ _checks[C_UpdateWhenLocked] = settings.value ("checks/updateWhenLocked", _checks[C_UpdateWhenLocked]).toBool ();
loadCities (&settings);
settings.setValue ("checks/hint", _checks[C_ShowHint]);
settings.setValue ("checks/updateOnWifi", _checks[C_UpdateOnWiFi]);
settings.setValue ("checks/updateOnGSM", _checks[C_UpdateOnGSM]);
+ settings.setValue ("checks/updateWhenLocked", _checks[C_UpdateWhenLocked]);
settings.setValue ("updateInterval", intervalIndex2Minutes (_updateIntervalIndex));
_regionID = "1"; // Default city
_cities["1"] = tr ("Moscow");
- _cities["10174"] = tr ("Kiev");
+ _cities["10174"] = tr ("St.Petersburg");
+ _cities["20544"] = tr ("Kiev");
_cities["11162"] = tr ("Ekaterinburg");
- _cities["11079"] = tr ("N.Novgorod");
setCheck (C_ShowLight, true);
setCheck (C_ShowRank, true);
setCheck (C_UpdateOnWiFi, true);
+ setCheck (C_UpdateWhenLocked, true);
+
_updateIntervalIndex = 3;
}
{
int int2min[] = { -1, 1, 2, 5, 15, 30 };
- if (index < 0 || sizeof (int2min) / sizeof (int2min[0]) <= index)
+ if (index < 0 || sizeof (int2min) / sizeof (int2min[0]) <= (unsigned int)index)
return -1;
return int2min[index];