X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fclient.cpp;h=de43a0b6b55d39244bc8ed04d46836035e124bc7;hp=cedc0422679c1287f55890cf9da0ba39288c9191;hb=770b7ef54b03f3ebd1e29a58b4757505e1809b2d;hpb=c5cbe5eb77fce2ab954a98399a1450803108217b diff --git a/src/client/client.cpp b/src/client/client.cpp index cedc0422..de43a0b6 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -150,9 +150,6 @@ Buffer *Client::buffer(BufferInfo id) { if(!buff) { Client *client = Client::instance(); buff = new Buffer(id, client); - - connect(buff, SIGNAL(userInput(BufferInfo, QString)), - client, SLOT(userInput(BufferInfo, QString))); connect(buff, SIGNAL(destroyed()), client, SLOT(bufferDestroyed())); client->_buffers[id.uid()] = buff; @@ -243,17 +240,8 @@ void Client::coreIdentityRemoved(IdentityId id) { } /*** ***/ - -void Client::fakeInput(BufferId bufferUid, QString message) { - Buffer *buff = buffer(bufferUid); - if(!buff) - qWarning() << "No Buffer with uid" << bufferUid << "can't send Input" << message; - else - emit instance()->sendInput(buff->bufferInfo(), message); -} - -void Client::fakeInput(BufferInfo bufferInfo, QString message) { - fakeInput(bufferInfo, message); +void Client::userInput(BufferInfo bufferInfo, QString message) { + emit instance()->sendInput(bufferInfo, message); } /*** core connection stuff ***/ @@ -416,17 +404,8 @@ void Client::networkDestroyed() { void Client::recvMessage(const Message &msg) { Buffer *b = buffer(msg.buffer()); - -// Buffer::ActivityLevel level = Buffer::OtherActivity; -// if(msg.type() == Message::Plain || msg.type() == Message::Notice){ -// level |= Buffer::NewMessage; -// } -// if(msg.flags() & Message::Highlight){ -// level |= Buffer::Highlight; -// } -// emit bufferActivity(level, b); - b->appendMsg(msg); + networkModel()->updateBufferActivity(msg); } void Client::recvStatusMsg(QString /*net*/, QString /*msg*/) { @@ -438,6 +417,7 @@ void Client::recvBacklogData(BufferInfo id, QVariantList msgs, bool /*done*/) { foreach(QVariant v, msgs) { Message msg = v.value(); b->prependMsg(msg); + // networkModel()->updateBufferActivity(msg); if(!layoutQueue.contains(b)) layoutQueue.append(b); } if(layoutQueue.count() && !layoutTimer->isActive()) layoutTimer->start(); @@ -458,7 +438,3 @@ AbstractUiMsg *Client::layoutMsg(const Message &msg) { return instance()->mainUi->layoutMsg(msg); } -void Client::userInput(BufferInfo id, QString msg) { - emit sendInput(id, msg); -} -