diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/settingsdialog.cpp | 11 | ||||
-rw-r--r-- | gui/settingsdialog.h | 2 | ||||
-rw-r--r-- | gui/settingsdialog.ui | 2 |
3 files changed, 13 insertions, 2 deletions
diff --git a/gui/settingsdialog.cpp b/gui/settingsdialog.cpp index 9736c1c7..b5ff8d56 100644 --- a/gui/settingsdialog.cpp +++ b/gui/settingsdialog.cpp @@ -13,10 +13,11 @@ * limitations under the License. */ +#include <MultiMC.h> #include "settingsdialog.h" #include "ui_settingsdialog.h" +#include "logic/JavaUtils.h" -#include <MultiMC.h> #include <settingsobject.h> #include <QFileDialog> #include <QMessageBox> @@ -180,3 +181,11 @@ void SettingsDialog::loadSettings(SettingsObject *s) ui->preLaunchCmdTextBox->setText(s->get("PreLaunchCommand").toString()); ui->postExitCmdTextBox->setText(s->get("PostExitCommand").toString()); } + +void SettingsDialog::on_pushButton_clicked() +{ + JavaUtils jut; + QStringList paths = jut.FindJavaPath(); + + ui->javaPathTextBox->setText(paths.at(0)); +} diff --git a/gui/settingsdialog.h b/gui/settingsdialog.h index b0a8c673..2611f105 100644 --- a/gui/settingsdialog.h +++ b/gui/settingsdialog.h @@ -53,6 +53,8 @@ private slots: void on_buttonBox_accepted(); + void on_pushButton_clicked(); + private: Ui::SettingsDialog *ui; }; diff --git a/gui/settingsdialog.ui b/gui/settingsdialog.ui index 0d30e301..f0cb5c3d 100644 --- a/gui/settingsdialog.ui +++ b/gui/settingsdialog.ui @@ -33,7 +33,7 @@ <enum>QTabWidget::Rounded</enum> </property> <property name="currentIndex"> - <number>0</number> + <number>2</number> </property> <widget class="QWidget" name="generalTab"> <attribute name="title"> |