Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/PrestametuVoz.activity/toolbar.py
blob: 9fa0e379413fd31e28eea6a6c7e245532b56dcd5 (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
# Copyright (C) 2010, Plan Ceibal <comunidad@plan.ceibal.edu.uy>
# -*- coding: utf-8 -*-
from gettext import gettext as _
import logging
import os
import time
import gtk

from instance import Instance
from sugar.graphics.icon import Icon
from sugar.graphics.toolbutton import ToolButton
from sugar.graphics.toggletoolbutton import ToggleToolButton
from sugar.graphics.combobox import ComboBox
from sugar.graphics.toolcombobox import ToolComboBox
from sugar.graphics.objectchooser import ObjectChooser
from sugar.graphics import iconentry
from sugar.activity.activity import ActivityToolbar
from sugar.activity.activity import EditToolbar
from sugar.graphics.menuitem import MenuItem
from sugar.datastore import datastore

import sugar.profile


#ick
TOOLBAR_ACTIVITY = 0
TOOLBAR_CONFIG = 1

class ConfigToolbar(gtk.Toolbar):
    __gtype_name__ = 'PrestametuvozToolbar'

    def __init__(self, toolbox, parent):
        gtk.Toolbar.__init__(self)

        self._toolbox = toolbox
        self._parent = parent
        
        self._btn_game_load = ToolButton('game-load')
        self._btn_game_load.get_icon_widget().set_property( 'fill-color', Instance.colorFill.hex )
        self._btn_game_load.set_tooltip(_('Load'))
        self._btn_game_load_id = self._btn_game_load.connect('clicked', self._game_load)
        self.insert(self._btn_game_load, -1)
        self._btn_game_load.show()

        self._btn_game_new = ToolButton('game-new')
        self._btn_game_new.get_icon_widget().set_property( 'fill-color', Instance.colorFill.hex )
        self._btn_game_new.set_tooltip(_('Create'))
        self._btn_game_new_id = self._btn_game_new.connect('clicked', self._game_new)
        self.insert(self._btn_game_new, -1)
        self._btn_game_new.show()
        
#        self._btn_game_save = ToolButton('save-load')
#        self._btn_game_save.get_icon_widget().set_property( 'fill-color', Instance.colorFill.hex )
#        self._btn_game_save.set_tooltip(_('Save'))
#        self._btn_game_save_id = self._btn_game_save.connect('clicked', self._game_save)
#        self.insert(self._btn_game_save, -1)
#        self._btn_game_save.show()

        separator_photo = gtk.SeparatorToolItem()
        separator_photo.set_draw(True)
        separator_photo.show()
        self.insert(separator_photo, -1)     

    def _game_load(self, *args):
        pass

    def _game_new(self, *args):
        pass

#    def _game_save(self, *args):
#        pass