MainFrame::MainFrame(wxFrame *frame, char *title, const wxPoint& pos, const wxSize& size):
wxFrame(frame, -1, title, pos, size)
{
- //--- Everything is done in MainApp -----------------------------------------------------
+ p_Splitter = NULL; pDoc = NULL; p_Help = NULL; // Keep the Pointers clean !
+ //--- Everything else is done in MainApp::OnInit() --------------------------------------
}
//----------------------------------------------------------------------------------------
MainFrame::~MainFrame(void)
// we want here!)
// delete wxConfigBase::Set((wxConfigBase *) NULL);
p_ProgramCfg->Flush(TRUE); // saves Objekt
- if (!frame->pDoc) // If we have a Valid Document
- delete frame->pDoc; // Cleanup (MainDoc::~MainDoc)
+ if (pDoc) // If we have a Valid Document
+ delete pDoc; // Cleanup (MainDoc::~MainDoc)
} // MainFrame::~MainFrame(void)
//----------------------------------------------------------------------------------------
void MainFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
//----------------------------------------------------------------------------------------
void MainFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
- wxMessageDialog dialog(this, _("DBBrowser\nMark Johnson\nBerlin, Germany\nmj10777@gmx.net\n (c) 1999"),
- _("About DBBrowser"), wxOK|wxCANCEL);
-
+ wxString Temp0, Temp1;
+ Temp0.Printf(_("%s\nMark Johnson\nBerlin, Germany\nmj10777@gmx.net\n (c) 2000"),p_ProgramCfg->GetAppName().c_str());
+ Temp1.Printf(_("About %s"),p_ProgramCfg->GetAppName().c_str());
+ wxMessageDialog dialog(this, Temp0,Temp1,wxOK|wxCANCEL);
dialog.ShowModal();
}
//----------------------------------------------------------------------------------------