def select(self): if self._orig: return True; self.name, self.id, self._orig = chooser.pick( lambda jobject: (jobject.metadata['title'], jobject.object_id, theme.pixbuf(jobject.file_path)), (None, None, None), what=chooser.IMAGE) if self.name: self._thumb = theme.scale(self._orig) return True else: return False
def __init__(self, name, thumbfile, dir): self.name = name self.frames = [] if dir: for i in sorted(glob.glob(theme.path(dir, '*'))): self.frames.append(PreinstalledFrame( os.path.join(dir, os.path.basename(i)))) self._thumb = theme.pixbuf(thumbfile, theme.THUMB_SIZE) self._custom = False else: for i in range(0, theme.FRAME_ROWS * theme.FRAME_COLS): self.frames.append(CustomFrame()) self._thumb = theme.CUSTOM_FRAME_THUMB self._custom = True
def __init__(self, name, id, soundfile, thumb): self.name = name self.id = id self._soundfile = soundfile self._thumb = theme.pixbuf(thumb, theme.THUMB_SIZE)
def __init__(self, jobject): Ground.__init__(self, jobject.metadata['title'], jobject.object_id) self._orig = theme.pixbuf(jobject.file_path) THEMES.append(self)
def __init__(self, name, filename): Ground.__init__(self, name, None) self._orig = theme.pixbuf(filename)
def orig(self): if self._orig == None: self._orig = theme.pixbuf(self._filename) return self._orig