QTfrontend/chatwidget.cpp
changeset 1316 50514e45d0b5
parent 1311 49beb1221c0b
child 1356 77ab8735401d
--- a/QTfrontend/chatwidget.cpp	Wed Oct 08 13:54:51 2008 +0000
+++ b/QTfrontend/chatwidget.cpp	Wed Oct 08 13:58:27 2008 +0000
@@ -58,7 +58,7 @@
 void HWChatWidget::onChatStringFromNet(const QStringList& str)
 {
   if (str.size() < 2) return;
-  QListWidget* w=chatText;
+  QListWidget* w = chatText;
   w->addItem(str[0]+": "+str[1]);
   w->scrollToBottom();
   w->setSelectionMode(QAbstractItemView::NoSelection);
@@ -67,6 +67,8 @@
 void HWChatWidget::nickAdded(const QString& nick)
 {
   chatNicks->addItem(nick);
+  chatText->addItem(QString(tr("* %1 joined")).arg(nick));
+  chatText->scrollToBottom();
 }
 
 void HWChatWidget::nickRemoved(const QString& nick)
@@ -76,6 +78,8 @@
     chatNicks->takeItem(chatNicks->row(*it));
     ++it;
   }
+  chatText->addItem(QString(tr("* %1 left")).arg(nick));
+  chatText->scrollToBottom();
 }
 
 void HWChatWidget::clear()