summaryrefslogtreecommitdiffstats
path: root/gui/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'gui/dialogs')
-rw-r--r--gui/dialogs/NewInstanceDialog.cpp9
-rw-r--r--gui/dialogs/NewInstanceDialog.ui77
2 files changed, 49 insertions, 37 deletions
diff --git a/gui/dialogs/NewInstanceDialog.cpp b/gui/dialogs/NewInstanceDialog.cpp
index 51060ad2..adb5c950 100644
--- a/gui/dialogs/NewInstanceDialog.cpp
+++ b/gui/dialogs/NewInstanceDialog.cpp
@@ -98,11 +98,10 @@ NewInstanceDialog::~NewInstanceDialog()
void NewInstanceDialog::updateDialogState()
{
- ui->buttonBox->button(QDialogButtonBox::Ok)
- ->setEnabled(!instName().isEmpty()
- && m_selectedVersion
- && (!ui->modpackBox->isChecked()
- || ui->modpackEdit->hasAcceptableInput()));
+ bool allowOK = !instName().isEmpty() &&
+ (ui->versionBox->isChecked() && m_selectedVersion ||
+ (ui->modpackBox->isChecked() && ui->modpackEdit->hasAcceptableInput()));
+ ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(allowOK);
}
void NewInstanceDialog::setSelectedVersion(BaseVersionPtr version, bool initial)
diff --git a/gui/dialogs/NewInstanceDialog.ui b/gui/dialogs/NewInstanceDialog.ui
index adb7fa54..6cb0c97c 100644
--- a/gui/dialogs/NewInstanceDialog.ui
+++ b/gui/dialogs/NewInstanceDialog.ui
@@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>345</width>
- <height>343</height>
+ <width>277</width>
+ <height>404</height>
</rect>
</property>
<property name="windowTitle">
@@ -83,15 +83,8 @@
</widget>
</item>
<item>
- <layout class="QGridLayout" name="gridLayout">
- <item row="1" column="2">
- <widget class="QToolButton" name="btnChangeVersion">
- <property name="text">
- <string>...</string>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
<widget class="QLabel" name="labelVersion_3">
<property name="text">
<string>&amp;Group:</string>
@@ -101,7 +94,7 @@
</property>
</widget>
</item>
- <item row="0" column="1" colspan="2">
+ <item>
<widget class="QComboBox" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@@ -114,46 +107,57 @@
</property>
</widget>
</item>
- <item row="2" column="1">
- <widget class="QLineEdit" name="modpackEdit">
+ </layout>
+ </item>
+ <item>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="4" column="2">
+ <widget class="QToolButton" name="modpackBtn">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
- <string>http://</string>
+ <string>...</string>
</property>
</widget>
</item>
- <item row="2" column="2">
- <widget class="QToolButton" name="modpackBtn">
+ <item row="4" column="0" colspan="2">
+ <widget class="QLineEdit" name="modpackEdit">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
- <string>...</string>
+ <string>http://</string>
</property>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QRadioButton" name="versionBox">
- <property name="text">
- <string>&amp;Version:</string>
- </property>
- <property name="checked">
+ <item row="2" column="0" colspan="2">
+ <widget class="QLineEdit" name="versionTextBox">
+ <property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
- <item row="2" column="0">
+ <item row="2" column="2">
+ <widget class="QToolButton" name="btnChangeVersion">
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" colspan="3">
<widget class="QRadioButton" name="modpackBox">
<property name="text">
- <string>Import &amp;Modpack:</string>
+ <string>Impor&amp;t Modpack (local file or link):</string>
</property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="versionTextBox">
- <property name="readOnly">
+ <item row="1" column="0" colspan="3">
+ <widget class="QRadioButton" name="versionBox">
+ <property name="text">
+ <string>Vani&amp;lla Minecraft (select version):</string>
+ </property>
+ <property name="checked">
<bool>true</bool>
</property>
</widget>
@@ -192,9 +196,18 @@
</item>
</layout>
</widget>
- <resources>
- <include location="../../graphics.qrc"/>
- </resources>
+ <tabstops>
+ <tabstop>instNameTextBox</tabstop>
+ <tabstop>groupBox</tabstop>
+ <tabstop>versionBox</tabstop>
+ <tabstop>versionTextBox</tabstop>
+ <tabstop>btnChangeVersion</tabstop>
+ <tabstop>modpackBox</tabstop>
+ <tabstop>modpackEdit</tabstop>
+ <tabstop>modpackBtn</tabstop>
+ <tabstop>iconButton</tabstop>
+ </tabstops>
+ <resources/>
<connections>
<connection>
<sender>buttonBox</sender>