QTfrontend/ui/widget/chatwidget.cpp
changeset 6147 b4d7d8d62feb
parent 6145 e658c6f698dd
child 6149 0b92341adb6a
--- a/QTfrontend/ui/widget/chatwidget.cpp	Tue Oct 18 00:13:50 2011 +0200
+++ b/QTfrontend/ui/widget/chatwidget.cpp	Tue Oct 18 14:28:50 2011 +0200
@@ -140,7 +140,8 @@
     mainLayout.setColumnStretch(0, 76);
     mainLayout.setColumnStretch(1, 24);
 
-    chatEditLine = new QLineEdit(this);
+    chatEditLine = new SmartLineEdit(this);
+    chatEditLine->addCommands(QStringList("/me"));
     chatEditLine->setMaxLength(300);
     connect(chatEditLine, SIGNAL(returnPressed()), this, SLOT(returnPressed()));
 
@@ -413,6 +414,8 @@
 
 void HWChatWidget::nickAdded(const QString& nick, bool notifyNick)
 {
+    chatEditLine->addNickname(nick);
+
     QListWidgetItem * item = new ListWidgetNickItem(nick, friendsList.contains(nick, Qt::CaseInsensitive), ignoreList.contains(nick, Qt::CaseInsensitive));
     updateNickItem(item);
     chatNicks->addItem(item);
@@ -426,6 +429,8 @@
 
 void HWChatWidget::nickRemoved(const QString& nick)
 {
+    chatEditLine->removeNickname(nick);
+
     foreach(QListWidgetItem * item, chatNicks->findItems(nick, Qt::MatchExactly))
         chatNicks->takeItem(chatNicks->row(item));