diff options
Diffstat (limited to 'contrib/dialog/inputbox.c')
-rw-r--r-- | contrib/dialog/inputbox.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/contrib/dialog/inputbox.c b/contrib/dialog/inputbox.c index 9d2eec2..14e2c28 100644 --- a/contrib/dialog/inputbox.c +++ b/contrib/dialog/inputbox.c @@ -1,9 +1,9 @@ /* - * $Id: inputbox.c,v 1.74 2012/07/01 18:13:40 Zoltan.Kelemen Exp $ + * $Id: inputbox.c,v 1.67 2011/06/29 09:48:34 tom Exp $ * * inputbox.c -- implements the input box * - * Copyright 2000-2011,2012 Thomas E. Dickey + * Copyright 2000-2010,2011 Thomas E. Dickey * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License, version 2.1 @@ -90,7 +90,7 @@ dialog_inputbox(const char *title, const char *cprompt, int height, int width, retry: #endif show_buttons = TRUE; - state = dialog_vars.default_button >= 0 ? dlg_default_button() : sTEXT; + state = dialog_vars.defaultno ? dlg_defaultno_button() : sTEXT; first = (state == sTEXT); key = fkey = 0; @@ -116,29 +116,27 @@ dialog_inputbox(const char *title, const char *cprompt, int height, int width, dlg_mouse_setbase(xorg, yorg); - dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr); - dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr); + dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr); + dlg_draw_bottom_box(dialog); dlg_draw_title(dialog, title); - (void) wattrset(dialog, dialog_attr); + wattrset(dialog, dialog_attr); dlg_draw_helpline(dialog, FALSE); dlg_print_autowrap(dialog, prompt, height, width); /* Draw the input field box */ box_width = width - 6; getyx(dialog, y, x); - (void) x; box_y = y + 2; box_x = (width - box_width) / 2; dlg_mouse_mkregion(y + 1, box_x - 1, 3, box_width + 2, 'i'); dlg_draw_box(dialog, y + 1, box_x - 1, 3, box_width + 2, - border_attr, border2_attr); + border_attr, dialog_attr); /* Make a window for the input-field, to associate bindings */ editor = dlg_sub_window(dialog, 1, box_width, yorg + box_y, xorg + box_x); - dlg_register_window(editor, "inputbox2", binding2); + dlg_register_window(editor, "inputbox", binding2); - dlg_trace_win(dialog); while (result == DLG_EXIT_UNKNOWN) { int edit = 0; |