From f9015ac9458bd633baa8b472d2c7b9907d088a66 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 24 May 2010 17:53:12 -0700 Subject: [PATCH] Save/Discard instead of Yes/No MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Integrates Sami Boukortt's patch described below: I have made a patch for the “Save changes?” dialog box to let the user choose between “Save”, “Discard” and “Cancel” instead of “Yes”, “No” and “Cancel”. I find this way more intuitive, since it enables Qt to reorganize the buttons properly according to the platform and to give them an icon (at least on X11). It also allows users to know what is going to happen without having to read the question. --- src/gui/MainWindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 67929e475..e0bc09661 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -835,17 +835,17 @@ bool MainWindow::mayChangeProject() "last saving. Do you want to save it " "now?" ), QMessageBox::Question, - QMessageBox::Yes, - QMessageBox::No, + QMessageBox::Save, + QMessageBox::Discard, QMessageBox::Cancel, this ); int answer = mb.exec(); - if( answer == QMessageBox::Yes ) + if( answer == QMessageBox::Save ) { return saveProject(); } - else if( answer == QMessageBox::No ) + else if( answer == QMessageBox::Discard ) { return true; }