From: Manuel Nickschas Date: Mon, 4 Aug 2008 21:12:00 +0000 (+0200) Subject: Cosmetic fixes for the notifications X-Git-Tag: 0.3.0~112 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=1afbad3bc1ebcd6abab1c02d7fbbb08ac3c52e48 Cosmetic fixes for the notifications --- diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index f82b971d..22d3724c 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -594,12 +594,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 +603,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);