From 23c450bf891ddf1da7ebee326e7fb1248448e84c Mon Sep 17 00:00:00 2001 From: hut Date: Tue, 29 Dec 2009 16:47:28 +0100 Subject: be less strict with resizes --- ranger/gui/displayable.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/ranger/gui/displayable.py b/ranger/gui/displayable.py index 404f66a0..6ce81df5 100644 --- a/ranger/gui/displayable.py +++ b/ranger/gui/displayable.py @@ -136,8 +136,8 @@ class Displayable(EnvironmentAware, FileManagerAware, SettingsAware): if x < 0 or y < 0: raise OutOfBoundsException("Starting point below zero!") - if wid < 1 or hei < 1: - raise OutOfBoundsException("WID and HEI must be >=1!") + #if wid < 1 or hei < 1: + # raise OutOfBoundsException("WID and HEI must be >=1!") if x + wid > maxx and y + hei > maxy: raise OutOfBoundsException("X and Y out of bounds!") @@ -155,23 +155,27 @@ class Displayable(EnvironmentAware, FileManagerAware, SettingsAware): # Not enough space for resizing... try: self.win.mvderwin(0, 0) + self.absy, self.absx = self.win.getbegyx() self.win.resize(hei, wid) except: - raise OutOfBoundsException("Resizing Failed!") + pass + #raise OutOfBoundsException("Resizing Failed!") if y != self.absy or x != self.absx: - self.win.mvderwin(y, x) + try: + self.win.mvderwin(y, x) + except: + pass self.yy, self.xx = y, x if self.parent: self.yy += self.parent.yy self.xx += self.parent.xx - self.absy, self.absx = y, x + self.absy, self.absx = self.win.getbegyx() self.x = 0 self.y = 0 - self.wid = wid - self.hei = hei + self.hei, self.wid = self.win.getmaxyx() class DisplayableContainer(Displayable): -- cgit 1.4.1-2-gfad0 mod_keybindings.py?id=62a776bbd80408c110e2d536ae406420c47f6bb1'>diff stats
path: root/examples/plugin_chmod_keybindings.py
blob: faab2345819fb861fc3cd35daa4d4a1a5cd3a0f3 (plain) (tree)
1
2
3
4
5
6
7
8
9