Applied Debian patch for wxWidgets 3.0 compatibility.

This commit is contained in:
Volker Ruppert 2014-12-23 19:30:03 +00:00
parent 88d9ad57bf
commit b18ed8e2b1
3 changed files with 7 additions and 13 deletions

View File

@ -840,8 +840,8 @@ bx_bool MyPanel::fillBxKeyEvent(wxKeyEvent& wxev, BxKeyEvent& bxev, bx_bool rele
case WXK_ALT: bx_key = BX_KEY_ALT_L; break;
case WXK_MENU: bx_key = BX_KEY_MENU; break;
case WXK_PAUSE: bx_key = BX_KEY_PAUSE; break;
case WXK_PRIOR: bx_key = BX_KEY_PAGE_UP; break;
case WXK_NEXT: bx_key = BX_KEY_PAGE_DOWN; break;
case WXK_PAGEUP: bx_key = BX_KEY_PAGE_UP; break;
case WXK_PAGEDOWN: bx_key = BX_KEY_PAGE_DOWN; break;
case WXK_END: bx_key = BX_KEY_END; break;
case WXK_HOME: bx_key = BX_KEY_HOME; break;
case WXK_LEFT: bx_key = BX_KEY_LEFT; break;
@ -885,14 +885,8 @@ bx_bool MyPanel::fillBxKeyEvent(wxKeyEvent& wxev, BxKeyEvent& bxev, bx_bool rele
case WXK_NUMPAD_UP: bx_key = BX_KEY_KP_UP; break;
case WXK_NUMPAD_RIGHT: bx_key = BX_KEY_KP_RIGHT; break;
case WXK_NUMPAD_DOWN: bx_key = BX_KEY_KP_DOWN; break;
case WXK_NUMPAD_PRIOR: bx_key = BX_KEY_KP_PAGE_UP; break;
#if WXK_NUMPAD_PAGEUP != WXK_NUMPAD_PRIOR
case WXK_NUMPAD_PAGEUP: bx_key = BX_KEY_KP_PAGE_UP; break;
#endif
case WXK_NUMPAD_NEXT: bx_key = BX_KEY_KP_PAGE_DOWN; break;
#if WXK_NUMPAD_PAGEDOWN != WXK_NUMPAD_NEXT
case WXK_NUMPAD_PAGEDOWN: bx_key = BX_KEY_KP_PAGE_DOWN; break;
#endif
case WXK_NUMPAD_END: bx_key = BX_KEY_KP_END; break;
case WXK_NUMPAD_BEGIN: bx_key = BX_KEY_KP_HOME; break;
case WXK_NUMPAD_INSERT: bx_key = BX_KEY_KP_INSERT; break;

View File

@ -53,7 +53,7 @@ void SetTextCtrl(wxTextCtrl *text, const char *format, int val);
int GetTextCtrlInt(wxTextCtrl *text, bool *valid = NULL, bool complain=false, wxString complaint = wxT("Invalid integer!"));
bool BrowseTextCtrl(wxTextCtrl *text,
wxString prompt= wxT("Choose a file"),
long style=wxOPEN);
long style=wxFD_OPEN);
wxChoice *makeLogOptionChoiceBox(wxWindow *parent, wxWindowID id, int evtype, bool includeNoChange = false);
////////////////////////////////////////////////////////////////////

View File

@ -522,7 +522,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
panel = new MyPanel(this, -1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER);
panel->SetBackgroundColour(wxColour(0,0,0));
panel->SetFocus();
wxGridSizer *sz = new wxGridSizer(1, 1);
wxGridSizer *sz = new wxGridSizer(0, 1, 1, 0);
sz->Add(panel, 0, wxGROW);
SetAutoLayout(TRUE);
SetSizer(sz);
@ -550,7 +550,7 @@ void MyFrame::OnConfigNew(wxCommandEvent& WXUNUSED(event))
void MyFrame::OnConfigRead(wxCommandEvent& WXUNUSED(event))
{
char bochsrc[512];
long style = wxOPEN;
long style = wxFD_OPEN;
wxFileDialog *fdialog = new wxFileDialog(this, wxT("Read configuration"), wxT(""), wxT(""), wxT("*.*"), style);
if (fdialog->ShowModal() == wxID_OK) {
strncpy(bochsrc, fdialog->GetPath().mb_str(wxConvUTF8), sizeof(bochsrc));
@ -563,7 +563,7 @@ void MyFrame::OnConfigRead(wxCommandEvent& WXUNUSED(event))
void MyFrame::OnConfigSave(wxCommandEvent& WXUNUSED(event))
{
char bochsrc[512];
long style = wxSAVE | wxOVERWRITE_PROMPT;
long style = wxFD_SAVE | wxFD_OVERWRITE_PROMPT;
wxFileDialog *fdialog = new wxFileDialog(this, wxT("Save configuration"), wxT(""), wxT(""), wxT("*.*"), style);
if (fdialog->ShowModal() == wxID_OK) {
strncpy(bochsrc, fdialog->GetPath().mb_str(wxConvUTF8), sizeof(bochsrc));
@ -1033,7 +1033,7 @@ int MyFrame::HandleAskParamString(bx_param_string_c *param)
} else if (n_opt & param->IS_FILENAME) {
// use file open dialog
long style =
(n_opt & param->SAVE_FILE_DIALOG) ? wxSAVE|wxOVERWRITE_PROMPT : wxOPEN;
(n_opt & param->SAVE_FILE_DIALOG) ? wxFD_SAVE|wxFD_OVERWRITE_PROMPT : wxFD_OPEN;
wxFileDialog *fdialog = new wxFileDialog(this, wxString(msg, wxConvUTF8), wxT(""), wxString(param->getptr(), wxConvUTF8), wxT("*.*"), style);
if (fdialog->ShowModal() == wxID_OK)
strncpy(newval, fdialog->GetPath().mb_str(wxConvUTF8), sizeof(newval));