Merge pull request #7200 from Techjar/qt-dialog-fixes-2-electric-boogaloo
Qt: Various dialog fixes
This commit is contained in:
commit
47c5a2f7ed
|
@ -153,9 +153,9 @@ void FilesystemWidget::PopulateDirectory(int partition_id, QStandardItem* root,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static QString SelectFolder()
|
QString FilesystemWidget::SelectFolder()
|
||||||
{
|
{
|
||||||
return QFileDialog::getExistingDirectory(nullptr, QObject::tr("Choose the folder to extract to"));
|
return QFileDialog::getExistingDirectory(this, QObject::tr("Choose the folder to extract to"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FilesystemWidget::ShowContextMenu(const QPoint&)
|
void FilesystemWidget::ShowContextMenu(const QPoint&)
|
||||||
|
@ -197,9 +197,9 @@ void FilesystemWidget::ShowContextMenu(const QPoint&)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ExtractSystemData(partition, folder))
|
if (ExtractSystemData(partition, folder))
|
||||||
QMessageBox::information(nullptr, tr("Success"), tr("Successfully extracted system data."));
|
QMessageBox::information(this, tr("Success"), tr("Successfully extracted system data."));
|
||||||
else
|
else
|
||||||
QMessageBox::critical(nullptr, tr("Error"), tr("Failed to extract system data."));
|
QMessageBox::critical(this, tr("Error"), tr("Failed to extract system data."));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -291,6 +291,7 @@ void FilesystemWidget::ExtractDirectory(const DiscIO::Partition& partition, cons
|
||||||
dialog->setMinimum(0);
|
dialog->setMinimum(0);
|
||||||
dialog->setMaximum(size);
|
dialog->setMaximum(size);
|
||||||
dialog->show();
|
dialog->show();
|
||||||
|
dialog->setWindowTitle(tr("Progress"));
|
||||||
|
|
||||||
bool all = path.isEmpty();
|
bool all = path.isEmpty();
|
||||||
|
|
||||||
|
@ -320,9 +321,9 @@ void FilesystemWidget::ExtractFile(const DiscIO::Partition& partition, const QSt
|
||||||
*m_volume, partition, filesystem->FindFileInfo(path.toStdString()).get(), out.toStdString());
|
*m_volume, partition, filesystem->FindFileInfo(path.toStdString()).get(), out.toStdString());
|
||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
QMessageBox::information(nullptr, tr("Success"), tr("Successfully extracted file."));
|
QMessageBox::information(this, tr("Success"), tr("Successfully extracted file."));
|
||||||
else
|
else
|
||||||
QMessageBox::critical(nullptr, tr("Error"), tr("Failed to extract file."));
|
QMessageBox::critical(this, tr("Error"), tr("Failed to extract file."));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FilesystemWidget::CheckIntegrity(const DiscIO::Partition& partition)
|
void FilesystemWidget::CheckIntegrity(const DiscIO::Partition& partition)
|
||||||
|
@ -345,10 +346,10 @@ void FilesystemWidget::CheckIntegrity(const DiscIO::Partition& partition)
|
||||||
dialog->close();
|
dialog->close();
|
||||||
|
|
||||||
if (is_valid.get())
|
if (is_valid.get())
|
||||||
QMessageBox::information(nullptr, tr("Success"),
|
QMessageBox::information(this, tr("Success"),
|
||||||
tr("Integrity check completed. No errors have been found."));
|
tr("Integrity check completed. No errors have been found."));
|
||||||
else
|
else
|
||||||
QMessageBox::critical(nullptr, tr("Error"),
|
QMessageBox::critical(this, tr("Error"),
|
||||||
tr("Integrity check for partition failed. The disc image is most "
|
tr("Integrity check for partition failed. The disc image is most "
|
||||||
"likely corrupted or has been patched incorrectly."));
|
"likely corrupted or has been patched incorrectly."));
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,8 @@ private:
|
||||||
void PopulateDirectory(int partition_id, QStandardItem* root, const DiscIO::Partition& partition);
|
void PopulateDirectory(int partition_id, QStandardItem* root, const DiscIO::Partition& partition);
|
||||||
void PopulateDirectory(int partition_id, QStandardItem* root, const DiscIO::FileInfo& directory);
|
void PopulateDirectory(int partition_id, QStandardItem* root, const DiscIO::FileInfo& directory);
|
||||||
|
|
||||||
|
QString SelectFolder();
|
||||||
|
|
||||||
void ShowContextMenu(const QPoint&);
|
void ShowContextMenu(const QPoint&);
|
||||||
|
|
||||||
void ExtractPartition(const DiscIO::Partition& partition, const QString& out);
|
void ExtractPartition(const DiscIO::Partition& partition, const QString& out);
|
||||||
|
|
|
@ -475,6 +475,9 @@ void GameList::CompressISO(bool decompress)
|
||||||
QProgressDialog progress_dialog(decompress ? tr("Decompressing...") : tr("Compressing..."),
|
QProgressDialog progress_dialog(decompress ? tr("Decompressing...") : tr("Compressing..."),
|
||||||
tr("Abort"), 0, 100, this);
|
tr("Abort"), 0, 100, this);
|
||||||
progress_dialog.setWindowModality(Qt::WindowModal);
|
progress_dialog.setWindowModality(Qt::WindowModal);
|
||||||
|
progress_dialog.setWindowFlags(progress_dialog.windowFlags() &
|
||||||
|
~Qt::WindowContextHelpButtonHint);
|
||||||
|
progress_dialog.setWindowTitle(tr("Progress"));
|
||||||
|
|
||||||
bool good;
|
bool good;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue