コード例 #1
0
    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()
コード例 #2
0
    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()
コード例 #3
0
ファイル: datetime_spoke.py プロジェクト: bwann/anaconda
    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()
コード例 #4
0
ファイル: datetime_spoke.py プロジェクト: zhangsju/anaconda
    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()