From 507f8afd1d5a92ad746528b7a2dfaaa524c0ccc1 Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Wed, 15 Apr 2009 23:34:52 +0000 Subject: Switch to sugar-port --- (limited to 'ground.py') diff --git a/ground.py b/ground.py index 85bf608..a65b657 100644 --- a/ground.py +++ b/ground.py @@ -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): -- cgit v0.9.1