Init last path with gtk dialog

This commit is contained in:
Ilya Fedin 2021-02-13 17:51:23 +04:00 committed by John Preston
parent 88951e9e5c
commit 294f849775
1 changed files with 5 additions and 0 deletions

View File

@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/ */
#include "platform/linux/linux_gtk_file_dialog.h" #include "platform/linux/linux_gtk_file_dialog.h"
#include "platform/platform_file_utilities.h"
#include "platform/linux/linux_gtk_integration_p.h" #include "platform/linux/linux_gtk_integration_p.h"
#include "platform/linux/linux_gdk_helper.h" #include "platform/linux/linux_gdk_helper.h"
#include "platform/linux/linux_desktop_environment.h" #include "platform/linux/linux_desktop_environment.h"
@ -655,6 +656,10 @@ bool Get(
const QString &filter, const QString &filter,
Type type, Type type,
QString startFile) { QString startFile) {
if (cDialogLastPath().isEmpty()) {
InitLastPath();
}
GtkFileDialog dialog(parent, caption, QString(), filter); GtkFileDialog dialog(parent, caption, QString(), filter);
dialog.setModal(true); dialog.setModal(true);