summaryrefslogtreecommitdiff
path: root/extra/config/lxdialog/util.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-06-05 11:43:44 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-06-05 11:43:44 +0000
commitb7a51199bdd351992670e6466d36202c8e70d89a (patch)
treeb9fda86acebfcd59f190b2063e3e7c292c176cb6 /extra/config/lxdialog/util.c
parent3afa0348159254528ec5c21829d250899cd76b76 (diff)
- pull kconfig from 2.6.25.4
It has nicer "-*-" etc hints
Diffstat (limited to 'extra/config/lxdialog/util.c')
-rw-r--r--extra/config/lxdialog/util.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/extra/config/lxdialog/util.c b/extra/config/lxdialog/util.c
index a1a1354ba..86d95cca4 100644
--- a/extra/config/lxdialog/util.c
+++ b/extra/config/lxdialog/util.c
@@ -266,26 +266,41 @@ void dialog_clear(void)
/*
* Do some initialization for dialog
*/
-void init_dialog(const char *backtitle)
+int init_dialog(const char *backtitle)
{
+ int height, width;
+
+ initscr(); /* Init curses */
+ getmaxyx(stdscr, height, width);
+ if (height < 19 || width < 80) {
+ endwin();
+ return -ERRDISPLAYTOOSMALL;
+ }
+
dlg.backtitle = backtitle;
color_setup(getenv("MENUCONFIG_COLOR"));
-}
-void reset_dialog(void)
-{
- initscr(); /* Init curses */
keypad(stdscr, TRUE);
cbreak();
noecho();
dialog_clear();
+
+ return 0;
+}
+
+void set_dialog_backtitle(const char *backtitle)
+{
+ dlg.backtitle = backtitle;
}
/*
* End using dialog functions.
*/
-void end_dialog(void)
+void end_dialog(int x, int y)
{
+ /* move cursor back to original position */
+ move(y, x);
+ refresh();
endwin();
}