Skip to content

Commit

Permalink
changed the default color scheme to monochrome
Browse files Browse the repository at this point in the history
  • Loading branch information
allinurl committed Sep 5, 2013
1 parent 59e2231 commit c85cff6
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 35 deletions.
36 changes: 18 additions & 18 deletions gdashboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,10 @@ render_bars (WINDOW * win, GDashModule * module_data, int y, int *x, int idx,

bar = get_bars (module_data->data[idx].hits, module_data->max_hits, *x);
if (selected) {
if (conf.color_scheme == MONOCHROME)
init_pair (1, COLOR_BLACK, COLOR_WHITE);
else
if (conf.color_scheme == STD_GREEN)
init_pair (1, COLOR_BLACK, COLOR_GREEN);
else
init_pair (1, COLOR_BLACK, COLOR_WHITE);

wattron (win, COLOR_PAIR (HIGHLIGHT));
mvwhline (win, y, *x, ' ', w);
Expand Down Expand Up @@ -436,10 +436,10 @@ render_data (WINDOW * win, GDashModule * module_data, int y, int *x, int idx,
convert_date (buf, data, "%Y%m%d", "%d/%b/%Y", DATE_LEN);

if (selected) {
if (conf.color_scheme == MONOCHROME)
init_pair (1, COLOR_BLACK, COLOR_WHITE);
else
if (conf.color_scheme == STD_GREEN)
init_pair (1, COLOR_BLACK, COLOR_GREEN);
else
init_pair (1, COLOR_BLACK, COLOR_WHITE);

wattron (win, COLOR_PAIR (HIGHLIGHT));
if (module_data->module == HOSTS && module_data->data[idx].is_subitem)
Expand Down Expand Up @@ -472,10 +472,10 @@ render_bandwidth (WINDOW * win, GDashModule * module_data, int y, int *x,
return;

if (selected) {
if (conf.color_scheme == MONOCHROME)
init_pair (1, COLOR_BLACK, COLOR_WHITE);
else
if (conf.color_scheme == STD_GREEN)
init_pair (1, COLOR_BLACK, COLOR_GREEN);
else
init_pair (1, COLOR_BLACK, COLOR_WHITE);

wattron (win, COLOR_PAIR (HIGHLIGHT));
mvwhline (win, y, *x, ' ', w);
Expand Down Expand Up @@ -504,10 +504,10 @@ render_usecs (WINDOW * win, GDashModule * module_data, int y, int *x,
return;

if (selected) {
if (conf.color_scheme == MONOCHROME)
init_pair (1, COLOR_BLACK, COLOR_WHITE);
else
if (conf.color_scheme == STD_GREEN)
init_pair (1, COLOR_BLACK, COLOR_GREEN);
else
init_pair (1, COLOR_BLACK, COLOR_WHITE);

wattron (win, COLOR_PAIR (HIGHLIGHT));
mvwhline (win, y, *x, ' ', w);
Expand Down Expand Up @@ -540,10 +540,10 @@ render_percent (WINDOW * win, GDashModule * module_data, int y, int *x, int idx,
max_hit = 1;

if (selected) {
if (conf.color_scheme == MONOCHROME)
init_pair (1, COLOR_BLACK, COLOR_WHITE);
else
if (conf.color_scheme == STD_GREEN)
init_pair (1, COLOR_BLACK, COLOR_GREEN);
else
init_pair (1, COLOR_BLACK, COLOR_WHITE);

wattron (win, COLOR_PAIR (HIGHLIGHT));
mvwhline (win, y, *x, ' ', w);
Expand Down Expand Up @@ -580,10 +580,10 @@ render_hits (WINDOW * win, GDashModule * module_data, int y, int *x, int idx,
goto inc;

if (selected) {
if (conf.color_scheme == MONOCHROME)
init_pair (1, COLOR_BLACK, COLOR_WHITE);
else
if (conf.color_scheme == STD_GREEN)
init_pair (1, COLOR_BLACK, COLOR_GREEN);
else
init_pair (1, COLOR_BLACK, COLOR_WHITE);

wattron (win, COLOR_PAIR (HIGHLIGHT));
mvwhline (win, y, 0, ' ', w);
Expand Down
8 changes: 4 additions & 4 deletions gmenu.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ void
draw_menu_item (GMenu * menu, char *s, int x, int y, int w, int color,
int checked)
{
if (conf.color_scheme == MONOCHROME) {
init_pair (1, COLOR_BLACK, COLOR_WHITE);
init_pair (2, COLOR_WHITE, -1);
} else {
if (conf.color_scheme == STD_GREEN) {
init_pair (1, COLOR_BLACK, COLOR_GREEN);
init_pair (2, COLOR_BLACK, COLOR_CYAN);
} else {
init_pair (1, COLOR_BLACK, COLOR_WHITE);
init_pair (2, COLOR_WHITE, -1);
}
wattron (menu->win, COLOR_PAIR (color));
mvwhline (menu->win, y, x, ' ', w);
Expand Down
26 changes: 13 additions & 13 deletions ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,20 @@ init_colors ()
use_default_colors ();

init_pair (COL_BLUE, COLOR_BLUE, -1);
if (conf.color_scheme == MONOCHROME)
init_pair (COL_GREEN, COLOR_WHITE, -1);
else
if (conf.color_scheme == STD_GREEN)
init_pair (COL_GREEN, COLOR_GREEN, -1);
else
init_pair (COL_GREEN, COLOR_WHITE, -1);

init_pair (COL_RED, COLOR_RED, -1);
init_pair (COL_BLACK, COLOR_BLACK, -1);
init_pair (COL_CYAN, COLOR_CYAN, -1);
init_pair (COL_YELLOW, COLOR_YELLOW, -1);

if (conf.color_scheme == MONOCHROME)
init_pair (BLUE_GREEN, COLOR_BLUE, COLOR_WHITE);
else
if (conf.color_scheme == STD_GREEN)
init_pair (BLUE_GREEN, COLOR_BLUE, COLOR_GREEN);
else
init_pair (BLUE_GREEN, COLOR_BLUE, COLOR_WHITE);

init_pair (BLACK_GREEN, COLOR_BLACK, COLOR_GREEN);
init_pair (BLACK_CYAN, COLOR_BLACK, COLOR_CYAN);
Expand Down Expand Up @@ -145,12 +145,12 @@ draw_header (WINDOW * win, char *header, int x, int y, int w, int color)
char buf[256];
snprintf (buf, sizeof buf, "%s%s", " ", header);

if (conf.color_scheme == MONOCHROME) {
init_pair (1, COLOR_BLACK, COLOR_WHITE);
init_pair (2, COLOR_WHITE, -1);
} else {
if (conf.color_scheme == STD_GREEN) {
init_pair (1, COLOR_BLACK, COLOR_GREEN);
init_pair (2, COLOR_BLACK, COLOR_CYAN);
} else {
init_pair (1, COLOR_BLACK, COLOR_WHITE);
init_pair (2, COLOR_WHITE, -1);
}
wattron (win, COLOR_PAIR (color));
mvwhline (win, y, x, ' ', w);
Expand Down Expand Up @@ -849,10 +849,10 @@ verify_format (GLog * logger, GSpinner * spinner)
static void
scheme_chosen (char *name)
{
if (strcmp ("Monochrome/Default", name) == 0)
conf.color_scheme = MONOCHROME;
else
if (strcmp ("Green/Original", name) == 0)
conf.color_scheme = STD_GREEN;
else
conf.color_scheme = MONOCHROME;
init_colors ();
}

Expand Down

0 comments on commit c85cff6

Please sign in to comment.