2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-08 10:35:15 +00:00

Check if portal backend is present by absence of errors when getting portal version

This commit is contained in:
Ilya Fedin
2021-03-07 08:02:41 +04:00
committed by John Preston
parent 67eba93e29
commit 67cbe61879
5 changed files with 65 additions and 141 deletions

View File

@@ -11,7 +11,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "platform/linux/linux_gtk_integration_p.h"
#include "platform/linux/linux_gdk_helper.h"
#include "platform/linux/linux_desktop_environment.h"
#include "platform/linux/specific_linux.h"
#include "lang/lang_keys.h"
#include "storage/localstorage.h"
#include "base/qt_adapters.h"
@@ -641,9 +640,7 @@ bool Supported() {
bool Use(Type type) {
return qEnvironmentVariableIsSet("TDESKTOP_USE_GTK_FILE_DIALOG")
|| DesktopEnvironment::IsGtkBased()
// use as a fallback for portal dialog
|| UseXDGDesktopPortal();
|| DesktopEnvironment::IsGtkBased();
}
bool Get(