# HG changeset patch # User jld # Date 1074271875 0 # Node ID 99c40a5a125dadab2e7c3ac366b61e04b7deab65 # Parent ded5649bf5731eca4441ef8164f54a46edf6f5a6 * configtool/standalone/wxwin/configtool.cpp: Prompt to save eCos configuration as necessary before building eCos. * configtool/standalone/wxwin/mainwin.cpp: Update copyright notice. diff --git a/host/tools/configtool/ChangeLog b/host/tools/configtool/ChangeLog --- a/host/tools/configtool/ChangeLog +++ b/host/tools/configtool/ChangeLog @@ -1,3 +1,10 @@ +2004-01-16 John Dallaway + + * configtool/standalone/wxwin/configtool.cpp: Prompt to save eCos + Configuration as necessary before building eCos. + + * configtool/standalone/wxwin/mainwin.cpp: Update copyright notice. + 2003-08-13 John Dallaway * configtool/common/common/build.cxx: More robust implementation for diff --git a/host/tools/configtool/standalone/wxwin/configtool.cpp b/host/tools/configtool/standalone/wxwin/configtool.cpp --- a/host/tools/configtool/standalone/wxwin/configtool.cpp +++ b/host/tools/configtool/standalone/wxwin/configtool.cpp @@ -3,6 +3,7 @@ // ---------------------------------------------------------------------------- // Copyright (C) 1998, 1999, 2000 Red Hat, Inc. // Copyright (C) 2003 John Dallaway +// Copyright (C) 2004 eCosCentric Limited // // This program is part of the eCos host tools. // @@ -1351,17 +1352,27 @@ void ecApp::Build(const wxString &strWha { wxGetApp().GetMainFrame()->ToggleWindow(ecID_TOGGLE_OUTPUT); } - if (!pDoc->GetDocumentSaved()) + if (!pDoc->GetDocumentSaved()) // if document has never been saved { - pDoc->SaveAs(); + if (!pDoc->SaveAs()) + return; // user chose not to save the unsaved document so cannot build eCos } -/* - if (pDoc->IsModified() && !wxDirExists(pDoc->GetBuildTree())) + + if (pDoc->IsModified()) // if document has been modified since last save { - pDoc->SaveAs(); + if (wxOK == wxMessageBox("Building eCos will save changes to your current eCos configuration.", + "Build", wxOK|wxCANCEL|wxICON_EXCLAMATION)) + pDoc->Save(); + else + return; // user chose not to save changes so cannot build eCos } -*/ -// if ( !(pDoc->IsModified() || !wxDirExists(pDoc->GetBuildTree())) ) // verify the save worked + + // save an eCos configuration which is already saved but is without a corresponding build tree + if (!wxDirExists(pDoc->GetBuildTree())) + { + pDoc->Save(); + } + if ( pDoc->GetDocumentSaved() ) { //wxString strCmd (wxT("c:\\bin\\testmake.bat")); diff --git a/host/tools/configtool/standalone/wxwin/mainwin.cpp b/host/tools/configtool/standalone/wxwin/mainwin.cpp --- a/host/tools/configtool/standalone/wxwin/mainwin.cpp +++ b/host/tools/configtool/standalone/wxwin/mainwin.cpp @@ -3,6 +3,7 @@ // ---------------------------------------------------------------------------- // Copyright (C) 1998, 1999, 2000 Red Hat, Inc. // Copyright (C) 2003 John Dallaway +// Copyright (C) 2004 eCosCentric Limited // // This program is part of the eCos host tools. // @@ -551,7 +552,7 @@ void ecMainFrame::OnAbout(wxCommandEvent // ecAboutDialog dialog(this, ecID_ABOUT_DIALOG, _("About eCos Configuration Tool")); // dialog.ShowModal(); wxString msg; - msg.Printf("eCos Configuration Tool %s (%s %s)\n\nCopyright (c) Red Hat, Inc. 1998-2002\nCopyright (c) John Dallaway 2003", ecCONFIGURATION_TOOL_VERSION, __DATE__, __TIME__); + msg.Printf("eCos Configuration Tool %s (%s %s)\n\nCopyright (c) Red Hat, Inc. 1998-2002\nCopyright (c) John Dallaway 2003\nCopyright (C) eCosCentric Limited 2004", ecCONFIGURATION_TOOL_VERSION, __DATE__, __TIME__); wxMessageBox(msg, _("About eCos Configuration Tool"), wxICON_INFORMATION | wxOK); }