X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fmainwin.cpp;h=b2a8b470d25b21fabf330d6f7a2125de49279126;hp=f82b971db85fccb55e73bae5d92b40d76cf1db3e;hb=019a59ffca44ddc32fc6b16fd6cdcc8f3e1c93c6;hpb=12e89ab96ec63667e0f1d61c88fe6f2a3023682a diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index f82b971d..b2a8b470 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -451,7 +451,7 @@ void MainWin::saveLayout() { } void MainWin::updateLagIndicator(int lag) { - coreLagLabel->setText(QString("Core Lag: %1 msec").arg(lag)); + coreLagLabel->setText(QString(tr("Core Lag: %1 msec")).arg(lag)); } @@ -583,6 +583,9 @@ void MainWin::messagesInserted(const QModelIndex &parent, int start, int end) { if(QApplication::activeWindow() != 0) return; + // FIXME + return; + for(int i = start; i <= end; i++) { QModelIndex idx = Client::messageModel()->index(i, ChatLineModel::ContentsColumn); if(!idx.isValid()) { @@ -594,12 +597,7 @@ void MainWin::messagesInserted(const QModelIndex &parent, int start, int end) { BufferInfo::Type bufType = Client::networkModel()->bufferType(bufId); if(flags & Message::Highlight || bufType == BufferInfo::QueryBuffer) { - QString title = Client::networkModel()->networkName(bufId); qDebug() << bufId << "title" << title; - if(bufType == BufferInfo::QueryBuffer) { - QString sender = Client::messageModel()->index(i, ChatLineModel::SenderColumn).data(ChatLineModel::DisplayRole).toString(); - sender = sender.mid(1, sender.length() - 2); // remove < > - title += " - " + sender; - } + QString title = Client::networkModel()->networkName(bufId) + " - " + Client::networkModel()->bufferName(bufId); // FIXME Don't instantiate this for every highlight... UiSettings uiSettings; @@ -608,12 +606,11 @@ void MainWin::messagesInserted(const QModelIndex &parent, int start, int end) { bool displayDesktop = uiSettings.value("NotificationDesktop", QVariant(true)).toBool(); if(displayBubble || displayDesktop) { if(uiSettings.value("DisplayPopupMessages", QVariant(true)).toBool()) { - // FIXME don't invoke style engine for this! QString text = idx.data(ChatLineModel::DisplayRole).toString(); if(displayBubble) displayTrayIconMessage(title, text); - # ifdef HAVE_DBUS +# ifdef HAVE_DBUS if(displayDesktop) sendDesktopNotification(title, text); - # endif +# endif } if(uiSettings.value("AnimateTrayIcon", QVariant(true)).toBool()) { QApplication::alert(this);