コード例 #1
0
ファイル: localdir.py プロジェクト: wazari972/picty
    def _open(self):
        return True

    def delete_store(self):
        return True


class Device(LocalDir):
    type = 'DEVICE'
    type_descr = 'Device'
    pref_widget = LocalDirPrefWidget
    add_widget = None

    def __init__(self, prefs):
        LocalDir.__init__(self, prefs)
        self.pixbuf = prefs[
            'pixbuf']  #device pixbuf varies depending on the device
        self.monitor_image_dirs = False

    def _open(self):
        return True


#    def start_monitor(self,callback):
#        if self.monitor_image_dirs:
#            self.monitor_master_callback=callback
#            self.monitor=monitor.Monitor(self.image_dirs,self.recursive,self.monitor_callback)

baseobjects.register_collection('LOCALDIR', LocalDir)
baseobjects.register_collection('DEVICE', Device)
コード例 #2
0
        val = viewsupport.get_aperture(item)
        if val:
            exposure += 'f/%3.1f' % (val, )
        val = viewsupport.get_speed_str(item)
        if val:
            exposure += ' %ss' % (val, )
        val = viewsupport.get_iso_str(item)
        if val:
            exposure += ' iso%s' % (val, )
        if exposure:
            if details and not details.endswith('\n'):
                details += '\n'
            details += 'Exposure: ' + exposure
        #IMAGE SIZE AND ZOOM LEVEL
        if size:
            if details and not details.endswith('\n'):
                details += '\n'
            details += 'Image Dimensions: %i x %i' % size
        if zoom:
            if details and not details.endswith('\n'):
                details += '\n'
            if zoom != 'fit':
                details += 'Zoom: %3.2f%%' % (zoom * 100, )
            else:
                details += 'Zoom: Fit'

        return (header, details)


baseobjects.register_collection('LOCALSTORE', Collection)
コード例 #3
0
            exposure += 'f/%3.1f' % (val, )
        val = viewsupport.get_speed_str(item)
        if val:
            exposure += ' %ss' % (val, )
        val = viewsupport.get_iso_str(item)
        if val:
            exposure += ' iso%s' % (val, )
        if exposure:
            if details and not details.endswith('\n'):
                details += '\n'
            details += 'Exposure: ' + exposure
        # IMAGE SIZE AND ZOOM LEVEL
        if size:
            if details and not details.endswith('\n'):
                details += '\n'
            details += 'Image Dimensions: %i x %i' % size
        if zoom:
            if details and not details.endswith('\n'):
                details += '\n'
            if zoom != 'fit':
                details += 'Zoom: %3.2f%%' % (zoom * 100, )
            else:
                details += 'Zoom: Fit'

        return (header, details)


log.setLevel(logging.DEBUG)
baseobjects.register_collection('WEBALBUMS', Theme)
log.warn("WebAlbums themes registered.")