summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2011-10-05 13:39:47 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-10-05 13:39:47 (GMT)
commit16a895e7d64b71d1aa7a971d77e8daf6591e9c56 (patch)
tree9c1c71eb1a80dd0fd813ea6ba42d1d4c7d4889ed /Swift/QtUI
parent8159071adb232b68c2ce79479145fbcd04979245 (diff)
downloadswift-contrib-16a895e7d64b71d1aa7a971d77e8daf6591e9c56.zip
swift-contrib-16a895e7d64b71d1aa7a971d77e8daf6591e9c56.tar.bz2
Allow role changing in MUCs.
Resolves: #987
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtChatWindow.cpp1
-rw-r--r--Swift/QtUI/Roster/QtOccupantListWidget.cpp3
2 files changed, 4 insertions, 0 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index 10daa68..7e47f4d 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -341,6 +341,7 @@ void QtChatWindow::setCorrectionEnabled(Tristate enabled) {
SecurityLabelsCatalog::Item QtChatWindow::getSelectedSecurityLabel() {
assert(labelsWidget_->isEnabled());
+ assert(labelsWidget_->currentIndex() >= 0 && labelsWidget_->currentIndex() < availableLabels_.size());
return availableLabels_[labelsWidget_->currentIndex()];
}
diff --git a/Swift/QtUI/Roster/QtOccupantListWidget.cpp b/Swift/QtUI/Roster/QtOccupantListWidget.cpp
index cbda0f1..3ee0b7d 100644
--- a/Swift/QtUI/Roster/QtOccupantListWidget.cpp
+++ b/Swift/QtUI/Roster/QtOccupantListWidget.cpp
@@ -45,6 +45,9 @@ void QtOccupantListWidget::contextMenuEvent(QContextMenuEvent* event) {
QString text = "Error: missing string";
switch (availableAction) {
case ChatWindow::Kick: text = tr("Kick user"); break;
+ case ChatWindow::MakeModerator: text = tr("Make moderator"); break;
+ case ChatWindow::MakeParticipant: text = tr("Make participant"); break;
+ case ChatWindow::MakeVisitor: text = tr("Remove voice"); break;
}
QAction* action = contextMenu.addAction(text);
actions[action] = availableAction;