Trying to get gui to compile with wx 2.9

Shouldn't affect normal compile.



git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4362 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee 2009-10-05 07:31:38 +00:00
parent 06e79364b0
commit 188e3b9172
7 changed files with 85 additions and 35 deletions

View File

@ -304,7 +304,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
_T("Apply signature file"), wxEmptyString, wxEmptyString, wxEmptyString,
_T("Dolphin Symbole Rename File (*.sym)|*.sym;"), wxFD_OPEN | wxFD_FILE_MUST_EXIST,
this);
if (path)
if (! path.IsEmpty())
{
FILE *f = fopen(path.mb_str(), "r");
if (!f)
@ -342,7 +342,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
_T("Save signature as"), wxEmptyString, wxEmptyString, wxEmptyString,
_T("Dolphin Signature File (*.dsy)|*.dsy;"), wxFD_SAVE,
this);
if (path) {
if (! path.IsEmpty()) {
SignatureDB db;
db.Initialize(&g_symbolDB, prefix.c_str());
std::string filename(path.mb_str()); // PPCAnalyst::SaveSignatureDB(
@ -357,7 +357,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
_T("Apply signature file"), wxEmptyString, wxEmptyString, wxEmptyString,
_T("Dolphin Signature File (*.dsy)|*.dsy;"), wxFD_OPEN | wxFD_FILE_MUST_EXIST,
this);
if (path) {
if (! path.IsEmpty()) {
SignatureDB db;
db.Load(path.mb_str());
db.Apply(&g_symbolDB);

View File

@ -803,7 +803,7 @@ void CFrame::OnLoadStateFromFile(wxCommandEvent& WXUNUSED (event))
wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
this);
if(path)
if(!path.IsEmpty())
State_LoadAs((const char*)path.mb_str());
}
@ -821,7 +821,7 @@ void CFrame::OnSaveStateToFile(wxCommandEvent& WXUNUSED (event))
wxFD_SAVE,
this);
if(path)
if(! path.IsEmpty())
State_SaveAs((const char*)path.mb_str());
}

View File

