diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-02-01 11:44:47 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-04-12 20:57:16 +0200 |
commit | aa70ed2244700dbcc93c1fadb22edc1c1caede37 (patch) | |
tree | 79fc6703e984edc4d631be8c6f40c71400f88aba /gui/dialogs | |
parent | 154d19bb74f4c5fc1519aa40cd9dfd20244273a1 (diff) | |
download | MultiMC-aa70ed2244700dbcc93c1fadb22edc1c1caede37.tar MultiMC-aa70ed2244700dbcc93c1fadb22edc1c1caede37.tar.gz MultiMC-aa70ed2244700dbcc93c1fadb22edc1c1caede37.tar.lz MultiMC-aa70ed2244700dbcc93c1fadb22edc1c1caede37.tar.xz MultiMC-aa70ed2244700dbcc93c1fadb22edc1c1caede37.zip |
SCRATCH move icons over to Env, instance proxy model to gui
Diffstat (limited to 'gui/dialogs')
-rw-r--r-- | gui/dialogs/CopyInstanceDialog.cpp | 6 | ||||
-rw-r--r-- | gui/dialogs/IconPickerDialog.cpp | 8 | ||||
-rw-r--r-- | gui/dialogs/NewInstanceDialog.cpp | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/gui/dialogs/CopyInstanceDialog.cpp b/gui/dialogs/CopyInstanceDialog.cpp index 80418e14..038fb896 100644 --- a/gui/dialogs/CopyInstanceDialog.cpp +++ b/gui/dialogs/CopyInstanceDialog.cpp @@ -29,7 +29,7 @@ #include "logic/icons/IconList.h" #include "logic/tasks/Task.h" #include "logic/BaseInstance.h" -#include <logic/InstanceList.h> +#include "logic/InstanceList.h" CopyInstanceDialog::CopyInstanceDialog(InstancePtr original, QWidget *parent) :QDialog(parent), ui(new Ui::CopyInstanceDialog), m_original(original) @@ -40,7 +40,7 @@ CopyInstanceDialog::CopyInstanceDialog(InstancePtr original, QWidget *parent) layout()->setSizeConstraint(QLayout::SetFixedSize); InstIconKey = original->iconKey(); - ui->iconButton->setIcon(MMC->icons()->getIcon(InstIconKey)); + ui->iconButton->setIcon(ENV.icons()->getIcon(InstIconKey)); ui->instNameTextBox->setText(original->name()); ui->instNameTextBox->setFocus(); auto groups = MMC->instances()->getGroups().toSet(); @@ -91,7 +91,7 @@ void CopyInstanceDialog::on_iconButton_clicked() if (dlg.result() == QDialog::Accepted) { InstIconKey = dlg.selectedIconKey; - ui->iconButton->setIcon(MMC->icons()->getIcon(InstIconKey)); + ui->iconButton->setIcon(ENV.icons()->getIcon(InstIconKey)); } } diff --git a/gui/dialogs/IconPickerDialog.cpp b/gui/dialogs/IconPickerDialog.cpp index 2fb50165..90bf2ef4 100644 --- a/gui/dialogs/IconPickerDialog.cpp +++ b/gui/dialogs/IconPickerDialog.cpp @@ -59,7 +59,7 @@ IconPickerDialog::IconPickerDialog(QWidget *parent) contentsWidget->installEventFilter(this); - contentsWidget->setModel(MMC->icons().get()); + contentsWidget->setModel(ENV.icons().get()); auto buttonAdd = ui->buttonBox->addButton(tr("Add Icon"), QDialogButtonBox::ResetRole); auto buttonRemove = @@ -104,12 +104,12 @@ void IconPickerDialog::addNewIcon() //: The type of icon files QStringList fileNames = QFileDialog::getOpenFileNames(this, selectIcons, QString(), tr("Icons") + "(*.png *.jpg *.jpeg *.ico)"); - MMC->icons()->installIcons(fileNames); + ENV.icons()->installIcons(fileNames); } void IconPickerDialog::removeSelectedIcon() { - MMC->icons()->deleteIcon(selectedIconKey); + ENV.icons()->deleteIcon(selectedIconKey); } void IconPickerDialog::activated(QModelIndex index) @@ -130,7 +130,7 @@ void IconPickerDialog::selectionChanged(QItemSelection selected, QItemSelection int IconPickerDialog::exec(QString selection) { - auto list = MMC->icons(); + auto list = ENV.icons(); auto contentsWidget = ui->iconView; selectedIconKey = selection; diff --git a/gui/dialogs/NewInstanceDialog.cpp b/gui/dialogs/NewInstanceDialog.cpp index bba1f785..86ffc5b8 100644 --- a/gui/dialogs/NewInstanceDialog.cpp +++ b/gui/dialogs/NewInstanceDialog.cpp @@ -66,7 +66,7 @@ NewInstanceDialog::NewInstanceDialog(QWidget *parent) setSelectedVersion(MMC->minecraftlist()->getLatestStable(), true); InstIconKey = "infinity"; - ui->iconButton->setIcon(MMC->icons()->getIcon(InstIconKey)); + ui->iconButton->setIcon(ENV.icons()->getIcon(InstIconKey)); ui->modpackEdit->setValidator(new UrlValidator(ui->modpackEdit)); connect(ui->modpackEdit, &QLineEdit::textChanged, this, &NewInstanceDialog::updateDialogState); @@ -181,7 +181,7 @@ void NewInstanceDialog::on_iconButton_clicked() if (dlg.result() == QDialog::Accepted) { InstIconKey = dlg.selectedIconKey; - ui->iconButton->setIcon(MMC->icons()->getIcon(InstIconKey)); + ui->iconButton->setIcon(ENV.icons()->getIcon(InstIconKey)); } } |