summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Maudsley <richard.maudsley@isode.com>2014-02-24 09:22:24 (GMT)
committerRichard Maudsley <richard.maudsley@isode.com>2014-02-24 09:22:24 (GMT)
commitda5e31ec60d089c3ffbafc3246608c95ba44df06 (patch)
tree0b1db584d7be8d8b32d754d6f05e3fcf4ebce27c
parentc54f38cabcf6db20b933a447135e73866156b871 (diff)
downloadswift-da5e31ec60d089c3ffbafc3246608c95ba44df06.zip
swift-da5e31ec60d089c3ffbafc3246608c95ba44df06.tar.bz2
Label fax numbers as fax and omit resources from JIDs in roster tooltips
Change-Id: I3101077446df6d673be594b0479dac169fb02f2b
-rw-r--r--Swift/Controllers/Roster/ContactRosterItem.cpp2
-rw-r--r--Swift/QtUI/Roster/RosterTooltip.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/Swift/Controllers/Roster/ContactRosterItem.cpp b/Swift/Controllers/Roster/ContactRosterItem.cpp
index fde4c97..e0651bc 100644
--- a/Swift/Controllers/Roster/ContactRosterItem.cpp
+++ b/Swift/Controllers/Roster/ContactRosterItem.cpp
@@ -18,7 +18,7 @@ namespace Swift {
ContactRosterItem::ContactRosterItem(const JID& jid, const JID& displayJID, const std::string& name, GroupRosterItem* parent)
-: RosterItem(name, parent), jid_(jid), displayJID_(displayJID), mucRole_(MUCOccupant::NoRole), mucAffiliation_(MUCOccupant::NoAffiliation), blockState_(BlockingNotSupported)
+: RosterItem(name, parent), jid_(jid), displayJID_(displayJID.toBare()), mucRole_(MUCOccupant::NoRole), mucAffiliation_(MUCOccupant::NoAffiliation), blockState_(BlockingNotSupported)
{
}
diff --git a/Swift/QtUI/Roster/RosterTooltip.cpp b/Swift/QtUI/Roster/RosterTooltip.cpp
index 045a955..86f175d 100644
--- a/Swift/QtUI/Roster/RosterTooltip.cpp
+++ b/Swift/QtUI/Roster/RosterTooltip.cpp
@@ -114,7 +114,8 @@ QString RosterTooltip::buildVCardSummary(VCard::ref vcard) {
// star | name | content
QString currentBlock;
foreach (const VCard::Telephone& tel, vcard->getTelephones()) {
- QString field = buildVCardField(tel.isPreferred, QObject::tr("Telephone"), htmlEscape(P2QSTRING(tel.number)));
+ QString type = tel.isFax ? QObject::tr("Fax") : QObject::tr("Telephone");
+ QString field = buildVCardField(tel.isPreferred, type, htmlEscape(P2QSTRING(tel.number)));
if (tel.isPreferred) {
currentBlock = field;
break;