+void NetworkView::bufferActivity(uint level, Buffer *b) {
+ QColor c;
+ if(bufitems.contains(b) and b != currentBuffer) {
+ if(level & Highlight) {
+ c = QColor(Qt::red);
+ } else if(level & NewMessage) {
+ c = QColor(Qt::darkYellow);
+ } else if(level & OtherActivity) {
+ c = QColor(Qt::darkGreen);
+ }
+ bufitems[b]->setForeground(0, c);
+ }
+}
+
+void NetworkView::clearActivity(Buffer *b) {
+ QColor c;
+ // it should be sane not to check if b is in bufitems since we just checked before calling this function
+ if(b->isActive()) {
+ c = QColor(Qt::black);
+ } else {
+ c = QColor(Qt::gray);
+ }
+ bufitems[b]->setForeground(0, c);
+}
+