@@ -39,11 +39,20 @@ WarpFetchDialog::WarpFetchDialog(BinaryViewRef bv,
3939
4040 // Tags editor
4141 m_tagsList = new QListWidget (this );
42- m_addTagBtn = new QPushButton (" Add" , this );
43- m_removeTagBtn = new QPushButton (" Remove" , this );
42+ m_addTagBtn = new QPushButton (this );
43+ m_addTagBtn->setText (" +" );
44+ m_addTagBtn->setToolTip (" Add tag" );
45+ m_removeTagBtn = new QPushButton (this );
46+ m_removeTagBtn->setText (" -" );
47+ m_removeTagBtn->setToolTip (" Remove selected tag(s)" );
48+ m_resetTagBtn = new QPushButton (this );
49+ m_resetTagBtn->setText (" Reset" );
50+ m_resetTagBtn->setToolTip (" Reset tags to: official, trusted" );
4451 auto tagBtnRow = new QHBoxLayout ();
4552 tagBtnRow->addWidget (m_addTagBtn);
4653 tagBtnRow->addWidget (m_removeTagBtn);
54+ tagBtnRow->addWidget (m_resetTagBtn);
55+ tagBtnRow->addStretch ();
4756 auto tagCol = new QVBoxLayout ();
4857 tagCol->addWidget (m_tagsList);
4958 tagCol->addLayout (tagBtnRow);
@@ -95,6 +104,7 @@ WarpFetchDialog::WarpFetchDialog(BinaryViewRef bv,
95104 // Wire buttons
96105 connect (m_addTagBtn, &QPushButton::clicked, this , &WarpFetchDialog::onAddTag);
97106 connect (m_removeTagBtn, &QPushButton::clicked, this , &WarpFetchDialog::onRemoveTag);
107+ connect (m_resetTagBtn, &QPushButton::clicked, this , &WarpFetchDialog::onResetTags);
98108}
99109
100110void WarpFetchDialog::populateContainers ()
@@ -116,6 +126,13 @@ void WarpFetchDialog::onRemoveTag()
116126 delete item;
117127}
118128
129+ void WarpFetchDialog::onResetTags ()
130+ {
131+ m_tagsList->clear ();
132+ AddListItem (m_tagsList, " official" );
133+ AddListItem (m_tagsList, " trusted" );
134+ }
135+
119136std::vector<Warp::SourceTag> WarpFetchDialog::collectTags () const
120137{
121138 std::vector<Warp::SourceTag> out;
0 commit comments