diff --git a/src/apps/diskprobe/ProbeView.cpp b/src/apps/diskprobe/ProbeView.cpp index 4072057a8a..2aef09dcaa 100644 --- a/src/apps/diskprobe/ProbeView.cpp +++ b/src/apps/diskprobe/ProbeView.cpp @@ -1888,16 +1888,18 @@ ProbeView::QuitRequested() return true; BAlert* alert = new BAlert(B_TRANSLATE("DiskProbe request"), - B_TRANSLATE("Save changes before closing?"), B_TRANSLATE("Don't save"), - B_TRANSLATE("Cancel"), B_TRANSLATE("Save"), B_WIDTH_AS_USUAL, - B_WARNING_ALERT); - alert->SetShortcut(1, B_ESCAPE); + B_TRANSLATE("Save changes before closing?"), B_TRANSLATE("Cancel"), + B_TRANSLATE("Don't save"), B_TRANSLATE("Save"), B_WIDTH_AS_USUAL, + B_OFFSET_SPACING, B_WARNING_ALERT); + alert->SetShortcut(0, B_ESCAPE); + alert->SetShortcut(1, 'd'); + alert->SetShortcut(2, 's'); int32 chosen = alert->Go(); if (chosen == 0) - return true; - if (chosen == 1) return false; + if (chosen == 1) + return true; return _Save() == B_OK; } diff --git a/src/apps/icon-o-matic/MainWindow.cpp b/src/apps/icon-o-matic/MainWindow.cpp index 5d7c015a6f..d8ac569860 100644 --- a/src/apps/icon-o-matic/MainWindow.cpp +++ b/src/apps/icon-o-matic/MainWindow.cpp @@ -1274,17 +1274,21 @@ MainWindow::_CheckSaveIcon(const BMessage* currentMessage) Activate(); BAlert* alert = new BAlert("save", - B_TRANSLATE("Save changes to current icon?"), B_TRANSLATE("Discard"), - B_TRANSLATE("Cancel"), B_TRANSLATE("Save")); + B_TRANSLATE("Save changes to current icon before closing?"), + B_TRANSLATE("Cancel"), B_TRANSLATE("Don't save"), + B_TRANSLATE("Save"), B_WIDTH_AS_USUAL, B_OFFSET_SPACING, + B_WARNING_ALERT); alert->SetShortcut(0, B_ESCAPE); + alert->SetShortcut(1, 'd'); + alert->SetShortcut(2, 's'); int32 choice = alert->Go(); switch (choice) { case 0: - // discard - return true; - case 1: // cancel return false; + case 1: + // don't save + return true; case 2: default: // cancel (save first) but pick up what we were doing before diff --git a/src/apps/mail/MailWindow.cpp b/src/apps/mail/MailWindow.cpp index 0537456fbc..8a81cba786 100644 --- a/src/apps/mail/MailWindow.cpp +++ b/src/apps/mail/MailWindow.cpp @@ -1697,40 +1697,41 @@ TMailWindow::QuitRequested() && fEnclosuresView->fList->CountItems()))) { if (fResending) { BAlert *alert = new BAlert("", B_TRANSLATE( - "Do you wish to send this message before closing?"), - B_TRANSLATE("Discard"), + "Send this message before closing?"), B_TRANSLATE("Cancel"), + B_TRANSLATE("Don't send"), B_TRANSLATE("Send"), B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_WARNING_ALERT); - alert->SetShortcut(0, 'd'); - alert->SetShortcut(1, B_ESCAPE); + alert->SetShortcut(0, B_ESCAPE); + alert->SetShortcut(1, 'd'); + alert->SetShortcut(2, 's'); result = alert->Go(); switch (result) { - case 0: // Discard - break; - case 1: // Cancel + case 0: // Cancel return false; + case 1: // Don't send + break; case 2: // Send Send(true); break; } } else { BAlert *alert = new BAlert("", - B_TRANSLATE("Do you wish to save this message as a draft " - "before closing?"), - B_TRANSLATE("Don't save"), + B_TRANSLATE("Save this message as a draft before closing?"), B_TRANSLATE("Cancel"), + B_TRANSLATE("Don't save"), B_TRANSLATE("Save"), B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_WARNING_ALERT); - alert->SetShortcut(0, 'd'); - alert->SetShortcut(1, B_ESCAPE); + alert->SetShortcut(0, B_ESCAPE); + alert->SetShortcut(1, 'd'); + alert->SetShortcut(2, 's'); result = alert->Go(); switch (result) { - case 0: // Don't Save - break; - case 1: // Cancel + case 0: // Cancel return false; + case 1: // Don't Save + break; case 2: // Save Send(false); break; diff --git a/src/apps/mail/Signature.cpp b/src/apps/mail/Signature.cpp index 7fd5ea867e..48a02034f1 100644 --- a/src/apps/mail/Signature.cpp +++ b/src/apps/mail/Signature.cpp @@ -296,14 +296,15 @@ TSignatureWindow::Clear() beep(); BAlert *alert = new BAlert("", B_TRANSLATE("Save changes to this signature?"), - B_TRANSLATE("Don't save"), B_TRANSLATE("Cancel"), + B_TRANSLATE("Don't save"), B_TRANSLATE("Save"), - B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(0, 'd'); - alert->SetShortcut(1, B_ESCAPE); + B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_WARNING_ALERT); + alert->SetShortcut(0, B_ESCAPE); + alert->SetShortcut(1, 'd'); + alert->SetShortcut(2, 's'); result = alert->Go(); - if (result == 1) + if (result == 0) return false; if (result == 2) Save(); diff --git a/src/apps/people/PersonWindow.cpp b/src/apps/people/PersonWindow.cpp index 8c5511e92c..728482aa69 100644 --- a/src/apps/people/PersonWindow.cpp +++ b/src/apps/people/PersonWindow.cpp @@ -296,10 +296,13 @@ PersonWindow::QuitRequested() status_t result; if (!fView->IsSaved()) { - BAlert* alert = new BAlert("", B_TRANSLATE("Save changes before quitting?"), - B_TRANSLATE("Cancel"), B_TRANSLATE("Quit"), - B_TRANSLATE("Save")); + BAlert* alert = new BAlert("", + B_TRANSLATE("Save changes before closing?"), B_TRANSLATE("Cancel"), + B_TRANSLATE("Don't save"), B_TRANSLATE("Save"), + B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_WARNING_ALERT); alert->SetShortcut(0, B_ESCAPE); + alert->SetShortcut(1, 'd'); + alert->SetShortcut(2, 's'); result = alert->Go(); if (result == 2) { diff --git a/src/apps/resedit/ResWindow.cpp b/src/apps/resedit/ResWindow.cpp index 4f5fea524a..83d1c925e8 100644 --- a/src/apps/resedit/ResWindow.cpp +++ b/src/apps/resedit/ResWindow.cpp @@ -34,10 +34,13 @@ bool ResWindow::QuitRequested(void) { if (fView->GetSaveStatus() == FILE_DIRTY) { - BAlert *alert = new BAlert("ResEdit", "Save your changes?", "Cancel", - "Don't Save", "Save"); + BAlert *alert = new BAlert("ResEdit", "Save changes before closing?", + "Cancel", "Don't save", "Save", + B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_WARNING_ALERT); alert->SetShortcut(0, B_ESCAPE); - + alert->SetShortcut(1, 'd'); + alert->SetShortcut(2, 's'); + switch (alert->Go()) { case 0: return false; diff --git a/src/apps/stylededit/StyledEditWindow.cpp b/src/apps/stylededit/StyledEditWindow.cpp index 0dfd0c9ea0..3193bcfc85 100644 --- a/src/apps/stylededit/StyledEditWindow.cpp +++ b/src/apps/stylededit/StyledEditWindow.cpp @@ -751,7 +751,7 @@ StyledEditWindow::Save(BMessage* message) || (S_IWOTH & st.st_mode))) { BString alertText; bs_printf(&alertText, B_TRANSLATE("This file is marked " - "Read-Only. Save changes to the document \"%s\"? "), name); + "read-only. Save changes to the document \"%s\"? "), name); switch (_ShowAlert(alertText, B_TRANSLATE("Cancel"), B_TRANSLATE("Don't save"), B_TRANSLATE("Save"), B_WARNING_ALERT)) { diff --git a/src/preferences/filetypes/ApplicationTypeWindow.cpp b/src/preferences/filetypes/ApplicationTypeWindow.cpp index d556cd6dd2..df1e7a48e2 100644 --- a/src/preferences/filetypes/ApplicationTypeWindow.cpp +++ b/src/preferences/filetypes/ApplicationTypeWindow.cpp @@ -1022,17 +1022,20 @@ ApplicationTypeWindow::QuitRequested() { if (_NeedsSaving(CHECK_ALL) != 0) { BAlert* alert = new BAlert(B_TRANSLATE("Save request"), - B_TRANSLATE("Do you want to save the changes?"), - B_TRANSLATE("Quit, don't save"), B_TRANSLATE("Cancel"), - B_TRANSLATE("Save"), B_WIDTH_AS_USUAL, B_WARNING_ALERT); - alert->SetShortcut(1, B_ESCAPE); + B_TRANSLATE("Save changes before closing?"), + B_TRANSLATE("Cancel"), B_TRANSLATE("Don't save"), + B_TRANSLATE("Save"), B_WIDTH_AS_USUAL, B_OFFSET_SPACING, + B_WARNING_ALERT); + alert->SetShortcut(0, B_ESCAPE); + alert->SetShortcut(1, 'd'); + alert->SetShortcut(2, 's'); int32 choice = alert->Go(); switch (choice) { case 0: - break; - case 1: return false; + case 1: + break; case 2: _Save(); break; diff --git a/src/preferences/shortcuts/ShortcutsWindow.cpp b/src/preferences/shortcuts/ShortcutsWindow.cpp index e389a4df94..5a5c6785e6 100644 --- a/src/preferences/shortcuts/ShortcutsWindow.cpp +++ b/src/preferences/shortcuts/ShortcutsWindow.cpp @@ -283,15 +283,21 @@ ShortcutsWindow::QuitRequested() if (fKeySetModified) { BAlert* alert = new BAlert(WARNING, - B_TRANSLATE("Really quit without saving your changes?"), - B_TRANSLATE("Don't save"), B_TRANSLATE("Cancel"), + B_TRANSLATE("Save changes before closing?"), + B_TRANSLATE("Cancel"), B_TRANSLATE("Don't save"), B_TRANSLATE("Save")); - alert->SetShortcut(1, B_ESCAPE); + alert->SetShortcut(0, B_ESCAPE); + alert->SetShortcut(1, 'd'); + alert->SetShortcut(2, 's'); switch(alert->Go()) { - case 1: + case 0: ret = false; break; + case 1: + ret = true; + break; + case 2: // Save: automatically if possible, otherwise go back and open // up the file requester @@ -310,9 +316,6 @@ ShortcutsWindow::QuitRequested() ret = false; } break; - default: - ret = true; - break; } }