From 45a6985df54f7884b78a2c8f0da5b53ba6e13b2d Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 31 May 2019 12:02:47 +0300 Subject: [PATCH] Force GTK file chooser only in the official builds. --- Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp | 3 +++ Telegram/gyp/Telegram.gyp | 1 + 2 files changed, 4 insertions(+) diff --git a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp index c78be9e59..3b6ae7312 100644 --- a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp @@ -100,6 +100,9 @@ using Type = ::FileDialog::internal::Type; #ifndef TDESKTOP_DISABLE_GTK_INTEGRATION bool NativeSupported() { +#ifndef TDESKTOP_FORCE_GTK_FILE_DIALOG + return false; +#endif // TDESKTOP_FORCE_GTK_FILE_DIALOG return Platform::internal::GdkHelperLoaded() && (Libs::gtk_widget_hide_on_delete != nullptr) && (Libs::gtk_clipboard_store != nullptr) diff --git a/Telegram/gyp/Telegram.gyp b/Telegram/gyp/Telegram.gyp index 7370115f0..57d81be5f 100644 --- a/Telegram/gyp/Telegram.gyp +++ b/Telegram/gyp/Telegram.gyp @@ -130,6 +130,7 @@ [ '"<(official_build_target)" != ""', { 'defines': [ 'TDESKTOP_OFFICIAL_TARGET=<(official_build_target)', + 'TDESKTOP_FORCE_GTK_FILE_DIALOG', ], 'dependencies': [ 'utils.gyp:Packer',