1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
Without this patch colors in mcabber do not work on Alpine (and
apparently also on FreeBSD).
The patch was taken from: https://bitbucket.org/McKael/mcabber-crew/issues/60/
diff --git a/mcabber/mcabber/screen.c b/mcabber/mcabber/screen.c
--- a/mcabber/screen.c
+++ b/mcabber/screen.c
@@ -1159,7 +1159,7 @@ static void scr_update_window(winbuf *wi
color = COLOR_GENERAL;
if (color != COLOR_GENERAL)
- wattrset(win_entry->win, get_color(color));
+ wbkgdset(win_entry->win, get_color(color));
// Generate the prefix area and display it
scr_line_prefix(line, pref, prefixwidth);
@@ -1215,12 +1215,12 @@ static void scr_update_window(winbuf *wi
if (actual && ((type == MC_ALL) || (actual->manual))
&& (line->flags & HBB_PREFIX_IN) &&
(!(line->flags & HBB_PREFIX_HLIGHT_OUT)))
- wattrset(win_entry->win, compose_color(actual->color));
+ wbkgdset(win_entry->win, compose_color(actual->color));
wprintw(win_entry->win, "%s", line->text);
// Return the char
line->text[line->mucnicklen] = tmp;
// Return the color back
- wattrset(win_entry->win, get_color(color));
+ wbkgdset(win_entry->win, get_color(color));
}
// Display text line
@@ -1229,7 +1229,7 @@ static void scr_update_window(winbuf *wi
// Return the color back
if (color != COLOR_GENERAL)
- wattrset(win_entry->win, get_color(COLOR_GENERAL));
+ wbkgdset(win_entry->win, get_color(COLOR_GENERAL));
g_free(line->text);
g_free(line);
@@ -1879,7 +1879,7 @@ void scr_draw_roster(void)
if (Roster_Width) {
int line_x_pos = roster_win_on_right ? 0 : Roster_Width-1;
// Redraw the vertical line (not very good...)
- wattrset(rosterWnd, get_color(COLOR_GENERAL));
+ wbkgdset(rosterWnd, get_color(COLOR_GENERAL));
for (i=0 ; i < CHAT_WIN_HEIGHT ; i++)
mvwaddch(rosterWnd, i, line_x_pos, ACS_VLINE);
}
@@ -1977,16 +1977,16 @@ void scr_draw_roster(void)
}
if (buddy == current_buddy) {
if (pending == '#')
- wattrset(rosterWnd, get_color(COLOR_ROSTERSELNMSG));
- else
- wattrset(rosterWnd, get_color(COLOR_ROSTERSEL));
+ wbkgdset(rosterWnd, get_color(COLOR_ROSTERSELNMSG));
+ else
+ wbkgdset(rosterWnd, get_color(COLOR_ROSTERSEL));
// The 3 following lines aim at coloring the whole line
wmove(rosterWnd, i, x_pos);
for (n = 0; n < maxx; n++)
waddch(rosterWnd, ' ');
} else {
if (pending == '#')
- wattrset(rosterWnd, get_color(COLOR_ROSTERNMSG));
+ wbkgdset(rosterWnd, get_color(COLOR_ROSTERNMSG));
else {
int color = get_color(COLOR_ROSTER);
if ((!isspe) && (!isgrp)) { // Look for color rules
@@ -2001,7 +2001,7 @@ void scr_draw_roster(void)
}
}
}
- wattrset(rosterWnd, color);
+ wbkgdset(rosterWnd, color);
}
}
@@ -2055,6 +2055,8 @@ void scr_draw_roster(void)
i++;
}
+ wbkgdset(rosterWnd, get_color(COLOR_GENERAL));
+
g_free(rline);
g_free(name);
top_panel(inputPanel);
|