From a0f43adf5ba49f9024445202394ae14ecabd4d2a Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 31 Jan 2016 18:52:53 +0000 Subject: Only add private chats to Rooms unread count in roster when room active --- src/ui/rosterwin.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'src/ui') diff --git a/src/ui/rosterwin.c b/src/ui/rosterwin.c index 971c6fd3..60d2fa91 100644 --- a/src/ui/rosterwin.c +++ b/src/ui/rosterwin.c @@ -843,21 +843,24 @@ _rosterwin_rooms_header(ProfLayoutSplit *layout, gboolean newline, GList *rooms) while (curr) { ProfMucWin *mucwin = curr->data; unread += mucwin->unread; - curr = g_list_next(curr); - } - char *prefpriv = prefs_get_string(PREF_ROSTER_PRIVATE); - if (g_strcmp0(prefpriv, "room") == 0) { - GList *privwins = wins_get_private_chats(NULL); - GList *curr = privwins; - while (curr) { - ProfPrivateWin *privwin = curr->data; - unread += privwin->unread; - curr = g_list_next(curr); + // include private chats + char *prefpriv = prefs_get_string(PREF_ROSTER_PRIVATE); + if (g_strcmp0(prefpriv, "room") == 0) { + GList *privwins = wins_get_private_chats(mucwin->roomjid); + GList *curr_priv = privwins; + while (curr_priv) { + ProfPrivateWin *privwin = curr_priv->data; + unread += privwin->unread; + curr_priv = g_list_next(curr_priv); + } + g_list_free(privwins); } - g_list_free(privwins); + prefs_free_string(prefpriv); + + curr = g_list_next(curr); } - prefs_free_string(prefpriv); + if (unread == 0 && prefs_get_boolean(PREF_ROSTER_COUNT_ZERO)) { g_string_append_printf(header, " (%d)", unread); } else if (unread > 0) { -- cgit 1.4.1-2-gfad0 n value='grep'>log msg
path: root/doc/colorschemes.txt
blob: e1fee2da0172cc6cc7a65fd821ec754cc1cf3029 (plain) (blame)
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
90
91
92