projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git@git.quassel-irc.org:quassel
[quassel.git]
/
src
/
client
/
networkmodel.cpp
diff --git
a/src/client/networkmodel.cpp
b/src/client/networkmodel.cpp
index
bec3edf
..
d09605f
100644
(file)
--- a/
src/client/networkmodel.cpp
+++ b/
src/client/networkmodel.cpp
@@
-33,7
+33,6
@@
#include "util.h" // get rid of this (needed for isChannelName)
#include "util.h" // get rid of this (needed for isChannelName)
-
/*****************************************
* Fancy Buffer Items
*****************************************/
/*****************************************
* Fancy Buffer Items
*****************************************/
@@
-70,10
+69,11
@@
bool BufferItem::isActive() const {
return qobject_cast<NetworkItem *>(parent())->isActive();
}
return qobject_cast<NetworkItem *>(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) {
}
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:
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);
}
default:
return PropertyMapItem::setData(column, value, role);
}
@@
-254,7
+255,7
@@
void BufferItem::removeUserFromCategory(IrcUser *ircUser) {
UserCategoryItem *categoryItem = 0;
for(int i = 0; i < childCount(); i++) {
categoryItem = qobject_cast<UserCategoryItem *>(child(i));
UserCategoryItem *categoryItem = 0;
for(int i = 0; i < childCount(); i++) {
categoryItem = qobject_cast<UserCategoryItem *>(child(i));
- if(
success = categoryItem->removeUser(ircUser
)) {
+ if(
(success = categoryItem->removeUser(ircUser)
)) {
if(categoryItem->childCount() == 0)
removeChild(i);
break;
if(categoryItem->childCount() == 0)
removeChild(i);
break;
@@
-312,6
+313,11
@@
QString BufferItem::toolTip(int column) const {
toolTip.append(tr("<b>Topic:</b> %1").arg(_topic));
}
}
toolTip.append(tr("<b>Topic:</b> %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("<b>Mode:</b> %1").arg(channelMode));
+ }
} else {
toolTip.append(tr("Not active <br /> Double-click to join"));
}
} else {
toolTip.append(tr("Not active <br /> Double-click to join"));
}