mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-06 17:35:36 +00:00
Fix directory opening with portal and use them by default with KDE
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user