Changed: Don't propose to migrate in CInstallDialog

--HG--
branch : develop
This commit is contained in:
kervala 2016-10-08 14:14:37 +02:00
parent c348bbb3de
commit 263665696a
3 changed files with 3 additions and 118 deletions

View file

@ -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
{
// always download data
CConfigFile::getInstance()->setSrcServerDirectory("");
}
CConfigFile::getInstance()->setInstallationDirectory(m_dstDirectory);
CConfigFile::getInstance()->setUse64BitsClient(clientArch64RadioButton->isChecked());

View file

@ -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;
};

View file

@ -10,7 +10,7 @@
<x>0</x>
<y>0</y>
<width>402</width>
<height>435</height>
<height>331</height>
</rect>
</property>
<property name="windowTitle">
@ -91,56 +91,6 @@ Just follow the different steps and make your choice between the options presen
<property name="bottomMargin">
<number>0</number>
</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>
<widget class="QGroupBox" name="destinationGroupBox">
<property name="title">
@ -214,10 +164,6 @@ Just follow the different steps and make your choice between the options presen
</widget>
<tabstops>
<tabstop>advancedCheckBox</tabstop>
<tabstop>oldDirectoryRadioButton</tabstop>
<tabstop>anotherLocationRadioButton</tabstop>
<tabstop>anotherLocationBrowseButton</tabstop>
<tabstop>internetRadioButton</tabstop>
<tabstop>destinationDefaultButton</tabstop>
<tabstop>destinationBrowseButton</tabstop>
<tabstop>clientArch64RadioButton</tabstop>