#7649 NORM Opportu: Activities needs to access sugar-toolbox's members directly

Zarro Boogs per Child bugtracker at laptop.org
Fri Jul 25 21:02:56 EDT 2008


#7649: Activities needs to access sugar-toolbox's members directly
-------------------------------------------+--------------------------------
 Reporter:  andresambrois                  |         Owner:               
     Type:  enhancement                    |        Status:  new          
 Priority:  normal                         |     Milestone:  Opportunity  
Component:  not assigned                   |       Version:  not specified
 Keywords:  sugar activity activities API  |   Next_action:  never set    
 Verified:  0                              |     Blockedby:               
 Blocking:                                 |  
-------------------------------------------+--------------------------------
 In order to use collaboration in an activity you need to access the
 _shared_activity member of your activity class to check if the activity is
 shared, and then there's further obscure stuff like:

 self.text_chan = self._shared_activity.telepathy_text_chan
 self.tubes_chan[telepathy.CHANNEL_TYPE_TUBES].connect_to_signal(
                 'NewTube', self._new_tube_cb)

   There are plenty more members of classes being accessed directly (like
 tubes_chan[telepathy.CHANNEL_TYPE_TUBES] above) which makes it difficult
 for novice programmers like me to find out what the heck they're doing
 when they write an activity, as their types don show up on the API docs.

   I include a patch that adds a get_shared_activity method which just
 returns the _shared_activity member so documentation about what
 _shared_activity really is shows up on the API docs, instead of having to
 go through half sugar-toolbox's code to find out.

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


More information about the Bugs mailing list