pitivi r1269 - in trunk: . pitivi



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]