From e3af6ee47390ac2bde75a6c31f85c091fdc3bce2 Mon Sep 17 00:00:00 2001 From: Muriel de Souza Godoi Date: Thu, 20 Sep 2007 18:40:22 +0000 Subject: add create game icons, create game gui New svgcard system using a cache to minimize memory usage. --- (limited to 'createcardpanel.py') diff --git a/createcardpanel.py b/createcardpanel.py index fa8ecd6..e2de4bc 100644 --- a/createcardpanel.py +++ b/createcardpanel.py @@ -27,8 +27,8 @@ _logger = logging.getLogger('memorize-activity') class CreateCardPanel(gtk.EventBox): __gsignals__ = { - 'add-pair': (gobject.SIGNAL_RUN_FIRST, None, [gobject.TYPE_PYOBJECT]), - 'update-pair': (gobject.SIGNAL_RUN_FIRST, None, [gobject.TYPE_PYOBJECT]), + 'add-pair': (gobject.SIGNAL_RUN_FIRST, None, [gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT]), + 'update-pair': (gobject.SIGNAL_RUN_FIRST, None, [gobject.TYPE_PYOBJECT,gobject.TYPE_PYOBJECT]), } def __init__(self): @@ -54,10 +54,10 @@ class CreateCardPanel(gtk.EventBox): self.show_all() def emit_add_pair(self, widget, event): - self.emit('add-pair',self.cardeditor.get_text()) + self.emit('add-pair',self.cardeditor.get_text(),self.cardeditor.get_text()) def emit_update_pair(self, widget, event): - self.emit('update-pair',self.cardeditor.get_text()) + self.emit('update-pair',self.cardeditor.get_text(),self.cardeditor.get_text()) def load_pair(self, widget, newtext): self.cardeditor.set_text(newtext) @@ -88,7 +88,7 @@ class CardEditor(gtk.EventBox): table.set_col_spacings(10) table.set_row_spacings(10) table.set_border_width(20) - self.card = svgcard.SvgCard(-1, {'front_text':{'card_text':'', 'text_color':'#ffffff'}, 'front_border':{'fill_color':'#4c4d4f', 'stroke_color':'#ffffff', 'opacity':'1'}}, {}, None, 184, 1, '#c0c0c0') + self.card = svgcard.SvgCard(-1, {'front_text':{'card_text':'', 'text_color':'#ffffff'}, 'front_border':{'fill_color':'#4c4d4f', 'stroke_color':'#ffffff', 'opacity':'1'}}, None, 184, 1, '#c0c0c0') self.card.flip() table.attach(self.previewlabel, 0, 1, 1, 2) -- cgit v0.9.1