From f26f3d90248afffddf4c6e0233f78b3dd9901c97 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 18 May 2016 09:53:36 +0200 Subject: [PATCH] Changed: Configure button action --- .../client/ryzom_installer/src/mainwindow.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp b/code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp index 0ead4615e..c98734406 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp @@ -98,6 +98,25 @@ void CMainWindow::onPlayClicked() void CMainWindow::onConfigureClicked() { + int profileIndex = profilesComboBox->currentIndex(); + + if (profileIndex < 0) return; + + CProfile profile = CConfigFile::getInstance()->getProfile(profileIndex); + + if (profile.server.isEmpty()) return; + + CServer server = CConfigFile::getInstance()->getServer(profile.server); + + if (server.configurationFilename.isEmpty()) return; + + QStringList arguments; + arguments << "-p"; + arguments << QString::number(profileIndex); + + bool started = QProcess::startDetached(server.configurationFilename, arguments); + + CConfigFile::getInstance()->setDefaultProfileIndex(profileIndex); } void CMainWindow::onProfiles()