about summary refs log tree commit diff stats
path: root/src/ui/titlebar.c
diff options
context:
space:
mode:
authorDebXWoody <stefan@debxwoody.de>2021-05-29 08:05:03 +0200
committerDebXWoody <stefan@debxwoody.de>2021-05-29 08:05:03 +0200
commit35206453667d46e4e14903c435958a94d8ad00e5 (patch)
treeee26090c0db3464cf991ad8096c6c8d4da1d03e5 /src/ui/titlebar.c
parent69e3cebf26dc5c6a9c13fe3269bcd659060d7c4e (diff)
downloadprofani-tty-35206453667d46e4e14903c435958a94d8ad00e5.tar.gz
Attention flag for chat windows
User is able to toggle a flag for chat windows. This flag should be used to mark
the window for "Attention".

Use Ctrl+f to mark the window.
Diffstat (limited to 'src/ui/titlebar.c')
-rw-r--r--src/ui/titlebar.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ui/titlebar.c b/src/ui/titlebar.c
index dee6a7e2..0b2187ce 100644
--- a/src/ui/titlebar.c
+++ b/src/ui/titlebar.c
@@ -487,6 +487,18 @@ _show_privacy(ProfChatWin* chatwin)
 
         return;
     }
+    if (chatwin->has_attention) {
+        wprintw(win, " ");
+        wattron(win, bracket_attrs);
+        wprintw(win, "[");
+        wattroff(win, bracket_attrs);
+        wattron(win, encrypted_attrs);
+        wprintw(win, "ATTENTION");
+        wattroff(win, encrypted_attrs);
+        wattron(win, bracket_attrs);
+        wprintw(win, "]");
+        wattroff(win, bracket_attrs);
+    }
 
     if (chatwin->pgp_send || chatwin->pgp_recv) {
         GString* pgpmsg = g_string_new("PGP ");