DolphinQt2: Don't show pop-ups in the middle of extracting a whole disc
This commit is contained in:
parent
f48fac5b55
commit
33211d8690
|
@ -173,8 +173,13 @@ void FilesystemWidget::ShowContextMenu(const QPoint&)
|
||||||
AddAction(menu, tr("Extract System Data..."), this, [this, partition] {
|
AddAction(menu, tr("Extract System Data..."), this, [this, partition] {
|
||||||
auto folder = SelectFolder();
|
auto folder = SelectFolder();
|
||||||
|
|
||||||
if (!folder.isEmpty())
|
if (folder.isEmpty())
|
||||||
ExtractSystemData(partition, folder);
|
return;
|
||||||
|
|
||||||
|
if (ExtractSystemData(partition, folder))
|
||||||
|
QMessageBox::information(nullptr, tr("Success"), tr("Successfully extracted system data."));
|
||||||
|
else
|
||||||
|
QMessageBox::critical(nullptr, tr("Error"), tr("Failed to extract system data."));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,14 +247,9 @@ void FilesystemWidget::ExtractPartition(const DiscIO::Partition& partition, cons
|
||||||
ExtractSystemData(partition, out);
|
ExtractSystemData(partition, out);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FilesystemWidget::ExtractSystemData(const DiscIO::Partition& partition, const QString& out)
|
bool FilesystemWidget::ExtractSystemData(const DiscIO::Partition& partition, const QString& out)
|
||||||
{
|
{
|
||||||
bool success = DiscIO::ExportSystemData(*m_volume, partition, out.toStdString());
|
return DiscIO::ExportSystemData(*m_volume, partition, out.toStdString());
|
||||||
|
|
||||||
if (success)
|
|
||||||
QMessageBox::information(nullptr, tr("Success"), tr("Successfully extracted system data."));
|
|
||||||
else
|
|
||||||
QMessageBox::critical(nullptr, tr("Error"), tr("Failed to extract system data."));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FilesystemWidget::ExtractDirectory(const DiscIO::Partition& partition, const QString& path,
|
void FilesystemWidget::ExtractDirectory(const DiscIO::Partition& partition, const QString& path,
|
||||||
|
|
|
@ -39,7 +39,7 @@ private:
|
||||||
void ExtractDirectory(const DiscIO::Partition& partition, const QString& path,
|
void ExtractDirectory(const DiscIO::Partition& partition, const QString& path,
|
||||||
const QString& out);
|
const QString& out);
|
||||||
void ExtractFile(const DiscIO::Partition& partition, const QString& path, const QString& out);
|
void ExtractFile(const DiscIO::Partition& partition, const QString& path, const QString& out);
|
||||||
void ExtractSystemData(const DiscIO::Partition& partition, const QString& out);
|
bool ExtractSystemData(const DiscIO::Partition& partition, const QString& out);
|
||||||
void CheckIntegrity(const DiscIO::Partition& partition);
|
void CheckIntegrity(const DiscIO::Partition& partition);
|
||||||
|
|
||||||
DiscIO::Partition GetPartitionFromID(int id);
|
DiscIO::Partition GetPartitionFromID(int id);
|
||||||
|
|
Loading…
Reference in New Issue