projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 6.0.2 - new release
[ctsim.git]
/
src
/
docs.cpp
diff --git
a/src/docs.cpp
b/src/docs.cpp
index 0f07a5223507874b56fc5c7c59a20838a512f942..a47d8d993fe4f952e93edace295168acef3098aa 100644
(file)
--- a/
src/docs.cpp
+++ b/
src/docs.cpp
@@
-7,9
+7,7
@@
** Date Started: July 2000
**
** This is part of the CTSim program
** Date Started: July 2000
**
** This is part of the CTSim program
-** Copyright (c) 1983-2001 Kevin Rosenberg
-**
-** $Id$
+** Copyright (c) 1983-2009 Kevin Rosenberg
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
@@
-51,12
+49,12
@@
IMPLEMENT_DYNAMIC_CLASS(ImageFileDocument, wxDocument)
bool ImageFileDocument::OnSaveDocument(const wxString& filename)
{
bool ImageFileDocument::OnSaveDocument(const wxString& filename)
{
- if (! m_pImageFile->fileWrite (filename)) {
- *theApp->getLog() <<
"Unable to write image file " << filename << "\n"
;
+ if (! m_pImageFile->fileWrite (filename
.mb_str(wxConvUTF8)
)) {
+ *theApp->getLog() <<
_T("Unable to write image file ") << filename << _T("\n")
;
return false;
}
if (theApp->getVerboseLogging())
return false;
}
if (theApp->getVerboseLogging())
- *theApp->getLog() <<
"Wrote image file " << filename << "\n"
;
+ *theApp->getLog() <<
_T("Wrote image file ") << filename << _T("\n")
;
Modify(false);
return true;
}
Modify(false);
return true;
}
@@
-66,18
+64,19
@@
bool ImageFileDocument::OnOpenDocument(const wxString& filename)
if (! OnSaveModified())
return false;
if (! OnSaveModified())
return false;
- if (! m_pImageFile->fileRead (filename.
c_str(
))) {
- *theApp->getLog() <<
"Unable to read image file " << filename << "\n"
;
+ if (! m_pImageFile->fileRead (filename.
mb_str(wxConvUTF8
))) {
+ *theApp->getLog() <<
_T("Unable to read image file ") << filename << _T("\n")
;
m_bBadFileOpen = true;
return false;
}
m_bBadFileOpen = true;
return false;
}
- if (theApp->getVerboseLogging() && filename !=
""
)
- *theApp->getLog() <<
"Read image file " << filename << "\n"
;
+ if (theApp->getVerboseLogging() && filename !=
_T("")
)
+ *theApp->getLog() <<
_T("Read image file ") << filename << _T("\n")
;
SetFilename(filename, true);
Modify(false);
getView()->setInitialClientSize();
SetFilename(filename, true);
Modify(false);
getView()->setInitialClientSize();
+ this->SetFilename(filename, true);
UpdateAllViews();
m_bBadFileOpen = false;
UpdateAllViews();
m_bBadFileOpen = false;
@@
-106,13
+105,13
@@
bool
ImageFileDocument::Revert ()
{
if (IsModified()) {
ImageFileDocument::Revert ()
{
if (IsModified()) {
- wxString msg (
"Revert to saved "
);
+ wxString msg (
_T("Revert to saved ")
);
msg += GetFilename();
msg += GetFilename();
- msg +=
"?"
;
- wxMessageDialog dialog (getView()->getFrame(), msg,
"Are you sure?"
, wxYES_NO | wxNO_DEFAULT);
+ msg +=
_T("?")
;
+ wxMessageDialog dialog (getView()->getFrame(), msg,
_T("Are you sure?")
, wxYES_NO | wxNO_DEFAULT);
if (dialog.ShowModal() == wxID_YES) {
if (theApp->getVerboseLogging())
if (dialog.ShowModal() == wxID_YES) {
if (theApp->getVerboseLogging())
- *theApp->getLog() <<
"Reverting to saved " << GetFilename() << "\n"
;
+ *theApp->getLog() <<
_T("Reverting to saved ") << GetFilename() << _T("\n")
;
Modify (false);
OnOpenDocument (GetFilename());
}
Modify (false);
OnOpenDocument (GetFilename());
}
@@
-177,7
+176,7
@@
BackgroundProcessingDocument::cancelRunningTasks()
while (m_vecpBackgroundSupervisors.size() > 0) {
::wxYield();
while (m_vecpBackgroundSupervisors.size() > 0) {
::wxYield();
- ::wx
Us
leep(50);
+ ::wx
MilliS
leep(50);
}
#endif
}
}
#endif
}
@@
-190,12
+189,12
@@
IMPLEMENT_DYNAMIC_CLASS(ProjectionFileDocument, BackgroundProcessingDocument)
bool
ProjectionFileDocument::OnSaveDocument(const wxString& filename)
{
bool
ProjectionFileDocument::OnSaveDocument(const wxString& filename)
{
- if (! m_pProjectionFile->write (filename.
c_str(
))) {
- *theApp->getLog() <<
"Unable to write projection file " << filename << "\n"
;
+ if (! m_pProjectionFile->write (filename.
mb_str(wxConvUTF8
))) {
+ *theApp->getLog() <<
_T("Unable to write projection file ") << filename << _T("\n")
;
return false;
}
if (theApp->getVerboseLogging())
return false;
}
if (theApp->getVerboseLogging())
- *theApp->getLog() <<
"Wrote projection file " << filename << "\n"
;
+ *theApp->getLog() <<
_T("Wrote projection file ") << filename << _T("\n")
;
Modify(false);
return true;
}
Modify(false);
return true;
}
@@
-213,15
+212,15
@@
ProjectionFileDocument::OnOpenDocument(const wxString& filename)
if (! OnSaveModified())
return false;
if (! OnSaveModified())
return false;
- if (! m_pProjectionFile->read (filename.
c_str(
))) {
- *theApp->getLog() <<
"Unable to read projection file " << filename << "\n"
;
+ if (! m_pProjectionFile->read (filename.
mb_str(wxConvUTF8
))) {
+ *theApp->getLog() <<
_T("Unable to read projection file ") << filename << _T("\n")
;
m_bBadFileOpen = true;
return false;
}
m_bBadFileOpen = false;
m_bBadFileOpen = true;
return false;
}
m_bBadFileOpen = false;
- if (theApp->getVerboseLogging() && filename !=
""
)
- *theApp->getLog() <<
"Read projection file " << filename << "\n"
;
+ if (theApp->getVerboseLogging() && filename !=
_T("")
)
+ *theApp->getLog() <<
_T("Read projection file ") << filename << _T("\n")
;
SetFilename(filename, true);
Modify(false);
SetFilename(filename, true);
Modify(false);
@@
-276,17
+275,17
@@
PhantomFileDocument::OnOpenDocument(const wxString& constFilename)
wxString filename (constFilename);
if (wxFile::Exists (filename)) {
wxString filename (constFilename);
if (wxFile::Exists (filename)) {
- m_phantom.createFromFile (filename);
+ m_phantom.createFromFile (filename
.mb_str(wxConvUTF8)
);
if (theApp->getVerboseLogging())
if (theApp->getVerboseLogging())
- *theApp->getLog() <<
"Read phantom file " << filename << "\n"
;
+ *theApp->getLog() <<
_T("Read phantom file ") << filename << _T("\n")
;
} else {
} else {
- filename.Replace (
".phm", ""
);
- m_phantom.createFromPhantom (filename);
+ filename.Replace (
_T(".phm"), _T("")
);
+ m_phantom.createFromPhantom (filename
.mb_str(wxConvUTF8)
);
}
m_namePhantom = filename;
SetFilename (filename, true);
if (m_phantom.fail()) {
}
m_namePhantom = filename;
SetFilename (filename, true);
if (m_phantom.fail()) {
- *theApp->getLog() <<
"Failure creating phantom " << filename << "\n"
;
+ *theApp->getLog() <<
_T("Failure creating phantom ") << filename << _T("\n")
;
m_bBadFileOpen = true;
return false;
}
m_bBadFileOpen = true;
return false;
}
@@
-301,12
+300,12
@@
PhantomFileDocument::OnOpenDocument(const wxString& constFilename)
bool
PhantomFileDocument::OnSaveDocument(const wxString& filename)
{
bool
PhantomFileDocument::OnSaveDocument(const wxString& filename)
{
- if (! m_phantom.fileWrite (filename.
c_str(
))) {
- *theApp->getLog() <<
"Unable to write phantom file " << filename << "\n"
;
+ if (! m_phantom.fileWrite (filename.
mb_str(wxConvUTF8
))) {
+ *theApp->getLog() <<
_T("Unable to write phantom file ") << filename << _T("\n")
;
return false;
}
if (theApp->getVerboseLogging())
return false;
}
if (theApp->getVerboseLogging())
- *theApp->getLog() <<
"Wrote phantom file " << filename << "\n"
;
+ *theApp->getLog() <<
_T("Wrote phantom file ") << filename << _T("\n")
;
Modify(false);
return true;
}
Modify(false);
return true;
}
@@
-346,12
+345,12
@@
bool
PlotFileDocument::OnSaveDocument(const wxString& filename)
{
m_namePlot = filename.c_str();
PlotFileDocument::OnSaveDocument(const wxString& filename)
{
m_namePlot = filename.c_str();
- if (! m_plot.fileWrite (filename)) {
- *theApp->getLog() <<
"Unable to write plot file " << filename << "\n"
;
+ if (! m_plot.fileWrite (filename
.mb_str(wxConvUTF8)
)) {
+ *theApp->getLog() <<
_T("Unable to write plot file ") << filename << _T("\n")
;
return false;
}
if (theApp->getVerboseLogging())
return false;
}
if (theApp->getVerboseLogging())
- *theApp->getLog() <<
"Wrote plot file " << filename << "\n"
;
+ *theApp->getLog() <<
_T("Wrote plot file ") << filename << _T("\n")
;
Modify(false);
return true;
}
Modify(false);
return true;
}
@@
-362,15
+361,15
@@
PlotFileDocument::OnOpenDocument(const wxString& filename)
if (! OnSaveModified())
return false;
if (! OnSaveModified())
return false;
- if (! m_plot.fileRead (filename.
c_str(
))) {
- *theApp->getLog() <<
"Unable to read plot file " << filename << "\n"
;
+ if (! m_plot.fileRead (filename.
mb_str(wxConvUTF8
))) {
+ *theApp->getLog() <<
_T("Unable to read plot file ") << filename << _T("\n")
;
m_bBadFileOpen = true;
return false;
}
m_bBadFileOpen = false;
m_bBadFileOpen = true;
return false;
}
m_bBadFileOpen = false;
- if (theApp->getVerboseLogging() && filename !=
""
)
- *theApp->getLog() <<
"Read plot file " << filename << "\n"
;
+ if (theApp->getVerboseLogging() && filename !=
_T("")
)
+ *theApp->getLog() <<
_T("Read plot file ") << filename << _T("\n")
;
SetFilename (filename, true);
m_namePlot = filename.c_str();
SetFilename (filename, true);
m_namePlot = filename.c_str();