about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2012-11-14 01:29:32 +0000
committerJames Booth <boothj5@gmail.com>2012-11-14 01:29:32 +0000
commit0618c61d6e82f41d4823788a1a7075125ae1f73a (patch)
treeda15896f1f6b36243b4165cd6d50faab45a6cbb6
parenta970ea49cd9457b9281466d6e127b8b15a25fd1f (diff)
downloadprofani-tty-0618c61d6e82f41d4823788a1a7075125ae1f73a.tar.gz
Show when unread messages in /wins list
-rw-r--r--src/windows.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/windows.c b/src/windows.c
index 43e6177f..2d8d8a65 100644
--- a/src/windows.c
+++ b/src/windows.c
@@ -241,7 +241,12 @@ win_show_wins(void)
                 switch (_wins[i].type)
                 {
                     case WIN_CHAT:
-                        wprintw(_cons_win, "[%d] - ", i + 1);
+                        wprintw(_cons_win, "[%d]", i + 1);
+                        if (_wins[i].unread > 0) {
+                            wprintw(_cons_win, " !! - ");
+                        } else {
+                            wprintw(_cons_win, "    - ");
+                        }
                         wprintw(_cons_win, "conversation : %s", _wins[i].from);
                         PContact contact = contact_list_get_contact(_wins[i].from);
                         if (p_contact_name(contact) != NULL) {
@@ -250,11 +255,21 @@ win_show_wins(void)
                         wprintw(_cons_win, ", %s", p_contact_presence(contact));
                         break;
                     case WIN_PRIVATE:
-                        wprintw(_cons_win, "[%d] - ", i + 1);
+                        wprintw(_cons_win, "[%d]", i + 1);
+                        if (_wins[i].unread > 0) {
+                            wprintw(_cons_win, " !! - ");
+                        } else {
+                            wprintw(_cons_win, "    - ");
+                        }
                         wprintw(_cons_win, "private      : %s", _wins[i].from);
                         break;
                     case WIN_MUC:
-                        wprintw(_cons_win, "[%d] - ", i + 1);
+                        wprintw(_cons_win, "[%d]", i + 1);
+                        if (_wins[i].unread > 0) {
+                            wprintw(_cons_win, " !! - ");
+                        } else {
+                            wprintw(_cons_win, "    - ");
+                        }
                         wprintw(_cons_win, "chat room    : %s", _wins[i].from);
                         break;
                     default: