summary refs log tree commit diff stats
path: root/ranger/gui
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-01 00:53:06 +0100
committerhut <hut@lavabit.com>2009-12-01 00:53:06 +0100
commitf8e96a972786a2448b764cba4be88aa05d708933 (patch)
tree844b6128119ccddded9310fc0c9a2c09bcb886de /ranger/gui
parent88b00cac7f412c41a745aa21221a5453e470b049 (diff)
downloadranger-f8e96a972786a2448b764cba4be88aa05d708933.tar.gz
structural improvements
Diffstat (limited to 'ranger/gui')
-rw-r--r--ranger/gui/ui.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index 77f88080..34f7c54c 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -5,14 +5,10 @@ class UI():
 		self.env = env
 		self.commandlist = commandlist
 		self.colorscheme = colorscheme
+		self.is_set_up = False
 
 		self.widgets = []
 
-		self.initialize()
-
-		self.setup()
-		self.resize()
-
 	def initialize(self):
 		self.win = curses.initscr()
 		self.win.leaveok(1)
@@ -28,6 +24,11 @@ class UI():
 		avail, old = curses.mousemask(mask)
 		curses.mousemask(avail)
 
+		if not self.is_set_up:
+			self.is_set_up = True
+			self.setup()
+			self.resize()
+
 	def handle_mouse(self, fm):
 		try:
 			event = MouseEvent(curses.getmouse())