From 6a52e6430ae4f9e3d429c11be93b92cb636323d4 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. (cherry picked from commit f9015ac9458bd633baa8b472d2c7b9907d088a66) --- 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 2526f2215..01c227c6f 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -560,17 +560,17 @@ bool MainWindow::mayChangeProject( void ) "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 ); }