diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-04-15 23:34:52 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2009-04-15 23:34:52 (GMT) |
commit | 507f8afd1d5a92ad746528b7a2dfaaa524c0ccc1 (patch) | |
tree | 256bd99a6ec95594ed09d873c57f2e36a4c2794f /ground.py | |
parent | 64cb9ab01d16afb4d56d811d0fbf6b12f644ad7c (diff) |
Switch to sugar-port
Diffstat (limited to 'ground.py')
-rw-r--r-- | ground.py | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -16,6 +16,9 @@ import os import gtk from gettext import gettext as _ +import port.chooser as chooser +import port.pixbuf as pixbuf + import theme def load(): @@ -34,7 +37,7 @@ class Ground: return True def serialize(self): - return theme.pixbuf2str(self._orig) + return pixbuf.to_str(self._orig) def thumb(self): if not self._thumb: @@ -62,14 +65,15 @@ class CustomGround(Ground): def select(self): try: - return theme.choose_image(lambda jobject: JournalGround(jobject)) + return chooser.pick(lambda jobject: JournalGround(jobject), + what=chooser.IMAGE) except: return None class RestoredGround(Ground): def __init__(self, name, id, data): Ground.__init__(self, name, id) - self._orig = theme.str2pixbuf(data) + self._orig = pixbuf.from_str(data) class JournalGround(Ground): def __init__(self, jobject): |