forked from pool/dialog
126 lines
3.4 KiB
Plaintext
126 lines
3.4 KiB
Plaintext
--- dialog.h
|
|
+++ dialog.h 2008-04-10 13:28:27.840374000 +0200
|
|
@@ -38,6 +38,23 @@
|
|
#include <string.h>
|
|
#include <signal.h> /* fork() etc. */
|
|
#include <math.h> /* sqrt() */
|
|
+#include <sys/ioctl.h> /* struct winsize */
|
|
+
|
|
+#ifndef GCC_NORETURN
|
|
+#if defined(__GNUC__)
|
|
+#define GCC_NORETURN __attribute__((noreturn))
|
|
+#else
|
|
+#define GCC_NORETURN /*nothing*/
|
|
+#endif
|
|
+#endif
|
|
+
|
|
+#ifndef GCC_UNUSED
|
|
+#if defined(__GNUC__)
|
|
+#define GCC_UNUSED __attribute__((unused))
|
|
+#else
|
|
+#define GCC_UNUSED /*nothing*/
|
|
+#endif
|
|
+#endif
|
|
|
|
#if defined(HAVE_NCURSESW_NCURSES_H)
|
|
#include <ncursesw/ncurses.h>
|
|
@@ -71,14 +88,6 @@
|
|
#define _(s) s
|
|
#endif
|
|
|
|
-#ifndef GCC_NORETURN
|
|
-#define GCC_NORETURN /*nothing*/
|
|
-#endif
|
|
-
|
|
-#ifndef GCC_UNUSED
|
|
-#define GCC_UNUSED /*nothing*/
|
|
-#endif
|
|
-
|
|
#ifndef HAVE_WGET_WCH
|
|
#undef USE_WIDE_CURSES
|
|
#endif
|
|
--- dlg_colors.h
|
|
+++ dlg_colors.h 2006-07-10 14:42:18.000000000 +0200
|
|
@@ -42,13 +42,13 @@
|
|
|
|
#define DLGC_FG_SHADOW COLOR_BLACK
|
|
#define DLGC_BG_SHADOW COLOR_BLACK
|
|
-#define DLGC_HL_SHADOW TRUE
|
|
+#define DLGC_HL_SHADOW FALSE
|
|
|
|
#define DLGC_FG_DIALOG COLOR_BLACK
|
|
#define DLGC_BG_DIALOG COLOR_WHITE
|
|
#define DLGC_HL_DIALOG FALSE
|
|
|
|
-#define DLGC_FG_TITLE COLOR_BLUE
|
|
+#define DLGC_FG_TITLE COLOR_YELLOW
|
|
#define DLGC_BG_TITLE COLOR_WHITE
|
|
#define DLGC_HL_TITLE TRUE
|
|
|
|
@@ -96,7 +96,7 @@
|
|
#define DLGC_BG_SEARCHBOX COLOR_WHITE
|
|
#define DLGC_HL_SEARCHBOX FALSE
|
|
|
|
-#define DLGC_FG_SEARCHBOX_TITLE COLOR_BLUE
|
|
+#define DLGC_FG_SEARCHBOX_TITLE COLOR_YELLOW
|
|
#define DLGC_BG_SEARCHBOX_TITLE COLOR_WHITE
|
|
#define DLGC_HL_SEARCHBOX_TITLE TRUE
|
|
|
|
@@ -104,7 +104,7 @@
|
|
#define DLGC_BG_SEARCHBOX_BORDER COLOR_WHITE
|
|
#define DLGC_HL_SEARCHBOX_BORDER TRUE
|
|
|
|
-#define DLGC_FG_POSITION_INDICATOR COLOR_BLUE
|
|
+#define DLGC_FG_POSITION_INDICATOR COLOR_YELLOW
|
|
#define DLGC_BG_POSITION_INDICATOR COLOR_WHITE
|
|
#define DLGC_HL_POSITION_INDICATOR TRUE
|
|
|
|
@@ -124,7 +124,7 @@
|
|
#define DLGC_BG_ITEM_SELECTED COLOR_BLUE
|
|
#define DLGC_HL_ITEM_SELECTED TRUE
|
|
|
|
-#define DLGC_FG_TAG COLOR_BLUE
|
|
+#define DLGC_FG_TAG COLOR_YELLOW
|
|
#define DLGC_BG_TAG COLOR_WHITE
|
|
#define DLGC_HL_TAG TRUE
|
|
|
|
--- guage.c
|
|
+++ guage.c 2008-04-10 12:53:27.303792000 +0200
|
|
@@ -229,7 +229,7 @@ dialog_gauge(const char *title,
|
|
#endif
|
|
|
|
fclose(dialog_state.pipe_input);
|
|
- dialog_state.pipe_input = 0;
|
|
+ dialog_state.pipe_input = (FILE*)0;
|
|
|
|
curs_set(1);
|
|
dlg_del_window(dialog);
|
|
--- util.c
|
|
+++ util.c 2008-08-14 11:45:04.905477461 +0200
|
|
@@ -1144,12 +1144,12 @@ dlg_exit(int code)
|
|
*/
|
|
if (dialog_state.input) {
|
|
fclose(dialog_state.input);
|
|
- dialog_state.input = 0;
|
|
+ dialog_state.input = (FILE*)0;
|
|
}
|
|
if (dialog_state.pipe_input) {
|
|
if (dialog_state.pipe_input != stdin) {
|
|
fclose(dialog_state.pipe_input);
|
|
- dialog_state.pipe_input = 0;
|
|
+ dialog_state.pipe_input = (FILE*)0;
|
|
}
|
|
}
|
|
_exit(code);
|
|
@@ -1520,8 +1520,10 @@ dlg_move_window(WINDOW *win, int height,
|
|
#ifdef HAVE_COLOR
|
|
if (p->shadow != 0) {
|
|
if (dialog_state.use_shadow) {
|
|
+ (void) wresize(p->shadow, height, width);
|
|
(void) mvwin(p->shadow, y + SHADOW_ROWS, x + SHADOW_COLS);
|
|
} else {
|
|
+ delwin(p->shadow);
|
|
p->shadow = 0;
|
|
}
|
|
}
|