1
0

Accepting request 799686 from server:messaging

OBS-URL: https://build.opensuse.org/request/show/799686
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/telegram-desktop?expand=0&rev=34
This commit is contained in:
Dominique Leuenberger 2020-05-03 20:46:40 +00:00 committed by Git OBS Bridge
commit 05843284e4
5 changed files with 14 additions and 58 deletions

View File

@ -1,51 +0,0 @@
From 7bc86cc9af28ba3d04a5cb69f6f7c16bfe7f8719 Mon Sep 17 00:00:00 2001
From: Ilya Fedin <fedin-ilja2010@ya.ru>
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;

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:86d2acc2dfd426ea222ae94984d81e60774f16f3ecc3405578377d90f809a950
size 26133964

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:52e1ef6aff5d78fa979ed0e31129662decf78e9e317184912a7e39fe9f666200
size 26178569

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Sat May 2 01:03:59 UTC 2020 - Marcel Kuehlhorn <tux93@opensuse.org>
- Update to 2.1.1
* Improve quiz explanation tooltip layout.
* Fix possible crash in theme editor.
* Other minor bug fixes and improvements.
- Remove 0002-fix-directory-open-via-portals.patch
* this release already contains the fix
-------------------------------------------------------------------
Sat Apr 25 14:59:16 UTC 2020 - Markus S <kamikazow@opensuse.org>

View File

@ -31,7 +31,7 @@
%define __builder ninja
Name: telegram-desktop
Version: 2.1.0
Version: 2.1.1
Release: 0
Summary: Messaging application with a focus on speed and security
License: GPL-3.0-only
@ -44,8 +44,6 @@ Source1: range-v3-master.zip
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
@ -150,7 +148,6 @@ mv %{_builddir}/Libraries/range-v3-master %{_builddir}/Libraries/range-v3
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%limit_build -m 2048