mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
Place choose panel codepage dialog at the centre of the screen.
This commit is contained in:
parent
47c4744347
commit
2328baf7a3
11
src/screen.c
11
src/screen.c
@ -3126,19 +3126,10 @@ set_panel_encoding (WPanel *panel)
|
||||
const char *encoding = NULL;
|
||||
char *cd_path;
|
||||
#ifdef HAVE_CHARSET
|
||||
int center_x, center_y;
|
||||
const char *errmsg;
|
||||
int r;
|
||||
|
||||
if (horizontal_split) {
|
||||
center_y = panel->widget.y + panel->widget.lines/2;
|
||||
center_x = COLS/2;
|
||||
} else {
|
||||
center_y = LINES/2;
|
||||
center_x = panel->widget.x + panel->widget.cols/2;
|
||||
}
|
||||
|
||||
r = select_charset (center_y, center_x, source_codepage, FALSE);
|
||||
r = select_charset (-1, -1, source_codepage, FALSE);
|
||||
|
||||
if (r == SELECT_CHARSET_CANCEL)
|
||||
return; /* Cancel */
|
||||
|
Loading…
Reference in New Issue
Block a user