[Sugar-devel] [PATCH] Jukebox: restore activity subtoolbar
Manuel Quiñones
manuq at laptop.org
Fri Sep 2 09:02:55 EDT 2011
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',
--
1.7.4.4
More information about the Sugar-devel
mailing list