diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-09-06 19:24:49 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2009-09-06 19:24:49 (GMT) |
commit | 02d954c1030a4813a68888a063e76d386eb63087 (patch) | |
tree | cad994c50e990dba4210310a30118daffe9642f8 | |
parent | 23387adc11d5bcd22222135c4a1127443447c10e (diff) |
Use get_toplevel() to get activity window
-rw-r--r-- | activity.py | 5 | ||||
-rw-r--r-- | createcardpanel.py | 4 |
2 files changed, 2 insertions, 7 deletions
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) |