From 02d954c1030a4813a68888a063e76d386eb63087 Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Sun, 06 Sep 2009 19:24:49 +0000 Subject: Use get_toplevel() to get activity window --- diff --git a/activity.py b/activity.py index 8f774cd..813b837 100644 --- a/activity.py +++ b/activity.py @@ -59,16 +59,11 @@ PATH = '/org/laptop/Memorize' _TOOLBAR_PLAY = 1 _TOOLBAR_CREATE = 2 -this = None - class MemorizeActivity(Activity): def __init__(self, handle): Activity.__init__(self, handle) - global this - this = self - self.create_load = False self.play_mode = None diff --git a/createcardpanel.py b/createcardpanel.py index c52d2f3..4ac5c72 100644 --- a/createcardpanel.py +++ b/createcardpanel.py @@ -374,7 +374,7 @@ class CardEditor(gtk.EventBox): del pixbuf_t del pixbuf_z - chooser.pick(parent=activity.this, + chooser.pick(parent=self.get_toplevel(), what=chooser.IMAGE, cb=load) @@ -394,7 +394,7 @@ class CardEditor(gtk.EventBox): self.emit('has-sound', True) _logger.debug('Audio Loaded: '+dst) - chooser.pick(parent=activity.this, + chooser.pick(parent=self.get_toplevel(), what=chooser.AUDIO, cb=load) -- cgit v0.9.1