diff --git a/code/ryzom/tools/client/ryzom_installer/src/installdialog.cpp b/code/ryzom/tools/client/ryzom_installer/src/installdialog.cpp index fad255622..4f9de6c48 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/installdialog.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/installdialog.cpp @@ -49,9 +49,8 @@ CInstallDialog::CInstallDialog():QDialog() updateAnotherLocationText(); - m_dstDirectory = CConfigFile::getNewInstallationDirectory(); - - updateDestinationText(); + // update default destination + onDestinationDefaultButtonClicked(); // check whether OS architecture is 32 or 64 bits if (CConfigFile::has64bitsOS()) @@ -71,6 +70,7 @@ CInstallDialog::CInstallDialog():QDialog() 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())); // TODO: if found a folder with initial data, get its total size and check if at least that size is free on the disk @@ -117,6 +117,13 @@ void CInstallDialog::onAnotherLocationBrowseButtonClicked() updateAnotherLocationText(); } +void CInstallDialog::onDestinationDefaultButtonClicked() +{ + m_dstDirectory = CConfigFile::getNewInstallationDirectory(); + + updateDestinationText(); +} + void CInstallDialog::onDestinationBrowseButtonClicked() { QString directory = QFileDialog::getExistingDirectory(this, tr("Please choose directory to install Ryzom in")); diff --git a/code/ryzom/tools/client/ryzom_installer/src/installdialog.h b/code/ryzom/tools/client/ryzom_installer/src/installdialog.h index 3497364d2..009483303 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/installdialog.h +++ b/code/ryzom/tools/client/ryzom_installer/src/installdialog.h @@ -36,6 +36,7 @@ public: private slots: void onShowAdvancedParameters(int state); void onAnotherLocationBrowseButtonClicked(); + void onDestinationDefaultButtonClicked(); void onDestinationBrowseButtonClicked(); void accept(); diff --git a/code/ryzom/tools/client/ryzom_installer/src/migratedialog.cpp b/code/ryzom/tools/client/ryzom_installer/src/migratedialog.cpp index 5f455c938..dcf1ca0fd 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/migratedialog.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/migratedialog.cpp @@ -46,9 +46,8 @@ CMigrateDialog::CMigrateDialog():QDialog() } } - m_dstDirectory = CConfigFile::getNewInstallationDirectory(); - - updateDestinationText(); + // update default destination + onDestinationDefaultButtonClicked(); // check whether OS architecture is 32 or 64 bits if (CConfigFile::has64bitsOS()) @@ -66,6 +65,7 @@ CMigrateDialog::CMigrateDialog():QDialog() destinationGroupBox->setTitle(tr("Files will be installed to (requires %1):").arg(qBytesToHumanReadable(server.dataUncompressedSize))); + connect(destinationDefaultButton, SIGNAL(clicked()), SLOT(onDestinationDefaultButtonClicked())); connect(destinationBrowseButton, SIGNAL(clicked()), SLOT(onDestinationBrowseButtonClicked())); connect(continueButton, SIGNAL(clicked()), SLOT(accept())); connect(quitButton, SIGNAL(clicked()), SLOT(reject())); @@ -91,6 +91,13 @@ void CMigrateDialog::onShowAdvancedParameters(int state) adjustSize(); } +void CMigrateDialog::onDestinationDefaultButtonClicked() +{ + m_dstDirectory = CConfigFile::getNewInstallationDirectory(); + + updateDestinationText(); +} + void CMigrateDialog::onDestinationBrowseButtonClicked() { QString directory = QFileDialog::getExistingDirectory(this, tr("Please choose directory to install Ryzom in")); diff --git a/code/ryzom/tools/client/ryzom_installer/src/migratedialog.h b/code/ryzom/tools/client/ryzom_installer/src/migratedialog.h index 4e058ba99..9cd584372 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/migratedialog.h +++ b/code/ryzom/tools/client/ryzom_installer/src/migratedialog.h @@ -35,6 +35,7 @@ public: private slots: void onShowAdvancedParameters(int state); + void onDestinationDefaultButtonClicked(); void onDestinationBrowseButtonClicked(); void accept(); diff --git a/code/ryzom/tools/client/ryzom_installer/ui/installdialog.ui b/code/ryzom/tools/client/ryzom_installer/ui/installdialog.ui index c0736c23c..d05811513 100644 --- a/code/ryzom/tools/client/ryzom_installer/ui/installdialog.ui +++ b/code/ryzom/tools/client/ryzom_installer/ui/installdialog.ui @@ -146,7 +146,7 @@ Just follow the different steps and make your choice between the options presen Files will be installed to (requires 10 GiB): - + @@ -154,6 +154,13 @@ Just follow the different steps and make your choice between the options presen + + + + Default + + + @@ -206,10 +213,12 @@ Just follow the different steps and make your choice between the options presen + advancedCheckBox oldDirectoryRadioButton anotherLocationRadioButton anotherLocationBrowseButton internetRadioButton + destinationDefaultButton destinationBrowseButton clientArch64RadioButton clientArch32RadioButton diff --git a/code/ryzom/tools/client/ryzom_installer/ui/migratedialog.ui b/code/ryzom/tools/client/ryzom_installer/ui/migratedialog.ui index e8d37007f..eca75bba3 100644 --- a/code/ryzom/tools/client/ryzom_installer/ui/migratedialog.ui +++ b/code/ryzom/tools/client/ryzom_installer/ui/migratedialog.ui @@ -93,7 +93,7 @@ Just press Continue button and follow the different steps until everything is do Files will be installed to (requires 10 GiB): - + @@ -101,6 +101,13 @@ Just press Continue button and follow the different steps until everything is do + + + + Default + + + @@ -174,9 +181,13 @@ Just press Continue button and follow the different steps until everything is do + advancedCheckBox + destinationDefaultButton destinationBrowseButton clientArch64RadioButton clientArch32RadioButton + continueButton + quitButton