X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fclient%2Fnetworkmodel.cpp;h=bd2d8a57f0f14508ff6502c5e6c03236b0b9a6c7;hb=ebf2a8f87f4f0ce69b62d4f11628fe1560c25f83;hp=bec3edf1496bcf1e434b675572c22ceb16f54599;hpb=0d1184b010f26a1620366fa705b18f6376b52698;p=quassel.git diff --git a/src/client/networkmodel.cpp b/src/client/networkmodel.cpp index bec3edf1..bd2d8a57 100644 --- a/src/client/networkmodel.cpp +++ b/src/client/networkmodel.cpp @@ -33,7 +33,6 @@ #include "util.h" // get rid of this (needed for isChannelName) - /***************************************** * Fancy Buffer Items *****************************************/ @@ -70,10 +69,11 @@ bool BufferItem::isActive() const { return qobject_cast(parent())->isActive(); } -bool BufferItem::setActivityLevel(Buffer::ActivityLevel level) { - _activity = level; - emit dataChanged(); - return true; +void BufferItem::setActivityLevel(Buffer::ActivityLevel level) { + if(_activity != level) { + _activity = level; + emit dataChanged(); + } } void BufferItem::updateActivityLevel(Buffer::ActivityLevel level) { @@ -107,7 +107,8 @@ QVariant BufferItem::data(int column, int role) const { bool BufferItem::setData(int column, const QVariant &value, int role) { switch(role) { case NetworkModel::BufferActivityRole: - return setActivityLevel((Buffer::ActivityLevel)value.toInt()); + setActivityLevel((Buffer::ActivityLevel)value.toInt()); + return true; default: return PropertyMapItem::setData(column, value, role); } @@ -312,6 +313,11 @@ QString BufferItem::toolTip(int column) const { toolTip.append(tr("Topic: %1").arg(_topic)); } } + if(_ircChannel) { + QString channelMode = _ircChannel->channelModeString(); // channelModeString is compiled on the fly -> thus cache the result + if(!channelMode.isEmpty()) + toolTip.append(tr("Mode: %1").arg(channelMode)); + } } else { toolTip.append(tr("Not active
Double-click to join")); }