summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-04-08 18:09:56 +0200
committerhut <hut@lavabit.com>2010-04-08 18:09:56 +0200
commite4e9ef4a93eb8d95f29848b2447968c6b9eef129 (patch)
tree7e419e06ddfb869fe6173b1be671cfb77fd8a0a5
parente01ea6523445c49fe440ebceeaeed1293f268b5f (diff)
downloadranger-e4e9ef4a93eb8d95f29848b2447968c6b9eef129.tar.gz
Fixed multiple signal bindings of the same function
-rw-r--r--ranger/shared/settings.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ranger/shared/settings.py b/ranger/shared/settings.py
index 6933957a..c533205b 100644
--- a/ranger/shared/settings.py
+++ b/ranger/shared/settings.py
@@ -58,6 +58,9 @@ class SettingObject(SignalDispatcher):
 		SignalDispatcher.__init__(self)
 		self.__dict__['_settings'] = dict()
 		self.__dict__['_setting_sources'] = list()
+		for name in ALLOWED_SETTINGS:
+			self.signal_bind('setopt.'+name,
+					self._raw_set_with_signal, priority=0.2)
 
 	def __setattr__(self, name, value):
 		if name[0] == '_':
@@ -67,8 +70,6 @@ class SettingObject(SignalDispatcher):
 			assert self._check_type(name, value)
 			kws = dict(setting=name, value=value,
 					previous=self._settings[name])
-			self.signal_bind('setopt.'+name,
-					self._raw_set_with_signal, priority=0.2)
 			self.signal_emit('setopt', **kws)
 			self.signal_emit('setopt.'+name, **kws)