summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-29 18:23:05 +0100
committerhut <hut@lavabit.com>2009-12-29 18:23:05 +0100
commitacde88ad401904abab55bfc259cb74c6d5e661a6 (patch)
treee43ce524eafb7ecf87929883dbe1b1ec9115e7b5 /ranger
parentd3eff0a94e7122a05f53be4021050cac98f929ee (diff)
downloadranger-acde88ad401904abab55bfc259cb74c6d5e661a6.tar.gz
fixed widget problems
Diffstat (limited to 'ranger')
-rw-r--r--ranger/gui/defaultui.py2
-rw-r--r--ranger/gui/displayable.py12
-rw-r--r--ranger/gui/widgets/notify.py2
3 files changed, 12 insertions, 4 deletions
diff --git a/ranger/gui/defaultui.py b/ranger/gui/defaultui.py
index 135ef0b5..462d394d 100644
--- a/ranger/gui/defaultui.py
+++ b/ranger/gui/defaultui.py
@@ -42,7 +42,7 @@ class DefaultUI(UI):
 		UI.update_size(self)
 		y, x = self.env.termsize
 
-		notify_hei = self.notify.requested_height
+		notify_hei = min(max(1, y - 4), self.notify.requested_height)
 
 		self.filelist_container.resize(1, 0, y - 1 - notify_hei, x)
 		self.pman.resize(1, 0, y - 1 - notify_hei, x)
diff --git a/ranger/gui/displayable.py b/ranger/gui/displayable.py
index f54a3fc7..a9c297b5 100644
--- a/ranger/gui/displayable.py
+++ b/ranger/gui/displayable.py
@@ -56,12 +56,20 @@ class Displayable(EnvironmentAware, FileManagerAware, SettingsAware):
 	def color(self, keylist = None, *keys):
 		"""Change the colors from now on."""
 		keys = combine(keylist, keys)
-		self.win.attrset(self.colorscheme.get_attr(*keys))
+		attr = self.colorscheme.get_attr(*keys)
+		try:
+			self.win.attrset(attr)
+		except:
+			pass
 
 	def color_at(self, y, x, wid, keylist = None, *keys):
 		"""Change the colors at the specified position"""
 		keys = combine(keylist, keys)
-		self.win.chgat(y, x, wid, self.colorscheme.get_attr(*keys))
+		attr = self.colorscheme.get_attr(*keys)
+		try:
+			self.win.chgat(y, x, wid, attr)
+		except:
+			pass
 	
 	def color_reset(self):
 		"""Change the colors to the default colors"""
diff --git a/ranger/gui/widgets/notify.py b/ranger/gui/widgets/notify.py
index e3f972ee..8b783fdb 100644
--- a/ranger/gui/widgets/notify.py
+++ b/ranger/gui/widgets/notify.py
@@ -33,7 +33,7 @@ class Notify(Widget):
 			self.color_at(i, 0, self.wid,\
 					'in_notify', 'background', how)
 			self.color('in_notify', 'message', how)
-			self.win.addnstr(i, 0, msg.text, self.wid)
+			self.addstr(i, 0, msg.text)
 			i += 1
 
 		self.color_reset()
1.4.4&id=db9bb0c9026b38acdf1174f2be5851acd47e066b'>^
f027adc0 ^
5c210a96 ^

3de15ddd ^

5c210a96 ^
fb275079 ^

5c210a96 ^
3d566884 ^
a1d7ed6e ^
3d566884 ^
621a1a39 ^
9bc5d95c ^
c44b726e ^
465bff73 ^




f027adc0 ^
f8e96a97 ^

0b5c4cbe ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61