blob: ac201dd1be1f50210c3e87c14915b7ac78e2bf29 (
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
|
# 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
import gtk
from sugar.activity import activity
from sugar.activity.activity import ActivityToolbox
from sugar.presence import presenceservice
from broadcast import Broadcast
class ClassroomKitActivity(activity.Activity):
"""Classroom Kit 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 Kit 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
"""
# Toolbar
toolbox = ActivityToolbox(self)
self._toolbar = toolbox.get_activity_toolbar()
self.set_toolbox(toolbox)
def showUI(self):
"""Show UI elements
"""
self.show_all()
|