Update to the new WebKitGTK 6.0 API

This commit is contained in:
Ilya Fedin
2023-03-19 21:13:56 +04:00
committed by John Preston
parent e632ac631e
commit d52cabb386
6 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -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";
@@ -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:
@@ -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 <QtWidgets/QApplication>
@@ -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();
}
}
@@ -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(),
@@ -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: