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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [5c5b1b29cf]

Overview
Comment:Remove obsolete windows theme plugin.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5c5b1b29cfc584d45d3835e5c544d55b565cab07
User & Date: mario on 2016-12-17 11:28:01
Other Links: manifest | tags
Context
2016-12-18
14:03
More details to overview, extract some flags, add dirname. List feature plugins in separate table. check-in: 14be328ff7 user: mario tags: trunk
2016-12-17
11:28
Remove obsolete windows theme plugin. check-in: 5c5b1b29cf user: mario tags: trunk
11:22
Set Frequence3 as new default bookmark (curb the finder song) check-in: 0e8c56d915 user: mario tags: trunk
Changes

Modified .win.pack from [a4570b6588] to [39e18d0030].

1
2
3
4
5
6
7
# pack:
#    dev/install_python_gtk.*, dev/*.cmd,
#    dev/librezlooks.dll,
#    dev/*.ico=/usr/share/pixmaps/,
#    help/help.chm,
#    contrib/disabled/win_theme_rezlooks.py=channels/,
#    .win.pack=


<


<

1
2

3
4

5
# pack:
#    dev/install_python_gtk.*, dev/*.cmd,

#    dev/*.ico=/usr/share/pixmaps/,
#    help/help.chm,

#    .win.pack=

Deleted contrib/disabled/win_theme_rezlooks.py version [5fed4755f0].

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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
# api: streamtuner2
# title: Default Windows theme
# description: Use "Rezlooks-dark" as default theme on Windows for SFX/EXE installer
# type: feature
# category: ui
# priority: optional
# 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, shutil
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):
                try:
                    shutil.copyfile(self.gtk_dll_src, self.gtk_dll)
                except:
                    log.ERR("could not copy librezlooks.dll")
                    return
            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

  GtkWidget::focus_padding = 1

  GtkPaned::handle_size = 6

  GtkRange::slider_width = 15
  GtkRange::stepper_size = 15 # toolbar arrows
  GtkScrollbar::min_slider_length = 30
  GtkCheckButton::indicator_size = 12
  GtkMenuBar::internal-padding = 0

  GtkTreeView::expander_size = 14
  GtkExpander::expander_size = 16

  xthickness = 1
  ythickness = 1

  fg[NORMAL]        = "#cccccc" # very dark brown
  fg[PRELIGHT]      = "#cccccc" # text on buttons (hover)
  fg[ACTIVE]        = "#cccccc" # text on unfocused tabs
  fg[SELECTED]      = "#cccccc" # selected text on lists
  fg[INSENSITIVE]   = "#999999" # greyed "unused" text

  bg[NORMAL]		= "#202020" # entire background
  bg[PRELIGHT]		= "#181818" # button prelights
  bg[ACTIVE]		= "#282828" # selected taskbar items
  bg[SELECTED]		= "#333333" # ???
  bg[INSENSITIVE]	= "#424242" # greyed buttons

  base[NORMAL]		= "#080808" # window background
  base[PRELIGHT]	= "#3d3e3f" # menubar outline colour
  base[ACTIVE]		= "#282828" # selected item background (out of focus)
  base[SELECTED]	= "#333333" # selected hilight,tab/slider background, & menu stripe
  base[INSENSITIVE]	= "#282828" # greyed sliders

  text[NORMAL]		= "#cccccc" # text in general
  text[PRELIGHT]	= "#cccccc" # hover text (on buttons)
  text[ACTIVE]		= "#a2a2a2" # greyed text out of use (on highlight)
  text[SELECTED]	= "#eeeeee" # selected text (on highlight)
  text[INSENSITIVE]	= "#b1b1b1" # greyed text

  engine "rezlooks" 
  {
	scrollbar_color   = "#202020"
    menubarstyle      = 1       # 0 = flat, 1 = gradient
    menuitemstyle     = 1       # currently IGNORED
    listviewitemstyle = 1       # currently IGNORED
    progressbarstyle  = 1       # currently IGNORED
	animation         = TRUE
  }
}

style "rezlooks-progressbar" = "rezlooks-default"
{
  fg[PRELIGHT] = "#202020"
  xthickness = 1
  ythickness = 1

}

style "rezlooks-wide" = "rezlooks-default"
{
  xthickness = 2
  ythickness = 2
}

