diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-02-07 11:45:22 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2009-02-07 11:45:22 (GMT) |
commit | c1954705fa0123dc91265098b3e375b4919572de (patch) | |
tree | 1e7254677f30c8889589bd9a1365588dd831d559 /ground.py | |
parent | 7671f904c967dfe561ebb8f3ce08389963784ea9 (diff) |
Mix in Documnt with more OOP; add id for all objects
Diffstat (limited to 'ground.py')
-rw-r--r-- | ground.py | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -34,7 +34,7 @@ class Ground: return True def read(self): - pixbuf2str(self._orig) + return theme.pixbuf2str(self._orig) def thumb(self): if not self._thumb: @@ -61,17 +61,19 @@ class CustomGround(Ground): self._orig = theme.pixbuf(filename) def select(self): - return theme.choose(lambda jobject: JournalGround(jobject)) + try: + return theme.choose(lambda jobject: JournalGround(jobject)) + except: + return None class RestoredGround(Ground): def __init__(self, name, id, data): Ground.__init__(self, name, id) - self._orig = str2pixbuf(data) + self._orig = theme.str2pixbuf(data) class JournalGround(Ground): def __init__(self, jobject): - Ground.__init__(self, jobject.props.metadata['title'], - jobject.object_id) + Ground.__init__(self, jobject.metadata['title'], jobject.object_id) self._orig = theme.pixbuf(jobject.file_path) THEMES = [ |