예제 #1
0
 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
예제 #2
0
    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
예제 #3
0
 def __init__(self, name, id, soundfile, thumb):
     self.name = name
     self.id = id
     self._soundfile = soundfile
     self._thumb = theme.pixbuf(thumb, theme.THUMB_SIZE)
예제 #4
0
 def __init__(self, jobject):
     Ground.__init__(self, jobject.metadata['title'], jobject.object_id)
     self._orig = theme.pixbuf(jobject.file_path)
     THEMES.append(self)
예제 #5
0
 def __init__(self, name, filename):
     Ground.__init__(self, name, None)
     self._orig = theme.pixbuf(filename)
예제 #6
0
 def orig(self):
     if self._orig == None:
         self._orig = theme.pixbuf(self._filename)
     return self._orig