[Sugar-devel] [PATCH] Jukebox: restore activity subtoolbar

Gonzalo Odiard gonzalo at laptop.org
Wed Sep 7 11:28:33 EDT 2011


Right now, jukebox is not saving anything useful in the journal, then I
don't see why we need this toolbar.
But this will change soon, because Manuel have a play list patch in the
works.
Then we can add this toolbar.

Gonzalo

2011/9/7 Simon Schampijer <simon at schampijer.de>

> Hi Manuel,
>
> looks good.
>
> Reviewed-By: Simon Schampijer <simon at laptop.org>
>
> Regards,
>   Simon
>
> PS: there seem to be an issue with the subtoolbar: when you click on it
> (lock it in) and click again on it it does not go away anymore. For both the
> activity and the view toolbar
>
>
> On 09/02/2011 03:02 PM, Manuel Quiñones wrote:
>
>> For new style of toolbars, the activity subtoolbar was missing.  It
>> has the activity title entry and the share button disabled.  Set max
>> participants to one.
>>
>> Signed-off-by: Manuel Quiñones<manuq at laptop.org>
>> ---
>>  jukeboxactivity.py |   13 +++++++------
>>  1 files changed, 7 insertions(+), 6 deletions(-)
>>
>> diff --git a/jukeboxactivity.py b/jukeboxactivity.py
>> index 0ba3f4c..53539db 100644
>> --- a/jukeboxactivity.py
>> +++ b/jukeboxactivity.py
>> @@ -27,6 +27,7 @@ from gettext import gettext as _
>>  import os
>>
>>  from sugar.activity import activity
>> +from sugar.activity.widgets import ActivityToolbarButton
>>  from sugar.graphics.objectchooser import ObjectChooser
>>  from sugar import mime
>>
>> @@ -68,6 +69,9 @@ class JukeboxActivity(activity.**Activity):
>>
>>      def __init__(self, handle):
>>          activity.Activity.__init__(**self, handle)
>> +
>> +        self.max_participants = 1
>> +
>>          self._object_id = handle.object_id
>>          self.set_title(_('Jukebox Activity'))
>>          self.player = None
>> @@ -101,13 +105,10 @@ class JukeboxActivity(activity.**Activity):
>>
>>          else:
>>              toolbar_box = ToolbarBox()
>> -            activity_button = ToolButton()
>> -            color = XoColor(profile.get_color())
>> -            bundle = ActivityBundle(activity.get_**bundle_path())
>> -            icon = Icon(file=bundle.get_icon(), xo_color=color)
>> -            activity_button.set_icon_**widget(icon)
>> -            activity_button.show()
>> +
>> +            activity_button = ActivityToolbarButton(self)
>>              toolbar_box.toolbar.insert(**activity_button, 0)
>> +            activity_button.show()
>>
>>              _view_toolbar = ViewToolbar()
>>              _view_toolbar.connect('go-**fullscreen',
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110907/39b90516/attachment.html>


More information about the Sugar-devel mailing list