1 |
ssuominen 09/09/04 13:05:24 |
2 |
|
3 |
Added: mc-4.7.0_pre2-horizontal_split.patch |
4 |
Log: |
5 |
Fix wrong charset dialog placement. http://www.midnight-commander.org/ticket/1451. |
6 |
(Portage version: 2.2_rc40/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 app-misc/mc/files/mc-4.7.0_pre2-horizontal_split.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/mc/files/mc-4.7.0_pre2-horizontal_split.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/mc/files/mc-4.7.0_pre2-horizontal_split.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: mc-4.7.0_pre2-horizontal_split.patch |
15 |
=================================================================== |
16 |
http://bugs.gentoo.org/show_bug.cgi?id=282556 |
17 |
http://www.midnight-commander.org/ticket/1451 |
18 |
|
19 |
diff -ur mc-4.7.0-pre2.orig/src/screen.c mc-4.7.0-pre2/src/screen.c |
20 |
--- mc-4.7.0-pre2.orig/src/screen.c 2009-08-23 23:17:14.000000000 +0300 |
21 |
+++ mc-4.7.0-pre2/src/screen.c 2009-09-04 15:59:56.000000000 +0300 |
22 |
@@ -2702,10 +2702,16 @@ |
23 |
char *cd_path; |
24 |
#ifdef HAVE_CHARSET |
25 |
const char *errmsg; |
26 |
+ int offset; |
27 |
int r; |
28 |
- int width = (panel->widget.x)? panel->widget.cols : panel->widget.cols * (-1); |
29 |
|
30 |
- r = select_charset (width, 0, source_codepage, FALSE); |
31 |
+ if (horizontal_split) { |
32 |
+ offset = (get_current_index () != 0) ? panel->widget.lines : -panel->widget.lines; |
33 |
+ r = select_charset (0, offset, source_codepage, FALSE); |
34 |
+ } else { |
35 |
+ offset = (get_current_index () != 0) ? panel->widget.cols : -panel->widget.cols; |
36 |
+ r = select_charset (offset, 0, source_codepage, FALSE); |
37 |
+ } |
38 |
|
39 |
if (r == SELECT_CHARSET_CANCEL) |
40 |
return; /* Cancel */ |