aboutsummaryrefslogtreecommitdiffstats
path: root/screen_utils.c
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-05-07 07:52:19 +0000
committerKalle Wallin <kaw@linux.se>2004-05-07 07:52:19 +0000
commit677eb1ad30321d83f6196672ea1798c0e1712870 (patch)
treee59bd568fd197b46da0779b1c43642c6bf6ae0e6 /screen_utils.c
parentab032e2b5a5499f783c034eeb64a1dd3f3387a1c (diff)
downloadmpd-677eb1ad30321d83f6196672ea1798c0e1712870.tar.gz
mpd-677eb1ad30321d83f6196672ea1798c0e1712870.tar.xz
mpd-677eb1ad30321d83f6196672ea1798c0e1712870.zip
Redesigned ncmpc's color support
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@937 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'screen_utils.c')
-rw-r--r--screen_utils.c31
1 files changed, 3 insertions, 28 deletions
diff --git a/screen_utils.c b/screen_utils.c
index 1fb581aaa..f8dfa4c1d 100644
--- a/screen_utils.c
+++ b/screen_utils.c
@@ -29,6 +29,7 @@
#include "command.h"
#include "options.h"
#include "list_window.h"
+#include "colors.h"
#include "screen.h"
#define FIND_PROMPT "Find: "
@@ -40,6 +41,7 @@ screen_getch(WINDOW *w, char *prompt)
int key = -1;
int prompt_len = strlen(prompt);
+ colors_use(w, COLOR_STATUS_ALERT);
wclear(w);
wmove(w, 0, 0);
waddstr(w, prompt);
@@ -67,6 +69,7 @@ screen_getstr(WINDOW *w, char *prompt)
char buf[256], *line = NULL;
int prompt_len = strlen(prompt);
+ colors_use(w, COLOR_STATUS_ALERT);
wclear(w);
wmove(w, 0, 0);
waddstr(w, prompt);
@@ -148,31 +151,3 @@ screen_find(screen_t *screen,
}
-int
-my_waddstr(WINDOW *w, const char *text, int color)
-{
- int ret;
-
- if( options.enable_colors )
- wattron(w, color);
- ret = waddstr(w, text);
- if( options.enable_colors )
- wattroff(w, color);
-
- return ret;
-}
-
-int
-my_mvwaddstr(WINDOW *w, int x, int y, const char *text, int color)
-{
- int ret;
-
- if( options.enable_colors )
- wattron(w, color);
- ret = mvwaddstr(w, x, y, text);
- if( options.enable_colors )
- wattroff(w, color);
-
- return ret;
-}
-