UI: Clean up (#2069)
Some checks failed
Build check / build (push) Has been cancelled
Generate translation template / generate-pot (push) Has been cancelled

This commit is contained in:
oltolm
2026-09-23 07:51:32 +02:00
committed by GitHub
parent b1fe77e995
commit d3d16f7a23
10 changed files with 18 additions and 18 deletions

View File

@@ -227,7 +227,7 @@ GraphicPacksWindow2::GraphicPacksWindow2(wxWindow* parent, uint64_t title_id_fil
m_filter_text = new wxTextCtrl(left_panel, wxID_ANY, wxString::FromUTF8(m_filter));
filter_row->Add(m_filter_text, 0, wxALL | wxEXPAND, 5);
m_filter_text->Bind(wxEVT_COMMAND_TEXT_UPDATED, &GraphicPacksWindow2::OnFilterUpdate, this);
m_filter_text->Bind(wxEVT_TEXT, &GraphicPacksWindow2::OnFilterUpdate, this);
m_installed_games_only = new wxCheckBox(left_panel, wxID_ANY, _("Installed games"));
m_installed_games_only->SetValue(m_filter_installed_games);

View File

@@ -97,7 +97,7 @@ MemorySearcherTool::MemorySearcherTool(wxFrame* parent)
auto textEntryTable = new wxStaticText(this, wxID_ANY, _("Stored Entries"));
m_listEntryTable = new wxDataViewListCtrl(this, LIST_ENTRYTABLE, wxDefaultPosition, wxSize(420, 200), wxDV_HORIZ_RULES);
m_listEntryTable->Bind(wxEVT_DATAVIEW_ITEM_CONTEXT_MENU, &MemorySearcherTool::OnEntryListRightClick, this);
m_listEntryTable->Bind(wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE, &MemorySearcherTool::OnItemEdited, this);
m_listEntryTable->Bind(wxEVT_DATAVIEW_ITEM_EDITING_DONE, &MemorySearcherTool::OnItemEdited, this);
{
m_listEntryTable->AppendTextColumn(_("Description"), wxDATAVIEW_CELL_EDITABLE, 150, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE);
m_listEntryTable->AppendTextColumn(_("Address"), wxDATAVIEW_CELL_INERT, 100, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE);
@@ -382,7 +382,7 @@ void MemorySearcherTool::OnEntryListRightClick(wxDataViewEvent& event)
//mnu.SetClientData(data);
mnu.Append(LIST_ENTRY_ADD, _("&Add new entry"))->Enable(false);
mnu.Append(LIST_ENTRY_REMOVE, _("&Remove entry"));
mnu.Bind(wxEVT_COMMAND_MENU_SELECTED, &MemorySearcherTool::OnPopupClick, this);
mnu.Bind(wxEVT_MENU, &MemorySearcherTool::OnPopupClick, this);
PopupMenu(&mnu);
}

View File

@@ -330,7 +330,7 @@ void wxDownloadManagerList::OnContextMenu(wxContextMenuEvent& event)
return;
wxMenu menu;
menu.Bind(wxEVT_COMMAND_MENU_SELECTED, &wxDownloadManagerList::OnContextMenuSelected, this);
menu.Bind(wxEVT_MENU, &wxDownloadManagerList::OnContextMenuSelected, this);
const auto selection = GetFirstSelected();
if (selection == wxNOT_FOUND)

View File

@@ -642,7 +642,7 @@ void wxGameList::OnContextMenu(wxContextMenuEvent& event)
auto& config = GetConfig();
wxMenu menu;
menu.Bind(wxEVT_COMMAND_MENU_SELECTED, &wxGameList::OnContextMenuSelected, this);
menu.Bind(wxEVT_MENU, &wxGameList::OnContextMenuSelected, this);
const auto selection = GetFirstSelected();
if (selection != wxNOT_FOUND)
@@ -900,7 +900,7 @@ void wxGameList::OnColumnRightClick(wxListEvent& event)
menu.AppendCheckItem(ShowRegion, _("Show &region"))->Check(GetColumnWidth(ColumnRegion) > 0);
menu.AppendCheckItem(ShowTitleId, _("Show &title ID"))->Check(GetColumnWidth(ColumnTitleID) > 0);
menu.Bind(wxEVT_COMMAND_MENU_SELECTED,
menu.Bind(wxEVT_MENU,
[this](wxCommandEvent& event) {
event.Skip();

View File

@@ -757,7 +757,7 @@ void wxTitleManagerList::OnContextMenu(wxContextMenuEvent& event)
return;
wxMenu menu;
menu.Bind(wxEVT_COMMAND_MENU_SELECTED, &wxTitleManagerList::OnContextMenuSelected, this);
menu.Bind(wxEVT_MENU, &wxTitleManagerList::OnContextMenuSelected, this);
const auto selection = GetFirstSelected();
if (selection == wxNOT_FOUND)

View File

@@ -237,7 +237,7 @@ void BreakpointWindow::OnRightDown(wxMouseEvent& event)
menu.Append(MENU_ID_CREATE_MEM_BP_READ, _("Create memory breakpoint (read)"));
menu.Append(MENU_ID_CREATE_MEM_BP_WRITE, _("Create memory breakpoint (write)"));
menu.Bind(wxEVT_COMMAND_MENU_SELECTED, &BreakpointWindow::OnContextMenuClick, this);
menu.Bind(wxEVT_MENU, &BreakpointWindow::OnContextMenuClick, this);
PopupMenu(&menu);
}
else
@@ -248,7 +248,7 @@ void BreakpointWindow::OnRightDown(wxMouseEvent& event)
wxMenu menu;
menu.Append(MENU_ID_DELETE_BP, _("Delete breakpoint"));
menu.Bind(wxEVT_COMMAND_MENU_SELECTED, &BreakpointWindow::OnContextMenuClickSelected, this);
menu.Bind(wxEVT_MENU, &BreakpointWindow::OnContextMenuClickSelected, this);
PopupMenu(&menu);
}
}
@@ -273,7 +273,7 @@ void BreakpointWindow::OnContextMenuClickSelected(wxCommandEvent& evt)
{
debugger_deleteBreakpoint(bpId);
wxCommandEvent evt(wxEVT_BREAKPOINT_CHANGE);
wxPostEvent(this->m_parent, evt);
wxPostEvent(this->GetParent(), evt);
}
debugger_unlockBreakpoints();
}

View File

@@ -68,7 +68,7 @@ wxBEGIN_EVENT_TABLE(DebuggerWindow2, wxFrame)
EVT_COMMAND(wxID_ANY, wxEVT_UPDATE_VIEW, DebuggerWindow2::OnUpdateView)
EVT_COMMAND(wxID_ANY, wxEVT_BREAKPOINT_CHANGE, DebuggerWindow2::OnBreakpointChange)
EVT_COMMAND(wxID_ANY, wxEVT_MOVE_TO_DISASM_ADDR, DebuggerWindow2::OnMoveToDisasmAddr)
EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_TOOL_CLICKED, DebuggerWindow2::OnToolClicked)
EVT_COMMAND(wxID_ANY, wxEVT_TOOL, DebuggerWindow2::OnToolClicked)
EVT_COMMAND(wxID_ANY, wxEVT_BREAKPOINT_HIT, DebuggerWindow2::OnBreakpointHit)
EVT_COMMAND(wxID_ANY, wxEVT_RUN, DebuggerWindow2::OnRunProgram)
EVT_COMMAND(wxID_ANY, wxEVT_NOTIFY_MODULE_LOADED, DebuggerWindow2::OnNotifyModuleLoaded)

