mirror of
https://github.com/stenzek/duckstation.git
synced 2026-07-11 01:24:11 +02:00
Qt: Remove multiple sources of truth for supported formats
Setup wizard was outdated.
This commit is contained in:
@@ -75,7 +75,7 @@ static constexpr QSize ACHIEVEMENT_PIXMAP_SIZE(16, 16);
|
||||
static constexpr QSize COMPATIBILITY_PIXMAP_SIZE(96, 24);
|
||||
|
||||
static const char* SUPPORTED_FORMATS_STRING =
|
||||
QT_TRANSLATE_NOOP(GameListWidget, ".cue (Cue Sheets)\n"
|
||||
QT_TRANSLATE_NOOP("GameListWidget", ".cue (Cue Sheets)\n"
|
||||
".iso (Single Track Image)\n"
|
||||
".ecm (Error Code Modeling Image)\n"
|
||||
".mds (Media Descriptor Sidecar)\n"
|
||||
@@ -1921,6 +1921,11 @@ GameListWidget::GameListWidget(QWidget* parent, QAction* action_view_list, QActi
|
||||
|
||||
GameListWidget::~GameListWidget() = default;
|
||||
|
||||
QString GameListWidget::getSupportedFormatsString()
|
||||
{
|
||||
return qApp->translate("GameListWidget", SUPPORTED_FORMATS_STRING);
|
||||
}
|
||||
|
||||
bool GameListWidget::isShowingGameList() const
|
||||
{
|
||||
return (m_ui.stack->currentIndex() == VIEW_MODE_LIST);
|
||||
|
||||
@@ -292,6 +292,9 @@ public:
|
||||
void setShowCoverTitles(bool enabled);
|
||||
void focusSearchWidget();
|
||||
|
||||
// Returns translated supported formats string. Formats are separated by newlines.
|
||||
static QString getSupportedFormatsString();
|
||||
|
||||
Q_SIGNALS:
|
||||
void refreshProgress(const QString& status, int current, int total);
|
||||
void refreshComplete();
|
||||
|
||||
@@ -177,7 +177,7 @@ void SetupWizardDialog::setupUi()
|
||||
|
||||
setupLanguagePage(true);
|
||||
setupBIOSPage();
|
||||
setupGameListPage();
|
||||
setupGameListPage(true);
|
||||
setupControllerPage(true);
|
||||
setupGraphicsPage(true);
|
||||
setupAchievementsPage(true);
|
||||
@@ -210,6 +210,7 @@ void SetupWizardDialog::languageChanged()
|
||||
QtHost::UpdateApplicationLanguage(this);
|
||||
m_ui.retranslateUi(this);
|
||||
setupLanguagePage(false);
|
||||
setupGameListPage(false);
|
||||
setupControllerPage(false);
|
||||
setupGraphicsPage(false);
|
||||
setupAchievementsPage(false);
|
||||
@@ -240,8 +241,13 @@ void SetupWizardDialog::refreshBiosList()
|
||||
BIOSSettingsWidget::setDropDownValue(m_ui.imagePAL, Core::GetBaseStringSettingValue("BIOS", "PathPAL"), false);
|
||||
}
|
||||
|
||||
void SetupWizardDialog::setupGameListPage()
|
||||
void SetupWizardDialog::setupGameListPage(bool initial)
|
||||
{
|
||||
m_ui.gameDirectoriesDescription->setText(
|
||||
m_ui.gameDirectoriesDescription->text().arg(GameListWidget::getSupportedFormatsString().split('\n').join(", ")));
|
||||
if (!initial)
|
||||
return;
|
||||
|
||||
m_directory_model = new GameListSearchDirectoriesModel(this);
|
||||
m_ui.searchDirectoryList->setModel(m_directory_model);
|
||||
QtUtils::SetColumnWidthsForTreeView(m_ui.searchDirectoryList, {-1, 100});
|
||||
|
||||
@@ -40,7 +40,7 @@ private:
|
||||
void setupUi();
|
||||
void setupLanguagePage(bool initial);
|
||||
void setupBIOSPage();
|
||||
void setupGameListPage();
|
||||
void setupGameListPage(bool initial);
|
||||
void setupControllerPage(bool initial);
|
||||
void setupGraphicsPage(bool initial);
|
||||
void updateResolutionScaleWarning();
|
||||
|
||||
@@ -486,7 +486,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="gameDirectoriesDescription">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>DuckStation will automatically scan and identify games from the selected directories below, and populate the game list. These games should be dumped from discs you own. Utilities such as ImgBurn can be used to create images of game discs in .bin/.cue format.</p><p>Supported formats for dumps include: <span style=" font-weight:700;">.cue</span> (Cue Sheets), <span style=" font-weight:700;">.iso/.img</span> (Single Track Image), <span style=" font-weight:700;">.ecm</span> (Error Code Modeling Image), <span style=" font-weight:700;">.mds</span> (Media Descriptor Sidecar), <span style=" font-weight:700;">.chd</span> (Compressed Hunks of Data), <span style=" font-weight:700;">.pbp</span> (PlayStation Portable, Only Decrypted).</p></body></html></string>
|
||||
<string><html><head/><body><p>DuckStation will automatically scan and identify games from the selected directories below, and populate the game list. These games should be dumped from discs you own. Utilities such as ImgBurn can be used to create images of game discs in .bin/.cue format.</p><p>Supported formats for dumps include: %1</p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop</set>
|
||||
|
||||
Reference in New Issue
Block a user