# -*- 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()