Check-in [f17890596d]
Overview
| Comment: | Allow repainting bookmarks categories after channel init |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
f17890596d5d2b8b9122398dba99a48c |
| User & Date: | mario on 2014-06-02 01:42:25 |
| Other Links: | manifest | tags |
Context
|
2014-06-02
| ||
| 01:43 | Remove force= parameter from update_streams check-in: 4b66ed9ef8 user: mario tags: trunk | |
| 01:42 | Allow repainting bookmarks categories after channel init check-in: f17890596d user: mario tags: trunk | |
|
2014-05-31
| ||
| 23:32 | less debug output check-in: 898d5ecf64 user: mario tags: trunk | |
Changes
Modified channels/_generic.py from [babd4a0b90] to [530431fbe1].
| ︙ | ︙ | |||
328 329 330 331 332 333 334 |
# reload current stream from web directory
def reload(self):
self.load(self.current, force=1)
def switch(self):
self.load(self.current, force=0)
| | > > > > > | 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 |
# reload current stream from web directory
def reload(self):
self.load(self.current, force=1)
def switch(self):
self.load(self.current, force=0)
# update streams pane if currently selected (used by bookmarks.links channel)
def reload_if_current(self, category):
if self.current == category:
self.reload()
# display .current category, once notebook/channel tab is first opened
def first_show(self):
__print__(dbg.PROC, "first_show ", self.module, self.shown)
if (self.shown != 55555):
|
| ︙ | ︙ |
Modified channels/history.py from [5834376e37] to [d33de09886].
| ︙ | ︙ | |||
46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
def __init__(self, parent):
# keep reference to main window
self.bm = parent.channels["bookmarks"]
# create category
self.bm.add_category("history");
# hook up to .play event
parent.hooks["play"].append(self.queue)
# add to favourites/history stream list
def queue(self, row):
| > | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
def __init__(self, parent):
# keep reference to main window
self.bm = parent.channels["bookmarks"]
# create category
self.bm.add_category("history");
self.bm.reload_if_current(self.module)
# hook up to .play event
parent.hooks["play"].append(self.queue)
# add to favourites/history stream list
def queue(self, row):
|
| ︙ | ︙ | |||
71 72 73 74 75 76 77 |
# limit number of entries
max = int(conf.history)
while max > 0 and len(hist) > max:
hist.pop()
# update store
self.bm.save()
| > | | > | 72 73 74 75 76 77 78 79 80 81 82 83 |
# limit number of entries
max = int(conf.history)
while max > 0 and len(hist) > max:
hist.pop()
# update store
self.bm.save()
self.bm.reload_if_current(self.module)
|
Modified channels/links.py from [b955e668ce] to [fb5b65ac66].
| ︙ | ︙ | |||
102 103 104 105 106 107 108 |
"homepage": homepage,
"type": "text/html",
})
# add to bookmarks
parent.bookmarks.streams[self.module] = self.streams
| | > | 102 103 104 105 106 107 108 109 110 |
"homepage": homepage,
"type": "text/html",
})
# add to bookmarks
parent.bookmarks.streams[self.module] = self.streams
# redraw category
parent.bookmarks.reload_if_current(self.module)
|