2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 06:55:58 +00:00

Use custom gtk file dialog only on gtk-based DEs

This commit is contained in:
Ilya Fedin
2020-06-01 12:33:24 +04:00
committed by John Preston
parent 1fb1d57a27
commit 7f29f57c3d
4 changed files with 21 additions and 15 deletions

View File

@@ -277,12 +277,12 @@ bool IsGtkIntegrationForced() {
return false;
}
bool IsGtkFileDialogForced() {
#ifdef TDESKTOP_FORCE_GTK_FILE_DIALOG
bool UseGtkFileDialog() {
#ifdef TDESKTOP_USE_GTK_FILE_DIALOG
return true;
#else // TDESKTOP_FORCE_GTK_FILE_DIALOG
#else // TDESKTOP_USE_GTK_FILE_DIALOG
return false;
#endif // !TDESKTOP_FORCE_GTK_FILE_DIALOG
#endif // !TDESKTOP_USE_GTK_FILE_DIALOG
}
bool IsQtPluginsBundled() {
@@ -668,7 +668,7 @@ void start() {
if(IsStaticBinary()
|| InAppImage()
|| InSnap()
|| IsGtkFileDialogForced()
|| UseGtkFileDialog()
|| IsQtPluginsBundled()) {
LOG(("Checking for XDG Desktop Portal..."));
// this can give us a chance to use a proper file dialog for current session