mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-09 11:05:12 +00:00
Make Linux file dialog API better
This commit is contained in:
@@ -171,7 +171,7 @@ bool Get(
|
||||
parent = parent->window();
|
||||
}
|
||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
if (XDP::Use(type)) {
|
||||
{
|
||||
const auto result = XDP::Get(
|
||||
parent,
|
||||
files,
|
||||
@@ -187,15 +187,17 @@ bool Get(
|
||||
}
|
||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
if (const auto integration = GtkIntegration::Instance()) {
|
||||
if (integration->useFileDialog(type)) {
|
||||
return integration->getFileDialog(
|
||||
parent,
|
||||
files,
|
||||
remoteContent,
|
||||
caption,
|
||||
filter,
|
||||
type,
|
||||
startFile);
|
||||
const auto result = integration->getFileDialog(
|
||||
parent,
|
||||
files,
|
||||
remoteContent,
|
||||
caption,
|
||||
filter,
|
||||
type,
|
||||
startFile);
|
||||
|
||||
if (result.has_value()) {
|
||||
return *result;
|
||||
}
|
||||
}
|
||||
// avoid situation when portals don't work
|
||||
|
Reference in New Issue
Block a user