From 3da01807e55ddbbd3116c9ae6fd84fae189fb5aa Mon Sep 17 00:00:00 2001 From: Duke Date: Sun, 5 Feb 2023 22:37:35 -0500 Subject: [PATCH] SDX talks to dragonxd --- src/connection.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/connection.cpp b/src/connection.cpp index 4ce96a8..5ba21aa 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -68,7 +68,11 @@ void ConnectionLoader::doAutoConnect(bool tryEhushdStart) { // Refused connection. So try and start embedded hushd if (Settings::getInstance()->useEmbedded()) { if (tryEhushdStart) { - this->showInformation(QObject::tr("Starting embedded hushd")); + if(isdragonx) { + this->showInformation(QObject::tr("Starting embedded dragonxd")); + } else { + this->showInformation(QObject::tr("Starting embedded hushd")); + } if (this->startEmbeddedHushd()) { // Embedded hushd started up. Wait a second and then refresh the connection main->logger->write("Embedded hushd started up, trying autoconnect in 1 sec"); @@ -544,6 +548,11 @@ void ConnectionLoader::refreshHushdState(Connection* connection, std::functionSettings menu"); + if(isdragonx) { + explanation = QString() % + QObject::tr("Authentication failed. The username / password you specified was " + "not accepted by dragonxd. Try changing it in the Edit->Settings menu"); + } this->showError(explanation); } else if (err == QNetworkReply::NetworkError::InternalServerError && @@ -557,7 +566,11 @@ void ConnectionLoader::refreshHushdState(Connection* connection, std::function 3) dots = 0; } - this->showInformation(QObject::tr("Your hushd is starting up. Please wait."), status); + if(isdragonx) { + this->showInformation(QObject::tr("Your dragonxd is starting up. Please wait."), status); + } else { + this->showInformation(QObject::tr("Your hushd is starting up. Please wait."), status); + } main->logger->write("Waiting for hushd to come online."); // Refresh after one second QTimer::singleShot(1000, [=]() { this->refreshHushdState(connection, refused); });