def on_location_changed(self, tz_map, location): if not location: return timezone = location.get_property("zone") if self._set_timezone(timezone): # timezone successfully set self._tz = get_timezone(timezone) self._update_datetime()
def on_location_changed(self, tz_map, location): if not location: return timezone = location.get_property('zone') if self._set_timezone(timezone): # timezone successfully set self._tz = get_timezone(timezone) self._update_datetime()
def on_location_changed(self, tz_map, location): if not location: return timezone = location.get_property('zone') # Updating the timezone will update the region/city combo boxes to match. # The on_city_changed handler will attempt to convert the timezone back # to a location and set it in the map, which we don't want, since we # already have a location. That's why we're here. with blockedHandler(self._cityCombo, self.on_city_changed): if self._set_timezone(timezone): # timezone successfully set self._tz = get_timezone(timezone) self._update_datetime()
def on_location_changed(self, tz_map, location): if not location: return timezone = location.get_property('zone') # Updating the timezone will update the region/city combo boxes to match. # The on_city_changed handler will attempt to convert the timezone back # to a location and set it in the map, which we don't want, since we # already have a location. That's why we're here. with blockedHandler(self._cityCombo, self.on_city_changed): if self._set_timezone(timezone): # timezone successfully set self._tz = get_timezone(timezone) self._update_datetime()