From 20a7ed23a3605d408709b300dbe03d934ae0a6cf Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 12 Jun 2016 13:54:47 +0200 Subject: [PATCH] Changed: Update profiles files after changing them --- .../client/ryzom_installer/src/mainwindow.cpp | 24 ++++++++++++++++--- .../ryzom_installer/src/operationdialog.cpp | 10 ++++++++ .../ryzom_installer/src/operationdialog.h | 2 ++ 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp b/code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp index c60958479..7ec519a0d 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp @@ -124,11 +124,29 @@ void CMainWindow::onConfigureClicked() void CMainWindow::onProfiles() { - CProfilesDialog dialog(this); + bool updated = false; - if (dialog.exec()) { - updateProfiles(); + CProfilesDialog dialog(this); + + if (dialog.exec()) + { + updateProfiles(); + + updated = true; + } + } + + if (updated) + { + COperationDialog dialog(this); + + dialog.setOperation(COperationDialog::OperationUpdateProfiles); + + if (!dialog.exec()) + { + // aborted + } } } diff --git a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp index 61649c587..3355f6aeb 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp @@ -102,6 +102,10 @@ void COperationDialog::processNextStep() processMigrateNextStep(); break; + case OperationUpdateProfiles: + processUpgradeProfilesNextStep(); + break; + case OperationInstall: processInstallNextStep(); break; @@ -201,8 +205,14 @@ void COperationDialog::processMigrateNextStep() } } +void COperationDialog::processUpdateProfilesNextStep() +{ + // TODO: implement +} + void COperationDialog::processInstallNextStep() { + // TODO: implement } void COperationDialog::processUninstallNextStep() diff --git a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.h b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.h index fe252ab6a..8aef3ec02 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.h +++ b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.h @@ -42,6 +42,7 @@ public: { OperationNone, OperationMigrate, + OperationUpdateProfiles, OperationInstall, OperationUninstall }; @@ -92,6 +93,7 @@ protected: void processNextStep(); void processMigrateNextStep(); + void processUpdateProfilesNextStep(); void processInstallNextStep(); void processUninstallNextStep();