Check-in [5d8d7fd191]
Overview
Comment: | Use custom GenericChannel.columns() wrapper to simplify passing TreeView widget and keeping returned liststore/rowmap/pix_entry. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
5d8d7fd191eb5bda0342183cc7fd146b |
User & Date: | mario on 2015-05-09 21:37:44 |
Other Links: | manifest | tags |
Context
2015-05-09
| ||
21:38 | Prepare for more complex hooks["play"] invocation (ignore args, kwargs). check-in: 5fbe0ccd0c user: mario tags: trunk | |
21:37 | Use custom GenericChannel.columns() wrapper to simplify passing TreeView widget and keeping returned liststore/rowmap/pix_entry. check-in: 5d8d7fd191 user: mario tags: trunk | |
21:36 | Minor typo fixes. check-in: d1befc2a99 user: mario tags: trunk | |
Changes
Modified channels/__init__.py from [824048913b] to [33bbfd495e].
︙ | |||
66 67 68 69 70 71 72 73 74 75 76 77 78 79 | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | + + + | catmap = {} shown = None # last selected entry in stream list, also indicator if notebook tab has been selected once / stream list of current category been displayed yet # gui + data streams = {} # Station list dict, associates each genre to a list of stream rows gtk_list = None # Gtk widget for station treeview gtk_cat = None # Gtk widget for category columns _ls = None # ListStore for station treeview _rowmap = None # Preserve streams-datamap _pix_entry = None # ListStore entry that contains favicon # mapping of stream{} data into gtk treeview/treestore representation datamap = [ # coltitle width [ datasrc key, type, renderer, attrs ] [cellrenderer2], ... ["", 20, ["state", str, "pixbuf", {}], ], ["Genre", 65, ['genre', str, "t", {}], ], ["Station Title",275, ["title", str, "text", {"strikethrough":11, "cell-background":12, "cell-background-set":13}], ["favicon", gtk.gdk.Pixbuf, "pixbuf", {}], ], |
︙ | |||
152 153 154 155 156 157 158 | 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | - - - - - - - + + + + | self.current = conf.state(self.module).get("current") self.display_categories() # update column names for field,title in list(self.titles.items()): self.update_datamap(field, title=title) |
︙ | |||
320 321 322 323 324 325 326 | 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 | - + - + | self.status("Category parsed empty.") self.streams[category] = self.nothing_found log.INFO("Oooops, parser returned nothing for category " + category) # Update treeview/model (if category is still selected) if self.current == category: log.UI("load() → uikit.columns({}.streams[{}])".format(self.module, category), [inspect.stack()[x][3] for x in range(1,5)]) |
︙ |