Save/Discard instead of Yes/No

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 f9015ac945)
This commit is contained in:
Andrew Kelley
2010-05-24 17:53:12 -07:00
committed by Tobias Doerffel
parent eab1153561
commit 6a52e6430a

View File

@@ -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 );
}