Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/activity.py
blob: 7aee0ef1f503b4439052fafcda3562649c0c8af6 (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

# python import
import logging
from gettext import gettext as _

# sugar import
from sugar.activity import activity

# atoidepoc import
from atoidepoc import ui

# get application logger
logger = logging.getLogger('atoidepoc')
logger.setLevel(logging.DEBUG)

class AToiDePocActivity(activity.Activity):

    def __init__(self, handle):
        # init parent
        activity.Activity.__init__(self, handle)
        # get toolbox
        _toolbox = activity.ActivityToolbox(self)
        # add tool bars
        self.set_toolbox(_toolbox)
        # show
        _toolbox.show()
        # init toolbars
        for _t in ['story', 'graphic', 'sound']:
            ui.Toolbar(_toolbox, name=_t)
        # set default tab
        _toolbox.set_current_toolbar(1)
        # some logging
        logger.debug('[activity] - started ...')