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

⌈⌋ branch:  streamtuner2


Diff

Differences From Artifact [1bd85b04a1]:

To Artifact [0098cea19a]:


1
2
3
4
5
6
7

8
9
10
11
12
13
14
15


16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

31
32
33
34







35
36



37

38
39
40
41
42
43
44
# api: streamtuner2
# title: Default Windows theme
# description: Use "Rezlooks-dark" as default theme on Windows for SFX/EXE installer
# type: feature
# category: ui
# priority: default
# pack: win_theme_rezlooks.py=../channels/

# version: -1
# author: Doug Whiteley
# license: GNU GPL
#
# Sets a dark Gtk theme on Windows per default. To disable, simply
# uncheck this plugin. The standard rendering will take hold after
# a restart.
# Other themes can be used with the `gtk_theme` plugin easily.




import os
from config import *
import uikit
from compat2and3 import *



# register a key
class win_theme_rezlooks(object):

    # plugin info
    module = "win_theme_rezlooks"
    meta = plugin_meta()

    theme_dirs = [uikit.gtk.rc_get_theme_dir(), conf.dir + "/themes", conf.share + "/themes"]

    # use builtin .GTKRC
    def __init__(self, parent):







        uikit.gtk.rc_parse_string(self.gtkrc)
        uikit.gtk.rc_reparse_all()





    gtkrc = """
style "rezlooks-default"
{
  GtkButton::default_border = { 0, 0, 0, 0 }
  GtkButton::default_outside_border = { 0, 0, 0, 0 }
  GtkRange::trough_border = 0







>








>
>




|










>
|



>
>
>
>
>
>
>
|
|
>
>
>

>






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# api: streamtuner2
# title: Default Windows theme
# description: Use "Rezlooks-dark" as default theme on Windows for SFX/EXE installer
# type: feature
# category: ui
# priority: default
# pack: win_theme_rezlooks.py=../channels/
# depends: librezlooks.dll
# version: -1
# author: Doug Whiteley
# license: GNU GPL
#
# Sets a dark Gtk theme on Windows per default. To disable, simply
# uncheck this plugin. The standard rendering will take hold after
# a restart.
# Other themes can be used with the `gtk_theme` plugin easily.
#
# (!) Only works with `librezlooks.dll` in place however.


import os
from config import *
from uikit import gtk
from compat2and3 import *



# register a key
class win_theme_rezlooks(object):

    # plugin info
    module = "win_theme_rezlooks"
    meta = plugin_meta()
    gtk_dll = 'C:\\Python27\\Lib\\site-packages\\gtk-2.0\\runtime\\lib\\gtk-2.0\\2.10.0\\engines\\librezlooks.dll'
    gtk_dll_src = '%s/dev/librezlooks.dll' % conf.share

    # use builtin .GTKRC
    def __init__(self, parent):
        # assert gtk-engine is there, else copy it over
        if not os.path.exists(self.gtk_dll):
            if os.path.exists(self.gtk_dll_src)
                os.copy(self.gtk_dll_src, self.gtk_dll)
            else:
                return
        # apply theme
        gtk.rc_parse_string(self.gtkrc)
        gtk.rc_reparse_all()
        # probably redundant:
        gtk.rc_reset_styles(gtk.settings_get_for_screen(gtk.gdk.screen_get_default()))
        parent.win_streamtuner2.queue_draw()

    # theme settings
    gtkrc = """
style "rezlooks-default"
{
  GtkButton::default_border = { 0, 0, 0, 0 }
  GtkButton::default_outside_border = { 0, 0, 0, 0 }
  GtkRange::trough_border = 0
241
242
243
244
245
246
247

248
widget_class "*.GtkNotebook.*.GtkViewport" style "rezlooks-notebook"

# evolution
widget_class "*GtkCTree*" style "evolution-hack"
widget_class "*GtkList*" style "evolution-hack"
widget_class "*GtkCList*" style "evolution-hack"
widget_class "*.ETree.*" style "evolution-hack"

"""







>
256
257
258
259
260
261
262
263
264
widget_class "*.GtkNotebook.*.GtkViewport" style "rezlooks-notebook"

# evolution
widget_class "*GtkCTree*" style "evolution-hack"
widget_class "*GtkList*" style "evolution-hack"
widget_class "*GtkCList*" style "evolution-hack"
widget_class "*.ETree.*" style "evolution-hack"

"""