summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-29 01:23:32 +0100
committerhut <hut@lavabit.com>2009-12-29 01:23:32 +0100
commit11ae51f0d6206e0fed2ed3241438164a33040ea4 (patch)
treeb93ddcf9cfe943688694d080e2a092268181af0d /ranger
parente3e37e3f8cd737585799429e09159bc4dbf330c8 (diff)
downloadranger-11ae51f0d6206e0fed2ed3241438164a33040ea4.tar.gz
quick&dirty fix for correct rel/abs coordinates
Diffstat (limited to 'ranger')
-rw-r--r--ranger/gui/displayable.py4
-rw-r--r--ranger/gui/ui.py5
-rw-r--r--ranger/gui/widgets/filelist.py2
3 files changed, 6 insertions, 5 deletions
diff --git a/ranger/gui/displayable.py b/ranger/gui/displayable.py
index c4366662..30975064 100644
--- a/ranger/gui/displayable.py
+++ b/ranger/gui/displayable.py
@@ -154,8 +154,8 @@ class Displayable(EnvironmentAware, FileManagerAware, SettingsAware):
 				raise OutOfBoundsException("Resizing Failed!")
 
 		self.win.mvderwin(y, x)
-		self.absx = x
-		self.absy = y
+		self.yy, self.xx = self.win.getbegyx()
+		self.absy, self.absx = y, x
 		self.x = 0
 		self.y = 0
 		self.wid = wid
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index 20a263ad..91964eb1 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -91,8 +91,9 @@ class UI(DisplayableContainer):
 		except:
 			return
 
-		# from ranger import log
-		# log('{0:0>28b} ({0})'.format(event.bstate))
+#		from ranger import log
+#		log('{0:0>28b} ({0})'.format(event.bstate))
+#		log('y: {0}  x: {1}'.format(event.y, event.x))
 
 		if DisplayableContainer.click(self, event):
 			return
diff --git a/ranger/gui/widgets/filelist.py b/ranger/gui/widgets/filelist.py
index 08a95e18..43f3834a 100644
--- a/ranger/gui/widgets/filelist.py
+++ b/ranger/gui/widgets/filelist.py
@@ -33,7 +33,7 @@ class FileList(Widget, DisplayableContainer):
 			pass
 
 		elif self.target.type is T_DIRECTORY:
-			index = self.scroll_begin + event.y - self.y
+			index = self.scroll_begin + event.y - self.yy
 
 			if event.pressed(1):
 				if not self.main_display:
href='/akspecs/ranger/blame/doc/pydoc/ranger.container.keybuffer.html?h=v1.8.1&id=0654d6d093f8e78033b9dcafcb52bbdcd92aed0c'>^
f07bb12f ^











































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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89