summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorSky <git@bunnies.cc>2013-10-06 19:54:52 +0100
committerSky <git@bunnies.cc>2013-10-06 19:54:52 +0100
commit17c98655f86f8ea41c4528e3fc25d12388a36861 (patch)
tree38591551b6bfe792ffd287ec68831b9801e0260e /gui
parentd5e4802adef575d1d2d20a3e6e5addd4b5f4d2ca (diff)
downloadMultiMC-17c98655f86f8ea41c4528e3fc25d12388a36861.tar
MultiMC-17c98655f86f8ea41c4528e3fc25d12388a36861.tar.gz
MultiMC-17c98655f86f8ea41c4528e3fc25d12388a36861.tar.lz
MultiMC-17c98655f86f8ea41c4528e3fc25d12388a36861.tar.xz
MultiMC-17c98655f86f8ea41c4528e3fc25d12388a36861.zip
First draft of multiple Java installation detection on Windows
Diffstat (limited to 'gui')
-rw-r--r--gui/settingsdialog.cpp4
-rw-r--r--gui/settingsdialog.ui18
2 files changed, 17 insertions, 5 deletions
diff --git a/gui/settingsdialog.cpp b/gui/settingsdialog.cpp
index c6fe893d..011925b7 100644
--- a/gui/settingsdialog.cpp
+++ b/gui/settingsdialog.cpp
@@ -185,9 +185,9 @@ void SettingsDialog::loadSettings(SettingsObject *s)
void SettingsDialog::on_pushButton_clicked()
{
JavaUtils jut;
- QStringList paths = jut.FindJavaPath();
+ auto javas = jut.FindJavaPaths();
- ui->javaPathTextBox->setText(paths.at(0));
+ ui->javaPathTextBox->setText(std::get<JI_PATH>(javas.at(0)));
}
void SettingsDialog::on_btnBrowse_clicked()
diff --git a/gui/settingsdialog.ui b/gui/settingsdialog.ui
index d7a134fb..8fa5e96e 100644
--- a/gui/settingsdialog.ui
+++ b/gui/settingsdialog.ui
@@ -374,6 +374,12 @@
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="labelJavaPath">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string>Java path:</string>
</property>
@@ -381,6 +387,12 @@
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelJVMArgs">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
<string>JVM arguments:</string>
</property>
@@ -402,9 +414,6 @@
<item row="0" column="1" colspan="3">
<widget class="QLineEdit" name="javaPathTextBox"/>
</item>
- <item row="2" column="1" colspan="3">
- <widget class="QLineEdit" name="jvmArgsTextBox"/>
- </item>
<item row="1" column="2">
<widget class="QPushButton" name="pushButton">
<property name="sizePolicy">
@@ -418,6 +427,9 @@
</property>
</widget>
</item>
+ <item row="2" column="1" colspan="3">
+ <widget class="QLineEdit" name="jvmArgsTextBox"/>
+ </item>
</layout>
</widget>
</item>