comparison console/libgnt/gntmain.c @ 14387:39b0124a455d

[gaim-migrate @ 17093] Allow different colors for highlighted windows. The name of the pair is "urgent" if you want to change it from ~/.gntrc. The default is green on the active background (or white). Red doesn't look too bad either. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 31 Aug 2006 03:13:54 +0000
parents 3bfea4c4ce33
children f4af666fafe3
comparison
equal deleted inserted replaced
14386:8a213dc761dd 14387:39b0124a455d
223 { 223 {
224 GntWidget *w = iter->data; 224 GntWidget *w = iter->data;
225 int color; 225 int color;
226 const char *title; 226 const char *title;
227 227
228 if (w == ordered->data) 228 if (w == ordered->data) {
229 {
230 /* This is the current window in focus */ 229 /* This is the current window in focus */
231 color = GNT_COLOR_TITLE; 230 color = GNT_COLOR_TITLE;
232 GNT_WIDGET_UNSET_FLAGS(w, GNT_WIDGET_URGENT); 231 GNT_WIDGET_UNSET_FLAGS(w, GNT_WIDGET_URGENT);
233 } 232 } else if (GNT_WIDGET_IS_FLAG_SET(w, GNT_WIDGET_URGENT)) {
234 else if (GNT_WIDGET_IS_FLAG_SET(w, GNT_WIDGET_URGENT))
235 {
236 /* This is a window with the URGENT hint set */ 233 /* This is a window with the URGENT hint set */
237 color = GNT_COLOR_TITLE_D; 234 color = GNT_COLOR_URGENT;
238 } 235 } else {
239 else
240 {
241 color = GNT_COLOR_NORMAL; 236 color = GNT_COLOR_NORMAL;
242 } 237 }
243 wbkgdset(taskbar, '\0' | COLOR_PAIR(color)); 238 wbkgdset(taskbar, '\0' | COLOR_PAIR(color));
244 mvwhline(taskbar, 0, width * i, ' ' | COLOR_PAIR(color), width); 239 mvwhline(taskbar, 0, width * i, ' ' | COLOR_PAIR(color), width);
245 title = GNT_BOX(w)->title; 240 title = GNT_BOX(w)->title;