From dfcc59661aa0b797f360b19bd67258693100c675 Mon Sep 17 00:00:00 2001 From: Kevin Smith <git@kismith.co.uk> Date: Wed, 26 Oct 2011 20:02:37 +0100 Subject: Prompt before destroying rooms 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; -- cgit v0.10.2-6-g49f6