1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-20 17:06:36 +02:00

use toxic settings for colour theme instead of config flag

This commit is contained in:
Jfreegman
2014-04-12 03:10:01 -04:00
parent 4a8db6f098
commit a29136d6b7
3 changed files with 8 additions and 27 deletions

View File

@ -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);

View File

@ -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 */