diff --git a/src/lib/gui/CMakeLists.txt b/src/lib/gui/CMakeLists.txt index 97b8a620c..0df69a0d4 100644 --- a/src/lib/gui/CMakeLists.txt +++ b/src/lib/gui/CMakeLists.txt @@ -58,8 +58,6 @@ add_library(${target} STATIC core/ServerConnection.h core/ServerMessage.cpp core/ServerMessage.h - core/WaylandWarnings.cpp - core/WaylandWarnings.h dialogs/AboutDialog.cpp dialogs/AboutDialog.h dialogs/AboutDialog.ui diff --git a/src/lib/gui/MainWindow.cpp b/src/lib/gui/MainWindow.cpp index eca80ad6a..c53147b60 100644 --- a/src/lib/gui/MainWindow.cpp +++ b/src/lib/gui/MainWindow.cpp @@ -892,9 +892,6 @@ void MainWindow::coreProcessStateChanged(ProcessState state) m_actionStopCore->setEnabled(true); if (state == Starting) { - if (deskflow::platform::isWayland()) { - m_waylandWarnings.showOnce(this); - } saveSettings(); } diff --git a/src/lib/gui/MainWindow.h b/src/lib/gui/MainWindow.h index ea5da061e..4dc5e3b2f 100644 --- a/src/lib/gui/MainWindow.h +++ b/src/lib/gui/MainWindow.h @@ -24,7 +24,6 @@ #include "gui/core/CoreProcess.h" #include "gui/core/NetworkMonitor.h" #include "gui/core/ServerConnection.h" -#include "gui/core/WaylandWarnings.h" #include "net/Fingerprint.h" #ifdef Q_OS_MACOS @@ -193,7 +192,6 @@ private: bool m_secureSocket = false; bool m_saveOnExit = true; bool m_clientErrorVisible = false; - deskflow::gui::core::WaylandWarnings m_waylandWarnings; ServerConfig m_serverConfig; deskflow::gui::CoreProcess m_coreProcess; deskflow::gui::ServerConnection m_serverConnection; diff --git a/src/lib/gui/Messages.cpp b/src/lib/gui/Messages.cpp index a087d6532..f9c8df874 100644 --- a/src/lib/gui/Messages.cpp +++ b/src/lib/gui/Messages.cpp @@ -8,7 +8,6 @@ #include "Logger.h" -#include "common/Enums.h" #include "common/Settings.h" #include "common/UrlConstants.h" #include "common/VersionInfo.h" @@ -225,24 +224,6 @@ void showReadOnlySettings(QWidget *parent, const QString &systemSettingsPath) QMessageBox::information(parent, title, message); } -void showWaylandLibraryError(QWidget *parent) -{ - QMessageBox::critical( - parent, kAppName, - QObject::tr( - "

Sorry, while this version of %1 does support Wayland, " - "this build was not linked with one or more of the required " - "libraries.

" - "

Please either switch to X from your login screen or use a build " - "that uses the correct libraries.

" - "

If you think this is incorrect, please " - R"(report a bug.

)" - "

Please check the logs for more information.

" - ) - .arg(kAppName, kUrlHelp) - ); -} - bool showUpdateCheckOption(QWidget *parent) { QMessageBox message(parent); diff --git a/src/lib/gui/Messages.h b/src/lib/gui/Messages.h index 045db82c7..5e36aec34 100644 --- a/src/lib/gui/Messages.h +++ b/src/lib/gui/Messages.h @@ -31,8 +31,6 @@ bool showClearSettings(QWidget *parent); void showReadOnlySettings(QWidget *parent, const QString &systemSettingsPath); -void showWaylandLibraryError(QWidget *parent); - bool showUpdateCheckOption(QWidget *parent); bool showDaemonOffline(QWidget *parent); diff --git a/src/lib/gui/core/WaylandWarnings.cpp b/src/lib/gui/core/WaylandWarnings.cpp deleted file mode 100644 index c31d9922f..000000000 --- a/src/lib/gui/core/WaylandWarnings.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Deskflow -- mouse and keyboard sharing utility - * SPDX-FileCopyrightText: (C) 2025 Chris Rizzitello - * SPDX-FileCopyrightText: (C) 2024 Symless Ltd. - * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception - */ - -#include "WaylandWarnings.h" - -#include "Messages.h" -#include "common/Settings.h" - -namespace deskflow::gui::core { - -void WaylandWarnings::showOnce(QWidget *parent) -{ - const auto mode = Settings::value(Settings::Core::CoreMode).value(); - - if (!m_hasEi || !m_hasPortal || mode == Settings::CoreMode::Server) { - if (!m_errorShown) { - m_errorShown = true; - messages::showWaylandLibraryError(parent); - } else { - qWarning("missing required wayland lib(s) or feature"); - } - return; - } -} - -} // namespace deskflow::gui::core diff --git a/src/lib/gui/core/WaylandWarnings.h b/src/lib/gui/core/WaylandWarnings.h deleted file mode 100644 index 706f75874..000000000 --- a/src/lib/gui/core/WaylandWarnings.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Deskflow -- mouse and keyboard sharing utility - * SPDX-FileCopyrightText: (C) 2025 Chris Rizzitello - * SPDX-FileCopyrightText: (C) 2024 Symless Ltd. - * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception - */ - -#pragma once - -#include - -namespace deskflow::gui::core { - -class WaylandWarnings -{ -public: - explicit WaylandWarnings() = default; - - void showOnce(QWidget *parent); - -private: - bool m_errorShown{false}; - -#if WINAPI_LIBEI - const bool m_hasEi = true; -#else - const bool m_hasEi = false; -#endif - -#if WINAPI_LIBPORTAL - const bool m_hasPortal = true; -#else - const bool m_hasPortal = false; -#endif -}; - -} // namespace deskflow::gui::core diff --git a/translations/deskflow_es.ts b/translations/deskflow_es.ts index 67a5c6298..426f85006 100644 --- a/translations/deskflow_es.ts +++ b/translations/deskflow_es.ts @@ -654,10 +654,6 @@ Nombres válidos: <p>Settings are read-only because you only have read access to the file:</p><p>%1</p> <p>Las configuraciones son de solo lectura porque solo tiene acceso de lectura al archivo:</p><p>%1</p> - - <p>Sorry, while this version of %1 does support Wayland, this build was not linked with one or more of the required libraries.</p><p>Please either switch to X from your login screen or use a build that uses the correct libraries.</p><p>If you think this is incorrect, please <a href="%2">report a bug</a>.</p><p>Please check the logs for more information.</p> - <p>Lo sentimos, aunque esta versión de %1 es compatible con Wayland, esta compilación no se vinculó con una o más de las bibliotecas requeridas.</p><p>Cambie a X desde su pantalla de inicio de sesión o use una compilación que use las bibliotecas correctas.</p><p>Si cree que esto es incorrecto, <a href="%2">informe un error</a>.</p><p>Consulte los registros para obtener más información.</p> - No thanks No, gracias diff --git a/translations/deskflow_it.ts b/translations/deskflow_it.ts index 381f3cd5c..5546713a1 100644 --- a/translations/deskflow_it.ts +++ b/translations/deskflow_it.ts @@ -654,10 +654,6 @@ Nomi validi: <p>Settings are read-only because you only have read access to the file:</p><p>%1</p> <p>Le impostazioni sono di sola lettura perché hai solo accesso in lettura al file:</p><p>%1</p> - - <p>Sorry, while this version of %1 does support Wayland, this build was not linked with one or more of the required libraries.</p><p>Please either switch to X from your login screen or use a build that uses the correct libraries.</p><p>If you think this is incorrect, please <a href="%2">report a bug</a>.</p><p>Please check the logs for more information.</p> - <p>Siamo spiacenti, sebbene questa versione di %1 supporti Wayland, questa build non è stata collegata a una o più librerie richieste.</p><p>Passa a X dalla schermata di accesso o usa una build che utilizzi le librerie corrette.</p><p>Se ritieni che ciò sia errato, <a href="%2">segnala un bug</a>.</p><p>Controlla i log per maggiori informazioni.</p> - No thanks No, grazie diff --git a/translations/deskflow_ja.ts b/translations/deskflow_ja.ts index a5e593e71..166d06fb8 100644 --- a/translations/deskflow_ja.ts +++ b/translations/deskflow_ja.ts @@ -656,10 +656,6 @@ Valid names: <p>Settings are read-only because you only have read access to the file:</p><p>%1</p> <p>以下のファイルへの書き込み権限がないため、設定は読み取り専用です:</p><p>%1</p> - - <p>Sorry, while this version of %1 does support Wayland, this build was not linked with one or more of the required libraries.</p><p>Please either switch to X from your login screen or use a build that uses the correct libraries.</p><p>If you think this is incorrect, please <a href="%2">report a bug</a>.</p><p>Please check the logs for more information.</p> - <p>申し訳ありません、このバージョンの %1 は Wayland に対応していますが、このビルドには必要なライブラリがリンクされていません。</p><p>ログイン画面から X に切り替えるか、正しいライブラリをリンクしたビルドを使用してください。</p><p>もしこの説明が正しくないと思われる場合は、<a href="%2">バグレポート</a>してください。</p><p>詳細はログを確認してください。</p> - No thanks 不要です diff --git a/translations/deskflow_ko.ts b/translations/deskflow_ko.ts index 5a7112e21..a89e4ccd5 100644 --- a/translations/deskflow_ko.ts +++ b/translations/deskflow_ko.ts @@ -654,10 +654,6 @@ Valid names: <p>Settings are read-only because you only have read access to the file:</p><p>%1</p> <p>다음 파일에 대한 쓰기 권한이 없어 설정이 읽기 전용입니다:</p><p>%1</p> - - <p>Sorry, while this version of %1 does support Wayland, this build was not linked with one or more of the required libraries.</p><p>Please either switch to X from your login screen or use a build that uses the correct libraries.</p><p>If you think this is incorrect, please <a href="%2">report a bug</a>.</p><p>Please check the logs for more information.</p> - <p>이 버전의 %1은(는) Wayland를 지원하지만, 이 빌드는 하나 이상의 필수 라이브러리와 연결되어 있지 않습니다.</p><p>로그인 화면에서 X로 전환하거나 올바른 라이브러리를 사용한 빌드를 이용하세요.</p><p>이 안내가 잘못되었다고 생각되면 <a href="%2">버그를 신고</a>해 주세요.</p><p>자세한 내용은 로그를 확인하세요.</p> - No thanks 아니요 diff --git a/translations/deskflow_ru.ts b/translations/deskflow_ru.ts index 2df384524..0c0482cc9 100644 --- a/translations/deskflow_ru.ts +++ b/translations/deskflow_ru.ts @@ -654,10 +654,6 @@ Valid names: <p>Settings are read-only because you only have read access to the file:</p><p>%1</p> <p>Настройки доступны только для чтения, так как у вас есть доступ только на чтение к файлу:</p><p>%1</p> - - <p>Sorry, while this version of %1 does support Wayland, this build was not linked with one or more of the required libraries.</p><p>Please either switch to X from your login screen or use a build that uses the correct libraries.</p><p>If you think this is incorrect, please <a href="%2">report a bug</a>.</p><p>Please check the logs for more information.</p> - <p>Хотя эта версия %1 поддерживает Wayland, данная сборка не была слинкована с необходимыми библиотеками.</p><p>Пожалуйста, переключитесь на сессию X11 или используйте сборку с поддержкой нужных библиотек.</p><p>Если вы считаете это ошибкой, пожалуйста, <a href="%2">сообщите о ней</a>.</p> - No thanks Нет, спасибо diff --git a/translations/deskflow_zh_CN.ts b/translations/deskflow_zh_CN.ts index a65384a36..bb8aecdfc 100644 --- a/translations/deskflow_zh_CN.ts +++ b/translations/deskflow_zh_CN.ts @@ -656,10 +656,6 @@ Valid names: <p>Settings are read-only because you only have read access to the file:</p><p>%1</p> <p>设置是只读的,因为您对该文件只有读取权限:</p><p>%1</p> - - <p>Sorry, while this version of %1 does support Wayland, this build was not linked with one or more of the required libraries.</p><p>Please either switch to X from your login screen or use a build that uses the correct libraries.</p><p>If you think this is incorrect, please <a href="%2">report a bug</a>.</p><p>Please check the logs for more information.</p> - <p>抱歉,虽然此版本的 %1 支持 Wayland,但此构建版本未链接一个或多个所需的库。</p><p>请从登录屏幕切换到 X,或者使用链接了正确库的构建版本。</p><p>如果您认为存在问题,请 <a href="%2">报告 Bug</a>。</p><p>请查看日志以获取更多信息。</p> - No thanks 不,谢谢