X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fbuffer.cpp;h=7a996d00ea712407ad83478bf906298417594cb1;hp=023263bbb98ab0f84d3b61fd1d0029c3e20f1a81;hb=cf28e7152c5d940aec586be1b29fbf8ddc99f087;hpb=e9772bbd46ac2006b3f283bfc9f06b013d174ae3 diff --git a/src/client/buffer.cpp b/src/client/buffer.cpp index 023263bb..7a996d00 100644 --- a/src/client/buffer.cpp +++ b/src/client/buffer.cpp @@ -1,11 +1,11 @@ /*************************************************************************** - * Copyright (C) 2005-07 by The Quassel Team * + * Copyright (C) 2005-07 by the Quassel IRC Team * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * + * (at your option) version 3. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -107,12 +107,12 @@ QVariantMap Buffer::nickList() const { } QString Buffer::topic() const { - // FIXME check if we got a networkInfo() object + if(ircChannel()) return ircChannel()->topic(); return QString(); } QString Buffer::ownNick() const { - // FIXME check if we got a networkInfo() object + // FIXME if(ircChannel()) return ircChannel()->ownNick(); return QString(); } @@ -165,6 +165,8 @@ void Buffer::setIrcChannel(IrcChannel *ircchan) { } _ircChannel = ircchan; if(_ircChannel) { + emit topicSet(_ircChannel->topic()); + connect(_ircChannel, SIGNAL(topicSet(QString)), this, SIGNAL(topicSet(QString))); connect(_ircChannel, SIGNAL(destroyed()), this, SLOT(setIrcChannel())); } _nickModel->setIrcChannel(ircChannel()); @@ -172,11 +174,6 @@ void Buffer::setIrcChannel(IrcChannel *ircchan) { // no longer needed // back reference: -// void Buffer::setTopic(QString t) { -// _topic = t; -// emit topicSet(t); -// emit bufferUpdated(this); -// } // void Buffer::addNick(QString nick, QVariantMap props) { // if(nick == ownNick()) setActive(true);