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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user