From 3c88b11e5df33116580ac008e36092775df66135 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Fri, 13 Mar 2026 12:24:18 -0700 Subject: [WARP] Improved UX and API - Exposes WARP type objects directly - Adds processor API (for generating warp files directly) - Adds file and chunk API - Misc cleanup - Simplified the amount of commands - Replaced the "Create" commands with a purpose built processor dialog - Added a native QT viewer for WARP files - Simplified committing to a remote with a purpose built commit dialog --- plugins/warp/ui/matches.cpp | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'plugins/warp/ui/matches.cpp') diff --git a/plugins/warp/ui/matches.cpp b/plugins/warp/ui/matches.cpp index cede06ab..918312fd 100644 --- a/plugins/warp/ui/matches.cpp +++ b/plugins/warp/ui/matches.cpp @@ -1,15 +1,13 @@ -#include -#include - #include "matches.h" +#include "theme.h" +#include "warp.h" +#include "shared/misc.h" #include #include #include - -#include "theme.h" -#include "warp.h" -#include "shared/misc.h" +#include +#include WarpCurrentFunctionWidget::WarpCurrentFunctionWidget(QWidget* parent) : QWidget(parent) { @@ -74,23 +72,24 @@ WarpCurrentFunctionWidget::WarpCurrentFunctionWidget(QWidget* parent) : QWidget( m_tableWidget->GetModel()->SetMatchedFunction(selectedFunction); }); // If the selected function is the current match, let the user remove the match. - m_tableWidget->RegisterContextMenuAction("Remove Match", + m_tableWidget->RegisterContextMenuAction( + "Remove Match", [this](WarpFunctionItem*, std::optional) { WarpRemoveMatchDialog dlg(this, m_current); if (dlg.execute()) m_tableWidget->GetModel()->SetMatchedFunction(nullptr); }, [this](WarpFunctionItem* item, std::optional) { - if (item == nullptr) - return false; - Warp::Ref selectedFunction = item->GetFunction(); - if (!selectedFunction) - return false; - Warp::Ref matchedFunction = m_tableWidget->GetModel()->GetMatchedFunction(); - if (!matchedFunction) - return false; - return BNWARPFunctionsEqual(selectedFunction->m_object, matchedFunction->m_object); - }); + if (item == nullptr) + return false; + Warp::Ref selectedFunction = item->GetFunction(); + if (!selectedFunction) + return false; + Warp::Ref matchedFunction = m_tableWidget->GetModel()->GetMatchedFunction(); + if (!matchedFunction) + return false; + return BNWARPFunctionsEqual(selectedFunction->m_object, matchedFunction->m_object); + }); m_tableWidget->RegisterContextMenuAction( "Search for Source", [this](WarpFunctionItem* item, std::optional) { // Apply the source as the filter. -- cgit v1.3.1