diff options
author | Kevin Smith <git@kismith.co.uk> | 2011-10-26 19:02:37 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2011-10-26 19:02:37 (GMT) |
commit | dfcc59661aa0b797f360b19bd67258693100c675 (patch) | |
tree | 62c7d109b3f7bb17b99f4c261d69452e0fc49d4d | |
parent | e4c3bccda3835e849fd1857f8d302eea77c41105 (diff) | |
download | swift-contrib-dfcc59661aa0b797f360b19bd67258693100c675.zip swift-contrib-dfcc59661aa0b797f360b19bd67258693100c675.tar.bz2 |
Prompt before destroying rooms
-rw-r--r-- | Swift/QtUI/QtChatWindow.cpp | 10 |
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; |