View File

@@ -598,7 +598,7 @@ void DisasmCtrl::OnKeyPressed(sint32 key_code, const wxPoint& position)
debugger_toggleExecuteBreakpoint(*optVirtualAddress);
wxCommandEvent evt(wxEVT_BREAKPOINT_CHANGE);
wxPostEvent(this->m_parent, evt);
wxPostEvent(this->GetParent(), evt);
}
return;
}
@@ -660,7 +660,7 @@ void DisasmCtrl::OnMouseDClick(const wxPoint& position, uint32 line)
debugger_toggleExecuteBreakpoint(virtualAddress);
RefreshLine(line);
wxCommandEvent evt(wxEVT_BREAKPOINT_CHANGE);
wxPostEvent(this->m_parent, evt);
wxPostEvent(this->GetParent(), evt);
return;
}
else if (pos.x <= OFFSET_ADDRESS + OFFSET_ADDRESS_RELATIVE + OFFSET_DISASSEMBLY)
@@ -747,21 +747,21 @@ void DisasmCtrl::OnContextMenuEntryClicked(wxCommandEvent& event)
{
debugger_toggleExecuteBreakpoint(m_contextMenuAddress);
wxCommandEvent evt(wxEVT_BREAKPOINT_CHANGE);
wxPostEvent(this->m_parent, evt);
wxPostEvent(this->GetParent(), evt);
break;
}
case IDContextMenu_ToggleLoggingBreakpoint:
{
debugger_toggleLoggingBreakpoint(m_contextMenuAddress);
wxCommandEvent evt(wxEVT_BREAKPOINT_CHANGE);
wxPostEvent(this->m_parent, evt);
wxPostEvent(this->GetParent(), evt);
break;
}
case IDContextMenu_RestoreOriginalInstructions:
{
debugger_removePatch(m_contextMenuAddress);
wxCommandEvent evt(wxEVT_BREAKPOINT_CHANGE); // This also refreshes the disassembly view
wxPostEvent(this->m_parent, evt);
wxPostEvent(this->GetParent(), evt);
break;
}
case IDContextMenu_CopyAddress:

View File

@@ -127,7 +127,7 @@ RegisterWindow::RegisterWindow(DebuggerWindow2& parent, const wxPoint& main_posi
if (parent.GetConfig().data().pin_to_main)
OnMainMove(main_position, main_size);
//Bind(wxEVT_COMMAND_MENU_SELECTED, &RegisterWindow::OnValueContextMenuSelected, this, kContextMenuZero, kContextMenuGotoDump);
//Bind(wxEVT_MENU, &RegisterWindow::OnValueContextMenuSelected, this, kContextMenuZero, kContextMenuGotoDump);
}

View File

@@ -456,7 +456,7 @@ void DebugPPCThreadsWindow::OnThreadListRightClick(wxMouseEvent& event)
menu.AppendSeparator();
menu.Append(THREADLIST_MENU_DUMP_STACK_TRACE, _("Write stack trace to log"));
menu.Append(THREADLIST_MENU_PROFILE_THREAD, _("Profile thread"));
menu.Bind(wxEVT_COMMAND_MENU_SELECTED, &DebugPPCThreadsWindow::OnThreadListPopupClick, this);
menu.Bind(wxEVT_MENU, &DebugPPCThreadsWindow::OnThreadListPopupClick, this);
PopupMenu(&menu);
}