summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-02-06 12:59:12 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-02-06 13:39:43 (GMT)
commit94b7aaf53c8b20e03c8081cce49cda14cd5c01da (patch)
tree95b73b6021f332da7ae3197ad2c97dee2f2ebae3 /Swift/QtUI
parentf3d68b13e120f471326449f68aa4140587d444fc (diff)
downloadswift-contrib-94b7aaf53c8b20e03c8081cce49cda14cd5c01da.zip
swift-contrib-94b7aaf53c8b20e03c8081cce49cda14cd5c01da.tar.bz2
Display mediated invites
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtChatWindow.cpp6
-rw-r--r--Swift/QtUI/QtChatWindow.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index 88f326f..ed8e632 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -795,14 +795,18 @@ void QtChatWindow::showRoomConfigurationForm(Form::ref form) {
mucConfigurationWindow_->onFormCancelled.connect(boost::bind(boost::ref(onConfigurationFormCancelled)));
}
-void QtChatWindow::addMUCInvitation(const JID& jid, const std::string& reason, const std::string& /*password*/) {
+void QtChatWindow::addMUCInvitation(const JID& jid, const std::string& reason, const std::string& /*password*/, bool direct) {
bool accepted = false;
QMessageBox msgBox;
+ //FIXME: horrid modal untranslated popup. Fix before release.
msgBox.setText(QString("You have been invited to the room %1 by %2.").arg(P2QSTRING(jid.toString())).arg(contact_));
QString reasonString;
if (!reason.empty()) {
reasonString = QString("\"%1\"").arg(P2QSTRING(reason));
}
+ if (!direct) {
+ reasonString += QString("(%1 may not have really sent this invitation)").arg(P2QSTRING(jid.toString()));
+ }
msgBox.setInformativeText(QString("Accept invitation from %1 to enter %2?\n%3").arg(contact_).arg(P2QSTRING(jid.toString())).arg(reasonString));
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msgBox.setDefaultButton(QMessageBox::Yes);
diff --git a/Swift/QtUI/QtChatWindow.h b/Swift/QtUI/QtChatWindow.h
index 55e929d..4f997c0 100644
--- a/Swift/QtUI/QtChatWindow.h
+++ b/Swift/QtUI/QtChatWindow.h
@@ -77,7 +77,7 @@ namespace Swift {
virtual void setAvailableOccupantActions(const std::vector<OccupantAction>& actions);
void setSubject(const std::string& subject);
void showRoomConfigurationForm(Form::ref);
- void addMUCInvitation(const JID& jid, const std::string& reason, const std::string& password);
+ void addMUCInvitation(const JID& jid, const std::string& reason, const std::string& password, bool direct = true);
void setAffiliations(MUCOccupant::Affiliation, const std::vector<JID>&);
public slots: