diff options
Diffstat (limited to 'scripts/lxdialog/yesno.c')
-rw-r--r-- | scripts/lxdialog/yesno.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/scripts/lxdialog/yesno.c b/scripts/lxdialog/yesno.c index 84f3e8e005e4..cb2568aae3ed 100644 --- a/scripts/lxdialog/yesno.c +++ b/scripts/lxdialog/yesno.c | |||
@@ -61,20 +61,7 @@ int dialog_yesno(const char *title, const char *prompt, int height, int width) | |||
61 | wattrset(dialog, dialog_attr); | 61 | wattrset(dialog, dialog_attr); |
62 | waddch(dialog, ACS_RTEE); | 62 | waddch(dialog, ACS_RTEE); |
63 | 63 | ||
64 | if (title != NULL && strlen(title) >= width - 2) { | 64 | print_title(dialog, title, width); |
65 | /* truncate long title -- mec */ | ||
66 | char *title2 = malloc(width - 2 + 1); | ||
67 | memcpy(title2, title, width - 2); | ||
68 | title2[width - 2] = '\0'; | ||
69 | title = title2; | ||
70 | } | ||
71 | |||
72 | if (title != NULL) { | ||
73 | wattrset(dialog, title_attr); | ||
74 | mvwaddch(dialog, 0, (width - strlen(title)) / 2 - 1, ' '); | ||
75 | waddstr(dialog, (char *)title); | ||
76 | waddch(dialog, ' '); | ||
77 | } | ||
78 | 65 | ||
79 | wattrset(dialog, dialog_attr); | 66 | wattrset(dialog, dialog_attr); |
80 | print_autowrap(dialog, prompt, width - 2, 1, 3); | 67 | print_autowrap(dialog, prompt, width - 2, 1, 3); |