Add 'empty text' to all the version selection dialogs.
Customize it for the Forge one so people finally shut up about 1.7.4
This commit is contained in:
@ -142,7 +142,8 @@ void OneSixModEditDialog::on_customEditorBtn_clicked()
|
||||
{
|
||||
if (!MMC->openJsonEditor(m_inst->instanceRoot() + "/custom.json"))
|
||||
{
|
||||
QMessageBox::warning(this, tr("Error"), tr("Unable to open custom.json, check the settings"));
|
||||
QMessageBox::warning(this, tr("Error"),
|
||||
tr("Unable to open custom.json, check the settings"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -151,6 +152,8 @@ void OneSixModEditDialog::on_forgeBtn_clicked()
|
||||
{
|
||||
VersionSelectDialog vselect(MMC->forgelist().get(), tr("Select Forge version"), this);
|
||||
vselect.setFilter(1, m_inst->currentVersionId());
|
||||
vselect.setEmptyString(tr("No Forge versions are currently available for Minecraft ") +
|
||||
m_inst->currentVersionId());
|
||||
if (vselect.exec() && vselect.selectedVersion())
|
||||
{
|
||||
if (m_inst->versionIsCustom())
|
||||
@ -240,9 +243,9 @@ void OneSixModEditDialog::on_liteloaderBtn_clicked()
|
||||
}
|
||||
if (!liteloader.apply(m_version))
|
||||
{
|
||||
QMessageBox::critical(
|
||||
this, tr("LiteLoader"),
|
||||
tr("For reasons unknown, the LiteLoader installation failed. Check your MultiMC log files for details."));
|
||||
QMessageBox::critical(this, tr("LiteLoader"),
|
||||
tr("For reasons unknown, the LiteLoader installation failed. "
|
||||
"Check your MultiMC log files for details."));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,6 +51,11 @@ VersionSelectDialog::VersionSelectDialog(BaseVersionList *vlist, QString title,
|
||||
}
|
||||
}
|
||||
|
||||
void VersionSelectDialog::setEmptyString(QString emptyString)
|
||||
{
|
||||
ui->listView->setEmptyString(emptyString);
|
||||
}
|
||||
|
||||
VersionSelectDialog::~VersionSelectDialog()
|
||||
{
|
||||
delete ui;
|
||||
|
@ -44,6 +44,7 @@ public:
|
||||
BaseVersionPtr selectedVersion() const;
|
||||
|
||||
void setFilter(int column, QString filter);
|
||||
void setEmptyString(QString emptyString);
|
||||
void setResizeOn(int column);
|
||||
|
||||
private
|
||||
|
@ -15,7 +15,7 @@
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTreeView" name="listView">
|
||||
<widget class="VersionListView" name="listView">
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
@ -65,6 +65,13 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>VersionListView</class>
|
||||
<extends>QTreeView</extends>
|
||||
<header>gui/widgets/VersionListView.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
|
Reference in New Issue
Block a user