示例#1
0
文件: lens.py 项目: MikeyG/gevernote
 def on_filtering_changed(self, scope):
     tags = scope.get_filter('tags')
     self.tag_filter_ids = map(lambda tag: int(tag.props.id),
         filter(lambda tag: tag.props.active, tags.options))
     notebook = scope.get_filter('notebooks').get_active_option()
     if notebook:
         self.notebook_filter_id = int(notebook.props.id)
     else:
         self.notebook_filter_id = None
     place = scope.get_filter('places').get_active_option()
     if place:
         self.place_filter_id = int(place.props.id)
     else:
         self.place_filter_id = None
     SingleScopeLens.on_filtering_changed(self, scope)
示例#2
0
文件: lens.py 项目: cas--/everpad
 def on_filtering_changed(self, scope):
     tags = scope.get_filter('tags')
     self.tag_filter_ids = map(
         lambda tag: int(tag.props.id),
         filter(lambda tag: tag.props.active, tags.options))
     notebook = scope.get_filter('notebooks').get_active_option()
     if notebook:
         self.notebook_filter_id = int(notebook.props.id)
     else:
         self.notebook_filter_id = None
     place = scope.get_filter('places').get_active_option()
     if place:
         self.place_filter_id = int(place.props.id)
     else:
         self.place_filter_id = None
     SingleScopeLens.on_filtering_changed(self, scope)