Check-in [2b3b50b6ad]
Overview
Comment: | Removed static .title and .module properties. Plugin discovery now realized through pkgutil.iter_modules(). |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
2b3b50b6ad9b7e64e1f616c9e27e8238 |
User & Date: | mario on 2015-03-29 03:03:50 |
Other Links: | manifest | tags |
Context
2015-03-29
| ||
03:06 | More complete plugin_meta() regex patterns. Now defaults to inspect.get_comments() on previous stack frame, src= or fn= only accepted as fallback. Complete default meta fields, splits doc block out, autostrips hash prefixes and indentation. check-in: 70c2e437fd user: mario tags: trunk | |
03:03 | Removed static .title and .module properties. Plugin discovery now realized through pkgutil.iter_modules(). check-in: 2b3b50b6ad user: mario tags: trunk | |
2015-03-28
| ||
18:50 | Merged _generic into channels/__init__. check-in: 817010842c user: mario tags: trunk | |
Changes
Modified channels/__init__.py from [da5f3b55c8] to [14b4644be4].
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - + + | # # encoding: UTF-8 # api: streamtuner2 # type: base # category: ui |
︙ | |||
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | 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 | + - - - + + + - - - - - - - - - - - + - | import action import favicon import os.path import xml.sax.saxutils import re import copy import inspect import pkgutil # Only export plugin classes __all__ = [ "GenericChannel", "ChannelPlugin", "module_list" ] # Search through ./channels/ and get module basenames. # Also order them by conf.channel_order # def module_list(): |
︙ | |||
133 134 135 136 137 138 139 | 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 | - - + + + + + + + + + + + + + | # constructor def __init__(self, parent=None): #self.streams = {} self.gtk_list = None self.gtk_cat = None |
︙ | |||
206 207 208 209 210 211 212 | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | - + | # load default category if (self.current): self.load(self.current) else: mygtk.columns(self.gtk_list, self.datamap, []) # add to main menu |
︙ | |||
573 574 575 576 577 578 579 | 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 | - - + + | fn = "/usr/share/streamtuner2/channels/" + self.module + ".png" if os.path.exists(fn): icon = gtk.Image() icon.set_property("pixbuf", gtk.gdk.pixbuf_new_from_file(fn)) icon.set_property("icon-size", 1) icon.set_property("visible", True) label.pack_start(icon, expand=False, fill=True) |
︙ |