diff options
author | hut <hut@lavabit.com> | 2009-12-28 22:03:45 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-12-28 22:21:27 +0100 |
commit | 2061a46e425daee933c40a5d030ec219c7cbca44 (patch) | |
tree | 42f5c17abccee3bd6d5d2fbd110b0a8dd1f627e9 | |
parent | c10335538eeff8ff96b5a9fc446ae1e6bba74e55 (diff) | |
download | ranger-2061a46e425daee933c40a5d030ec219c7cbca44.tar.gz |
fixes
-rw-r--r-- | ranger/gui/displayable.py | 5 | ||||
-rw-r--r-- | ranger/gui/widgets/filelist.py | 8 | ||||
-rw-r--r-- | ranger/gui/widgets/filelistcontainer.py | 2 |
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) |