summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-06-04 22:09:21 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-06-04 22:42:02 (GMT)
commit7bca08eb2829982865f1649483f9aa01b3413b1c (patch)
tree630b333f0dd9b05478816eae27c6695b1a6bbe35 /Swiften/MUC
parentb3208697addc0492f4ae1f76c75a8810c20e701a (diff)
downloadswift-contrib-7bca08eb2829982865f1649483f9aa01b3413b1c.zip
swift-contrib-7bca08eb2829982865f1649483f9aa01b3413b1c.tar.bz2
Starting towards tooltips for the colour-blind.
Putting status show names along with the text in tooltips. Covers the MeView and roster entries. Still ToDo: status setter Resolves: #429
Diffstat (limited to 'Swiften/MUC')
-rw-r--r--Swiften/MUC/MUC.cpp5
-rw-r--r--Swiften/MUC/MUC.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/Swiften/MUC/MUC.cpp b/Swiften/MUC/MUC.cpp
index 60b81a0..b4265b5 100644
--- a/Swiften/MUC/MUC.cpp
+++ b/Swiften/MUC/MUC.cpp
@@ -88,16 +88,17 @@ void MUC::handleIncomingPresence(boost::shared_ptr<Presence> presence) {
}
else if (presence->getType() == Presence::Available) {
std::map<String, MUCOccupant>::iterator it = occupants.find(nick);
+ MUCOccupant occupant(nick, role, affiliation);
if (it != occupants.end()) {
MUCOccupant oldOccupant = it->second;
if (oldOccupant.getRole() != role) {
- onOccupantRoleChanged(nick, role, oldOccupant.getRole());
+ onOccupantRoleChanged(nick, occupant, oldOccupant.getRole());
}
if (oldOccupant.getAffiliation() != affiliation) {
onOccupantAffiliationChanged(nick, affiliation, oldOccupant.getAffiliation());
}
}
- std::pair<std::map<String, MUCOccupant>::iterator, bool> result = occupants.insert(std::make_pair(nick, MUCOccupant(nick, role, affiliation)));
+ std::pair<std::map<String, MUCOccupant>::iterator, bool> result = occupants.insert(std::make_pair(nick, occupant));
if (result.second) {
onOccupantJoined(result.first->second);
}
diff --git a/Swiften/MUC/MUC.h b/Swiften/MUC/MUC.h
index 4bf56c9..40fc2f6 100644
--- a/Swiften/MUC/MUC.h
+++ b/Swiften/MUC/MUC.h
@@ -41,7 +41,7 @@ namespace Swift {
boost::signal<void (const String& /*nick*/)> onJoinComplete;
boost::signal<void (boost::shared_ptr<ErrorPayload>)> onJoinFailed;
boost::signal<void (boost::shared_ptr<Presence>)> onOccupantPresenceChange;
- boost::signal<void (const String&, const MUCOccupant::Role& /*new*/, const MUCOccupant::Role& /*old*/)> onOccupantRoleChanged;
+ boost::signal<void (const String&, const MUCOccupant& /*now*/, const MUCOccupant::Role& /*old*/)> onOccupantRoleChanged;
boost::signal<void (const String&, const MUCOccupant::Affiliation& /*new*/, const MUCOccupant::Affiliation& /*old*/)> onOccupantAffiliationChanged;
boost::signal<void (const MUCOccupant&)> onOccupantJoined;
boost::signal<void (const MUCOccupant&, LeavingType, const String& /*reason*/)> onOccupantLeft;