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

⌈⌋ branch:  streamtuner2


Check-in [e0aba9dd4e]

Overview
Comment:Rename to "Spec buttons", use new {type:dict} config descriptor.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:e0aba9dd4ec71eab8036f3ff5cc9f71d3b3a9846
User & Date: mario on 2016-10-28 18:14:01
Other Links: manifest | tags
Context
2016-10-28
23:08
Fix add_default=False logic. check-in: 87a6d5ac96 user: mario tags: trunk
18:14
Rename to "Spec buttons", use new {type:dict} config descriptor. check-in: e0aba9dd4e user: mario tags: trunk
18:13
Update config_play/_record and their TreeViews for the slimmer ListStore without row[2] `editable` bool, and the more generic uikit.liststore_edit callback (still requires lambda handlers for column and liststore as user_data). check-in: bca80ec8af user: mario tags: trunk
Changes

Modified channels/specbuttons.py from [cb0390ac2c] to [19182e61c1].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# encoding: utf-8
# title: Extra buttons for apps
# description: Adds configurable mini toolbar buttons
# version: 0.7
# 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, rows: "icon,command", description: "Associate icons to external commands." }
# doc:
#    http://fossil.include-once.org/streamtuner2/info/43b36ed35b1488d5
#
# Adds the mini/extra buttons in the toolbar, which allow to control your
# audio player or run other system commands. The configuration list is in
# the Settings → Options tab.
#
................................................................................
    # Hook toolbar label
    def __init__(self, parent):
        self.parent = parent
        self.specbuttons = parent.get_widget("specbuttons")
        parent.hooks["init"].append(self.update_buttons)
        parent.hooks["config_save"].append(self.update_paths)
        parent.specbuttons.show()
        parent.tv_config_specbuttons.show()

    # Extra buttons
    def update_buttons(self, parent):
    
        # define table width (2 rows default)
        y = max(min(int(conf.specbutton_rows), 4), 1) # 1 <= y <= 4
        self.specbuttons.resize(y, int(math.ceil(len(conf.specbuttons) / y)))

|







|







 







<







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
46
47
48
49
50
51
52

53
54
55
56
57
58
59
# encoding: utf-8
# title: Spec buttons for apps
# description: Adds configurable mini toolbar buttons
# version: 0.7
# 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 either be `<a href='http://www.pygtk.org/pygtk2reference/gtk-stock-items.html'>gtk-xyz</a>` internal names, or `/usr/share/icon/*.png` path names ← which icon basenames would be expanded into. Commands can be any external program." }
# doc:
#    http://fossil.include-once.org/streamtuner2/info/43b36ed35b1488d5
#
# Adds the mini/extra buttons in the toolbar, which allow to control your
# audio player or run other system commands. The configuration list is in
# the Settings → Options tab.
#
................................................................................
    # Hook toolbar label
    def __init__(self, parent):
        self.parent = parent
        self.specbuttons = parent.get_widget("specbuttons")
        parent.hooks["init"].append(self.update_buttons)
        parent.hooks["config_save"].append(self.update_paths)
        parent.specbuttons.show()


    # Extra buttons
    def update_buttons(self, parent):
    
        # define table width (2 rows default)
        y = max(min(int(conf.specbutton_rows), 4), 1) # 1 <= y <= 4
        self.specbuttons.resize(y, int(math.ceil(len(conf.specbuttons) / y)))