On Fri, Nov 7, 2008 at 1:41 PM, Morgan Collett <[EMAIL PROTECTED]> wrote: > I want to push some of the code required for sharing into > sugar-toolkit, for example: > > def _list_tubes_reply_cb(self, tubes): > for tube_info in tubes: > self._new_tube_cb(*tube_info) > > If I put this directly into sugar.activity.activity.Activity, then all > activities will gain the code which might impose some overhead. > > Alternatively I can subclass Activity to SharableActivity or something > like that, and add the telepathy/tubes helper code in there.
If we make activities subclass SharableActivity, then they won't be able to subclass WebActivity, RedActivity, QTActivity, etc IMO, the alternative that is looking best right now is to have in sugar.activity.activity the bare minimum an activity needs to load (a window). Then add services like SharingService, JournalService, etc that can be used by the activities that actually need them, and loaded when they are actually needed. This is the approach followed in XULRunner and in Maemo, AFAIK. Regards, Tomeu _______________________________________________ Sugar mailing list [email protected] http://lists.laptop.org/listinfo/sugar

