diff options
author | Ilya Fedin <fedin-ilja2010@ya.ru> | 2021-07-19 21:53:11 +0400 |
---|---|---|
committer | John Preston <johnprestonmail@gmail.com> | 2021-07-19 22:31:27 +0300 |
commit | 6f151f20e93998847fa4c70b060fd1da1a2e46fc (patch) | |
tree | 273d61f8864fc497449cf65384aa6ef69212de07 /Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp | |
parent | ae70dfb1f415cdedef070131f70954a552eb5fa8 (diff) |
Add support for DESKTOP_APP_DISABLE_WEBKITGTK
Co-authored-by: mid-kid <esteve.varela@gmail.com>
Diffstat (limited to 'Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp')
-rw-r--r-- | Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp b/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp index bb57ebbfb8..60f109c9dd 100644 --- a/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp +++ b/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp @@ -16,7 +16,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "base/platform/linux/base_linux_glibmm_helper.h" #include "base/platform/linux/base_linux_dbus_utilities.h" #include "base/platform/base_platform_info.h" -#include "webview/platform/linux/webview_linux_webkit2gtk.h" #include "platform/linux/linux_gtk_integration_p.h" #include "platform/linux/linux_gdk_helper.h" #include "platform/linux/linux_gtk_open_with_dialog.h" @@ -24,6 +23,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "window/window_controller.h" #include "core/application.h" +#ifndef DESKTOP_APP_DISABLE_WEBKITGTK +#include "webview/platform/linux/webview_linux_webkit2gtk.h" +#endif // !DESKTOP_APP_DISABLE_WEBKITGTK + #include <QtCore/QProcess> #include <private/qguiapplication_p.h> @@ -588,9 +591,11 @@ int GtkIntegration::Exec( if (const auto integration = BaseGtkIntegration::Instance()) { return integration->exec(parentDBusName); } +#ifndef DESKTOP_APP_DISABLE_WEBKITGTK } else if (type == Type::Webview) { Webview::WebKit2Gtk::SetServiceName(serviceName.toStdString()); return Webview::WebKit2Gtk::Exec(parentDBusName.toStdString()); +#endif // !DESKTOP_APP_DISABLE_WEBKITGTK } else if (type == Type::TDesktop) { ServiceName = serviceName.toStdString(); if (const auto integration = Instance()) { @@ -615,8 +620,10 @@ void GtkIntegration::Start(Type type) { if (type == Type::Base) { BaseGtkIntegration::SetServiceName(kBaseService.utf16().arg(h)); } else if (type == Type::Webview) { +#ifndef DESKTOP_APP_DISABLE_WEBKITGTK Webview::WebKit2Gtk::SetServiceName( kWebviewService.utf16().arg(h).arg("%1").toStdString()); +#endif // !DESKTOP_APP_DISABLE_WEBKITGTK return; } else { |