diff options
Diffstat (limited to 'gui/dialogs')
-rw-r--r-- | gui/dialogs/CopyInstanceDialog.cpp | 2 | ||||
-rw-r--r-- | gui/dialogs/IconPickerDialog.cpp | 2 | ||||
-rw-r--r-- | gui/dialogs/NewInstanceDialog.cpp | 2 | ||||
-rw-r--r-- | gui/dialogs/SettingsDialog.cpp | 14 | ||||
-rw-r--r-- | gui/dialogs/SettingsDialog.h | 3 | ||||
-rw-r--r-- | gui/dialogs/SettingsDialog.ui | 23 |
6 files changed, 40 insertions, 6 deletions
diff --git a/gui/dialogs/CopyInstanceDialog.cpp b/gui/dialogs/CopyInstanceDialog.cpp index 9d7ac30c..4095408b 100644 --- a/gui/dialogs/CopyInstanceDialog.cpp +++ b/gui/dialogs/CopyInstanceDialog.cpp @@ -27,7 +27,7 @@ #include "logic/InstanceFactory.h" #include "logic/BaseVersion.h" -#include "logic/lists/IconList.h" +#include "logic/icons/IconList.h" #include "logic/lists/MinecraftVersionList.h" #include "logic/tasks/Task.h" #include "logic/BaseInstance.h" diff --git a/gui/dialogs/IconPickerDialog.cpp b/gui/dialogs/IconPickerDialog.cpp index 99d6dc9a..cb832d95 100644 --- a/gui/dialogs/IconPickerDialog.cpp +++ b/gui/dialogs/IconPickerDialog.cpp @@ -25,7 +25,7 @@ #include "gui/Platform.h" #include "gui/widgets/InstanceDelegate.h" -#include "logic/lists/IconList.h" +#include "logic/icons/IconList.h" IconPickerDialog::IconPickerDialog(QWidget *parent) : QDialog(parent), ui(new Ui::IconPickerDialog) diff --git a/gui/dialogs/NewInstanceDialog.cpp b/gui/dialogs/NewInstanceDialog.cpp index 5b2cd086..c7b273af 100644 --- a/gui/dialogs/NewInstanceDialog.cpp +++ b/gui/dialogs/NewInstanceDialog.cpp @@ -19,7 +19,7 @@ #include "logic/InstanceFactory.h" #include "logic/BaseVersion.h" -#include "logic/lists/IconList.h" +#include "logic/icons/IconList.h" #include "logic/lists/MinecraftVersionList.h" #include "logic/tasks/Task.h" diff --git a/gui/dialogs/SettingsDialog.cpp b/gui/dialogs/SettingsDialog.cpp index 30a973da..569c8f63 100644 --- a/gui/dialogs/SettingsDialog.cpp +++ b/gui/dialogs/SettingsDialog.cpp @@ -102,6 +102,18 @@ void SettingsDialog::on_instDirBrowseBtn_clicked() ui->instDirTextBox->setText(cooked_dir); } } +void SettingsDialog::on_iconsDirBrowseBtn_clicked() +{ + QString raw_dir = QFileDialog::getExistingDirectory(this, tr("Icons Directory"), + ui->iconsDirTextBox->text()); + QString cooked_dir = NormalizePath(raw_dir); + + // do not allow current dir - it's dirty. Do not allow dirs that don't exist + if (!cooked_dir.isEmpty() && QDir(cooked_dir).exists()) + { + ui->iconsDirTextBox->setText(cooked_dir); + } +} void SettingsDialog::on_modsDirBrowseBtn_clicked() { @@ -205,6 +217,7 @@ void SettingsDialog::applySettings(SettingsObject *s) s->set("InstanceDir", ui->instDirTextBox->text()); s->set("CentralModsDir", ui->modsDirTextBox->text()); s->set("LWJGLDir", ui->lwjglDirTextBox->text()); + s->set("IconsDir", ui->iconsDirTextBox->text()); // Editors QString jsonEditor = ui->jsonEditorTextBox->text(); @@ -271,6 +284,7 @@ void SettingsDialog::loadSettings(SettingsObject *s) ui->instDirTextBox->setText(s->get("InstanceDir").toString()); ui->modsDirTextBox->setText(s->get("CentralModsDir").toString()); ui->lwjglDirTextBox->setText(s->get("LWJGLDir").toString()); + ui->iconsDirTextBox->setText(s->get("IconsDir").toString()); // Editors ui->jsonEditorTextBox->setText(s->get("JsonEditor").toString()); diff --git a/gui/dialogs/SettingsDialog.h b/gui/dialogs/SettingsDialog.h index 01357c91..bcf57a80 100644 --- a/gui/dialogs/SettingsDialog.h +++ b/gui/dialogs/SettingsDialog.h @@ -55,8 +55,11 @@ slots: void on_lwjglDirBrowseBtn_clicked(); + void on_jsonEditorBrowseBtn_clicked(); + void on_iconsDirBrowseBtn_clicked(); + void on_maximizedCheckBox_clicked(bool checked); void on_buttonBox_accepted(); diff --git a/gui/dialogs/SettingsDialog.ui b/gui/dialogs/SettingsDialog.ui index ec4d156e..dbc8ca88 100644 --- a/gui/dialogs/SettingsDialog.ui +++ b/gui/dialogs/SettingsDialog.ui @@ -215,6 +215,9 @@ <item row="1" column="1"> <widget class="QLineEdit" name="modsDirTextBox"/> </item> + <item row="2" column="1"> + <widget class="QLineEdit" name="lwjglDirTextBox"/> + </item> <item row="1" column="2"> <widget class="QToolButton" name="modsDirBrowseBtn"> <property name="text"> @@ -229,9 +232,6 @@ </property> </widget> </item> - <item row="2" column="1"> - <widget class="QLineEdit" name="lwjglDirTextBox"/> - </item> <item row="2" column="2"> <widget class="QToolButton" name="lwjglDirBrowseBtn"> <property name="text"> @@ -239,6 +239,23 @@ </property> </widget> </item> + <item row="3" column="1"> + <widget class="QLineEdit" name="iconsDirTextBox"/> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="labelIconsDir"> + <property name="text"> + <string>Icons:</string> + </property> + </widget> + </item> + <item row="3" column="2"> + <widget class="QToolButton" name="iconsDirBrowseBtn"> + <property name="text"> + <string>...</string> + </property> + </widget> + </item> </layout> </widget> </item> |