Inject version info into embedded xml and ignore local xml file by default.
Added check for 3.60 update pup.
This commit is contained in:
@@ -64,6 +64,7 @@ void ConfigWidget::connectSignals()
|
||||
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
||||
|
||||
connect(ui->protocolModeBox, SIGNAL(currentIndexChanged(int)), this, SLOT(protocolModeChanged(int)));
|
||||
connect(ui->psversionBox, SIGNAL(currentIndexChanged(int)), this, SLOT(versionModeChanged(int)));
|
||||
}
|
||||
|
||||
void ConfigWidget::protocolModeChanged(int index)
|
||||
@@ -87,7 +88,25 @@ void ConfigWidget::protocolModeChanged(int index)
|
||||
ui->protocolEdit->setEnabled(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigWidget::versionModeChanged(int index)
|
||||
{
|
||||
switch(index)
|
||||
{
|
||||
case 0:
|
||||
ui->psversionEdit->setEnabled(false);
|
||||
break;
|
||||
case 1:
|
||||
ui->psversionEdit->setEnabled(false);
|
||||
break;
|
||||
case 2:
|
||||
ui->psversionEdit->setEnabled(true);
|
||||
break;
|
||||
default:
|
||||
ui->psversionEdit->setEnabled(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigWidget::setDefaultData()
|
||||
@@ -151,6 +170,23 @@ void ConfigWidget::setDefaultData()
|
||||
ui->protocolEdit->setText(QString::number(protocol_version));
|
||||
else
|
||||
ui->protocolEdit->setText(QString::number(VITAMTP_PROTOCOL_MAX_VERSION));
|
||||
|
||||
bool ignorexml = settings.value("ignorexml", true).toBool();
|
||||
ui->ignorexmlCheck->setChecked(ignorexml);
|
||||
|
||||
QString versiontype = settings.value("versiontype", "zero").toString();
|
||||
QString customVersion = settings.value("customversion", "00.000.000").toString();
|
||||
|
||||
if(versiontype == "custom")
|
||||
ui->psversionBox->setCurrentIndex(2);
|
||||
else if(versiontype == "henkaku")
|
||||
ui->psversionBox->setCurrentIndex(1);
|
||||
else
|
||||
ui->psversionBox->setCurrentIndex(0);
|
||||
|
||||
versionModeChanged(ui->psversionBox->currentIndex());
|
||||
|
||||
ui->psversionEdit->setText(customVersion);
|
||||
}
|
||||
|
||||
ConfigWidget::~ConfigWidget()
|
||||
@@ -241,6 +277,17 @@ void ConfigWidget::accept()
|
||||
else if(ui->protocolModeBox->currentIndex() == 2)
|
||||
settings.setValue("protocolMode", "custom");
|
||||
|
||||
if(ui->psversionBox->currentIndex() == 0)
|
||||
settings.setValue("versiontype", "zero");
|
||||
else if(ui->psversionBox->currentIndex() == 1)
|
||||
settings.setValue("versiontype", "henkaku");
|
||||
else if(ui->psversionBox->currentIndex() == 2)
|
||||
settings.setValue("versiontype", "custom");
|
||||
|
||||
settings.setValue("ignorexml", ui->ignorexmlCheck->isChecked());
|
||||
|
||||
settings.setValue("customversion", ui->psversionEdit->text());
|
||||
|
||||
bool ok;
|
||||
int protocol = ui->protocolEdit->text().toInt(&ok);
|
||||
|
||||
|
@@ -48,6 +48,7 @@ private:
|
||||
|
||||
private slots:
|
||||
void protocolModeChanged(int index);
|
||||
void versionModeChanged(int index);
|
||||
void browseBtnPressed(int from);
|
||||
void accept();
|
||||
};
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>519</width>
|
||||
<height>525</height>
|
||||
<height>559</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -305,16 +305,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_3">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Update database automatically when files on the PC are changed</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
@@ -367,6 +357,16 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="ignorexmlCheck">
|
||||
<property name="text">
|
||||
<string>Ignore local file psp2-updatelist.xml on update folder</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4"/>
|
||||
</item>
|
||||
@@ -375,6 +375,32 @@
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>CMA protocol selection</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="protocolModeBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Latest</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Manual</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Custom</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
@@ -445,6 +471,13 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>CMA custom version</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="protocolEdit">
|
||||
<property name="inputMask">
|
||||
@@ -455,23 +488,37 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string>CMA protocol selection</string>
|
||||
<string>Custom PS Vita version</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="protocolModeBox">
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="psversionEdit">
|
||||
<property name="text">
|
||||
<string notr="true">03.600.000</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>Use this version for updates</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="psversionBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Latest</string>
|
||||
<string>FW 0.00 (Always up-to-date)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Manual</string>
|
||||
<string>FW 3.60 (HENkaku)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
@@ -481,13 +528,6 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>CMA custom version</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
Reference in New Issue
Block a user