about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/config/theme.c4
-rw-r--r--src/config/theme.h2
-rw-r--r--src/event/server_events.c7
-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
-rw-r--r--src/window_list.c2
-rw-r--r--theme_template2
-rw-r--r--themes/aqua2
-rw-r--r--themes/batman2
-rw-r--r--themes/bios2
-rw-r--r--themes/boothj56
-rw-r--r--themes/forest2
-rw-r--r--themes/headache2
-rw-r--r--themes/joker2
-rw-r--r--themes/mono2
-rw-r--r--themes/orange2
-rw-r--r--themes/original2
-rw-r--r--themes/original_bright2
-rw-r--r--themes/shade2
-rw-r--r--themes/spawn2
-rw-r--r--themes/whiteness2
23 files changed, 63 insertions, 4 deletions
diff --git a/src/config/theme.c b/src/config/theme.c
index 0e790eb2..10bbb0af 100644
--- a/src/config/theme.c
+++ b/src/config/theme.c
@@ -142,6 +142,8 @@ theme_init(const char *const theme_name)
     g_hash_table_insert(defaults, strdup("roster.xa.unread"),        strdup("cyan"));
     g_hash_table_insert(defaults, strdup("roster.room"),             strdup("green"));
     g_hash_table_insert(defaults, strdup("roster.room.unread"),      strdup("green"));
+    g_hash_table_insert(defaults, strdup("roster.room.trigger"),     strdup("green"));
+    g_hash_table_insert(defaults, strdup("roster.room.mention"),     strdup("green"));
     g_hash_table_insert(defaults, strdup("occupants.header"),        strdup("yellow"));
 }
 
@@ -765,6 +767,8 @@ theme_attrs(theme_item_t attrs)
     case THEME_ROSTER_XA_UNREAD:        _theme_prep_fgnd("roster.xa.unread",        "cyan",     lookup_str, &bold); break;
     case THEME_ROSTER_ROOM:             _theme_prep_fgnd("roster.room",             "green",    lookup_str, &bold); break;
     case THEME_ROSTER_ROOM_UNREAD:      _theme_prep_fgnd("roster.room.unread",      "green",    lookup_str, &bold); break;
+    case THEME_ROSTER_ROOM_TRIGGER:     _theme_prep_fgnd("roster.room.trigger",     "green",    lookup_str, &bold); break;
+    case THEME_ROSTER_ROOM_MENTION:     _theme_prep_fgnd("roster.room.mention",     "green",    lookup_str, &bold); break;
     case THEME_OCCUPANTS_HEADER:        _theme_prep_fgnd("occupants.header",        "yellow",   lookup_str, &bold); break;
     case THEME_WHITE:                   g_string_append(lookup_str, "white");   bold = FALSE;   break;
     case THEME_WHITE_BOLD:              g_string_append(lookup_str, "white");   bold = TRUE;    break;
