about summary refs log tree commit diff stats
path: root/src/config/theme.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-07-16 13:44:16 +0100
committerJames Booth <boothj5@gmail.com>2014-07-16 13:44:16 +0100
commit4624eabb750d548ae3bddc5a8e73557f7a292330 (patch)
treeeb922c0bc2c929703a98b7c39bddfaaaf016e769 /src/config/theme.c
parentafde9d770a94aa2684d6d40a7735a775b0122594 (diff)
downloadprofani-tty-4624eabb750d548ae3bddc5a8e73557f7a292330.tar.gz
Colour chat room messages that contain users nickname
Diffstat (limited to 'src/config/theme.c')
-rw-r--r--src/config/theme.c36
1 files changed, 21 insertions, 15 deletions
diff --git a/src/config/theme.c b/src/config/theme.c
index 14e7260c..c03c2dd4 100644
--- a/src/config/theme.c
+++ b/src/config/theme.c
@@ -89,6 +89,7 @@ static struct colours_t {
         NCURSES_COLOR_T error;
         NCURSES_COLOR_T incoming;
         NCURSES_COLOR_T roominfo;
+        NCURSES_COLOR_T roommention;
         NCURSES_COLOR_T me;
         NCURSES_COLOR_T them;
         NCURSES_COLOR_T otrstartedtrusted;
@@ -202,29 +203,30 @@ theme_init_colours(void)
 
     // room chat
     init_pair(19, colour_prefs.roominfo, colour_prefs.bkgnd);
+    init_pair(20, colour_prefs.roommention, colour_prefs.bkgnd);
 
     // statuses
-    init_pair(20, colour_prefs.online, colour_prefs.bkgnd);
-    init_pair(21, colour_prefs.offline, colour_prefs.bkgnd);
-    init_pair(22, colour_prefs.away, colour_prefs.bkgnd);
-    init_pair(23, colour_prefs.chat, colour_prefs.bkgnd);
-    init_pair(24, colour_prefs.dnd, colour_prefs.bkgnd);
-    init_pair(25, colour_prefs.xa, colour_prefs.bkgnd);
+    init_pair(21, colour_prefs.online, colour_prefs.bkgnd);
+    init_pair(22, colour_prefs.offline, colour_prefs.bkgnd);
+    init_pair(23, colour_prefs.away, colour_prefs.bkgnd);
+    init_pair(24, colour_prefs.chat, colour_prefs.bkgnd);
+    init_pair(25, colour_prefs.dnd, colour_prefs.bkgnd);
+    init_pair(26, colour_prefs.xa, colour_prefs.bkgnd);
 
     // states
-    init_pair(26, colour_prefs.typing, colour_prefs.bkgnd);
-    init_pair(27, colour_prefs.gone, colour_prefs.bkgnd);
+    init_pair(27, colour_prefs.typing, colour_prefs.bkgnd);
+    init_pair(28, colour_prefs.gone, colour_prefs.bkgnd);
 
     // subscription status
-    init_pair(28, colour_prefs.subscribed, colour_prefs.bkgnd);
-    init_pair(29, colour_prefs.unsubscribed, colour_prefs.bkgnd);
+    init_pair(29, colour_prefs.subscribed, colour_prefs.bkgnd);
+    init_pair(30, colour_prefs.unsubscribed, colour_prefs.bkgnd);
 
     // otr messages
-    init_pair(30, colour_prefs.otrstartedtrusted, colour_prefs.bkgnd);
-    init_pair(31, colour_prefs.otrstarteduntrusted, colour_prefs.bkgnd);
-    init_pair(32, colour_prefs.otrended, colour_prefs.bkgnd);
-    init_pair(33, colour_prefs.otrtrusted, colour_prefs.bkgnd);
-    init_pair(34, colour_prefs.otruntrusted, colour_prefs.bkgnd);
+    init_pair(31, colour_prefs.otrstartedtrusted, colour_prefs.bkgnd);
+    init_pair(32, colour_prefs.otrstarteduntrusted, colour_prefs.bkgnd);
+    init_pair(33, colour_prefs.otrended, colour_prefs.bkgnd);
+    init_pair(34, colour_prefs.otrtrusted, colour_prefs.bkgnd);
+    init_pair(35, colour_prefs.otruntrusted, colour_prefs.bkgnd);
 }
 
 static NCURSES_COLOR_T
@@ -399,6 +401,10 @@ _load_colours(void)
     _set_colour(roominfo_val, &colour_prefs.roominfo, COLOR_YELLOW);
     g_free(roominfo_val);
 
+    gchar *roommention_val = g_key_file_get_string(theme, "colours", "roommention", NULL);
+    _set_colour(roommention_val, &colour_prefs.roommention, COLOR_YELLOW);
+    g_free(roommention_val);
+
     gchar *me_val = g_key_file_get_string(theme, "colours", "me", NULL);
     _set_colour(me_val, &colour_prefs.me, COLOR_YELLOW);
     g_free(me_val);