diff options
| -rw-r--r-- | src/createinstancedialog.ui | 13 | ||||
| -rw-r--r-- | src/createinstancedialogpages.cpp | 13 | ||||
| -rw-r--r-- | src/createinstancedialogpages.h | 1 |
3 files changed, 19 insertions, 8 deletions
diff --git a/src/createinstancedialog.ui b/src/createinstancedialog.ui index 4d9d8b06..41703f5e 100644 --- a/src/createinstancedialog.ui +++ b/src/createinstancedialog.ui @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>493</width> - <height>423</height> + <height>444</height> </rect> </property> <property name="windowTitle"> @@ -58,7 +58,7 @@ <item> <widget class="QStackedWidget" name="pages"> <property name="currentIndex"> - <number>0</number> + <number>5</number> </property> <widget class="QWidget" name="page_10"> <layout class="QVBoxLayout" name="verticalLayout_21"> @@ -506,12 +506,15 @@ <property name="text"> <string><h3>Select a folder where the data should be stored.</h3></string> </property> + <property name="wordWrap"> + <bool>true</bool> + </property> </widget> </item> <item> - <widget class="QLabel" name="label_7"> + <widget class="QLabel" name="pathsLabel"> <property name="text"> - <string>This includes downloads, mods, profiles and overwrite. If there is enough space on this drive, you should use the default folder.</string> + <string>This includes downloads, mods, profiles and overwrite for your <b>%1</b> instance. If there is enough space on this drive, you should use the default folder.</string> </property> <property name="wordWrap"> <bool>true</bool> @@ -744,7 +747,7 @@ <item row="8" column="0" colspan="4"> <widget class="QLabel" name="label_11"> <property name="text"> - <string>Use <code>%BASE_DIR%</code> to refer to the Base Directory.</string> + <string>Use %BASE_DIR% to refer to the Base Directory.</string> </property> </widget> </item> diff --git a/src/createinstancedialogpages.cpp b/src/createinstancedialogpages.cpp index 4d2c5b8b..e5213d33 100644 --- a/src/createinstancedialogpages.cpp +++ b/src/createinstancedialogpages.cpp @@ -269,6 +269,10 @@ void GamePage::select(IPluginGame* game) m_selection = checked; selectButton(checked); updateNavigation(); + + if (checked) { + next(); + } } void GamePage::selectCustom() @@ -277,6 +281,7 @@ void GamePage::selectCustom() &m_dlg, QObject::tr("Find game installation")); if (path.isEmpty()) { + // reselect the previous button selectButton(m_selection); return; } @@ -408,7 +413,7 @@ QCommandLinkButton* GamePage::createCustomButton() QObject::connect(b, &QAbstractButton::clicked, [&] { selectCustom(); - }); + }); return b; } @@ -422,7 +427,7 @@ void GamePage::createGameButton(Game* g) QObject::connect(g->button, &QAbstractButton::clicked, [g, this] { select(g->game); - }); + }); } void GamePage::fillList() @@ -759,6 +764,7 @@ bool NamePage::checkName(QString parentDir, QString name) PathsPage::PathsPage(CreateInstanceDialog& dlg) : Page(dlg), m_lastType(CreateInstanceDialog::NoType), + m_label(ui->pathsLabel), m_simpleExists(ui->locationExists), m_simpleInvalid(ui->locationInvalid), m_advancedExists(ui->advancedDirExists), m_advancedInvalid(ui->advancedDirInvalid) @@ -793,6 +799,7 @@ void PathsPage::activated() checkPaths(); updateNavigation(); + m_label.setText(m_dlg.game()->gameName()); m_lastInstanceName = name; m_lastType = type; } @@ -868,7 +875,7 @@ void PathsPage::setPaths(const QString& name, bool force) path = root + "/" + name; } - path = QDir::toNativeSeparators(QDir(path).canonicalPath()); + path = QDir::toNativeSeparators(QDir::cleanPath(path)); setIfEmpty(ui->location, path, force); setIfEmpty(ui->base, path, force); diff --git a/src/createinstancedialogpages.h b/src/createinstancedialogpages.h index 0d210493..15e63a8f 100644 --- a/src/createinstancedialogpages.h +++ b/src/createinstancedialogpages.h @@ -179,6 +179,7 @@ public: private: QString m_lastInstanceName; CreateInstanceDialog::Types m_lastType; + PlaceholderLabel m_label; mutable PlaceholderLabel m_simpleExists, m_simpleInvalid; mutable PlaceholderLabel m_advancedExists, m_advancedInvalid; |
