summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorJan Dalheimer <jan@dalheimer.de>2014-01-23 21:31:41 +0100
committerJan Dalheimer <jan@dalheimer.de>2014-01-23 21:31:41 +0100
commit156bc8f27656c115bf1b023cd4ebc5f629df3887 (patch)
tree79e7ff327148f0841d7184a3882d8c2e6938ef4a /gui
parentc39d26f4453166603749826eee1a732c815047d0 (diff)
downloadMultiMC-156bc8f27656c115bf1b023cd4ebc5f629df3887.tar
MultiMC-156bc8f27656c115bf1b023cd4ebc5f629df3887.tar.gz
MultiMC-156bc8f27656c115bf1b023cd4ebc5f629df3887.tar.lz
MultiMC-156bc8f27656c115bf1b023cd4ebc5f629df3887.tar.xz
MultiMC-156bc8f27656c115bf1b023cd4ebc5f629df3887.zip
Forge works now too, and so does forge+liteloader
Diffstat (limited to 'gui')
-rw-r--r--gui/dialogs/DerpModEditDialog.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/gui/dialogs/DerpModEditDialog.cpp b/gui/dialogs/DerpModEditDialog.cpp
index aafaa2e2..216aa59d 100644
--- a/gui/dialogs/DerpModEditDialog.cpp
+++ b/gui/dialogs/DerpModEditDialog.cpp
@@ -55,7 +55,6 @@ DerpModEditDialog::DerpModEditDialog(DerpInstance *inst, QWidget *parent)
main_model->setSourceModel(m_version.get());
ui->libraryTreeView->setModel(main_model);
ui->libraryTreeView->installEventFilter(this);
- ui->mainClassEdit->setText(m_version->mainClass);
updateVersionControls();
}
else
@@ -98,6 +97,7 @@ void DerpModEditDialog::updateVersionControls()
ui->forgeBtn->setEnabled(true);
ui->liteloaderBtn->setEnabled(LiteLoaderInstaller().canApply(m_inst));
ui->customEditorBtn->setEnabled(customVersion);
+ ui->mainClassEdit->setText(m_version->mainClass);
}
void DerpModEditDialog::disableVersionControls()
@@ -105,6 +105,7 @@ void DerpModEditDialog::disableVersionControls()
ui->forgeBtn->setEnabled(false);
ui->liteloaderBtn->setEnabled(false);
ui->customEditorBtn->setEnabled(false);
+ ui->mainClassEdit->setText("");
}
void DerpModEditDialog::on_customEditorBtn_clicked()
@@ -140,9 +141,9 @@ void DerpModEditDialog::on_forgeBtn_clicked()
// install
QString forgePath = entry->getFullPath();
ForgeInstaller forge(forgePath, forgeVersion->universal_url);
- if (!forge.apply(m_version))
+ if (!forge.add(m_inst))
{
- // failure notice
+ QLOG_ERROR() << "Failure installing forge";
}
}
else
@@ -155,12 +156,13 @@ void DerpModEditDialog::on_forgeBtn_clicked()
// install
QString forgePath = entry->getFullPath();
ForgeInstaller forge(forgePath, forgeVersion->universal_url);
- if (!forge.apply(m_version))
+ if (!forge.add(m_inst))
{
- // failure notice
+ QLOG_ERROR() << "Failure installing forge";
}
}
}
+ m_inst->reloadFullVersion(this);
}
void DerpModEditDialog::on_liteloaderBtn_clicked()
@@ -180,6 +182,10 @@ void DerpModEditDialog::on_liteloaderBtn_clicked()
this, tr("LiteLoader"),
tr("For reasons unknown, the LiteLoader installation failed. Check your MultiMC log files for details."));
}
+ else
+ {
+ m_inst->reloadFullVersion(this);
+ }
}
bool DerpModEditDialog::loaderListFilter(QKeyEvent *keyEvent)