Merge with develop
This commit is contained in:
parent
9fe3019714
commit
a4b3c7c01c
3 changed files with 3 additions and 118 deletions
|
@ -32,23 +32,6 @@ CInstallDialog::CInstallDialog():QDialog()
|
||||||
|
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
|
||||||
oldDirectoryRadioButton->setVisible(false);
|
|
||||||
|
|
||||||
// enable download radio button by default
|
|
||||||
internetRadioButton->setChecked(true);
|
|
||||||
|
|
||||||
m_oldDirectory = CConfigFile::getInstance()->getOldInstallationDirectory();
|
|
||||||
|
|
||||||
// found a previous installation
|
|
||||||
if (CConfigFile::getInstance()->areRyzomDataInstalledIn(m_oldDirectory))
|
|
||||||
{
|
|
||||||
oldDirectoryRadioButton->setText(tr("Old installation: %1").arg(m_oldDirectory));
|
|
||||||
oldDirectoryRadioButton->setVisible(true);
|
|
||||||
oldDirectoryRadioButton->setChecked(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
updateAnotherLocationText();
|
|
||||||
|
|
||||||
// update default destination
|
// update default destination
|
||||||
onDestinationDefaultButtonClicked();
|
onDestinationDefaultButtonClicked();
|
||||||
|
|
||||||
|
@ -66,10 +49,8 @@ CInstallDialog::CInstallDialog():QDialog()
|
||||||
|
|
||||||
const CServer &server = CConfigFile::getInstance()->getServer();
|
const CServer &server = CConfigFile::getInstance()->getServer();
|
||||||
|
|
||||||
internetRadioButton->setText(tr("Internet (%1 to download)").arg(qBytesToHumanReadable(server.dataCompressedSize)));
|
|
||||||
destinationGroupBox->setTitle(tr("Files will be installed to (requires %1):").arg(qBytesToHumanReadable(server.dataUncompressedSize)));
|
destinationGroupBox->setTitle(tr("Files will be installed to (requires %1):").arg(qBytesToHumanReadable(server.dataUncompressedSize)));
|
||||||
|
|
||||||
connect(anotherLocationBrowseButton, SIGNAL(clicked()), SLOT(onAnotherLocationBrowseButtonClicked()));
|
|
||||||
connect(destinationDefaultButton, SIGNAL(clicked()), SLOT(onDestinationDefaultButtonClicked()));
|
connect(destinationDefaultButton, SIGNAL(clicked()), SLOT(onDestinationDefaultButtonClicked()));
|
||||||
connect(destinationBrowseButton, SIGNAL(clicked()), SLOT(onDestinationBrowseButtonClicked()));
|
connect(destinationBrowseButton, SIGNAL(clicked()), SLOT(onDestinationBrowseButtonClicked()));
|
||||||
|
|
||||||
|
@ -94,29 +75,6 @@ void CInstallDialog::onShowAdvancedParameters(int state)
|
||||||
adjustSize();
|
adjustSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CInstallDialog::onAnotherLocationBrowseButtonClicked()
|
|
||||||
{
|
|
||||||
QString directory;
|
|
||||||
|
|
||||||
for(;;)
|
|
||||||
{
|
|
||||||
directory = QFileDialog::getExistingDirectory(this, tr("Please choose directory where Ryzom is currently installed."));
|
|
||||||
|
|
||||||
if (directory.isEmpty()) return;
|
|
||||||
|
|
||||||
if (CConfigFile::getInstance()->isRyzomInstalledIn(directory)) break;
|
|
||||||
|
|
||||||
QMessageBox::StandardButton res = QMessageBox::warning(this, tr("Unable to find Ryzom"), tr("Unable to find Ryzom in selected directory. Please choose another one or cancel."));
|
|
||||||
}
|
|
||||||
|
|
||||||
m_anotherDirectory = directory;
|
|
||||||
|
|
||||||
// if we browse to a Ryzom installation, we want to use it
|
|
||||||
anotherLocationRadioButton->setChecked(true);
|
|
||||||
|
|
||||||
updateAnotherLocationText();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CInstallDialog::onDestinationDefaultButtonClicked()
|
void CInstallDialog::onDestinationDefaultButtonClicked()
|
||||||
{
|
{
|
||||||
m_dstDirectory = CConfigFile::getNewInstallationDirectory();
|
m_dstDirectory = CConfigFile::getNewInstallationDirectory();
|
||||||
|
@ -135,11 +93,6 @@ void CInstallDialog::onDestinationBrowseButtonClicked()
|
||||||
updateDestinationText();
|
updateDestinationText();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CInstallDialog::updateAnotherLocationText()
|
|
||||||
{
|
|
||||||
anotherLocationRadioButton->setText(tr("Another location: %1").arg(m_anotherDirectory.isEmpty() ? tr("Undefined"):m_anotherDirectory));
|
|
||||||
}
|
|
||||||
|
|
||||||
void CInstallDialog::updateDestinationText()
|
void CInstallDialog::updateDestinationText()
|
||||||
{
|
{
|
||||||
destinationLabel->setText(m_dstDirectory);
|
destinationLabel->setText(m_dstDirectory);
|
||||||
|
@ -196,18 +149,8 @@ void CInstallDialog::accept()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oldDirectoryRadioButton->isChecked())
|
// always download data
|
||||||
{
|
|
||||||
CConfigFile::getInstance()->setSrcServerDirectory(m_oldDirectory);
|
|
||||||
}
|
|
||||||
else if (anotherLocationRadioButton->isChecked())
|
|
||||||
{
|
|
||||||
CConfigFile::getInstance()->setSrcServerDirectory(m_anotherDirectory);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CConfigFile::getInstance()->setSrcServerDirectory("");
|
CConfigFile::getInstance()->setSrcServerDirectory("");
|
||||||
}
|
|
||||||
|
|
||||||
CConfigFile::getInstance()->setInstallationDirectory(m_dstDirectory);
|
CConfigFile::getInstance()->setInstallationDirectory(m_dstDirectory);
|
||||||
CConfigFile::getInstance()->setUse64BitsClient(clientArch64RadioButton->isChecked());
|
CConfigFile::getInstance()->setUse64BitsClient(clientArch64RadioButton->isChecked());
|
||||||
|
|
|
@ -35,18 +35,14 @@ public:
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onShowAdvancedParameters(int state);
|
void onShowAdvancedParameters(int state);
|
||||||
void onAnotherLocationBrowseButtonClicked();
|
|
||||||
void onDestinationDefaultButtonClicked();
|
void onDestinationDefaultButtonClicked();
|
||||||
void onDestinationBrowseButtonClicked();
|
void onDestinationBrowseButtonClicked();
|
||||||
|
|
||||||
void accept();
|
void accept();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateAnotherLocationText();
|
|
||||||
void updateDestinationText();
|
void updateDestinationText();
|
||||||
|
|
||||||
QString m_oldDirectory;
|
|
||||||
QString m_anotherDirectory;
|
|
||||||
QString m_dstDirectory;
|
QString m_dstDirectory;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>402</width>
|
<width>402</width>
|
||||||
<height>435</height>
|
<height>331</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -91,56 +91,6 @@ Just follow the different steps and make your choice between the options presen
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="sourceGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Files will be installed from:</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="oldDirectoryRadioButton">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">Old installation: %1</string>
|
|
||||||
</property>
|
|
||||||
<property name="autoExclusive">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="anotherLocationLayout" stretch="1,0">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="anotherLocationRadioButton">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">Another location: %1</string>
|
|
||||||
</property>
|
|
||||||
<property name="autoExclusive">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="anotherLocationBrowseButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Browse...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="internetRadioButton">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">Internet (%1 to download)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="destinationGroupBox">
|
<widget class="QGroupBox" name="destinationGroupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
|
@ -214,10 +164,6 @@ Just follow the different steps and make your choice between the options presen
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>advancedCheckBox</tabstop>
|
<tabstop>advancedCheckBox</tabstop>
|
||||||
<tabstop>oldDirectoryRadioButton</tabstop>
|
|
||||||
<tabstop>anotherLocationRadioButton</tabstop>
|
|
||||||
<tabstop>anotherLocationBrowseButton</tabstop>
|
|
||||||
<tabstop>internetRadioButton</tabstop>
|
|
||||||
<tabstop>destinationDefaultButton</tabstop>
|
<tabstop>destinationDefaultButton</tabstop>
|
||||||
<tabstop>destinationBrowseButton</tabstop>
|
<tabstop>destinationBrowseButton</tabstop>
|
||||||
<tabstop>clientArch64RadioButton</tabstop>
|
<tabstop>clientArch64RadioButton</tabstop>
|
||||||
|
|
Loading…
Reference in a new issue