diff --git a/src/config/theme.h b/src/config/theme.h
index c26b84f1..e6a72dde 100644
--- a/src/config/theme.h
+++ b/src/config/theme.h
@@ -106,6 +106,8 @@ typedef enum {
     THEME_ROSTER_XA_UNREAD,
     THEME_ROSTER_ROOM,
     THEME_ROSTER_ROOM_UNREAD,
+    THEME_ROSTER_ROOM_TRIGGER,
+    THEME_ROSTER_ROOM_MENTION,
     THEME_RECEIPT_SENT,
     THEME_NONE,
     THEME_WHITE,
diff --git a/src/event/server_events.c b/src/event/server_events.c
index 64f82dc0..57416496 100644
--- a/src/event/server_events.c
+++ b/src/event/server_events.c
@@ -281,6 +281,13 @@ sv_ev_room_message(const char *const room_jid, const char *const nick, const cha
         if (notify) {
             mucwin->notify = TRUE;
         }
+
+        if (mention) {
+            mucwin->unread_mentions = TRUE;
+        }
+        if (triggers) {
+            mucwin->unread_triggers = TRUE;
+        }
     }
 
     if (triggers) {
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;
diff --git a/src/window_list.c b/src/window_list.c
index efb6e331..2acfd0fb 100644
--- a/src/window_list.c
+++ b/src/window_list.c
@@ -228,6 +228,8 @@ wins_set_current_by_num(int i)
             ProfMucWin *mucwin = (ProfMucWin*) window;
             assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK);
             mucwin->unread = 0;
+            mucwin->unread_mentions = FALSE;
+            mucwin->unread_triggers = FALSE;
             mucwin->notify = FALSE;
         } else if (window->type == WIN_PRIVATE) {
             ProfPrivateWin *privatewin = (ProfPrivateWin*) window;
diff --git a/theme_template b/theme_template
index b363c041..eb5a0fe8 100644
--- a/theme_template
+++ b/theme_template
@@ -67,6 +67,8 @@ roster.dnd.unread=
 roster.offline.unread=
 roster.room=
 roster.room.unread=
+roster.room.trigger=
+roster.room.mention=
 occupants.header=
 receipt.sent=
 
diff --git a/themes/aqua b/themes/aqua
index dbfd9d30..ecdfac16 100644
--- a/themes/aqua
+++ b/themes/aqua
@@ -67,5 +67,7 @@ roster.dnd.unread=blue
 roster.offline.unread=bold_black
 roster.room=cyan
 roster.room.unread=bold_cyan
+roster.room.mention=bold_blue
+roster.room.trigger=bold_blue
 occupants.header=bold_white
 receipt.sent=white
diff --git a/themes/batman b/themes/batman
index 87cb3e30..937e0ad3 100644
--- a/themes/batman
+++ b/themes/batman
@@ -67,5 +67,7 @@ roster.dnd.unread=green
 roster.offline.unread=bold_black
 roster.room=green
 roster.room.unread=green
+roster.room.mention=green
+roster.room.trigger=green
 occupants.header=yellow
 receipt.sent=red
diff --git a/themes/bios b/themes/bios
index 2dfd4975..51d63c84 100644
--- a/themes/bios
+++ b/themes/bios
@@ -67,6 +67,8 @@ roster.dnd.unread=bold_red
 roster.offline.unread=bold_blue
 roster.room=bold_red
 roster.room.unread=bold_magenta
+roster.room.mention=bold_magenta
+roster.room.trigger=bold_magenta
 occupants.header=bold_magenta
 receipt.sent=bold_blue
 
diff --git a/themes/boothj5 b/themes/boothj5
index 2327fdf0..ac6c4666 100644
--- a/themes/boothj5
+++ b/themes/boothj5
@@ -42,8 +42,8 @@ typing=yellow
 gone=red
 error=red
 roominfo=yellow
-roommention=bold_magenta
-roomtrigger=bold_red
+roommention=bold_cyan
+roomtrigger=bold_blue
 me=blue
 them=bold_green
 roster.header=bold_yellow
@@ -67,6 +67,8 @@ roster.dnd.unread=bold_magenta
 roster.offline.unread=bold_red
 roster.room=green
 roster.room.unread=bold_green
+roster.room.mention=bold_cyan
+roster.room.trigger=bold_blue
 occupants.header=bold_yellow
 receipt.sent=bold_black
 
diff --git a/themes/forest b/themes/forest
index 9d687f3c..cd289d44 100644
--- a/themes/forest
+++ b/themes/forest
@@ -67,5 +67,7 @@ roster.dnd.unread=bold_black
 roster.offline.unread=bold_black
 roster.room=green
 roster.room.unread=bold_green
+roster.room.mention=bold_green
+roster.room.trigger=bold_green
 occupants.header=bold_green
 receipt.sent=bold_black
diff --git a/themes/headache b/themes/headache
index 7686d99d..8f95e796 100644
--- a/themes/headache
+++ b/themes/headache
@@ -67,5 +67,7 @@ roster.dnd.unread=bold_magenta
 roster.offline.unread=bold_green
 roster.room=red
 roster.room.unread=bold_red
+roster.room.mention=bold_red
+roster.room.trigger=bold_red
 occupants.header=bold_cyan
 receipt.sent=red
diff --git a/themes/joker b/themes/joker
index 0f4db59f..400dc0a7 100644
--- a/themes/joker
+++ b/themes/joker
@@ -67,5 +67,7 @@ roster.dnd.unread=green
 roster.offline.unread=bold_black
 roster.room=green
 roster.room.unread=green
+roster.room.mention=green
+roster.room.trigger=green
 occupants.header=magenta
 receipt.sent=red
diff --git a/themes/mono b/themes/mono
index c74d7509..392d458a 100644
--- a/themes/mono
+++ b/themes/mono
@@ -67,5 +67,7 @@ roster.dnd.unread=white
 roster.offline.unread=white
 roster.room=white
 roster.room.unread=white
+roster.room.mention=white
+roster.room.trigger=white
 occupants.header=white
 receipt.sent=white
diff --git a/themes/orange b/themes/orange
index 220f448e..a7875ec9 100644
--- a/themes/orange
+++ b/themes/orange
@@ -67,5 +67,7 @@ roster.dnd.unread=white
 roster.offline.unread=white
 roster.room=blue
 roster.room.unread=blue
+roster.room.mention=blue
+roster.room.trigger=blue
 occupants.header=black
 receipt.sent=red
diff --git a/themes/original b/themes/original
index ab6f5b44..c9433d34 100644
--- a/themes/original
+++ b/themes/original
@@ -67,5 +67,7 @@ roster.dnd.unread=red
 roster.offline.unread=red
 roster.room=green
 roster.room.unread=green
+roster.room.mention=green
+roster.room.trigger=green
 occupants.header=yellow
 receipt.sent=red
diff --git a/themes/original_bright b/themes/original_bright
index 032a8a8a..4e0dd8e8 100644
--- a/themes/original_bright
+++ b/themes/original_bright
@@ -67,5 +67,7 @@ roster.dnd.unread=bold_red
 roster.offline.unread=bold_red
 roster.room=bold_green
 roster.room.unread=bold_green
+roster.room.mention=bold_green
+roster.room.trigger=bold_green
 occupants.header=bold_yellow
 receipt.sent=bold_red
diff --git a/themes/shade b/themes/shade
index 9bc4d2eb..cd343727 100644
--- a/themes/shade
+++ b/themes/shade
@@ -67,5 +67,7 @@ roster.dnd.unread=green
 roster.offline.unread=white
 roster.room=green
 roster.room.unread=green
+roster.room.mention=green
+roster.room.trigger=green
 occupants.header=magenta
 receipt.sent=red
diff --git a/themes/spawn b/themes/spawn
index e04ab5f5..be3fb5ed 100644
--- a/themes/spawn
+++ b/themes/spawn
@@ -67,5 +67,7 @@ roster.dnd.unread=green
 roster.offline.unread=bold_black
 roster.room=green
 roster.room.unread=green
+roster.room.mention=green
+roster.room.trigger=green
 occupants.header=white
 receipt.sent=red
diff --git a/themes/whiteness b/themes/whiteness
index 22d70ef4..883038f6 100644
--- a/themes/whiteness
+++ b/themes/whiteness
@@ -67,5 +67,7 @@ roster.dnd.unread=red
 roster.offline.unread=red
 roster.room=green
 roster.room.unread=green
+roster.room.mention=green
+roster.room.trigger=green
 occupants.header=black
 receipt.sent=red
href='#n386'>386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656