Diff
Differences From Artifact [5834376e37]:
- File channels/history.py — part of check-in [af5ae3f5be] at 2014-05-27 12:37:55 on branch trunk — ListStore row editing callback unified via lambda-funcs as signal handlers. Recording hook adapted to pass actual MIME type. Python3 try/except for json file writing (still breaks due to gzip handler being optional). (user: mario, size: 1660) [annotate] [blame] [check-ins using]
To Artifact [d33de09886]:
- File channels/history.py — part of check-in [f17890596d] at 2014-06-02 01:42:25 on branch trunk — Allow repainting bookmarks categories after channel init (user: mario, size: 1679) [annotate] [blame] [check-ins using]
| ︙ | |||
46 47 48 49 50 51 52 53 54 55 56 57 58 59 | 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 | 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)
|