summaryrefslogtreecommitdiff
path: root/plugins/warp/ui/shared/fetchdialog.cpp
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-10-03 20:23:31 -0400
committerMason Reed <mason@vector35.com>2025-10-03 20:23:36 -0400
commitbf38450d476e1629b1165e8f8e23ebf0abc0db63 (patch)
tree582e5695567d5ab5f25e88ba8cb6c3bcd9a9a76a /plugins/warp/ui/shared/fetchdialog.cpp
parent22c39b0af205075a3dcc49fe095d2460a1f838f9 (diff)
[WARP] Add option to reset allowed tags in fetch dialog
Diffstat (limited to 'plugins/warp/ui/shared/fetchdialog.cpp')
-rw-r--r--plugins/warp/ui/shared/fetchdialog.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/plugins/warp/ui/shared/fetchdialog.cpp b/plugins/warp/ui/shared/fetchdialog.cpp
index 0230ad51..4b72e840 100644
--- a/plugins/warp/ui/shared/fetchdialog.cpp
+++ b/plugins/warp/ui/shared/fetchdialog.cpp
@@ -39,11 +39,20 @@ WarpFetchDialog::WarpFetchDialog(BinaryViewRef bv,
// Tags editor
m_tagsList = new QListWidget(this);
- m_addTagBtn = new QPushButton("Add", this);
- m_removeTagBtn = new QPushButton("Remove", this);
+ m_addTagBtn = new QPushButton(this);
+ m_addTagBtn->setText("+");
+ m_addTagBtn->setToolTip("Add tag");
+ m_removeTagBtn = new QPushButton(this);
+ m_removeTagBtn->setText("-");
+ m_removeTagBtn->setToolTip("Remove selected tag(s)");
+ m_resetTagBtn = new QPushButton(this);
+ m_resetTagBtn->setText("Reset");
+ m_resetTagBtn->setToolTip("Reset tags to: official, trusted");
auto tagBtnRow = new QHBoxLayout();
tagBtnRow->addWidget(m_addTagBtn);
tagBtnRow->addWidget(m_removeTagBtn);
+ tagBtnRow->addWidget(m_resetTagBtn);
+ tagBtnRow->addStretch();
auto tagCol = new QVBoxLayout();
tagCol->addWidget(m_tagsList);
tagCol->addLayout(tagBtnRow);
@@ -95,6 +104,7 @@ WarpFetchDialog::WarpFetchDialog(BinaryViewRef bv,
// Wire buttons
connect(m_addTagBtn, &QPushButton::clicked, this, &WarpFetchDialog::onAddTag);
connect(m_removeTagBtn, &QPushButton::clicked, this, &WarpFetchDialog::onRemoveTag);
+ connect(m_resetTagBtn, &QPushButton::clicked, this, &WarpFetchDialog::onResetTags);
}
void WarpFetchDialog::populateContainers()
@@ -116,6 +126,13 @@ void WarpFetchDialog::onRemoveTag()
delete item;
}
+void WarpFetchDialog::onResetTags()
+{
+ m_tagsList->clear();
+ AddListItem(m_tagsList, "official");
+ AddListItem(m_tagsList, "trusted");
+}
+
std::vector<Warp::SourceTag> WarpFetchDialog::collectTags() const
{
std::vector<Warp::SourceTag> out;