Internet radio browser GUI for music/video streams from various directory services.

⌈⌋ ⎇ branch:  streamtuner2


Check-in [723f84022a]

Overview
Comment:Fix path delimiter (it's probably ";" on Windows, blimey if only it was documented somewhere)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 723f84022aa4a68d5aa8be7f4e8842d8bcc6b1ae
User & Date: mario on 2016-12-16 18:35:54
Other Links: manifest | tags
Context
2016-12-17
10:51
fix .save_formats reference for file dialog check-in: 440ac1977d user: mario tags: trunk
2016-12-16
18:35
Fix path delimiter (it's probably ";" on Windows, blimey if only it was documented somewhere) check-in: 723f84022a user: mario tags: trunk
18:34
Fix popen(`locate`) exception. check-in: 8154611e3a user: mario tags: trunk
Changes

Modified contrib/theme_installer.py from [d37a7bfc56] to [d8378ec0f4].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# encoding: UTF-8
# api: streamtuner2
# title: Gtk2 theme installer
# description: Shows themes in the bookmarks pane for installation
# type: feature
# category: ui
# version: 0.3
# priority: experimental
#
# Downloads a list of Gtk themes and presents it in the bookmarks
# tab under... »themes«. Double clicking will download and install
# a theme right away.
#
# Note that this is primarily meant for Windows, as it unpacks






|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
# encoding: UTF-8
# api: streamtuner2
# title: Gtk2 theme installer
# description: Shows themes in the bookmarks pane for installation
# type: feature
# category: ui
# version: 0.3.1
# priority: experimental
#
# Downloads a list of Gtk themes and presents it in the bookmarks
# tab under... »themes«. Double clicking will download and install
# a theme right away.
#
# Note that this is primarily meant for Windows, as it unpacks
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
        z = zipfile.ZipFile(zip)
        z.extractall(self.theme_dir)
        ls = z.namelist()
        dll = [fn for fn in ls if re.search("\w+\.(dll|so)$", fn)]
        base = [m.group(1) for fn in ls for m in [re.match("^([\w\s\-\.]+)/gtk-2.0/.+", fn)] if m]

        # move *.dll / *.so
        for gtk_dir in uikit.gtk.rc_get_module_dir().split(":"):
            if os.path.exists(gtk_dir) and os.access(gtk_dir, os.W_OK):
                for fn in dll:
                    if fn.find("/") > 0:  # create lib/engines/.../ if given
                        try: os.makedirs(self.theme_dir + os.path.basename(fn))
                        except: pass      # copy file
                    if shutil.copy(self.theme_dir + fn, gtk_dir):
                        break

        # enable
        conf.theme = base[0]
        self.apply_theme(True)
        conf.save()








|













159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
        z = zipfile.ZipFile(zip)
        z.extractall(self.theme_dir)
        ls = z.namelist()
        dll = [fn for fn in ls if re.search("\w+\.(dll|so)$", fn)]
        base = [m.group(1) for fn in ls for m in [re.match("^([\w\s\-\.]+)/gtk-2.0/.+", fn)] if m]

        # move *.dll / *.so
        for gtk_dir in uikit.gtk.rc_get_module_dir().split(";" if conf.windows else ":"):
            if os.path.exists(gtk_dir) and os.access(gtk_dir, os.W_OK):
                for fn in dll:
                    if fn.find("/") > 0:  # create lib/engines/.../ if given
                        try: os.makedirs(self.theme_dir + os.path.basename(fn))
                        except: pass      # copy file
                    if shutil.copy(self.theme_dir + fn, gtk_dir):
                        break

        # enable
        conf.theme = base[0]
        self.apply_theme(True)
        conf.save()