Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/cardlist.py
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2009-01-29 18:01:47 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-01-29 18:01:47 (GMT)
commit48a3c653d91aad048f7b0ba34ec5767d9ae35e1d (patch)
tree950d7285ee0bfe65a5f9bc4421f2b253f1d60f08 /cardlist.py
parentaaf957ba0cec1a70463250b6a85b02514b10bade (diff)
Update-pair-button's sensitivity reflects to selected pair OLPC#6618
Diffstat (limited to 'cardlist.py')
-rw-r--r--cardlist.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/cardlist.py b/cardlist.py
index 735af5c..f324ad0 100644
--- a/cardlist.py
+++ b/cardlist.py
@@ -39,7 +39,7 @@ _logger = logging.getLogger('memorize-activity')
class CardList(gtk.EventBox):
__gsignals__ = {
- 'pair-selected': (SIGNAL_RUN_FIRST, None, 6 * [TYPE_PYOBJECT]),
+ 'pair-selected': (SIGNAL_RUN_FIRST, None, 7 * [TYPE_PYOBJECT]),
'update-create-toolbar': (SIGNAL_RUN_FIRST, None, 3 * [TYPE_PYOBJECT]),
'update-create-buttons': (SIGNAL_RUN_FIRST, None, 2 * [TYPE_PYOBJECT]),
}
@@ -210,6 +210,7 @@ class CardList(gtk.EventBox):
self.pairs.remove(widget)
del widget
self.emit('update-create-buttons', True, True)
+ self.emit('pair-selected', False, None, None, None, None, None, None)
def set_selected(self, widget, event):
if self.current_pair <> None:
@@ -217,7 +218,10 @@ class CardList(gtk.EventBox):
self.old.set_selected(False)
self.current_pair = widget
widget.set_selected(True)
- self.emit('pair-selected', self.current_pair.get_text(1), self.current_pair.get_text(2), self.current_pair.get_pixbuf(1), self.current_pair.get_pixbuf(2), self.current_pair.get_sound(1), self.current_pair.get_sound(2))
+ self.emit('pair-selected', True,
+ self.current_pair.get_text(1), self.current_pair.get_text(2),
+ self.current_pair.get_pixbuf(1), self.current_pair.get_pixbuf(2),
+ self.current_pair.get_sound(1), self.current_pair.get_sound(2))
def update_selected(self, widget, newtext1, newtext2, aimg, bimg, asnd, bsnd):
self.current_pair.change_text(newtext1, newtext2)