Commit b7c06968 authored by Johannes Zarl-Zierl's avatar Johannes Zarl-Zierl
Browse files

DuplicateMerger: add option to just block image from DB.

CCBUG: 320635
parent 6e5bb118
......@@ -55,12 +55,14 @@ DuplicateMerger::DuplicateMerger(QWidget *parent) :
topLayout->addWidget(label);
_trash = new QRadioButton(i18n("Move to &trash"));
QRadioButton* deleteFromDisk = new QRadioButton(i18n("&Delete from disk"));
_deleteFromDisk = new QRadioButton(i18n("&Delete from disk"));
QRadioButton* blockFromDB = new QRadioButton(i18n("&Block from database"));
_trash->setChecked(true);
topLayout->addSpacing(10);
topLayout->addWidget(_trash);
topLayout->addWidget(deleteFromDisk);
topLayout->addWidget(_deleteFromDisk);
topLayout->addWidget(blockFromDB);
topLayout->addSpacing(10);
QScrollArea* scrollArea = new QScrollArea;
......@@ -100,8 +102,13 @@ void DuplicateMerger::selectNone()
void DuplicateMerger::go()
{
Utilities::DeleteMethod method = Utilities::BlockFromDatabase;
if (_trash->isChecked())
method = Utilities::MoveToTrash;
else if (_deleteFromDisk->isChecked())
method = Utilities::DeleteFromDisk;
Q_FOREACH( DuplicateMatch* selector, m_selectors) {
selector->execute(_trash->isChecked() ? Utilities::MoveToTrash : Utilities::DeleteFromDisk );
selector->execute(method);
}
}
......
......@@ -60,6 +60,7 @@ private:
QVBoxLayout* m_scrollLayout;
QList<DuplicateMatch*> m_selectors;
QRadioButton* _trash;
QRadioButton *_deleteFromDisk;
QLabel* m_selectionCount;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment