diff --git a/configure.ac b/configure.ac index 0d470a3..a2da511 100644 --- a/configure.ac +++ b/configure.ac @@ -451,29 +451,6 @@ fi AM_CONDITIONAL(BUILD_AV, test "x$BUILD_AV" = "xyes") -# check for ncurses default colour capabilities -NATIVE_COLOURS="no" -AC_ARG_ENABLE([native-colours], - [AC_HELP_STRING( - [--enable-native-colours], [use terminal-default fg/bg colours]) - ], - [ - if test "x$enableval" = "xno"; then - NATIVE_COLOURS="no" - elif test "x$enableval" = "xyes"; then - NATIVE_COLOURS="yes" - fi - ] -) -if test "x$NATIVE_COLOURS" = "xyes"; then - AC_CHECK_LIB([ncurses], [assume_default_colors], - [AC_DEFINE( - [TOXIC_NATIVE_COLOURS], [1], [use terminal-default fg/bg colours]) - ], - [AC_MSG_WARN([curses library does not support native colours])] - ) -fi - TOXIC_VERSION="$PACKAGE_VERSION" AC_PATH_PROG([GIT], [git], [no]) if test "x$GIT" != "xno"; then diff --git a/src/main.c b/src/main.c index 3e60517..4d394ee 100644 --- a/src/main.c +++ b/src/main.c @@ -110,10 +110,12 @@ static void init_term(void) if (has_colors()) { short bg_color = COLOR_BLACK; start_color(); -#ifdef TOXIC_NATIVE_COLOURS - if (assume_default_colors(-1,-1) == OK) - bg_color = -1; -#endif + + if (user_settings->colour_theme == NATIVE_COLS) { + if (assume_default_colors(-1,-1) == OK) + bg_color = -1; + } + init_pair(0, COLOR_WHITE, COLOR_BLACK); init_pair(1, COLOR_GREEN, bg_color); init_pair(2, COLOR_CYAN, bg_color); diff --git a/src/settings.c b/src/settings.c index df3d0b0..a4f85a1 100644 --- a/src/settings.c +++ b/src/settings.c @@ -61,8 +61,10 @@ static void uset_time(struct user_settings *s, int val) static void uset_alerts(struct user_settings *s, int val) { + /* alerts default on if invalid value */ s->alerts = val == ALERTS_DISABLED ? ALERTS_DISABLED : ALERTS_ENABLED; } + static void uset_colours(struct user_settings *s, int val) { /* use default toxic colours if invalid value */