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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user