about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-04-04 19:55:56 +0200
committerhut <hut@lavabit.com>2010-04-04 19:55:56 +0200
commitda3b9d968682c220886c0e241b763f1d338d4a18 (patch)
tree4805a7e95d830082ad7fbce299b812efc5fa605d
parent3c041abb2ebc43d02f3990b5b7283170c5c728f5 (diff)
downloadranger-da3b9d968682c220886c0e241b763f1d338d4a18.tar.gz
core.actions: added set_option(optname, value) method
-rw-r--r--ranger/core/actions.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 6eef3d41..ac28ed52 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -313,6 +313,10 @@ class Actions(EnvironmentAware, SettingsAware):
 		if isinstance(self.env.settings[string], bool):
 			self.env.settings[string] ^= True
 
+	def set_option(self, optname, value):
+		"""Set the value of an option named <optname>"""
+		self.env.settings[optname] = value
+
 	def sort(self, func=None, reverse=None):
 		if reverse is not None:
 			self.env.settings['sort_reverse'] = bool(reverse)