Permalink
Browse files

DolphinQt2: Don't show pop-ups in the middle of extracting a whole disc

  • Loading branch information...
JosJuice committed May 5, 2018
1 parent f48fac5 commit 33211d86903869e7bb23fa7b3d2f8e42fd592ba8
@@ -173,8 +173,13 @@ void FilesystemWidget::ShowContextMenu(const QPoint&)
AddAction(menu, tr("Extract System Data..."), this, [this, partition] {
auto folder = SelectFolder();
if (!folder.isEmpty())
ExtractSystemData(partition, folder);
if (folder.isEmpty())
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);
}
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());
if (success)
QMessageBox::information(nullptr, tr("Success"), tr("Successfully extracted system data."));
else
QMessageBox::critical(nullptr, tr("Error"), tr("Failed to extract system data."));
return DiscIO::ExportSystemData(*m_volume, partition, out.toStdString());
}
void FilesystemWidget::ExtractDirectory(const DiscIO::Partition& partition, const QString& path,
@@ -39,7 +39,7 @@ class FilesystemWidget final : public QWidget
void ExtractDirectory(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);
DiscIO::Partition GetPartitionFromID(int id);

0 comments on commit 33211d8

Please sign in to comment.