From: <tm...@us...> - 2010-04-09 16:17:21
|
Revision: 5108 http://hugin.svn.sourceforge.net/hugin/?rev=5108&view=rev Author: tmodes Date: 2010-04-09 16:17:14 +0000 (Fri, 09 Apr 2010) Log Message: ----------- Extended warn message if saving failed Modified Paths: -------------- hugin/trunk/src/hugin1/hugin/MainFrame.cpp Modified: hugin/trunk/src/hugin1/hugin/MainFrame.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2010-04-06 21:10:59 UTC (rev 5107) +++ hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2010-04-09 16:17:14 UTC (rev 5108) @@ -529,6 +529,7 @@ void MainFrame::OnSaveProject(wxCommandEvent & e) { DEBUG_TRACE(""); + bool savedProjectFile=false; try { wxFileName scriptName = m_filename; if (m_filename == wxT("")) { @@ -547,6 +548,7 @@ } pano.printPanoramaScript(script, optvec, pano.getOptions(), all, false, path); script.close(); + savedProjectFile=true; int createMakefile = 1; #if defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE @@ -583,7 +585,14 @@ } } catch (std::exception & e) { wxString err(e.what(), wxConvLocal); - wxMessageBox(wxString::Format(_("Could not save project file \"%s\".\nMaybe the file or the folder is read-only.\n\n(Error code: %s)"),m_filename.c_str(),err.c_str()),_("Error"),wxOK|wxICON_ERROR); + if(savedProjectFile) + { + wxMessageBox(wxString::Format(_("Could not save project makefile \"%s\".\nBut the project file was saved.\nMaybe the file or the folder is read-only.\n\n(Error code: %s)"),(m_filename+wxT(".mk")).c_str(),err.c_str()),_("Warning"),wxOK|wxICON_INFORMATION); + } + else + { + wxMessageBox(wxString::Format(_("Could not save project file \"%s\".\nMaybe the file or the folder is read-only.\n\n(Error code: %s)"),m_filename.c_str(),err.c_str()),_("Error"),wxOK|wxICON_ERROR); + }; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |