From: <ebl...@us...> - 2006-08-23 03:00:34
|
Revision: 16992 Author: eblanton Date: 2006-08-22 20:00:10 -0700 (Tue, 22 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16992&view=rev Log Message: ----------- Use default terminal colors if available Modified Paths: -------------- trunk/console/libgnt/gntcolors.c Modified: trunk/console/libgnt/gntcolors.c =================================================================== --- trunk/console/libgnt/gntcolors.c 2006-08-23 02:34:40 UTC (rev 16991) +++ trunk/console/libgnt/gntcolors.c 2006-08-23 03:00:10 UTC (rev 16992) @@ -43,13 +43,14 @@ void gnt_init_colors() { static gboolean init = FALSE; + int defaults; if (init) return; init = TRUE; start_color(); - use_default_colors(); + defaults = use_default_colors(); if (can_use_custom_color()) { @@ -78,14 +79,22 @@ } else { - init_pair(GNT_COLOR_NORMAL, COLOR_BLACK, COLOR_WHITE); + if (defaults == OK) + { + init_pair(GNT_COLOR_NORMAL, -1, -1); + init_pair(GNT_COLOR_DISABLED, COLOR_YELLOW, -1); + } + else + { + init_pair(GNT_COLOR_NORMAL, COLOR_BLACK, COLOR_WHITE); + init_pair(GNT_COLOR_DISABLED, COLOR_YELLOW, COLOR_WHITE); + } init_pair(GNT_COLOR_HIGHLIGHT, COLOR_WHITE, COLOR_BLUE); init_pair(GNT_COLOR_SHADOW, COLOR_BLACK, COLOR_BLACK); init_pair(GNT_COLOR_TITLE, COLOR_WHITE, COLOR_BLUE); init_pair(GNT_COLOR_TITLE_D, COLOR_WHITE, COLOR_BLACK); init_pair(GNT_COLOR_TEXT_NORMAL, COLOR_WHITE, COLOR_BLUE); init_pair(GNT_COLOR_HIGHLIGHT_D, COLOR_CYAN, COLOR_BLACK); - init_pair(GNT_COLOR_DISABLED, COLOR_YELLOW, COLOR_WHITE); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |