1
2
3
4
5
6
7
8
9
10
11
|
# encoding: utf-8
# title: Spec buttons for apps
# description: Adds configurable mini toolbar buttons
# version: 0.8.2
# depends: streamtuner2 >= 2.2.0
# type: feature
# category: ui
# config:
# { name: specbutton_rows, value: 2, max: 4, type: int, description: "Number of rows to arrange buttons in." }
# { name: specbuttons, type: dict, columns: "Icon,Command", description: "Icons can be `<a href='http://www.pygtk.org/pygtk2reference/gtk-stock-items.html'>gtk-xyz</a>` internal names. Else use `/usr/share/icon/*.png` file names. Icon file basenames will be expanded into full paths." }
# documentation:
|
|
|
1
2
3
4
5
6
7
8
9
10
11
|
# encoding: utf-8
# title: Spec buttons for apps
# description: Adds configurable mini toolbar buttons
# version: 0.8.3
# depends: streamtuner2 >= 2.2.0
# type: feature
# category: ui
# config:
# { name: specbutton_rows, value: 2, max: 4, type: int, description: "Number of rows to arrange buttons in." }
# { name: specbuttons, type: dict, columns: "Icon,Command", description: "Icons can be `<a href='http://www.pygtk.org/pygtk2reference/gtk-stock-items.html'>gtk-xyz</a>` internal names. Else use `/usr/share/icon/*.png` file names. Icon file basenames will be expanded into full paths." }
# documentation:
|
126
127
128
129
130
131
132
133
134
135
|
conf.specbuttons = r
self.update_buttons(self.parent)
# Button callback, allow for %url/%title placeholders
def action(self, cmd):
if re.search("[%$]", cmd):
row = self.parent.channel().row()
cmd = action.run_fmt_url(cmd, row=row, add_default=False, cmd=cmd)
action.run(cmd)
|
|
>
|
|
126
127
128
129
130
131
132
133
134
135
136
|
conf.specbuttons = r
self.update_buttons(self.parent)
# Button callback, allow for %url/%title placeholders
def action(self, cmd):
if re.search("[%$]", cmd):
row = self.parent.channel().row()
action.run_fmt_url(row=row, add_default=False, cmd=cmd)
else:
action.run(cmd)
|