blob: dbd9400be6e31829dfc133062311843fac62294c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import logging
from gettext import gettext as _
from sugar.activity import activity
from sugar.activity.activity import ActivityToolbox
import gtk
from broadcast import Broadcast
class ClassRoomBroadcastActivity(activity.Activity):
"""Class Room Broadcast Activity
"""
# Broadcast Component
_broadcast = None
# UI
_toolbar = None
def __init__(self, handle):
"""Constructor
"""
# initialize activity
activity.Activity.__init__(self, handle)
# debug msg
logging.debug("Starting Classroom Broadcast Activity")
# UI
self.loadUI()
# create broadcast component
self._broadcast = Broadcast(self)
self._broadcast.loadUI();
# Show UI
self.showUI()
# Show status
self._broadcast.showStatus()
def loadUI(self):
"""Create and show UI
"""
# 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
"""
self.show_all()
|