2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-10-09 13:39:00 +00:00

Add portal-based open with dialog implementation

This commit is contained in:
Ilya Fedin
2021-03-07 02:29:13 +04:00
committed by John Preston
parent a27a54798c
commit b918170464
7 changed files with 229 additions and 20 deletions

View File

@@ -12,6 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
#include "platform/linux/linux_xdp_file_dialog.h"
#include "platform/linux/linux_xdp_open_with_dialog.h"
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
#include <QtGui/QDesktopServices>
@@ -41,6 +42,12 @@ void UnsafeOpenEmailLink(const QString &email) {
}
bool UnsafeShowOpenWith(const QString &filepath) {
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
if (internal::ShowXDPOpenWithDialog(filepath)) {
return true;
}
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
if (InFlatpak() || InSnap()) {
return false;
}