mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-05 11:04:42 +03:00
Ticket #1955: Incorrect input line length in 'Edit symlink' dialog window
If symbolic link has a long name, the input line in 'Edit symlink' dialog window is short. This bug is reproduces in non-C locales (KOI8-R, UTF-8, etc). Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
6be399dc28
commit
fef45001b0
11
src/wtools.c
11
src/wtools.c
@ -510,8 +510,8 @@ fg_input_dialog_help (const char *header, const char *text, const char *help,
|
|||||||
QuickWidget quick_widgets[] = {
|
QuickWidget quick_widgets[] = {
|
||||||
/* 0 */ QUICK_BUTTON (6, 10, 1, 0, N_("&Cancel"), B_CANCEL, NULL),
|
/* 0 */ QUICK_BUTTON (6, 10, 1, 0, N_("&Cancel"), B_CANCEL, NULL),
|
||||||
/* 1 */ QUICK_BUTTON (3, 10, 1, 0, N_("&OK"), B_ENTER, NULL),
|
/* 1 */ QUICK_BUTTON (3, 10, 1, 0, N_("&OK"), B_ENTER, NULL),
|
||||||
/* 2 */ QUICK_INPUT (4, 80, 0, 0, def_text, 58, 0, NULL, &my_str),
|
/* 2 */ QUICK_INPUT (3, 80, 0, 0, def_text, 58, 0, NULL, &my_str),
|
||||||
/* 3 */ QUICK_LABEL (4, 80, 2, 0, ""),
|
/* 3 */ QUICK_LABEL (3, 80, 2, 0, ""),
|
||||||
QUICK_END
|
QUICK_END
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -561,12 +561,17 @@ fg_input_dialog_help (const char *header, const char *text, const char *help,
|
|||||||
help, quick_widgets, TRUE
|
help, quick_widgets, TRUE
|
||||||
};
|
};
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++) {
|
||||||
|
quick_widgets[i].x_divisions = Quick_input.xlen;
|
||||||
quick_widgets[i].y_divisions = Quick_input.ylen;
|
quick_widgets[i].y_divisions = Quick_input.ylen;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
quick_widgets[i].relative_y += 2 + lines;
|
quick_widgets[i].relative_y += 2 + lines;
|
||||||
|
|
||||||
|
/* input line length */
|
||||||
|
quick_widgets[2].u.input.len = Quick_input.xlen - 6;
|
||||||
|
|
||||||
ret = quick_dialog (&Quick_input);
|
ret = quick_dialog (&Quick_input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user