| 2629 | if (fChanged && !fIncoming && fDraft) { |
| 2630 | BAlert *alert = new BAlert("", |
| 2631 | MDR_DIALECT_CHOICE ( |
| 2632 | "Message has unsaved changes. Do you wish to save them before closing?", |
| 2633 | "閉じる前に保存しますか?"), |
| 2634 | MDR_DIALECT_CHOICE ("Don't Save","保存しない"), |
| 2635 | MDR_DIALECT_CHOICE ("Cancel","中止"), |
| 2636 | MDR_DIALECT_CHOICE ("Save","保存"), |
| 2637 | B_WIDTH_AS_USUAL, B_OFFSET_SPACING, |
| 2638 | B_WARNING_ALERT); |
| 2639 | alert->SetShortcut(0,'d'); |
| 2640 | alert->SetShortcut(1,B_ESCAPE); |
| 2641 | result = alert->Go(); |
| 2642 | switch (result) { |
| 2643 | case 0: // Don't Save |
| 2644 | fChanged = false; |
| 2645 | // we don't want to see |
| 2646 | // and an other alert message! |
| 2647 | break; |
| 2648 | |
| 2649 | case 1: // Cancel |
| 2650 | return false; |
| 2651 | |
| 2652 | case 2: // Save |
| 2653 | Send(false); |
| 2654 | fChanged = false; |
| 2655 | break; |
| 2656 | } |
| 2657 | } |
| 2658 | |