[Sugar-devel] [PATCH] Jukebox: restore activity subtoolbar
Simon Schampijer
simon at schampijer.de
Wed Sep 7 11:23:51 EDT 2011
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',
More information about the Sugar-devel
mailing list