@ -671,9 +671,9 @@ void CISOProperties::ExportDir(const char* _rFullPath, const char* _rExportFolde
// Extraction
for (u32 i = index[0]; i < index[1]; i++)
{
dialog.SetTitle(wxString::Format(_T("%s : %d%%"), dialogTitle,
dialog.SetTitle(wxString::Format(_T("%s : %d%%"), (const char *)dialogTitle.mb_str(),
(u32)(((float)(i - index[0]) / (float)(index[1] - index[0])) * 100)));
if (!dialog.Update(i, wxString::Format(_T("Extracting %s"), wxString::FromAscii(fst[i]->m_FullPath))))
if (!dialog.Update(i, wxString::Format(_T("Extracting %s"), fst[i]->m_FullPath)))
break;
if (fst[i]->IsDirectory())

View File

@ -201,43 +201,82 @@ bool DolphinApp::OnInit()
// Parse command lines
#if wxUSE_CMDLINE_PARSER
#if wxCHECK_VERSION(2, 9, 0)
wxCmdLineEntryDesc cmdLineDesc[] =
{
{
wxCMD_LINE_SWITCH, _T("h"), _T("help"), _T("Show this help message"),
wxCMD_LINE_SWITCH, "h", "help", "Show this help message",
wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP
},
{
wxCMD_LINE_SWITCH, _T("d"), _T("debugger"), _T("Opens the debugger")
wxCMD_LINE_SWITCH, "d", "debugger", "Opens the debugger"
},
{
wxCMD_LINE_SWITCH, _T("l"), _T("logger"), _T("Opens The Logger")
wxCMD_LINE_SWITCH, "l", "logger", "Opens The Logger"
},
{
wxCMD_LINE_OPTION, _T("e"), _T("elf"), _T("Loads an elf file"),
wxCMD_LINE_OPTION, "e", "elf", "Loads an elf file",
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_OPTION, _T("V"), _T("video_plugin"),_T("Specify a video plugin"),
wxCMD_LINE_OPTION, "V", "video_plugin","Specify a video plugin",
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_OPTION, _T("A"), _T("audio_plugin"),_T("Specify an audio plugin"),
wxCMD_LINE_OPTION, "A", "audio_plugin","Specify an audio plugin",
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_OPTION, _T("P"), _T("pad_plugin"),_T("Specify a pad plugin"),
wxCMD_LINE_OPTION, "P", "pad_plugin","Specify a pad plugin",
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_OPTION, _T("W"), _T("wiimote_plugin"),_T("Specify a wiimote plugin"),
wxCMD_LINE_OPTION, "W", "wiimote_plugin","Specify a wiimote plugin",
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_NONE
}
};
#else
wxCmdLineEntryDesc cmdLineDesc[] =
{
{
wxCMD_LINE_SWITCH, _("h"), _("help"),
wxT("Show this help message"),
wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP
},
{
wxCMD_LINE_SWITCH, _("d"), _("debugger"), wxT("Opens the debugger")
},
{
wxCMD_LINE_SWITCH, _("l"), _("logger"), wxT("Opens The Logger")
},
{
wxCMD_LINE_OPTION, _("e"), _("elf"), wxT("Loads an elf file"),
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_OPTION, _("V"), _("video_plugin"), wxT("Specify a video plugin"),
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_OPTION, _("A"), _("audio_plugin"), wxT("Specify an audio plugin"),
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_OPTION, _("P"), _("pad_plugin"), wxT("Specify a pad plugin"),
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_OPTION, _("W"), _("wiimote_plugin"), wxT("Specify a wiimote plugin"),
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_NONE
}
};
#endif
#if defined(__APPLE__)
// check to see if ~/Library/Application Support/Dolphin exists; if not, create it
char AppSupportDir[MAXPATHLEN];
@ -288,19 +327,29 @@ bool DolphinApp::OnInit()
{
return false;
}
UseDebugger = parser.Found(_T("debugger"));
UseLogger = parser.Found(_T("logger"));
LoadElf = parser.Found(_T("elf"), &ElfFile);
#if wxCHECK_VERSION(2, 9, 0)
UseDebugger = parser.Found("debugger");
UseLogger = parser.Found("logger");
LoadElf = parser.Found("elf", &ElfFile);
#else
UseDebugger = parser.Found(_("debugger"));
UseLogger = parser.Found(_("logger"));
LoadElf = parser.Found(_("elf"), &ElfFile);
#endif
if( LoadElf && ElfFile == wxEmptyString )
PanicAlert("You did not specify a file name");
selectVideoPlugin = parser.Found(_T("video_plugin"), &videoPluginFilename);
selectAudioPlugin = parser.Found(_T("audio_plugin"), &audioPluginFilename);
selectPadPlugin = parser.Found(_T("pad_plugin"), &padPluginFilename);
selectWiimotePlugin = parser.Found(_T("wiimote_plugin"), &wiimotePluginFilename);
#if wxCHECK_VERSION(2, 9, 0)
selectVideoPlugin = parser.Found("video_plugin", &videoPluginFilename);
selectAudioPlugin = parser.Found("audio_plugin", &audioPluginFilename);
selectPadPlugin = parser.Found("pad_plugin", &padPluginFilename);
selectWiimotePlugin = parser.Found("wiimote_plugin", &wiimotePluginFilename);
#else
selectVideoPlugin = parser.Found("video_plugin", &videoPluginFilename);
selectAudioPlugin = parser.Found("audio_plugin", &audioPluginFilename);
selectPadPlugin = parser.Found("pad_plugin", &padPluginFilename);
selectWiimotePlugin = parser.Found("wiimote_plugin", &wiimotePluginFilename);
#endif
// ============
#endif
@ -615,4 +664,4 @@ void Host_SetWiiMoteConnectionState(int _State)
wxPostEvent(main_frame, event);
}
#endif // HAVE_WX
#endif // HAVE_WX

View File

@ -41,8 +41,9 @@ void NetEvent::SendEvent(int EventType, const std::string text, int integer)
event.SetId( EventType );
event.SetInt( integer );
event.SetString( wxString::FromAscii(text.c_str()) );
#if ! wxCHECK_VERSION(2, 9, 0)
m_netptr->AddPendingEvent(event);
#endif
}
//--------------------------------

View File

@ -93,7 +93,7 @@ bool CopySJISToString(wxString& _rDestination, const char* _src)
}
}
#else
_rDestination = wxString(wxString(_src,wxConvLibc),wxConvUTF8);
_rDestination = wxString(_src,wxConvUTF8);
returnCode = true;
#endif
return returnCode;

View File

@ -281,12 +281,12 @@ void WiimotePadConfigDialog::ToBlank(bool _ToBlank)
if(_ToBlank)
{
for(int i = IDB_ANALOG_LEFT_X; i <= IDB_TRIGGER_R; i++)
#ifndef _WIN32
if(GetButtonText(i, j).ToAscii() == "-1")
SetButtonText(i, (char *)"", j);
#else
if(GetButtonText(i, j) == wxT("-1")) SetButtonText(i, "", j);
#endif
#if ! defined _WIN32 && ! wxCHECK_VERSION(2, 9, 0)
if(GetButtonText(i, j).ToAscii() == "-1")
SetButtonText(i, (char *)"", j);
#else
if(GetButtonText(i, j) == wxT("-1")) SetButtonText(i, "", j);
#endif
}
else
{