2016-07-06 21:30:14 +03:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 13:23:14 +03:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2016-07-06 21:30:14 +03:00
|
|
|
|
2018-01-03 13:23:14 +03:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2016-07-06 21:30:14 +03:00
|
|
|
*/
|
2017-02-28 13:51:00 +03:00
|
|
|
#include "platform/linux/file_utilities_linux.h"
|
2016-07-06 21:30:14 +03:00
|
|
|
|
2021-03-07 02:29:13 +04:00
|
|
|
#include "platform/linux/linux_xdp_open_with_dialog.h"
|
2021-02-05 02:06:21 +04:00
|
|
|
|
2016-07-06 21:30:14 +03:00
|
|
|
namespace Platform {
|
2017-02-28 17:05:30 +03:00
|
|
|
namespace File {
|
|
|
|
|
2020-11-08 01:28:24 +04:00
|
|
|
bool UnsafeShowOpenWith(const QString &filepath) {
|
2023-09-03 14:40:18 +04:00
|
|
|
return internal::ShowXDPOpenWithDialog(filepath);
|
2020-04-28 12:26:12 +04:00
|
|
|
}
|
|
|
|
|
2017-02-28 17:05:30 +03:00
|
|
|
} // namespace File
|
|
|
|
|
2016-07-06 21:30:14 +03:00
|
|
|
namespace FileDialog {
|
2017-02-28 17:05:30 +03:00
|
|
|
|
2018-04-17 19:19:34 +04:00
|
|
|
bool Get(
|
|
|
|
QPointer<QWidget> parent,
|
|
|
|
QStringList &files,
|
|
|
|
QByteArray &remoteContent,
|
|
|
|
const QString &caption,
|
|
|
|
const QString &filter,
|
2021-01-10 07:51:38 +04:00
|
|
|
::FileDialog::internal::Type type,
|
2018-04-17 19:19:34 +04:00
|
|
|
QString startFile) {
|
2018-06-11 23:39:33 +03:00
|
|
|
if (parent) {
|
|
|
|
parent = parent->window();
|
|
|
|
}
|
2018-04-17 19:19:34 +04:00
|
|
|
return ::FileDialog::internal::GetDefault(
|
|
|
|
parent,
|
|
|
|
files,
|
|
|
|
remoteContent,
|
|
|
|
caption,
|
|
|
|
filter,
|
|
|
|
type,
|
|
|
|
startFile);
|
2017-02-28 17:05:30 +03:00
|
|
|
}
|
|
|
|
|
2016-07-06 21:30:14 +03:00
|
|
|
} // namespace FileDialog
|
|
|
|
} // namespace Platform
|