projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r435: *** empty log message ***
[ctsim.git]
/
src
/
ctsim.cpp
diff --git
a/src/ctsim.cpp
b/src/ctsim.cpp
index ee7b4a8ab62285de8560f3d6e53e6322d73ee2f9..d0cc8c686c28072b085a780b62a4c5d216163ef0 100644
(file)
--- a/
src/ctsim.cpp
+++ b/
src/ctsim.cpp
@@
-9,7
+9,7
@@
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: ctsim.cpp,v 1.4
0 2001/01/20 17:43:41
kevin Exp $
+** $Id: ctsim.cpp,v 1.4
1 2001/01/26 00:45:24
kevin Exp $
**
** 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
@@
-70,7
+70,7
@@
#endif
#endif
#endif
#endif
-static const char* rcsindent = "$Id: ctsim.cpp,v 1.4
0 2001/01/20 17:43:41
kevin Exp $";
+static const char* rcsindent = "$Id: ctsim.cpp,v 1.4
1 2001/01/26 00:45:24
kevin Exp $";
struct option CTSimApp::ctsimOptions[] =
{
struct option CTSimApp::ctsimOptions[] =
{
@@
-207,6
+207,11
@@
CTSimApp::usage(const char* program)
int
CTSimApp::OnExit()
{
int
CTSimApp::OnExit()
{
+ if (theApp->getConfig())
+ theApp->getDocManager()->FileHistorySave (*theApp->getConfig());
+ delete theApp->getDocManager();
+ m_docManager = NULL;
+
#ifdef HAVE_DMALLOC
dmalloc_shutdown();
#endif
#ifdef HAVE_DMALLOC
dmalloc_shutdown();
#endif
@@
-293,6
+298,7
@@
MainFrame::MainFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const
file_menu->Append(MAINMENU_FILE_EXIT, "E&xit");
// history of files visited
file_menu->Append(MAINMENU_FILE_EXIT, "E&xit");
// history of files visited
+ theApp->getDocManager()->FileHistoryAddFilesToMenu(file_menu);
theApp->getDocManager()->FileHistoryUseMenu(file_menu);
#ifndef CTSIM_MDI
theApp->getDocManager()->FileHistoryUseMenu(file_menu);
#ifndef CTSIM_MDI
@@
-355,9
+361,6
@@
MainFrame::MainFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const
MainFrame::~MainFrame()
{
MainFrame::~MainFrame()
{
- if (theApp->getConfig())
- theApp->getDocManager()->FileHistorySave (*theApp->getConfig());
- delete theApp->getDocManager();
}
void
}
void
@@
-546,7
+549,7
@@
MainFrame::OnUpdateUI (wxUpdateUIEvent& rEvent)
void
MainFrame::OnMRUFile (wxCommandEvent& event)
{
void
MainFrame::OnMRUFile (wxCommandEvent& event)
{
- wxString fileName (theApp->getDocManager()->GetHistoryFile(event.Get
Selection()
));
+ wxString fileName (theApp->getDocManager()->GetHistoryFile(event.Get
Id() - wxID_FILE1
));
if (fileName != "")
theApp->getDocManager()->CreateDocument(fileName, wxDOC_SILENT);
}
if (fileName != "")
theApp->getDocManager()->CreateDocument(fileName, wxDOC_SILENT);
}