pitivi r1234 - in branches/SOC_2008_SLAKSHMAN: . pitivi
- From: edwardrv svn gnome org
- To: svn-commits-list gnome org
- Subject: pitivi r1234 - in branches/SOC_2008_SLAKSHMAN: . pitivi
- Date: Sat, 16 Aug 2008 08:08:01 +0000 (UTC)
Author: edwardrv
Date: Sat Aug 16 08:08:00 2008
New Revision: 1234
URL: http://svn.gnome.org/viewvc/pitivi?rev=1234&view=rev
Log:
* pitivi/threads.py:
Added convenience CallbackThread class
Modified:
branches/SOC_2008_SLAKSHMAN/ChangeLog
branches/SOC_2008_SLAKSHMAN/pitivi/threads.py
Modified: branches/SOC_2008_SLAKSHMAN/pitivi/threads.py
==============================================================================
--- branches/SOC_2008_SLAKSHMAN/pitivi/threads.py (original)
+++ branches/SOC_2008_SLAKSHMAN/pitivi/threads.py Sat Aug 16 08:08:00 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]