diff --git a/src/wx/guiinit.cpp b/src/wx/guiinit.cpp index 0da55f21..74c86d86 100644 --- a/src/wx/guiinit.cpp +++ b/src/wx/guiinit.cpp @@ -2281,7 +2281,7 @@ bool MainFrame::InitMore(void) // just verify preview window & mag sel present { wxPanel *prev; - prev=SafeXRCCTRL(d, "Preview"); + prev=SafeXRCCTRL(d, "Preview"); if(!wxDynamicCast(prev->GetParent(), wxScrolledWindow)) throw std::runtime_error("Unable to load a dialog control from the builtin xrc file: Preview"); SafeXRCCTRL(d, "Magnification"); @@ -2289,10 +2289,10 @@ bool MainFrame::InitMore(void) } //// File menu - LoadXRCDialog("GBAROMInfo"); + d=LoadXRCDialog("GBAROMInfo"); // just verify fields present wxControl *lab; -#define getlab(n) lab=SafeXRCCTRL(d, n) +#define getlab(n) lab=SafeXRCCTRL(d, n) getlab("Title"); getlab("GameCode"); getlab("MakerCode"); @@ -2338,21 +2338,21 @@ bool MainFrame::InitMore(void) #endif wxRadioButton *rb; #define getrbi(n, o, v) do { \ - rb=SafeXRCCTRL(d, n); \ + rb=SafeXRCCTRL(d, n); \ rb->SetValidator(wxBoolIntValidator(&o, v)); \ } while(0) #define getrbb(n, o) do { \ - rb=SafeXRCCTRL(d, n); \ + rb=SafeXRCCTRL(d, n); \ rb->SetValidator(wxGenericValidator(&o)); \ } while(0) #define getrbbr(n, o) do { \ - rb=SafeXRCCTRL(d, n); \ + rb=SafeXRCCTRL(d, n); \ rb->SetValidator(wxBoolRevValidator(&o)); \ } while(0) wxBoolEnValidator *benval; wxBoolEnHandler *ben; #define getbe(n, o, cv, t, wt) do { \ - cv=SafeXRCCTRL(d, n); \ + cv=SafeXRCCTRL(d, n); \ cv->SetValidator(wxBoolEnValidator(&o)); \ benval = wxStaticCast(cv->GetValidator(), wxBoolEnValidator); \ static wxBoolEnHandler _ben; \ @@ -2363,7 +2363,7 @@ bool MainFrame::InitMore(void) // of checkboxes. A lot of work for little benefit. wxBoolRevEnValidator *brenval; #define getbre(n, o, cv, t, wt) do { \ - cv=SafeXRCCTRL(d, n); \ + cv=SafeXRCCTRL(d, n); \ cv->SetValidator(wxBoolRevEnValidator(&o)); \ brenval = wxStaticCast(cv->GetValidator(), wxBoolRevEnValidator); \ wx##wt##BoolEnHandlerConnect(rb, wxID_ANY, *ben); \ @@ -2391,7 +2391,7 @@ bool MainFrame::InitMore(void) #define getrbbd(n, o) getbre(n, o, rb, wxRadioButton, RBD) wxTextCtrl *tc; #define gettc(n, o) do { \ - tc=SafeXRCCTRL(d, n); \ + tc=SafeXRCCTRL(d, n); \ tc->SetValidator(wxTextValidator(wxFILTER_NONE, &o)); \ } while(0) #ifndef NO_LINK @@ -2436,7 +2436,7 @@ bool MainFrame::InitMore(void) cheat_list_handler.dlg = d; d->SetEscapeId(wxID_OK); wxCheckedListCtrl *cl; - cl=SafeXRCCTRL(d, "Cheats"); + cl=SafeXRCCTRL(d, "Cheats"); if(!cl->Init()) throw std::runtime_error("Unable to initialize the Cheats dialog control from the builtin xrc file!"); cheat_list_handler.list = cl; @@ -2571,7 +2571,7 @@ bool MainFrame::InitMore(void) wxCommandEventHandler(CheatFind_t::f), \ NULL, &cheat_find_handler); #define cf_enbutton(n, v) do { \ - cheat_find_handler.v=SafeXRCCTRL(d, n); \ + cheat_find_handler.v=SafeXRCCTRL(d, n); \ cheat_find_handler.v->Disable(); \ } while(0) cf_button("Search", Search); @@ -2587,6 +2587,7 @@ bool MainFrame::InitMore(void) d->Connect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(CheatFind_t::Select), NULL, &cheat_find_handler); + d->Fit(); } d=LoadXRCDialog("CheatAdd");