style "rezlooks-button" = "rezlooks-default"
{
  xthickness = 3
  ythickness = 3
  bg[NORMAL] = "#202020"
}

style "rezlooks-notebook" = "rezlooks-wide"
{
  bg[NORMAL] = "#202020" # inner window background colour
  bg[ACTIVE] = "#333333" # out of focus tabs
}


style "rezlooks-tasklist" = "rezlooks-default"
{
  xthickness = 5
  ythickness = 3
}

style "rezlooks-menu" = "rezlooks-default"
{
  xthickness = 2
  ythickness = 1
}

style "rezlooks-menu-item" = "rezlooks-default"
{
  xthickness = 2
  ythickness = 3
  fg[PRELIGHT] = "#cccccc"
  text[PRELIGHT] = "#cccccc"
}

style "rezlooks-menubar" = "rezlooks-default"
{
	fg[NORMAL] = "#cccccc"
	text[NORMAL] = "#cccccc"
	fg[PRELIGHT] = "#cccccc"
	fg[ACTIVE] = "#cccccc"
}

style "rezlooks-tree" = "rezlooks-default"
{
  xthickness = 2
  ythickness = 2
}

style "evolution-hack" = "rezlooks-default"
{
}

style "rezlooks-frame-title" = "rezlooks-default"
{
  fg[NORMAL] = "#404040"
}

style "rezlooks-panel" = "rezlooks-default"
{
  xthickness = 3
  ythickness = 3
}

style "rezlooks-tooltips" = "rezlooks-default"
{
  xthickness = 4
  ythickness = 4
  bg[NORMAL] = { 1.0,1.0,0.75 }
}

style "rezlooks-combo" = "rezlooks-default"
{
  xthickness = 1
  ythickness = 2
}

style "metacity-frame"
{
  # Normal base color
  #bg[NORMAL]  = "#bbbbbb"

  # Unfocused title background color
  #bg[INSENSITIVE]  = { 0.8, 0.8, 0.8 }

  # Unfocused title text color
  #fg[INSENSITIVE]  = { 1.55, 1.55, 1.55 }

  # Focused icon color
  #fg[NORMAL]  = { 0.2, 0.2, 0.2 }

  # Focused title background color
  bg[SELECTED]  = "#4d4e50"

  # Focused title text color
  fg[SELECTED]  = "#ffffff"
}

# widget styles
class "GtkWidget" style "rezlooks-default"
class "GtkButton" style "rezlooks-button"
class "GtkCombo"  style "rezlooks-button"
class "GtkRange"  style "rezlooks-wide"
class "GtkFrame"  style "rezlooks-wide"
class "GtkMenu"   style "rezlooks-menu"
class "GtkEntry"  style "rezlooks-button"
class "GtkMenuItem"    style "rezlooks-menu-item"
class "GtkStatusbar"   style "rezlooks-wide"
class "GtkNotebook"    style "rezlooks-notebook"
class "GtkProgressBar" style "rezlooks-progressbar"
class "*MenuBar*"      style "rezlooks-menubar"

class "MetaFrames" style "metacity-frame"
widget_class "*MenuItem.*" style "rezlooks-menu-item"

# combobox stuff
widget_class "*.GtkComboBox.GtkButton" style "rezlooks-combo"
widget_class "*.GtkCombo.GtkButton"    style "rezlooks-combo"

# tooltips stuff
widget_class "*.tooltips.*.GtkToggleButton" style "rezlooks-tasklist"
widget "gtk-tooltips" style "rezlooks-tooltips"

# treeview stuff
widget_class "*.GtkTreeView.GtkButton" style "rezlooks-tree"
widget_class "*.GtkCTree.GtkButton" style "rezlooks-tree"
widget_class "*.GtkList.GtkButton" style "rezlooks-tree"
widget_class "*.GtkCList.GtkButton" style "rezlooks-tree"
widget_class "*.GtkFrame.GtkLabel" style "rezlooks-frame-title"

# notebook stuff
widget_class "*.GtkNotebook.*.GtkEventBox" style "rezlooks-notebook"
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"

"""
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































































































































































































































































































Deleted dev/librezlooks.dll version [8eafebe3dc].

cannot compute difference between binary files