コード例 #1
0
ファイル: theme.py プロジェクト: 0tli4nitsa/ubuntu-tweak
def get_valid_window_themes():
    dirs = ( '/usr/share/themes',
             os.path.join(os.path.expanduser("~"), ".themes"))
    valid = walk_directories(dirs, lambda d:
                os.path.exists(os.path.join(d, "metacity-1")))

    valid.sort()

    return valid
コード例 #2
0
def get_valid_window_themes():
    dirs = ('/usr/share/themes',
            os.path.join(os.path.expanduser("~"), ".themes"))
    valid = walk_directories(
        dirs, lambda d: os.path.exists(os.path.join(d, "metacity-1")))

    valid.sort()

    return valid
コード例 #3
0
ファイル: sound.py プロジェクト: 0tli4nitsa/ubuntu-tweak
    def _get_valid_themes(self):
        dirs = ( '/usr/share/sounds',
                 os.path.join(os.path.expanduser("~"), ".sounds"))
        valid = walk_directories(dirs, lambda d:
                    os.path.exists(os.path.join(d, "index.theme")))

        valid.sort()

        return valid
コード例 #4
0
    def _get_valid_themes(self):
        dirs = ('/usr/share/sounds',
                os.path.join(os.path.expanduser("~"), ".sounds"))
        valid = walk_directories(
            dirs, lambda d: os.path.exists(os.path.join(d, "index.theme")))

        valid.sort()

        return valid
コード例 #5
0
ファイル: theme.py プロジェクト: 0tli4nitsa/ubuntu-tweak
def get_valid_cursor_themes():
    dirs = ( '/usr/share/icons',
             os.path.join(os.path.expanduser("~"), ".icons"))
    valid = walk_directories(dirs, lambda d:
                os.path.isdir(d) and \
                    os.path.exists(os.path.join(d, "cursors")))

    valid.sort()

    return valid
コード例 #6
0
def get_valid_cursor_themes():
    dirs = ('/usr/share/icons', os.path.join(os.path.expanduser("~"),
                                             ".icons"))
    valid = walk_directories(dirs, lambda d:
                os.path.isdir(d) and \
                    os.path.exists(os.path.join(d, "cursors")))

    valid.sort()

    return valid
コード例 #7
0
ファイル: theme.py プロジェクト: 0tli4nitsa/ubuntu-tweak
def get_valid_icon_themes():
    # This function is taken from gnome-tweak-tool
    dirs = ( '/usr/share/icons',
             os.path.join(os.path.expanduser("~"), ".icons"))
    valid = walk_directories(dirs, lambda d:
                os.path.isdir(d) and \
                    not os.path.exists(os.path.join(d, "cursors")))

    valid.sort()

    return valid
コード例 #8
0
def get_valid_icon_themes():
    # This function is taken from gnome-tweak-tool
    dirs = ('/usr/share/icons', os.path.join(os.path.expanduser("~"),
                                             ".icons"))
    valid = walk_directories(dirs, lambda d:
                os.path.isdir(d) and \
                    not os.path.exists(os.path.join(d, "cursors")))

    valid.sort()

    return valid
コード例 #9
0
ファイル: theme.py プロジェクト: 0tli4nitsa/ubuntu-tweak
def get_valid_themes():
    # This function is taken from gnome-tweak-tool
    """ Only shows themes that have variations for gtk+-3 and gtk+-2 """
    dirs = ( '/usr/share/themes',
             os.path.join(os.path.expanduser("~"), ".themes"))
    valid = walk_directories(dirs, lambda d:
                os.path.exists(os.path.join(d, "gtk-2.0")) and \
                    os.path.exists(os.path.join(d, "gtk-3.0")))

    valid.sort()

    return valid
コード例 #10
0
def get_valid_themes():
    # This function is taken from gnome-tweak-tool
    """ Only shows themes that have variations for gtk+-3 and gtk+-2 """
    dirs = ('/usr/share/themes',
            os.path.join(os.path.expanduser("~"), ".themes"))
    valid = walk_directories(dirs, lambda d:
                os.path.exists(os.path.join(d, "gtk-2.0")) and \
                    os.path.exists(os.path.join(d, "gtk-3.0")))

    valid.sort()

    return valid