Ejemplo n.º 1
0
def on_reload(ctx=None):
    for key in ('THEME', 'FS_HIDE_FILES', 'OPTION_STYLE', 'PAGE_OPEN',
                'RECENT_SEARCH_LIMIT', "PAGE_SIZE", "RECENT_SIZE"):
        value = cacheutil.hget('sys.config', key)
        xutils.trace("HGET", "key=%s, value=%s" % (key, value))
        if value is not None:
            setattr(xconfig, key, value)

    path = os.path.join(xconfig.SCRIPTS_DIR, "user.css")
    if not os.path.exists(path):
        return
    xconfig.set("USER_CSS", xutils.readfile(path))
Ejemplo n.º 2
0
def on_reload(ctx=None):
    keys = ("THEME", 'FS_HIDE_FILES', 'OPTION_STYLE', 'PAGE_OPEN',
            'RECENT_SEARCH_LIMIT', "PAGE_SIZE", "RECENT_SIZE",
            "RECORD_LOCATION", "TRASH_EXPIRE", "PAGE_WIDTH", "FS_VIEW_MODE")
    for key in keys:
        value = cacheutil.hget('sys.config', key)
        xutils.trace("HGET", "key=%s, value=%s" % (key, value))
        if value is not None:
            setattr(xconfig, key, value)

    path = os.path.join(xconfig.SCRIPTS_DIR, "user.css")
    if not os.path.exists(path):
        return
    xconfig.USER_CSS = xutils.readfile(path)