mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-09 13:02:01 +03:00
Merge branch '1561_panel_encoding_dialog_position'
* 1561_panel_encoding_dialog_position: Ticket #1561: fixed wrong position of select panel encoding dialog.
This commit is contained in:
commit
de33d013be
10
src/screen.c
10
src/screen.c
@ -2702,10 +2702,16 @@ set_panel_encoding (WPanel *panel)
|
|||||||
char *cd_path;
|
char *cd_path;
|
||||||
#ifdef HAVE_CHARSET
|
#ifdef HAVE_CHARSET
|
||||||
const char *errmsg;
|
const char *errmsg;
|
||||||
|
int offset;
|
||||||
int r;
|
int r;
|
||||||
int width = (panel->widget.x)? panel->widget.cols : panel->widget.cols * (-1);
|
|
||||||
|
|
||||||
r = select_charset (width, 0, source_codepage, FALSE);
|
if (horizontal_split) {
|
||||||
|
offset = (get_current_index () != 0) ? panel->widget.lines : -panel->widget.lines;
|
||||||
|
r = select_charset (0, offset, source_codepage, FALSE);
|
||||||
|
} else {
|
||||||
|
offset = (get_current_index () != 0) ? panel->widget.cols : -panel->widget.cols;
|
||||||
|
r = select_charset (offset, 0, source_codepage, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
if (r == SELECT_CHARSET_CANCEL)
|
if (r == SELECT_CHARSET_CANCEL)
|
||||||
return; /* Cancel */
|
return; /* Cancel */
|
||||||
|
Loading…
Reference in New Issue
Block a user