summary refs log tree commit diff stats
path: root/ranger/gui
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-11 00:51:15 +0100
committerhut <hut@lavabit.com>2009-12-11 00:51:15 +0100
commit0c0b9489072922c0f597c7099f8728868ffbb4a4 (patch)
treed64203e1c87d11abd958f26ca016b5425f07e908 /ranger/gui
parent871c502d58055c7611f0763eaa71a7fafad7efdc (diff)
downloadranger-0c0b9489072922c0f597c7099f8728868ffbb4a4.tar.gz
moved commands from fm.py to actions.py, cleanups
Diffstat (limited to 'ranger/gui')
-rw-r--r--ranger/gui/ui.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index beedea09..c7c10cfe 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -17,14 +17,19 @@ class MouseEvent(object):
 		except:
 			return False
 
-from ranger.shared import EnvironmentAware
+from ranger.shared import EnvironmentAware, SettingsAware
+from ranger.container import CommandList
 
-class UI(EnvironmentAware):
-	def __init__(self, commandlist):
+class UI(EnvironmentAware, SettingsAware):
+	def __init__(self, commandlist = None):
 		import os
 		os.environ['ESCDELAY'] = '25' # don't know a cleaner way
 
-		self.commandlist = commandlist
+		if commandlist is None:
+			self.commandlist = CommandList()
+			self.settings.keys.initialize_commands(self.commandlist)
+		else:
+			self.commandlist = commandlist
 		self.colorscheme = self.env.settings.colorscheme
 		self.is_set_up = False
 		self.win = curses.initscr()
@@ -32,7 +37,6 @@ class UI(EnvironmentAware):
 		self.widgets = []
 
 	def initialize(self):
-
 		self.win.leaveok(0)
 		self.win.keypad(1)