Confirm recursive deletion and localize removal progress
This commit is contained in:
1 parent
7244f22722
commit
afc54eae00
3 files changed
+31
-6
No files matched your search
@@ -642,8 +642,9 @@ void MemberFileBrowser::mutate(uint8_t command) {
|
||||
auto entries = selectedEntries(); if (entries.isEmpty()) return;
|
||||
QPointer<MemberFileBrowser> guard(this);
|
||||
m_dropId = requestId(); updateActions();
|
||||
QString prompt = entries.size() == 1 ? text("Delete %1?").arg(entries.first().remote) :
|
||||
text("Delete %1 selected entries? Non-empty folders will not be removed.").arg(entries.size());
|
||||
QString prompt = entries.size() == 1
|
||||
? (entries.first().directory ? text("Delete %1 and all its contents?") : text("Delete %1?")).arg(entries.first().remote)
|
||||
: text("Delete %1 selected entries and all folder contents?").arg(entries.size());
|
||||
auto answer = QMessageBox::question(this, text("Delete"), prompt, QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
|
||||
if (!guard) return;
|
||||
bool cancelled = !m_dropId; m_dropId = 0; updateActions();
|
||||
|
||||
Reference in new issue
Block a user