This commit is contained in:
doitux
2007-12-09 13:44:23 +00:00
parent e3d027a25f
commit 5aa2647ade
5 changed files with 18 additions and 20 deletions
+8 -4
View File
@@ -20,12 +20,13 @@
#include "chattools.h"
#include "session.h"
#include "configfile.h"
#include "sdlplayer.h"
#include <iostream>
using namespace std;
ChatTools::ChatTools(QLineEdit* l, ConfigFile *c, int notifyMode, QTextBrowser *b, QTreeWidget *t) : nickAutoCompletitionCounter(0), myLineEdit(l), myNickTreeWidget(t), myNickStringList(NULL), myTextBrowser(b), myNotifyMode(notifyMode), myConfig(c)
ChatTools::ChatTools(QLineEdit* l, ConfigFile *c, int notifyMode, QTextBrowser *b, QTreeWidget *t, SDLPlayer *s, QDialog *p) : nickAutoCompletitionCounter(0), myLineEdit(l), myNickTreeWidget(t), myNickStringList(NULL), myTextBrowser(b), myNotifyMode(notifyMode), myConfig(c), mySDLPlayer(s), myParentDialog(p)
{
}
@@ -64,7 +65,6 @@ void ChatTools::receiveMessage(QString playerName, QString message) {
break;
default:;
}
myTextBrowser->append(playerName + ": " + tempMsg);
}
else {
switch (myNotifyMode) {
@@ -75,9 +75,13 @@ void ChatTools::receiveMessage(QString playerName, QString message) {
case 2: tempMsg = QString("<span style=\"color:#FFFFFF;\">"+message+"</span>");
break;
default:;
}
myTextBrowser->append(playerName + ": " + tempMsg);
}
}
myTextBrowser->append(playerName + ": " + tempMsg);
}
if(myParentDialog) {
if(myParentDialog->isVisible() && myConfig->readConfigInt("PlayLobbyChatNotification"))
mySDLPlayer->playSound("lobbychatnotify",0);
}
}