From a4b3c7c01cb42ec120772e2aa9efd15a5ccb7042 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 8 Oct 2016 14:15:15 +0200 Subject: [PATCH] Merge with develop --- .../ryzom_installer/src/installdialog.cpp | 61 +------------------ .../ryzom_installer/src/installdialog.h | 4 -- .../ryzom_installer/ui/installdialog.ui | 56 +---------------- 3 files changed, 3 insertions(+), 118 deletions(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/installdialog.cpp b/code/ryzom/tools/client/ryzom_installer/src/installdialog.cpp index a9af5b82a..513cf1044 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/installdialog.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/installdialog.cpp @@ -32,23 +32,6 @@ CInstallDialog::CInstallDialog():QDialog() 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 onDestinationDefaultButtonClicked(); @@ -66,10 +49,8 @@ CInstallDialog::CInstallDialog():QDialog() 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))); - connect(anotherLocationBrowseButton, SIGNAL(clicked()), SLOT(onAnotherLocationBrowseButtonClicked())); connect(destinationDefaultButton, SIGNAL(clicked()), SLOT(onDestinationDefaultButtonClicked())); connect(destinationBrowseButton, SIGNAL(clicked()), SLOT(onDestinationBrowseButtonClicked())); @@ -94,29 +75,6 @@ void CInstallDialog::onShowAdvancedParameters(int state) 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() { m_dstDirectory = CConfigFile::getNewInstallationDirectory(); @@ -135,11 +93,6 @@ void CInstallDialog::onDestinationBrowseButtonClicked() updateDestinationText(); } -void CInstallDialog::updateAnotherLocationText() -{ - anotherLocationRadioButton->setText(tr("Another location: %1").arg(m_anotherDirectory.isEmpty() ? tr("Undefined"):m_anotherDirectory)); -} - void CInstallDialog::updateDestinationText() { destinationLabel->setText(m_dstDirectory); @@ -196,18 +149,8 @@ void CInstallDialog::accept() } } - if (oldDirectoryRadioButton->isChecked()) - { - CConfigFile::getInstance()->setSrcServerDirectory(m_oldDirectory); - } - else if (anotherLocationRadioButton->isChecked()) - { - CConfigFile::getInstance()->setSrcServerDirectory(m_anotherDirectory); - } - else - { - CConfigFile::getInstance()->setSrcServerDirectory(""); - } + // always download data + CConfigFile::getInstance()->setSrcServerDirectory(""); CConfigFile::getInstance()->setInstallationDirectory(m_dstDirectory); CConfigFile::getInstance()->setUse64BitsClient(clientArch64RadioButton->isChecked()); diff --git a/code/ryzom/tools/client/ryzom_installer/src/installdialog.h b/code/ryzom/tools/client/ryzom_installer/src/installdialog.h index 009483303..06473ee62 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/installdialog.h +++ b/code/ryzom/tools/client/ryzom_installer/src/installdialog.h @@ -35,18 +35,14 @@ public: private slots: void onShowAdvancedParameters(int state); - void onAnotherLocationBrowseButtonClicked(); void onDestinationDefaultButtonClicked(); void onDestinationBrowseButtonClicked(); void accept(); private: - void updateAnotherLocationText(); void updateDestinationText(); - QString m_oldDirectory; - QString m_anotherDirectory; QString m_dstDirectory; }; diff --git a/code/ryzom/tools/client/ryzom_installer/ui/installdialog.ui b/code/ryzom/tools/client/ryzom_installer/ui/installdialog.ui index 26fa11b93..bad2bcf17 100644 --- a/code/ryzom/tools/client/ryzom_installer/ui/installdialog.ui +++ b/code/ryzom/tools/client/ryzom_installer/ui/installdialog.ui @@ -10,7 +10,7 @@ 0 0 402 - 435 + 331 @@ -91,56 +91,6 @@ Just follow the different steps and make your choice between the options presen 0 - - - - Files will be installed from: - - - - - - Old installation: %1 - - - true - - - - - - - 6 - - - - - Another location: %1 - - - true - - - - - - - Browse... - - - - - - - - - Internet (%1 to download) - - - - - - @@ -214,10 +164,6 @@ Just follow the different steps and make your choice between the options presen advancedCheckBox - oldDirectoryRadioButton - anotherLocationRadioButton - anotherLocationBrowseButton - internetRadioButton destinationDefaultButton destinationBrowseButton clientArch64RadioButton