Use Continuumatrice application name in connection status and title

This commit is contained in:
Christian Daniel Jensen 2026-11-03 03:38:51 -07:00
parent a950a1cf7f
commit afa4542b04

View file

@ -13,6 +13,7 @@
#include "libcockatrice/protocol/pb/event_server_shutdown.pb.h" #include "libcockatrice/protocol/pb/event_server_shutdown.pb.h"
#include <QChar> #include <QChar>
#include <QCoreApplication>
#include <QDateTime> #include <QDateTime>
#include <QDebug> #include <QDebug>
#include <QLineEdit> #include <QLineEdit>
@ -217,7 +218,7 @@ void ConnectionController::onServerShutdownEvent(const Event_ServerShutdown &eve
"games will be lost.\nReason for shutdown: %1", "games will be lost.\nReason for shutdown: %1",
"", event.minutes()) "", event.minutes())
.arg(QString::fromStdString(event.reason()))); .arg(QString::fromStdString(event.reason())));
serverShutdownMessageBox.setIconPixmap(themePixmap(QStringLiteral("cockatrice")).scaled(64, 64)); serverShutdownMessageBox.setIconPixmap(themePixmap(QStringLiteral("continuumatrice")).scaled(64, 64));
serverShutdownMessageBox.setText(tr("Scheduled server shutdown")); serverShutdownMessageBox.setText(tr("Scheduled server shutdown"));
serverShutdownMessageBox.setWindowModality(Qt::ApplicationModal); serverShutdownMessageBox.setWindowModality(Qt::ApplicationModal);
serverShutdownMessageBox.setVisible(true); serverShutdownMessageBox.setVisible(true);
@ -333,7 +334,7 @@ void ConnectionController::onLoginError(int r,
case Response::RespContextError: { case Response::RespContextError: {
QMessageBox::critical(dialogParent, tr("Error"), QMessageBox::critical(dialogParent, tr("Error"),
tr("An internal error has occurred, please close and reopen Cockatrice before " tr("An internal error has occurred, please close and reopen Continuumatrice before "
"trying again.\nIf the error persists, ensure you are running the latest " "trying again.\nIf the error persists, ensure you are running the latest "
"version of the software and if needed contact the software developers.")); "version of the software and if needed contact the software developers."));
break; break;
@ -489,14 +490,14 @@ void ConnectionController::onProtocolVersionMismatch(int localVersion, int remot
{ {
if (localVersion > remoteVersion) { if (localVersion > remoteVersion) {
QMessageBox::critical(dialogParent, tr("Error"), QMessageBox::critical(dialogParent, tr("Error"),
tr("You are trying to connect to an obsolete server. Please downgrade your Cockatrice " tr("You are trying to connect to an obsolete server. Please downgrade your Continuumatrice "
"version or connect to a suitable server.\n" "version or connect to a suitable server.\n"
"Local version is %1, remote version is %2.") "Local version is %1, remote version is %2.")
.arg(localVersion) .arg(localVersion)
.arg(remoteVersion)); .arg(remoteVersion));
} else { } else {
QMessageBox::critical(dialogParent, tr("Error"), QMessageBox::critical(dialogParent, tr("Error"),
tr("Your Cockatrice client is obsolete. Please update your Cockatrice version.\n" tr("Your Continuumatrice client is obsolete. Please update your Continuumatrice version.\n"
"Local version is %1, remote version is %2.") "Local version is %1, remote version is %2.")
.arg(localVersion) .arg(localVersion)
.arg(remoteVersion)); .arg(remoteVersion));
@ -631,7 +632,7 @@ void ConnectionController::onPromptForgotPasswordChallenge()
void ConnectionController::updateWindowTitle() void ConnectionController::updateWindowTitle()
{ {
const QString appName = QStringLiteral("Cockatrice"); const QString appName = QCoreApplication::applicationName();
QString title; QString title;
switch (remoteClient->getStatus()) { switch (remoteClient->getStatus()) {
@ -653,7 +654,7 @@ void ConnectionController::updateWindowTitle()
break; break;
} }
case StatusLoggedIn: { case StatusLoggedIn: {
title = remoteClient->getUserName() + "@" + remoteClient->peerName(); title = appName + " - " + remoteClient->getUserName() + "@" + remoteClient->peerName();
break; break;
} }
case StatusRequestingForgotPassword: case StatusRequestingForgotPassword: