[Trac #732] Activities donut should rotate with alt-tab

Zarro Boogs per Child bugtracker at laptop.org
Mon Jan 15 05:37:42 EST 2007


#732: Activities donut should rotate with alt-tab
-------------------------+--------------------------------------------------
 Reporter:  ywwg         |        Owner:  ywwg   
     Type:  enhancement  |       Status:  new    
 Priority:  normal       |    Milestone:  BTest-3
Component:  sugar        |   Resolution:         
 Keywords:               |  
-------------------------+--------------------------------------------------
Comment (by marco):

 {{{

 +        #must be a list or else activity launch order is lost

 # should be separated by a space, same for other places in the patch

 +            index = [a.get_id() for a in self._activities].index(act_id)
 +            activity = self._activities[index]

 Please add a _get_activity_from_id method.

 +        index = [a.get_id() for a in self._activities].index(act_id)
 +        del self._activities[index]

 Use it here too.

 -        if not act_id in self._activities.keys():
 +        if not act_id in [a.get_id() for a in self._activities]:

 And here.

 +        try:
 96      +            index = [a.get_id() for a in
 self._activities].index(activity_id)
 97      +            activity = self._activities[index]

 And here.

 +    def _activity_changed_cb(self, model, host):
 138     +        if host is not None:

 s/host/activity. I think this is coming from the model now.
 Don't store the current activity in the view, just get it from the model.

 +    def _do_redraw(self):
 196     +        self.emit_paint_needed(0, 0, -1, -1)
 197     +        self.emit_request_changed()

 The naming here is incorrect. It will both recalculate size (possibly
 moving stuff around) and redraw. I'd say to not have an helper for this at
 all. It might be slightly more code but it will a lot more explicit.

 Can you please split out the draw ring and draw edge parts out to separate
 methods?

 Thanks!

 }}}

-- 
Ticket URL: <http://dev.laptop.org/ticket/732#comment:7>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list