From c7a6da9b619e350ee0462d5387a8dff38557f92e Mon Sep 17 00:00:00 2001 From: Ariel Calzada Date: Wed, 25 Jan 2012 00:53:07 +0000 Subject: Fix toolbar for viewer --- diff --git a/classroomkit.py b/classroomkit.py index 81273ad..4f2f289 100644 --- a/classroomkit.py +++ b/classroomkit.py @@ -75,9 +75,26 @@ class ClassroomKitActivity(activity.Activity): """Create and show UI """ # Toolbar - toolbox = ActivityToolbox(self) - self._toolbar = toolbox.get_activity_toolbar() - self.set_toolbox(toolbox) + # Broadcast + if not self._shared_activity: + toolbox = ActivityToolbox(self) + self._toolbar = toolbox.get_activity_toolbar() + self.set_toolbox(toolbox) + else: + # we do not have collaboration features + # make the share option insensitive + self.max_participants = 1 + + # Toolbar + toolbox = ActivityToolbox(self) + self._toolbar = toolbox.get_activity_toolbar() + + self._toolbar.remove(self._toolbar.share) + self._toolbar.share = None + self._toolbar.remove(self._toolbar.keep) + self._toolbar.keep = None + self.set_toolbox(toolbox) + def showUI(self): """Show UI elements -- cgit v0.9.1