[sugar] Reducing activity sharing boilderplate code

Morgan Collett morgan.collett at gmail.com
Fri Nov 7 07:41:19 EST 2008


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.

Thoughts?

Regards
Morgan


More information about the Sugar mailing list