about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/console.c2
-rw-r--r--src/ui/rosterwin.c12
-rw-r--r--src/ui/win_types.h2
-rw-r--r--src/ui/window.c2
4 files changed, 16 insertions, 2 deletions
diff --git a/src/ui/console.c b/src/ui/console.c
index 2be41b14..a5a9800d 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -2189,6 +2189,8 @@ cons_theme_properties(void)
     _cons_theme_prop(THEME_ROSTER_OFFLINE_UNREAD, "roster.offline.unread");
     _cons_theme_prop(THEME_ROSTER_ROOM, "roster.room");
     _cons_theme_prop(THEME_ROSTER_ROOM_UNREAD, "roster.room.unread");
+    _cons_theme_prop(THEME_ROSTER_ROOM_TRIGGER, "roster.room.trigger");
+    _cons_theme_prop(THEME_ROSTER_ROOM_MENTION, "roster.room.mention");
 
     _cons_theme_prop(THEME_OCCUPANTS_HEADER, "occupants.header");
 
diff --git a/src/ui/rosterwin.c b/src/ui/rosterwin.c
index d7c8875b..7dfad1e1 100644
--- a/src/ui/rosterwin.c
+++ b/src/ui/rosterwin.c
@@ -479,7 +479,11 @@ _rosterwin_room(ProfLayoutSplit *layout, ProfMucWin *mucwin)
 {
     GString *msg = g_string_new(" ");
 
-    if (mucwin->unread > 0) {
+    if (mucwin->unread_mentions) {
+        wattron(layout->subwin, theme_attrs(THEME_ROSTER_ROOM_MENTION));
+    } else if (mucwin->unread_triggers) {
+        wattron(layout->subwin, theme_attrs(THEME_ROSTER_ROOM_TRIGGER));
+    } else if (mucwin->unread > 0) {
         wattron(layout->subwin, theme_attrs(THEME_ROSTER_ROOM_UNREAD));
     } else {
         wattron(layout->subwin, theme_attrs(THEME_ROSTER_ROOM));
@@ -514,7 +518,11 @@ _rosterwin_room(ProfLayoutSplit *layout, ProfMucWin *mucwin)
     win_sub_print(layout->subwin, msg->str, FALSE, wrap, current_indent);
     g_string_free(msg, TRUE);
 
-    if (mucwin->unread > 0) {
+    if (mucwin->unread_mentions) {
+        wattroff(layout->subwin, theme_attrs(THEME_ROSTER_ROOM_MENTION));
+    } else if (mucwin->unread_triggers) {
+        wattroff(layout->subwin, theme_attrs(THEME_ROSTER_ROOM_TRIGGER));
+    } else if (mucwin->unread > 0) {
         wattroff(layout->subwin, theme_attrs(THEME_ROSTER_ROOM_UNREAD));
     } else {
         wattroff(layout->subwin, theme_attrs(THEME_ROSTER_ROOM));
diff --git a/src/ui/win_types.h b/src/ui/win_types.h
index 94901957..53b5f49a 100644
--- a/src/ui/win_types.h
+++ b/src/ui/win_types.h
@@ -117,6 +117,8 @@ typedef struct prof_muc_win_t {
     ProfWin window;
     char *roomjid;
     int unread;
+    gboolean unread_mentions;
+    gboolean unread_triggers;
     gboolean notify;
     gboolean showjid;
     unsigned long memcheck;
diff --git a/src/ui/window.c b/src/ui/window.c
index d749ac84..8af57cfd 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -181,6 +181,8 @@ win_create_muc(const char *const roomjid)
 
     new_win->roomjid = strdup(roomjid);
     new_win->unread = 0;
+    new_win->unread_mentions = FALSE;
+    new_win->unread_triggers = FALSE;
     new_win->notify = FALSE;
     if (prefs_get_boolean(PREF_OCCUPANTS_JID)) {
         new_win->showjid = TRUE;