[Companion][AppPreferencesDialog] If not ALLOW_NIGHTLY_BUILDS then either hide nightly channel option, or if user already has it selected then display a warning (in case they also have nightly installed in parallel).
This commit is contained in:
@@ -170,10 +170,17 @@ void AppPreferencesDialog::initSettings()
|
|||||||
ui->snapshotPath->setDisabled(true);
|
ui->snapshotPath->setDisabled(true);
|
||||||
ui->snapshotPathButton->setDisabled(true);
|
ui->snapshotPathButton->setDisabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(ALLOW_NIGHTLY_BUILDS)
|
#if !defined(ALLOW_NIGHTLY_BUILDS)
|
||||||
// TODO should we gray out nightly builds here?
|
// remove nightly version option entirely unless it's the current one (because user might have nightly version also installed)
|
||||||
|
if (g.OpenTxBranch() != AppData::BRANCH_NIGHTLY_UNSTABLE)
|
||||||
|
ui->OpenTxBranch->removeItem(2);
|
||||||
|
// if it's already selected, add a warning message
|
||||||
|
else
|
||||||
|
ui->updatesLayout->addWidget(new QLabel("<font color='red'>" % tr("Note: Nightly builds are not available in this version, Release/RC update channel will be used.") % "</font>", this));
|
||||||
#endif
|
#endif
|
||||||
ui->OpenTxBranch->setCurrentIndex(g.OpenTxBranch());
|
ui->OpenTxBranch->setCurrentIndex(g.OpenTxBranch());
|
||||||
|
|
||||||
ui->autoCheckCompanion->setChecked(g.autoCheckApp());
|
ui->autoCheckCompanion->setChecked(g.autoCheckApp());
|
||||||
ui->autoCheckFirmware->setChecked(g.autoCheckFw());
|
ui->autoCheckFirmware->setChecked(g.autoCheckFw());
|
||||||
ui->showSplash->setChecked(g.showSplash());
|
ui->showSplash->setChecked(g.showSplash());
|
||||||
|
|||||||
@@ -767,8 +767,8 @@ Mode 4:
|
|||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="7" column="1">
|
<item row="7" column="1">
|
||||||
<layout class="QGridLayout" name="gridLayout_6">
|
<layout class="QVBoxLayout" name="updatesLayout">
|
||||||
<item row="0" column="0">
|
<item>
|
||||||
<widget class="QCheckBox" name="autoCheckFirmware">
|
<widget class="QCheckBox" name="autoCheckFirmware">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Automatic check for OpenTX firmware updates</string>
|
<string>Automatic check for OpenTX firmware updates</string>
|
||||||
@@ -778,7 +778,7 @@ Mode 4:
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item>
|
||||||
<widget class="QCheckBox" name="autoCheckCompanion">
|
<widget class="QCheckBox" name="autoCheckCompanion">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Automatic check for Companion updates</string>
|
<string>Automatic check for Companion updates</string>
|
||||||
@@ -788,7 +788,7 @@ Mode 4:
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item>
|
||||||
<widget class="QComboBox" name="OpenTxBranch">
|
<widget class="QComboBox" name="OpenTxBranch">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
|||||||
Reference in New Issue
Block a user