1 |
truedfx 08/04/28 16:37:40 |
2 |
|
3 |
Added: ufed-0.40-termsize.patch |
4 |
Log: |
5 |
Bug #219578: Don't try to draw the scroll thumb if the terminal window is large enough to not need one. It caused ufed to abort and is pointless anyway. |
6 |
(Portage version: 2.1.5_rc6) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 app-portage/ufed/files/ufed-0.40-termsize.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-portage/ufed/files/ufed-0.40-termsize.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-portage/ufed/files/ufed-0.40-termsize.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: ufed-0.40-termsize.patch |
15 |
=================================================================== |
16 |
|
17 |
Don't draw scroll thumb if the terminal is large enough to not |
18 |
need one. Reported by Martin von Gagern <Martin.vGagern@×××.net>. |
19 |
|
20 |
--- ufed-0.40/ufed-curses.c |
21 |
+++ ufed-0.40/ufed-curses.c |
22 |
@@ -109,7 +109,8 @@ |
23 |
wattrset(w, COLOR_PAIR(3) | A_BOLD); |
24 |
mvwaddch(w, 0, 0, ACS_UARROW); |
25 |
wvline(w, ACS_CKBOARD, wHeight(Scrollbar)-3); |
26 |
+ if(items->prev->top+items->prev->height > wHeight(List)) |
27 |
- mvwaddch(w, 1+(wHeight(Scrollbar)-3)*topy/(items->prev->top+items->prev->height-(wHeight(List)-1)), 0, ACS_BLOCK); |
28 |
+ mvwaddch(w, 1+(wHeight(Scrollbar)-3)*topy/(items->prev->top+items->prev->height-(wHeight(List)-1)), 0, ACS_BLOCK); |
29 |
mvwaddch(w, wHeight(Scrollbar)-2, 0, ACS_DARROW); |
30 |
mvwaddch(w, wHeight(Scrollbar)-1, 0, ACS_VLINE); |
31 |
wnoutrefresh(w); |
32 |
@@ -380,7 +381,9 @@ |
33 |
mousekey = c; \ |
34 |
goto check_key; \ |
35 |
} |
36 |
+ if(items->prev->top+items->prev->height > wHeight(List)) |
37 |
+ {} |
38 |
- if(event.y == 0) |
39 |
+ else if(event.y == 0) |
40 |
SIM(UP) |
41 |
else if(event.y == wHeight(Scrollbar)-2) |
42 |
SIM(DOWN) |
43 |
|
44 |
|
45 |
|
46 |
-- |
47 |
gentoo-commits@l.g.o mailing list |