[Sugar-devel] [ANNOUNCE] Groupthink 0.1 pre-alpha

Gary C Martin gary at garycmartin.com
Wed Jan 14 12:23:42 EST 2009


On 14 Jan 2009, at 13:02, Tomeu Vizoso wrote:

> Hi Ben,
>
> can we use this on non-sugar pygtk apps?
>
> For example, could we use it to add collaboration features to
> Labyrinth (a pygtk app that we are reusing as a Sugar activity)? Or
> does it depend on Sugar in any way?

Tomeu, FWIW I've tried multiple times to (politely) make contact with  
the original Labyrinth authors since Dec. Not a peep response from  
anyone, and the google mail list is dead (authorised posters only and  
no one is authorising any one new it seems). Don't hold out hope of  
upstream support – I think there's a lot of code in the core that  
needing changing to improve UI and a lot of code we don't need to  
bundle (custom win NT support!?). I'm guessing upstreaming would work  
much better for a project with a well established code-base, and an  
active maintainer – we seem to have neither.

I'm happy to fork, and make it work its best for us under Sugar, so we  
have a solid activity.

--G

> If the data model supported sharing through telepathy tubes, I think
> that the upstream GNOME developers would be interested in helping us
> maintain this code.
>
> Regards,
>
> Tomeu
>
> On Wed, Jan 14, 2009 at 06:11, Benjamin M. Schwartz
> <bmschwar at fas.harvard.edu> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Groupthink [1] is a development toolkit for collaborative activities.
>> It's designed to hide all the collaboration boilerplate and  
>> algorithms
>> under a clean high-level abstraction, so that Activity developers can
>> spend more time on what they really care about.
>>
>> Groupthink is deeply pre-alpha.  Any application is likely to find a
>> multitude of blocker bugs.  If that is acceptable to you, then by all
>> means start your experiments.  If you are interested, please ask  
>> questions
>> or read the code.
>>
>> As an example of the power of Groupthink, I have created a  
>> collaborative
>> version of Chris Ball's "Words" activity, a multilingual  
>> dictionary.  This
>> required adding the groupthink library into the bundle.  It also  
>> required
>> two patches, attached.  Together, these patches represent a total  
>> of 5
>> lines changed.  The resulting activity has the main input field  
>> shared
>> synchronously across all instances.  This activity will be released,
>> pending further testing.
>>
>> Groupthink: Collab should be easy.
>>
>> - --Ben
>>
>> [1] http://dev.laptop.org/git?p=projects/dobject;a=summary
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v2.0.9 (GNU/Linux)
>>
>> iEYEARECAAYFAkltdAwACgkQUJT6e6HFtqQ80wCfa4f13gAvJQYcdkhdmefBPBuU
>> rYEAoJne2buq5hhC29/4ZFCdVvegBsne
>> =aS94
>> -----END PGP SIGNATURE-----
>>
>> --- activity.py.orig    2009-01-12 22:51:15.000000000 -0500
>> +++ activity.py 2009-01-12 23:31:59.000000000 -0500
>> @@ -1,9 +1,11 @@
>> from sugar.activity import activity
>>
>> -class ViewSourceActivity(activity.Activity):
>> +from groupthink.sugar_tools import GroupActivity
>> +
>> +class ViewSourceActivity(GroupActivity):
>>    """Activity subclass which handles the 'view source' key."""
>> -    def __init__(self, handle):
>> -        super(ViewSourceActivity, self).__init__(handle)
>> +    def __init__(self, handle, service_name):
>> +        super(ViewSourceActivity, self).__init__(handle,  
>> service_name)
>>        self.__source_object_id = None # XXX: persist this across  
>> invocations?
>>        self.connect('key-press-event', self._key_press_cb)
>>    def _key_press_cb(self, widget, event):
>>
>> --- pippy_app.py.orig   2009-01-13 23:37:25.000000000 -0500
>> +++ pippy_app.py        2009-01-13 00:13:49.000000000 -0500
>> @@ -28,6 +28,8 @@
>> from sugar.activity.activity import ActivityToolbox, \
>>     get_bundle_path, get_bundle_name
>>
>> +import groupthink.gtk_tools
>> +
>> SERVICE = "org.laptop.Words"
>> IFACE = SERVICE
>> PATH = "/org/laptop/Words"
>> @@ -36,7 +38,7 @@
>>    """Words Activity as specified in activity.info"""
>>    def __init__(self, handle):
>>        """Set up the Words activity."""
>> -        super(WordsActivity, self).__init__(handle)
>> +        super(WordsActivity, self).__init__(handle, SERVICE)
>>        self._logger = logging.getLogger('words-activity')
>>
>>        from sugar.graphics.menuitem import MenuItem
>> @@ -69,7 +71,8 @@
>>        label2 = gtk.Label("Translation")
>>
>>        # Text entry box to enter word to be translated.
>> -        self.totranslate = gtk.Entry(max=50)
>> +        self.cloud.totranslate =  
>> groupthink.gtk_tools.RecentEntry(max=50)
>> +        self.totranslate = self.cloud.totranslate
>>        self.totranslate.connect("changed", self.totranslate_cb)
>>        self.totranslate.modify_font(pango.FontDescription("Sans 14"))
>>
>>
>> _______________________________________________
>> Sugar-devel mailing list
>> Sugar-devel at lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel



More information about the Sugar-devel mailing list