summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2011-10-26 19:02:37 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-10-26 19:02:37 (GMT)
commitdfcc59661aa0b797f360b19bd67258693100c675 (patch)
tree62c7d109b3f7bb17b99f4c261d69452e0fc49d4d
parente4c3bccda3835e849fd1857f8d302eea77c41105 (diff)
downloadswift-dfcc59661aa0b797f360b19bd67258693100c675.zip
swift-dfcc59661aa0b797f360b19bd67258693100c675.tar.bz2
Prompt before destroying rooms
-rw-r--r--Swift/QtUI/QtChatWindow.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index 1f58064..8270175 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -737,7 +737,15 @@ void QtChatWindow::handleActionButtonClicked() {
affiliationEditor_->show();
}
else if (result == destroy) {
- onDestroyRequest();
+ QMessageBox msgBox;
+ msgBox.setWindowTitle(tr("Confirm room destruction"));
+ msgBox.setText(tr("Are you sure you want to destroy the room?"));
+ msgBox.setInformativeText(tr("This will destroy the room."));
+ msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
+ msgBox.setDefaultButton(QMessageBox::No);
+ if (msgBox.exec() == QMessageBox::Yes) {
+ onDestroyRequest();
+ }
}
else if (result == invite) {
bool ok;