pitivi r1390 - trunk/pitivi
- From: edwardrv svn gnome org
- To: svn-commits-list gnome org
- Subject: pitivi r1390 - trunk/pitivi
- Date: Fri, 28 Nov 2008 17:28:05 +0000 (UTC)
Author: edwardrv
Date: Fri Nov 28 17:28:05 2008
New Revision: 1390
URL: http://svn.gnome.org/viewvc/pitivi?rev=1390&view=rev
Log:
added setter parameter to receiver descriptor
Modified:
trunk/pitivi/receiver.py
Modified: trunk/pitivi/receiver.py
==============================================================================
--- trunk/pitivi/receiver.py (original)
+++ trunk/pitivi/receiver.py Fri Nov 28 17:28:05 2008
@@ -9,11 +9,12 @@
connected when the property value is set. Prior to connecting new signal
handlers, old handlers are disconnected."""
- def __init__(self):
+ def __init__(self, setter=None):
object.__init__(self)
self.sender = None
self.handlers = {}
self.sigids = {}
+ self.setter = setter
self._first_connect = True
def __get__(self, instance, blah):
@@ -33,9 +34,8 @@
for sig, hdlr in self.handlers.iteritems():
value.connect(sig, MethodType(hdlr, instance))
self.sender = value
- notify = "after_set_" + self.__name__
- if hasattr(instance, notify):
- getattr(instance, notify)()
+ if self.setter:
+ self.setter(instance)
def __del__(self, instance):
raise NotImplementedError
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]