call notifier instantly after they are added
authorFelix Domke <tmbinc@elitedvb.net>
Sun, 8 Oct 2006 20:15:35 +0000 (20:15 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Sun, 8 Oct 2006 20:15:35 +0000 (20:15 +0000)
lib/python/Components/config.py

index 10f112c..3b64763 100644 (file)
@@ -73,6 +73,16 @@ class ConfigElement(object):
        def addNotifier(self, notifier):
                assert callable(notifier), "notifiers must be callable"
                self.notifiers.append(notifier)
+               
+               # CHECKME:
+               # do we want to call the notifier
+               #  - at all when adding it? (yes)
+               #  - when the default is active? (yes)
+               #  - when no value *yet* has been set,
+               #    because no config has ever been read (currently yes)
+               #    (though that's not so easy to detect.
+               #     the entry could just be new.)
+               notifier(self)
 
        def disableSave(self):
                self.save_disabled = True