292
293
294
295
296
297
298
299
300
301
302
303
304
305
|
self.thread(
#@TODO: should get a wrapper, for HTTP errors, and optionalize bookamrks
lambda: ( self.channel().load(category,reload), reload and self.bookmarks.heuristic_update(self.current_channel,category) )
)
# Thread a function, add to worker pool (for utilizing stop button)
def thread(self, target, *args):
thread = Thread(target=target, args=args)
thread.start()
self.working.append(thread)
# Click in category list
def on_category_clicked(self, widget, event, *more):
|
>
>
|
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
|
self.thread(
#@TODO: should get a wrapper, for HTTP errors, and optionalize bookamrks
lambda: ( self.channel().load(category,reload), reload and self.bookmarks.heuristic_update(self.current_channel,category) )
)
# Thread a function, add to worker pool (for utilizing stop button)
def thread(self, target, *args):
if conf.nothreads:
return target(*args)
thread = Thread(target=target, args=args)
thread.start()
self.working.append(thread)
# Click in category list
def on_category_clicked(self, widget, event, *more):
|