summaryrefslogtreecommitdiffstats
path: root/contrib/dialog/yesno.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/dialog/yesno.c')
-rw-r--r--contrib/dialog/yesno.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/contrib/dialog/yesno.c b/contrib/dialog/yesno.c
index e97d760..4efb073 100644
--- a/contrib/dialog/yesno.c
+++ b/contrib/dialog/yesno.c
@@ -1,9 +1,9 @@
/*
- * $Id: yesno.c,v 1.56 2012/07/02 23:58:08 tom Exp $
+ * $Id: yesno.c,v 1.51 2011/06/27 08:20:57 tom Exp $
*
* yesno.c -- implements the yes/no box
*
- * Copyright 1999-2011,2012 Thomas E. Dickey
+ * Copyright 1999-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
@@ -37,7 +37,13 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
static DLG_KEYS_BINDING binding[] = {
HELPKEY_BINDINGS,
ENTERKEY_BINDINGS,
- TRAVERSE_BINDINGS,
+ DLG_KEYS_DATA( DLGK_ENTER, ' ' ),
+ DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_DOWN ),
+ DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_RIGHT ),
+ DLG_KEYS_DATA( DLGK_FIELD_NEXT, TAB ),
+ DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_UP ),
+ DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
+ DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_LEFT ),
SCROLLKEY_BINDINGS,
END_KEYS_BINDING
};
@@ -46,7 +52,7 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
int x, y;
int key = 0, fkey;
int code;
- int button = dlg_default_button();
+ int button = dlg_defaultno_button();
WINDOW *dialog = 0;
int result = DLG_EXIT_UNKNOWN;
char *prompt = dlg_strclone(cprompt);
@@ -81,8 +87,8 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
dlg_register_buttons(dialog, "yesno", buttons);
}
- 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);
dlg_draw_helpline(dialog, FALSE);
@@ -97,7 +103,6 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
if (show) {
last = dlg_print_scrolled(dialog, prompt, offset,
page, width, TRUE);
- dlg_trace_win(dialog);
show = FALSE;
}
key = dlg_mouse_wgetch(dialog, &fkey);
OpenPOWER on IntegriCloud