summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Debugger/CodeView.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-05-17 13:17:28 -0400
committerLioncash <mathew1800@gmail.com>2014-05-17 16:25:51 -0400
commite1359382be30bb8f61a779846c9ebc1fa72791d0 (patch)
tree4c9df69820dc795039928efa619727b73a9766f6 /Source/Core/DolphinWX/Debugger/CodeView.cpp
parent90df5efd01782847f6427efa552b4a2a5a007413 (diff)
Kill off _T and wxT macros
Minor other alterations that relate to above as well. Also added the PanicAlertT version of alerts for some error messages that use PanicAlert. We want the user to actually understand why the error occurred.
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/CodeView.cpp')
-rw-r--r--Source/Core/DolphinWX/Debugger/CodeView.cpp59
1 files changed, 29 insertions, 30 deletions
diff --git a/Source/Core/DolphinWX/Debugger/CodeView.cpp b/Source/Core/DolphinWX/Debugger/CodeView.cpp
index 0d8ce7042e..968fa816f8 100644
--- a/Source/Core/DolphinWX/Debugger/CodeView.cpp
+++ b/Source/Core/DolphinWX/Debugger/CodeView.cpp
@@ -227,7 +227,7 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
#if wxUSE_CLIPBOARD
case IDM_COPYADDRESS:
- wxTheClipboard->SetData(new wxTextDataObject(wxString::Format(_T("%08x"), selection)));
+ wxTheClipboard->SetData(new wxTextDataObject(wxString::Format("%08x", selection)));
break;
case IDM_COPYCODE:
@@ -310,7 +310,7 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
Symbol *symbol = symbol_db->GetSymbolFromAddr(selection);
if (symbol)
{
- wxTextEntryDialog input_symbol(this, StrToWxStr("Rename symbol:"),
+ wxTextEntryDialog input_symbol(this, _("Rename symbol:"),
wxGetTextFromUserPromptStr,
StrToWxStr(symbol->name));
if (input_symbol.ShowModal() == wxID_OK)
@@ -339,24 +339,23 @@ void CCodeView::OnMouseUpR(wxMouseEvent& event)
// popup menu
wxMenu* menu = new wxMenu;
//menu->Append(IDM_GOTOINMEMVIEW, "&Goto in mem view");
- menu->Append(IDM_FOLLOWBRANCH,
- StrToWxStr("&Follow branch"))->Enable(AddrToBranch(selection) ? true : false);
+ menu->Append(IDM_FOLLOWBRANCH, _("&Follow branch"))->Enable(AddrToBranch(selection) ? true : false);
menu->AppendSeparator();
#if wxUSE_CLIPBOARD
- menu->Append(IDM_COPYADDRESS, StrToWxStr("Copy &address"));
- menu->Append(IDM_COPYFUNCTION, StrToWxStr("Copy &function"))->Enable(isSymbol);
- menu->Append(IDM_COPYCODE, StrToWxStr("Copy &code line"));
- menu->Append(IDM_COPYHEX, StrToWxStr("Copy &hex"));
+ menu->Append(IDM_COPYADDRESS, _("Copy &address"));
+ menu->Append(IDM_COPYFUNCTION, _("Copy &function"))->Enable(isSymbol);
+ menu->Append(IDM_COPYCODE, _("Copy &code line"));
+ menu->Append(IDM_COPYHEX, _("Copy &hex"));
menu->AppendSeparator();
#endif
- menu->Append(IDM_RENAMESYMBOL, StrToWxStr("Rename &symbol"))->Enable(isSymbol);
+ menu->Append(IDM_RENAMESYMBOL, _("Rename &symbol"))->Enable(isSymbol);
menu->AppendSeparator();
menu->Append(IDM_RUNTOHERE, _("&Run To Here"));
menu->Append(IDM_ADDFUNCTION, _("&Add function"));
- menu->Append(IDM_JITRESULTS, StrToWxStr("PPC vs X86"));
- menu->Append(IDM_INSERTBLR, StrToWxStr("Insert &blr"));
- menu->Append(IDM_INSERTNOP, StrToWxStr("Insert &nop"));
- menu->Append(IDM_PATCHALERT, StrToWxStr("Patch alert"));
+ menu->Append(IDM_JITRESULTS, _("PPC vs X86"));
+ menu->Append(IDM_INSERTBLR, _("Insert &blr"));
+ menu->Append(IDM_INSERTNOP, _("Insert &nop"));
+ menu->Append(IDM_PATCHALERT, _("Patch alert"));
PopupMenu(menu);
event.Skip(true);
}
@@ -375,12 +374,12 @@ void CCodeView::OnPaint(wxPaintEvent& event)
dc.SetFont(DebuggerFont);
wxCoord w,h;
- dc.GetTextExtent(_T("0WJyq"),&w,&h);
+ dc.GetTextExtent("0WJyq", &w, &h);
if (h > rowHeight)
rowHeight = h;
- dc.GetTextExtent(_T("W"),&w,&h);
+ dc.GetTextExtent("W", &w, &h);
int charWidth = w;
struct branch
@@ -399,15 +398,15 @@ void CCodeView::OnPaint(wxPaintEvent& event)
// Colors and brushes
// -------------------------
dc.SetBackgroundMode(wxTRANSPARENT); // the text background
- const wxChar* bgColor = _T("#ffffff");
+ const wxColour bgColor = *wxWHITE;
wxPen nullPen(bgColor);
- wxPen currentPen(_T("#000000"));
- wxPen selPen(_T("#808080")); // gray
+ wxPen currentPen(*wxBLACK_PEN);
+ wxPen selPen(*wxGREY_PEN);
nullPen.SetStyle(wxTRANSPARENT);
currentPen.SetStyle(wxSOLID);
- wxBrush currentBrush(_T("#FFEfE8")); // light gray
- wxBrush pcBrush(_T("#70FF70")); // green
- wxBrush bpBrush(_T("#FF3311")); // red
+ wxBrush currentBrush(*wxLIGHT_GREY_BRUSH);
+ wxBrush pcBrush(*wxGREEN_BRUSH);
+ wxBrush bpBrush(*wxRED_BRUSH);
wxBrush bgBrush(bgColor);
wxBrush nullBrush(bgColor);
@@ -429,9 +428,9 @@ void CCodeView::OnPaint(wxPaintEvent& event)
int rowY1 = rc.height / 2 + rowHeight * i - rowHeight / 2;
int rowY2 = rc.height / 2 + rowHeight * i + rowHeight / 2;
- wxString temp = wxString::Format(_T("%08x"), address);
+ wxString temp = wxString::Format("%08x", address);
u32 col = debugger->GetColor(address);
- wxBrush rowBrush(wxColor(col >> 16, col >> 8, col));
+ wxBrush rowBrush(wxColour(col >> 16, col >> 8, col));
dc.SetBrush(nullBrush);
dc.SetPen(nullPen);
dc.DrawRectangle(0, rowY1, 16, rowY2 - rowY1 + 2);
@@ -450,9 +449,9 @@ void CCodeView::OnPaint(wxPaintEvent& event)
dc.SetBrush(currentBrush);
if (!plain)
{
- dc.SetTextForeground(_T("#600000")); // the address text is dark red
+ dc.SetTextForeground("#600000"); // the address text is dark red
dc.DrawText(temp, 17, rowY1);
- dc.SetTextForeground(_T("#000000"));
+ dc.SetTextForeground(*wxBLACK);
}
// If running
@@ -495,11 +494,11 @@ void CCodeView::OnPaint(wxPaintEvent& event)
branches[numBranches].srcAddr = address / align;
branches[numBranches++].dst = (int)(rowY1 + ((s64)(u32)offs - (s64)(u32)address) * rowHeight / align + rowHeight / 2);
sprintf(desc, "-->%s", debugger->GetDescription(offs).c_str());
- dc.SetTextForeground(_T("#600060")); // the -> arrow illustrations are purple
+ dc.SetTextForeground(wxTheColourDatabase->Find("PURPLE")); // the -> arrow illustrations are purple
}
else
{
- dc.SetTextForeground(_T("#000000"));
+ dc.SetTextForeground(*wxBLACK);
}
dc.DrawText(StrToWxStr(dis2), 17 + 17*charWidth, rowY1);
@@ -508,9 +507,9 @@ void CCodeView::OnPaint(wxPaintEvent& event)
// Show blr as its' own color
if (strcmp(dis, "blr"))
- dc.SetTextForeground(_T("#007000")); // dark green
+ dc.SetTextForeground(wxTheColourDatabase->Find("DARK GREEN"));
else
- dc.SetTextForeground(_T("#8000FF")); // purple
+ dc.SetTextForeground(wxTheColourDatabase->Find("VIOLET"));
dc.DrawText(StrToWxStr(dis), 17 + (plain ? 1*charWidth : 9*charWidth), rowY1);
@@ -521,7 +520,7 @@ void CCodeView::OnPaint(wxPaintEvent& event)
if (!plain)
{
- dc.SetTextForeground(_T("#0000FF")); // blue
+ dc.SetTextForeground(*wxBLUE);
//char temp[256];
//UnDecorateSymbolName(desc,temp,255,UNDNAME_COMPLETE);