diff --git a/0002-fix-directory-open-via-portals.patch b/0002-fix-directory-open-via-portals.patch new file mode 100644 index 0000000..720bb8f --- /dev/null +++ b/0002-fix-directory-open-via-portals.patch @@ -0,0 +1,51 @@ +From 7bc86cc9af28ba3d04a5cb69f6f7c16bfe7f8719 Mon Sep 17 00:00:00 2001 +From: Ilya Fedin +Date: Tue, 21 Apr 2020 23:05:17 +0400 +Subject: [PATCH] Fix directory opening with portal and use them by default + with KDE + +--- + .../SourceFiles/platform/linux/file_utilities_linux.cpp | 6 +++--- + Telegram/SourceFiles/platform/linux/specific_linux.cpp | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp +index 47dd56a411..88f8a69a91 100644 +--- a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp ++++ b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp +@@ -83,11 +83,11 @@ constexpr auto kPreviewHeight = 512; + using Type = ::FileDialog::internal::Type; + + #ifndef TDESKTOP_DISABLE_GTK_INTEGRATION +-bool NativeSupported() { ++bool NativeSupported(Type type = Type::ReadFile) { + #ifndef TDESKTOP_FORCE_GTK_FILE_DIALOG + return false; + #endif // TDESKTOP_FORCE_GTK_FILE_DIALOG +- return !Platform::UseXDGDesktopPortal() ++ return (!Platform::UseXDGDesktopPortal() || type == Type::ReadFolder) + && Platform::internal::GdkHelperLoaded() + && (Libs::gtk_widget_hide_on_delete != nullptr) + && (Libs::gtk_clipboard_store != nullptr) +@@ -192,7 +192,7 @@ bool Get( + parent = parent->window(); + } + #ifndef TDESKTOP_DISABLE_GTK_INTEGRATION +- if (NativeSupported()) { ++ if (NativeSupported(type)) { + return GetNative( + parent, + files, +diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp +index 0bb3963420..c12e5a0780 100644 +--- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp ++++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp +@@ -266,7 +266,7 @@ bool UseXDGDesktopPortal() { + const auto envVar = qEnvironmentVariableIsSet("TDESKTOP_USE_PORTAL"); + const auto portalPresent = IsXDGDesktopPortalPresent(); + +- return envVar && portalPresent; ++ return (DesktopEnvironment::IsKDE() || envVar) && portalPresent; + }(); + + return UsePortal; diff --git a/tdesktop-2.0.1-full.tar.gz b/tdesktop-2.0.1-full.tar.gz deleted file mode 100644 index f0254ed..0000000 --- a/tdesktop-2.0.1-full.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ced19f5bc15e26d7bf76e47841422425f664110f1aada111b9f525ab18e1723c -size 26106949 diff --git a/tdesktop-2.1.0-full.tar.gz b/tdesktop-2.1.0-full.tar.gz new file mode 100644 index 0000000..dd74cfb --- /dev/null +++ b/tdesktop-2.1.0-full.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86d2acc2dfd426ea222ae94984d81e60774f16f3ecc3405578377d90f809a950 +size 26133964 diff --git a/telegram-desktop.changes b/telegram-desktop.changes index 064832f..957acaf 100644 --- a/telegram-desktop.changes +++ b/telegram-desktop.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Sat Apr 25 14:59:16 UTC 2020 - Markus S + +- Update to 2.1.0 + * Access a catalog of over 20,000 stickers made by professional + artists from the updated Sticker Panel by clicking the '+' icon. + * Use sticker search to find the stickers you're looking for + or scroll from the latest packs all the way to the classics. + * Add explanations that appear after users respond to a quiz question. + * See how much time you have left to answer a question from + @QuizBot with the new countdown animation. + * Send a single :dart: emoji to see if you hit the bullseye. +- Disable libdee requirement after Python2 removal +- Upstream recommends using xdg-desktop-portal, so we might do the same +- Add 0002-fix-directory-open-via-portals.patch + * Upstream fix for a bug when opening directories via portals + ------------------------------------------------------------------- Tue Mar 31 11:43:35 UTC 2020 - Marcel Kuehlhorn diff --git a/telegram-desktop.spec b/telegram-desktop.spec index 9989078..5492533 100644 --- a/telegram-desktop.spec +++ b/telegram-desktop.spec @@ -31,7 +31,7 @@ %define __builder ninja Name: telegram-desktop -Version: 2.0.1 +Version: 2.1.0 Release: 0 Summary: Messaging application with a focus on speed and security License: GPL-3.0-only @@ -40,8 +40,12 @@ URL: https://github.com/telegramdesktop/tdesktop Source0: https://github.com/telegramdesktop/tdesktop/releases/download/v%{version}/tdesktop-%{version}-full.tar.gz # curl https://codeload.github.com/ericniebler/range-v3/zip/master -o range-v3-master.zip Source1: range-v3-master.zip +# PATCH-FIX-OPENSUSE Patch0: 0000-gtk2-default.patch +# PATCH-FIX-OPENSUSE Patch1: 0001-use-bundled-range.patch +# PATCH-FIX-UPSTREAM Fix for opening directories when using portals +Patch2: 0002-fix-directory-open-via-portals.patch BuildRequires: appstream-glib BuildRequires: chrpath BuildRequires: cmake >= 3.16 @@ -73,7 +77,6 @@ BuildRequires: pkgconfig(Qt5Network) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(dbusmenu-qt5) -BuildRequires: pkgconfig(dee-1.0) BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(fontconfig) BuildRequires: pkgconfig(freetype2) @@ -128,6 +131,8 @@ Requires: ffmpeg Requires: hicolor-icon-theme Requires: icu Requires: openssl +# TDesktop can fall back to a simple GTK file picker but prefers the portal +Recommends: xdg-desktop-portal ExclusiveArch: x86_64 %description @@ -145,6 +150,7 @@ mv %{_builddir}/Libraries/range-v3-master %{_builddir}/Libraries/range-v3 %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build %limit_build -m 2048 @@ -154,7 +160,7 @@ export CXX=/usr/bin/g++-9 %endif %cmake \ - -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_BUILD_TYPE=Release \ -DTDESKTOP_API_ID=340630 \ -DTDESKTOP_API_HASH=98a22f733eac40f1bd187a30d19271de \