X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtopia%2Fmainwidget.cpp;h=65d528615a3864f829be18a7a9416ed39726f4fa;hp=b083a8ecb07d3f41aba572b390d744ee7f038602;hb=d47cd9b56ba10dc6e20baeabbd2b51305824b8c2;hpb=8a3c3f283e33a9ae87b4b3bed94e676f12dd5d2e diff --git a/src/qtopia/mainwidget.cpp b/src/qtopia/mainwidget.cpp index b083a8ec..65d52861 100644 --- a/src/qtopia/mainwidget.cpp +++ b/src/qtopia/mainwidget.cpp @@ -58,7 +58,7 @@ void MainWidget::setBuffer(Buffer *buf) { chatWidget->setContents(lines); connect(buf, SIGNAL(msgAppended(AbstractUiMsg *)), chatWidget, SLOT(appendMsg(AbstractUiMsg *))); connect(buf, SIGNAL(msgPrepended(AbstractUiMsg *)), chatWidget, SLOT(prependMsg(AbstractUiMsg *))); - //connect(buf, SIGNAL(topicSet(QString)), this, SLOT(setTopic(QString))); + connect(buf, SIGNAL(topicSet(QString)), this, SLOT(setTopic(QString))); //connect(buf, SIGNAL(ownNickSet(QString)), this, SLOT(setOwnNick(QString))); ui.stack->addWidget(chatWidget); chatWidgets.insert(buf, chatWidget); @@ -78,3 +78,12 @@ void MainWidget::enterPressed() { } ui.inputLine->clear(); } + +// FIXME make this more elegant, we don't need to send a string around... +void MainWidget::setTopic(QString topic) { + Q_UNUSED(topic); + if(currentBuffer) { + QString title = QString("%1 (%2): \"%3\"").arg(currentBuffer->name()).arg(currentBuffer->networkName()).arg(currentBuffer->topic()); + ui.topicBar->setContents(title); + } +}