Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/selectdeckpanel.py~
blob: 05f528541cea7cb50caa3b5cdf6c0a2c2e01f6b0 (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
# -*- coding: utf-8 -*-
# Copyright (c) 2010, Kirk Winans
# Code originally based on Simon Schampijer's code for the Memorize
# Activity


# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
import gtk
from os import environ
from os.path import join, basename
import hippo

import shutil
import tempfile
from gettext import gettext as _
import logging
from gobject import SIGNAL_RUN_FIRST, TYPE_PYOBJECT
from sugar.graphics import style
from sugar.graphics.toolbutton import ToolButton
from sugar.graphics.icon import Icon
from sugar.graphics.palette import Palette
from port.widgets import ToggleToolButton
from port.widgets import CanvasRoundBox, ToolComboBox
#from port import chooser

from sugar.datastore import datastore
import xml.etree.ElementTree

#
# Select Deck Panel for Flashcard Activity
#
class SelectDeckPanel(gtk.VBox):

    def __init__(self)

    gtk.VBox.__init__(self)

    available_decks_box = gtk.HBox()
    new_deck_box = gtk.HBox()

    self.available_decks_label = gtk.Label(_('Deck:'))
    self.available_decks = gtk.ComboBoxEntry()

    self.new_deck_label = gtk.Label(_('New Deck Name:'))
    self.new_deck = gtk.Entry()


    self.available_decks_box.pack_start(self.available_decks_label)
    self.available_decks_box.pack_start(self.available_decks)
    self.pack_start(available_decks_box)

    self.new_deck_box(self.new_deck_label)
    self.new_deck_box(self.new_deck)
    self.pack_start(new_deck_box)


    self.available_decks_label.show()
    self.available_decks.show()
    self.available_decks_box.show()

    self.new_deck_label.show()
    self.new_deck.show()
    self.new_deck_box.show()