refactor: remove the generic connection and hostname failures dialog
this dialog has been the cause of alot of confusion, it will almost always show up incorrectly at least once when connecting a new client if you accept the client side dialog before adding the screen to the server fixes: #9497
This commit is contained in:
@ -77,7 +77,6 @@ public:
|
||||
inline static const auto LogExpanded = QStringLiteral("gui/logExpanded");
|
||||
inline static const auto SymbolicTrayIcon = QStringLiteral("gui/symbolicTrayIcon");
|
||||
inline static const auto WindowGeometry = QStringLiteral("gui/windowGeometry");
|
||||
inline static const auto ShowGenericClientFailureDialog = QStringLiteral("gui/showGenericClientFailureDialog");
|
||||
inline static const auto ShownFirstConnectedMessage = QStringLiteral("gui/shownFirstConnectedMessage");
|
||||
inline static const auto ShownServerFirstStartMessage = QStringLiteral("gui/shownServerFirstStartMessage");
|
||||
inline static const auto ShowVersionInTitle = QStringLiteral("gui/showVersionInTitle");
|
||||
@ -230,7 +229,6 @@ private:
|
||||
, Settings::Gui::LogExpanded
|
||||
, Settings::Gui::SymbolicTrayIcon
|
||||
, Settings::Gui::WindowGeometry
|
||||
, Settings::Gui::ShowGenericClientFailureDialog
|
||||
, Settings::Gui::ShownFirstConnectedMessage
|
||||
, Settings::Gui::ShownServerFirstStartMessage
|
||||
, Settings::Gui::ShowVersionInTitle
|
||||
@ -266,7 +264,6 @@ private:
|
||||
, Settings::Gui::CloseReminder
|
||||
, Settings::Gui::LogExpanded
|
||||
, Settings::Gui::SymbolicTrayIcon
|
||||
, Settings::Gui::ShowGenericClientFailureDialog
|
||||
, Settings::Security::TlsEnabled
|
||||
, Settings::Security::CheckPeers
|
||||
};
|
||||
|
||||
@ -1263,7 +1263,7 @@ void MainWindow::remoteHostChanged(const QString &newRemoteHost)
|
||||
|
||||
void MainWindow::showClientError(deskflow::client::ErrorType error, const QString &address)
|
||||
{
|
||||
if (!Settings::value(Settings::Gui::ShowGenericClientFailureDialog).toBool() || !isVisible() || m_clientErrorVisible)
|
||||
if (!isVisible() || m_clientErrorVisible)
|
||||
return;
|
||||
|
||||
m_clientErrorVisible = true;
|
||||
|
||||
@ -186,7 +186,8 @@ void showFirstConnectedMessage(QWidget *parent, bool closeToTray, bool enableSer
|
||||
void showClientConnectError(QWidget *parent, deskflow::client::ErrorType error, const QString &address)
|
||||
{
|
||||
using enum deskflow::client::ErrorType;
|
||||
if (error == NoError)
|
||||
|
||||
if (error == NoError || error == GenericError || error == HostnameError)
|
||||
return;
|
||||
|
||||
auto message = QObject::tr("<p>Failed to connect to the server '%1'.</p>").arg(address);
|
||||
@ -199,17 +200,6 @@ void showClientConnectError(QWidget *parent, deskflow::client::ErrorType error,
|
||||
"single instance of the client process is running.</p>"
|
||||
)
|
||||
);
|
||||
} else if (error == HostnameError) {
|
||||
message.append(
|
||||
QObject::tr( //
|
||||
"<p>Please try to connect to the server using the server IP address "
|
||||
"instead of the hostname. </p>"
|
||||
"<p>If that doesn't work, please check your TLS and "
|
||||
"firewall settings.</p>"
|
||||
)
|
||||
);
|
||||
} else if (error == GenericError) {
|
||||
message.append(QObject::tr("<p>Please check your TLS and firewall settings.</p>"));
|
||||
} else {
|
||||
qFatal("unknown client error");
|
||||
}
|
||||
@ -226,14 +216,6 @@ void showClientConnectError(QWidget *parent, deskflow::client::ErrorType error,
|
||||
dialog.setText(message);
|
||||
dialog.setWindowModality(Qt::ApplicationModal);
|
||||
dialog.setIcon(QMessageBox::Information);
|
||||
|
||||
auto cbNoShowAgain = new QCheckBox(QObject::tr("Do not show this message again"));
|
||||
|
||||
QObject::connect(cbNoShowAgain, &QCheckBox::toggled, [](bool enabled) {
|
||||
Settings::setValue(Settings::Gui::ShowGenericClientFailureDialog, !enabled);
|
||||
});
|
||||
|
||||
dialog.setCheckBox(cbNoShowAgain);
|
||||
dialog.setDefaultButton(QMessageBox::Ok);
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
@ -684,22 +684,10 @@ Nombres válidos:
|
||||
<source><p>A Client with your name is already connected to the server.</p>Please ensure that you're using a unique name and that only a single instance of the client process is running.</p></source>
|
||||
<translation type="unfinished"><p>Ya hay un cliente conectado al servidor con su nombre.</p>Asegúrese de utilizar un nombre único y de que solo se esté ejecutando una única instancia del proceso del cliente.</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><p>Please try to connect to the server using the server IP address instead of the hostname. </p><p>If that doesn't work, please check your TLS and firewall settings.</p></source>
|
||||
<translation type="unfinished"><p>Intente conectarse al servidor usando la dirección IP del servidor en lugar del nombre de host.</p><p>Si eso no funciona, verifique la configuración de TLS y firewall.</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><p>Please check your TLS and firewall settings.</p></source>
|
||||
<translation type="unfinished"><p>Por favor revise su configuración de TLS y firewall.</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 Connection Error</source>
|
||||
<translation type="unfinished">%1 Error de conexión</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Do not show this message again</source>
|
||||
<translation type="unfinished">No volver a mostrar este mensaje</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 - New Client</source>
|
||||
<translation type="unfinished">%1 - Nuevo cliente</translation>
|
||||
|
||||
@ -684,22 +684,10 @@ Nomi validi:
|
||||
<source><p>A Client with your name is already connected to the server.</p>Please ensure that you're using a unique name and that only a single instance of the client process is running.</p></source>
|
||||
<translation><p>Un client con il tuo nome è già connesso al server.</p>Assicurati di utilizzare un nome univoco e che sia in esecuzione una sola istanza del processo client.</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><p>Please try to connect to the server using the server IP address instead of the hostname. </p><p>If that doesn't work, please check your TLS and firewall settings.</p></source>
|
||||
<translation><p>Prova a connetterti al server usando l'indirizzo IP del server invece del nome host.</p><p>Se non funziona, controlla le impostazioni TLS e del firewall.</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><p>Please check your TLS and firewall settings.</p></source>
|
||||
<translation><p>Controlla le impostazioni TLS e del firewall.</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 Connection Error</source>
|
||||
<translation>Errore di connessione %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Do not show this message again</source>
|
||||
<translation>Non mostrare più questo messaggio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 - New Client</source>
|
||||
<translation>%1 - Nuovo Client</translation>
|
||||
|
||||
@ -685,22 +685,10 @@ Valid names:
|
||||
<source><p>A Client with your name is already connected to the server.</p>Please ensure that you're using a unique name and that only a single instance of the client process is running.</p></source>
|
||||
<translation><p>同じ名前のクライアントがサーバーに接続済です。</p><p>名前の重複がないことと、クライアントプロセスが多重起動していない事を確認してください。</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><p>Please try to connect to the server using the server IP address instead of the hostname. </p><p>If that doesn't work, please check your TLS and firewall settings.</p></source>
|
||||
<translation><p>サーバーのホスト名ではなくIPアドレスで接続してみてください。</p><p>それでも接続できない場合は、TLSとファイアウォールの設定を確認してください。</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><p>Please check your TLS and firewall settings.</p></source>
|
||||
<translation><p>TLSとファイアウォールの設定を確認してください。</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 Connection Error</source>
|
||||
<translation>%1 接続エラー</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Do not show this message again</source>
|
||||
<translation>このメッセージを再表示しない</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 - New Client</source>
|
||||
<translation>%1 - 新しいクライアント</translation>
|
||||
|
||||
@ -683,22 +683,10 @@ Valid names:
|
||||
<source><p>A Client with your name is already connected to the server.</p>Please ensure that you're using a unique name and that only a single instance of the client process is running.</p></source>
|
||||
<translation><p>같은 이름의 클라이언트가 이미 서버에 연결되어 있습니다.</p><p>고유한 이름을 사용하고, 클라이언트 프로세스가 하나만 실행 중인지 확인하세요.</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><p>Please try to connect to the server using the server IP address instead of the hostname. </p><p>If that doesn't work, please check your TLS and firewall settings.</p></source>
|
||||
<translation><p>호스트 이름 대신 서버 IP 주소로 연결해 보세요.</p><p>문제가 계속되면 TLS 및 방화벽 설정을 확인하세요.</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><p>Please check your TLS and firewall settings.</p></source>
|
||||
<translation><p>TLS 및 방화벽 설정을 확인하세요.</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 Connection Error</source>
|
||||
<translation>%1 연결 오류</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Do not show this message again</source>
|
||||
<translation>다시 표시하지 않기</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 - New Client</source>
|
||||
<translation>%1 - 새 클라이언트</translation>
|
||||
|
||||
@ -685,22 +685,10 @@ Valid names:
|
||||
<source><p>A Client with your name is already connected to the server.</p>Please ensure that you're using a unique name and that only a single instance of the client process is running.</p></source>
|
||||
<translation><p>Клиент с таким именем уже подключен к серверу.</p>Убедитесь, что вы используете уникальное имя и запущен только один процесс клиента.</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><p>Please try to connect to the server using the server IP address instead of the hostname. </p><p>If that doesn't work, please check your TLS and firewall settings.</p></source>
|
||||
<translation><p>Попробуйте подключиться к серверу по IP-адресу вместо имени хоста. </p><p>Если это не поможет, проверьте настройки TLS и брандмауэра.</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><p>Please check your TLS and firewall settings.</p></source>
|
||||
<translation><p>Пожалуйста, проверьте настройки TLS и брандмауэра.</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 Connection Error</source>
|
||||
<translation>Ошибка соединения %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Do not show this message again</source>
|
||||
<translation>Больше не показывать это сообщение</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 - New Client</source>
|
||||
<translation>%1 - Новый клиент</translation>
|
||||
|
||||
@ -685,22 +685,10 @@ Valid names:
|
||||
<source><p>A Client with your name is already connected to the server.</p>Please ensure that you're using a unique name and that only a single instance of the client process is running.</p></source>
|
||||
<translation type="unfinished"><p>一个同名的客户端已连接到服务器。</p>请确保您使用的名称唯一,且只有一个客户端进程实例在运行。</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><p>Please try to connect to the server using the server IP address instead of the hostname. </p><p>If that doesn't work, please check your TLS and firewall settings.</p></source>
|
||||
<translation><p>请尝试使用服务器 IP 地址而不是主机名来连接服务器。</p><p>如果不起作用,请检查您的 TLS 和防火墙设置。</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><p>Please check your TLS and firewall settings.</p></source>
|
||||
<translation><p>请检查您的 TLS 和防火墙设置。</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 Connection Error</source>
|
||||
<translation>%1 连接错误</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Do not show this message again</source>
|
||||
<translation>不再显示此消息</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 - New Client</source>
|
||||
<translation>%1 - 新客户端</translation>
|
||||
|
||||
Reference in New Issue
Block a user