Small code cleanup.

This commit is contained in:
Volker Ruppert 2021-03-08 09:04:16 +00:00
parent 8cf09f8545
commit b5428785aa
3 changed files with 6 additions and 5 deletions

View File

@ -100,6 +100,9 @@ public:
#endif #endif
}; };
// this variable uses the bx_wx_gui_c object to access MyPanel
static MyPanel *thePanel = NULL;
// declare one instance of the gui object and call macro to insert the // declare one instance of the gui object and call macro to insert the
// plugin code // plugin code
static bx_wx_gui_c *theGui = NULL; static bx_wx_gui_c *theGui = NULL;

View File

@ -96,10 +96,9 @@
#include "icon_bochs.xpm" #include "icon_bochs.xpm"
#endif #endif
// FIXME: ugly global variables that the bx_gui_c object in wx.cc can use // FIXME: ugly global variable that the bx_gui_c object in wx.cc can use
// to access the MyFrame and the MyPanel. // to access the MyFrame.
MyFrame *theFrame = NULL; MyFrame *theFrame = NULL;
MyPanel *thePanel = NULL;
// The wxBochsClosing flag is used to keep track of when the wxWidgets GUI is // The wxBochsClosing flag is used to keep track of when the wxWidgets GUI is
// shutting down. Shutting down can be somewhat complicated because the // shutting down. Shutting down can be somewhat complicated because the
@ -1294,7 +1293,7 @@ void MyFrame::OnToolbarClick(wxCommandEvent& event)
case ID_Toolbar_Copy: which = BX_TOOLBAR_COPY; break; case ID_Toolbar_Copy: which = BX_TOOLBAR_COPY; break;
case ID_Toolbar_Paste: which = BX_TOOLBAR_PASTE; break; case ID_Toolbar_Paste: which = BX_TOOLBAR_PASTE; break;
case ID_Toolbar_Snapshot: which = BX_TOOLBAR_SNAPSHOT; break; case ID_Toolbar_Snapshot: which = BX_TOOLBAR_SNAPSHOT; break;
case ID_Toolbar_Mouse_en: thePanel->ToggleMouse(true); break; case ID_Toolbar_Mouse_en: panel->ToggleMouse(true); break;
case ID_Toolbar_User: which = BX_TOOLBAR_USER; break; case ID_Toolbar_User: which = BX_TOOLBAR_USER; break;
default: default:
wxLogError(wxT("unknown toolbar id %d"), id); wxLogError(wxT("unknown toolbar id %d"), id);

View File

@ -33,7 +33,6 @@ class LogViewDialog;
//hack alert; yuck; FIXME //hack alert; yuck; FIXME
extern MyFrame *theFrame; extern MyFrame *theFrame;
extern MyPanel *thePanel;
// wxBochsClosing flag, see comments in wxmain.h // wxBochsClosing flag, see comments in wxmain.h
extern bool wxBochsClosing; extern bool wxBochsClosing;