Changeset 375

Show
Ignore:
Timestamp:
09/11/11 18:31:44 (8 months ago)
Author:
Carsten
Message:

Revised the "Save Confirmation Alert" dialogs to follow the GNOME Human Interface Guidelines, see  http://developer.gnome.org/hig-book/ for details.

Location:
cafu/trunk/CaWE
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • cafu/trunk/CaWE/ChildFrame.cpp

    r321 r375  
    748748    } 
    749749 
    750     const int Answer=wxMessageBox("The map has been modified since it was last saved.\n" 
    751         "Do you want to save it before closing?\n" 
    752         "Note that when you select 'No', all changes since the last save will be LOST.", 
    753         "Save map before closing?", wxYES_NO | wxCANCEL | wxICON_EXCLAMATION); 
    754  
    755     switch (Answer) 
    756     { 
    757         case wxYES: 
     750    // This "Save Confirmation Alert" essentially follows the GNOME Human Interface Guidelines, 
     751    // see http://developer.gnome.org/hig-book/ for details. 
     752    wxMessageDialog Msg(NULL, "Save changes to map \"" + m_Doc->GetFileName() + "\" before closing?", "CaWE Map Editor", wxYES_NO | wxCANCEL); 
     753 
     754    Msg.SetExtendedMessage("If you close without saving, your changes will be discarded."); 
     755    Msg.SetYesNoLabels("Save", "Close without Saving"); 
     756 
     757    switch (Msg.ShowModal()) 
     758    { 
     759        case wxID_YES: 
    758760            if (!m_Doc->Save()) 
    759761            { 
     
    776778            return; 
    777779 
    778         case wxNO: 
     780        case wxID_NO: 
    779781            Destroy(); 
    780782            return; 
    781783 
    782         default:    // Answer==wxCANCEL 
     784        default:    // wxID_CANCEL 
    783785            CE.Veto(); 
    784786            return; 
  • cafu/trunk/CaWE/GuiEditor/ChildFrame.cpp

    r368 r375  
    624624    } 
    625625 
    626     const int Answer=wxMessageBox("The GUI has been modified since it was last saved.\n" 
    627         "Do you want to save it before closing?\n" 
    628         "Note that when you select 'No', all changes since the last save will be LOST.", 
    629         "Save GUI before closing?", wxYES_NO | wxCANCEL | wxICON_EXCLAMATION); 
    630  
    631     switch (Answer) 
    632     { 
    633         case wxYES: 
     626    // This "Save Confirmation Alert" essentially follows the GNOME Human Interface Guidelines, 
     627    // see http://developer.gnome.org/hig-book/ for details. 
     628    wxMessageDialog Msg(NULL, "Save changes to GUI \"" + m_FileName + "\" before closing?", "CaWE GUI Editor", wxYES_NO | wxCANCEL); 
     629 
     630    Msg.SetExtendedMessage("If you close without saving, your changes will be discarded."); 
     631    Msg.SetYesNoLabels("Save", "Close without Saving"); 
     632 
     633    switch (Msg.ShowModal()) 
     634    { 
     635        case wxID_YES: 
    634636            if (!Save()) 
    635637            { 
     
    643645            return; 
    644646 
    645         case wxNO: 
     647        case wxID_NO: 
    646648            Destroy(); 
    647649            return; 
    648650 
    649         default:    // Answer==wxCANCEL 
     651        default:    // wxID_CANCEL 
    650652            CE.Veto(); 
    651653            return; 
  • cafu/trunk/CaWE/ModelEditor/ChildFrame.cpp

    r354 r375  
    865865    } 
    866866 
    867     const int Answer=wxMessageBox("The model has been modified since it was last saved.\n" 
    868         "Do you want to save it before closing?\n" 
    869         "Note that when you select 'No', all changes since the last save will be LOST.", 
    870         "Save model before closing?", wxYES_NO | wxCANCEL | wxICON_EXCLAMATION); 
    871  
    872     switch (Answer) 
    873     { 
    874         case wxYES: 
     867    // This "Save Confirmation Alert" essentially follows the GNOME Human Interface Guidelines, 
     868    // see http://developer.gnome.org/hig-book/ for details. 
     869    wxMessageDialog Msg(NULL, "Save changes to model \"" + m_FileName + "\" before closing?", "CaWE Model Editor", wxYES_NO | wxCANCEL); 
     870 
     871    Msg.SetExtendedMessage("If you close without saving, your changes will be discarded."); 
     872    Msg.SetYesNoLabels("Save", "Close without Saving"); 
     873 
     874    switch (Msg.ShowModal()) 
     875    { 
     876        case wxID_YES: 
    875877            if (!Save()) 
    876878            { 
     
    884886            return; 
    885887 
    886         case wxNO: 
     888        case wxID_NO: 
    887889            Destroy(); 
    888890            return; 
    889891 
    890         default:    // Answer==wxCANCEL 
     892        default:    // wxID_CANCEL 
    891893            CE.Veto(); 
    892894            return;