summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-28 22:03:45 +0100
committerhut <hut@lavabit.com>2009-12-28 22:21:27 +0100
commit2061a46e425daee933c40a5d030ec219c7cbca44 (patch)
tree42f5c17abccee3bd6d5d2fbd110b0a8dd1f627e9
parentc10335538eeff8ff96b5a9fc446ae1e6bba74e55 (diff)
downloadranger-2061a46e425daee933c40a5d030ec219c7cbca44.tar.gz
fixes
-rw-r--r--ranger/gui/displayable.py5
-rw-r--r--ranger/gui/widgets/filelist.py8
-rw-r--r--ranger/gui/widgets/filelistcontainer.py2
3 files changed, 8 insertions, 7 deletions
diff --git a/ranger/gui/displayable.py b/ranger/gui/displayable.py
index 95645e2c..4604f881 100644
--- a/ranger/gui/displayable.py
+++ b/ranger/gui/displayable.py
@@ -140,15 +140,16 @@ class Displayable(EnvironmentAware, FileManagerAware, SettingsAware):
 			if y + hei > maxy:
 				raise OutOfBoundsException("Y out of bounds!")
 
+		self.win.mvderwin(0, 0)
 		try:
-			self.win.resize(max(1,hei), wid)
+			self.win.resize(hei, wid)
 		except:
 			log(self.__class__)
 			log("failed to resize {0}x{1}  {2}x{3}".format(y,x,hei,wid))
 		log("moving {2} to {0}x{1}".format(y, x, self.__class__.__name__))
 		self.win.mvderwin(y, x)
 		self.absx = x
-		self.absy = x
+		self.absy = y
 		self.x = 0
 		self.y = 0
 		self.wid = wid
diff --git a/ranger/gui/widgets/filelist.py b/ranger/gui/widgets/filelist.py
index 6af13944..638222d3 100644
--- a/ranger/gui/widgets/filelist.py
+++ b/ranger/gui/widgets/filelist.py
@@ -13,13 +13,13 @@ class FileList(Widget, DisplayableContainer):
 
 	def __init__(self, win, level):
 		DisplayableContainer.__init__(self, win)
-		self.pager = Pager(win)
+		self.pager = Pager(self.win)
 		self.add_obj(self.pager)
 		self.level = level
 	
-	def resize(self, *args):
-		DisplayableContainer.resize(self, *args)
-		self.pager.resize(*args)
+	def resize(self, y, x, hei, wid):
+		DisplayableContainer.resize(self, y, x, hei, wid)
+		self.pager.resize(0, 0, hei, wid)
 
 	def click(self, event):
 		"""Handle a MouseEvent"""
diff --git a/ranger/gui/widgets/filelistcontainer.py b/ranger/gui/widgets/filelistcontainer.py
index f50ea7cb..c1c3c184 100644
--- a/ranger/gui/widgets/filelistcontainer.py
+++ b/ranger/gui/widgets/filelistcontainer.py
@@ -98,4 +98,4 @@ class FileListContainer(Widget, DisplayableContainer):
 			has_preview = self.container[-2].has_preview()
 			if self.preview_available != has_preview:
 				self.preview_available = has_preview
-				self.resize(self.y, self.x, self.hei, self.wid)
+				self.resize(self.absy, self.absx, self.hei, self.wid)
f='#n244'>244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423