From f6eca72da8af611844322661d0b5bf8573dec5c1 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Wed, 30 Oct 2024 11:08:39 +0400 Subject: [PATCH] Add error message for webview unsupported display server --- Telegram/Resources/langs/lang.strings | 1 + Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 79c691079251f0..83dafac2ecbb62 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -3962,6 +3962,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_payments_webview_install_edge" = "Please install {link}."; "lng_payments_webview_install_webkit" = "Please install WebKitGTK (webkit2gtk-4.1/webkit2gtk-4.0) using your package manager."; "lng_payments_webview_enable_opengl" = "Please enable OpenGL in application settings."; +"lng_payments_webview_switch_x11" = "Unsupported display server. Please switch to X11."; "lng_payments_webview_update_windows" = "Please update your system to Windows 8.1 or later."; "lng_payments_sure_close" = "Are you sure you want to close this payment form? The changes you made will be lost."; "lng_payments_receipt_label" = "Receipt"; diff --git a/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp b/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp index ef25c73ac4bdf9..3aca29e8704447 100644 --- a/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp +++ b/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp @@ -1605,6 +1605,8 @@ TextWithEntities ErrorText(const Webview::Available &info) { return { tr::lng_payments_webview_install_webkit(tr::now) }; case Error::NoOpenGL: return { tr::lng_payments_webview_enable_opengl(tr::now) }; + case Error::NonX11: + return { tr::lng_payments_webview_switch_x11(tr::now) }; case Error::OldWindows: return { tr::lng_payments_webview_update_windows(tr::now) }; default: