X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/260460ae06e11201d161eb6d1b09ba859900a4bc..6dfec4b8d901b13f11745a1371083a0b8c1c6980:/demos/dbbrowse/dbbrowse.cpp diff --git a/demos/dbbrowse/dbbrowse.cpp b/demos/dbbrowse/dbbrowse.cpp index 5770c15901..c75312caab 100644 --- a/demos/dbbrowse/dbbrowse.cpp +++ b/demos/dbbrowse/dbbrowse.cpp @@ -149,7 +149,9 @@ bool MainApp::OnInit(void) // Does everything needed for a program start } else { // Read in Foreign language's text for GetAppName() and Help - m_locale.AddCatalog(GetAppName().c_str()); + Temp0 = GetAppName(); + Temp0 = Temp0.Lower(); + m_locale.AddCatalog(Temp0.c_str()); m_locale.AddCatalog("help"); } } // Support the following languages (std = english) @@ -267,6 +269,11 @@ MainFrame::MainFrame(wxFrame *frame, char *title, const wxPoint& pos, const wxS //---------------------------------------------------------------------------------------- MainFrame::~MainFrame(void) { + // Close the help frame; this will cause the config data to get written. + if (p_Help->GetFrame()) // returns NULL if no help frame active + p_Help->GetFrame()->Close(TRUE); + delete p_Help; // Memory Leak + p_Help = NULL; // save the control's values to the config if (p_ProgramCfg == NULL) return; @@ -290,9 +297,6 @@ MainFrame::~MainFrame(void) //---------------------------------------------------------------------------------------- void MainFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) { - // Close the help frame; this will cause the config data to get written. - if (p_Help->GetFrame()) // returns NULL if no help frame active - p_Help->GetFrame()->Close(TRUE); Close(TRUE); } //----------------------------------------------------------------------------------------