From d52cabb3861ba40fe15f7423e530364fe8878540 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sun, 19 Mar 2023 21:13:56 +0400 Subject: [PATCH] Update to the new WebKitGTK 6.0 API --- Telegram/Resources/langs/lang.strings | 2 +- Telegram/SourceFiles/payments/ui/payments_panel.cpp | 2 +- Telegram/SourceFiles/platform/linux/launcher_linux.cpp | 6 +++--- Telegram/SourceFiles/platform/linux/specific_linux.cpp | 4 ++-- Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp | 2 +- Telegram/lib_webview | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 4c22feea1..c10c0ca3c 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -2516,7 +2516,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_payments_webview_no_use" = "Unfortunately, you can't use payments with current system configuration."; "lng_payments_webview_install_edge" = "Please install {link}."; -"lng_payments_webview_install_webkit" = "Please install WebKitGTK (webkit2gtk-5.0/webkit2gtk-4.1/webkit2gtk-4.0) using your package manager."; +"lng_payments_webview_install_webkit" = "Please install WebKitGTK (webkitgtk-6.0/webkit2gtk-4.1/webkit2gtk-4.0) using your package manager."; "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/payments/ui/payments_panel.cpp b/Telegram/SourceFiles/payments/ui/payments_panel.cpp index 2b93e08b2..2f9b1cfa4 100644 --- a/Telegram/SourceFiles/payments/ui/payments_panel.cpp +++ b/Telegram/SourceFiles/payments/ui/payments_panel.cpp @@ -914,7 +914,7 @@ void Panel::showWebviewError( "https://go.microsoft.com/fwlink/p/?LinkId=2124703")) .append(parts.value(1)); } break; - case Error::NoGtkOrWebkit2Gtk: + case Error::NoWebKitGTK: rich.append(tr::lng_payments_webview_install_webkit(tr::now)); break; case Error::OldWindows: diff --git a/Telegram/SourceFiles/platform/linux/launcher_linux.cpp b/Telegram/SourceFiles/platform/linux/launcher_linux.cpp index a2200f6f7..a2bc1c237 100644 --- a/Telegram/SourceFiles/platform/linux/launcher_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/launcher_linux.cpp @@ -9,7 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "core/crash_reports.h" #include "core/update_checker.h" -#include "webview/platform/linux/webview_linux_webkit2gtk.h" +#include "webview/platform/linux/webview_linux_webkitgtk.h" #include @@ -64,8 +64,8 @@ Launcher &Launcher::Instance() { int Launcher::exec() { for (auto i = begin(_arguments), e = end(_arguments); i != e; ++i) { if (*i == "-webviewhelper" && std::distance(i, e) > 1) { - Webview::WebKit2Gtk::SetSocketPath(*(i + 1)); - return Webview::WebKit2Gtk::Exec(); + Webview::WebKitGTK::SetSocketPath(*(i + 1)); + return Webview::WebKitGTK::Exec(); } } diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp index 93fc23a99..6d98b39fe 100644 --- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp @@ -22,7 +22,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "core/core_settings.h" #include "core/update_checker.h" #include "window/window_controller.h" -#include "webview/platform/linux/webview_linux_webkit2gtk.h" +#include "webview/platform/linux/webview_linux_webkitgtk.h" #ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION #include "base/platform/linux/base_linux_glibmm_helper.h" @@ -787,7 +787,7 @@ void start() { #endif // DESKTOP_APP_USE_PACKAGED_FONTS #endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION - Webview::WebKit2Gtk::SetSocketPath(u"%1/%2-%3-webview-%4"_q.arg( + Webview::WebKitGTK::SetSocketPath(u"%1/%2-%3-webview-%4"_q.arg( QDir::tempPath(), h, cGUIDStr(), diff --git a/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp b/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp index 7dff179cc..d77b84f3e 100644 --- a/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp +++ b/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp @@ -1143,7 +1143,7 @@ void Panel::showWebviewError( "https://go.microsoft.com/fwlink/p/?LinkId=2124703")) .append(parts.value(1)); } break; - case Error::NoGtkOrWebkit2Gtk: + case Error::NoWebKitGTK: rich.append(tr::lng_payments_webview_install_webkit(tr::now)); break; default: diff --git a/Telegram/lib_webview b/Telegram/lib_webview index 69aec516f..f632fc84c 160000 --- a/Telegram/lib_webview +++ b/Telegram/lib_webview @@ -1 +1 @@ -Subproject commit 69aec516f1a3553c6870ae30adbf11b174858694 +Subproject commit f632fc84cbc62ae8abbbd05f81d472757a337c11