#4716 HIGH Never A: Activities need to be included in neighborhood filtering

Zarro Boogs per Child bugtracker at laptop.org
Thu Nov 8 13:44:01 EST 2007


#4716: Activities need to be included in neighborhood filtering
---------------------+------------------------------------------------------
  Reporter:  Eben    |       Owner:  tomeu         
      Type:  defect  |      Status:  new           
  Priority:  high    |   Milestone:  Never Assigned
 Component:  sugar   |     Version:                
Resolution:          |    Keywords:                
  Verified:  0       |  
---------------------+------------------------------------------------------

Comment(by tomeu):

 This will filter correctly activities based on its name and its type. No
 filtering by participant though, I think that should be done for Update2.

 {{{
 diff --git a/shell/view/home/MeshBox.py b/shell/view/home/MeshBox.py
 index 0a23020..696dc86 100644
 --- a/shell/view/home/MeshBox.py
 +++ b/shell/view/home/MeshBox.py
 @@ -290,11 +290,13 @@ class ActivityView(hippo.CanvasBox):
          self._shell.join_activity(bundle_id, self._model.get_id())

      def set_filter(self, query):
 -        if self._model.activity.props.name.lower().find(query) == -1:
 -            self._icon.xo_color = [style.COLOR_INACTIVE_STROKE.get_svg(),
 -                                   style.COLOR_INACTIVE_FILL.get_svg()]
 +        text_to_check = self._model.activity.props.name.lower() + \
 +                self._model.activity.props.type.lower()
 +        if text_to_check.find(query) == -1:
 +            self._icon.props.stroke_color =
 style.COLOR_INACTIVE_STROKE.get_svg()
 +            self._icon.props.fill_color =
 style.COLOR_INACTIVE_FILL.get_svg()
          else:
 -            self._icon.xo_color = self._model.get_color()
 +            self._icon.props.xo_color = self._model.get_color()

  _AUTOSEARCH_TIMEOUT = 1000

 }}}

-- 
Ticket URL: <http://dev.laptop.org/ticket/4716#comment:4>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list