pitivi r1269 - in trunk: . pitivi
- From: edwardrv svn gnome org
- To: svn-commits-list gnome org
- Subject: pitivi r1269 - in trunk: . pitivi
- Date: Fri, 26 Sep 2008 17:12:55 +0000 (UTC)
Author: edwardrv
Date: Fri Sep 26 17:12:55 2008
New Revision: 1269
URL: http://svn.gnome.org/viewvc/pitivi?rev=1269&view=rev
Log:
* pitivi/threads.py:
Added convenience CallbackThread class
Modified:
trunk/ChangeLog
trunk/pitivi/threads.py
Modified: trunk/pitivi/threads.py
==============================================================================
--- trunk/pitivi/threads.py (original)
+++ trunk/pitivi/threads.py Fri Sep 26 17:12:55 2008
@@ -66,6 +66,19 @@
gobject.type_register(Thread)
+class CallbackThread(Thread):
+
+ def __init__(self, callback, *args, **kwargs):
+ self.callback = callback
+ self.args = args
+ self.kwargs = kwargs
+ Thread.__init__(self)
+
+ def process(self):
+ self.callback(*self.args, **self.kwargs)
+
+gobject.type_register(CallbackThread)
+
class ThreadMaster(gobject.GObject):
"""
Controls all thread existing in pitivi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]