2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-03 16:05:57 +00:00

os x and linux dialog path remember through executions

This commit is contained in:
John Preston
2015-03-24 18:49:07 +03:00
parent b5d3580150
commit 489b151d49
4 changed files with 36 additions and 6 deletions

View File

@@ -920,6 +920,14 @@ namespace {
cSetRecentEmojisPreload(v);
} break;
case dbiDialogLastPath: {
QString path;
stream >> path;
if (!_checkStreamStatus(stream)) return false;
cSetDialogLastPath(path);
} break;
default:
LOG(("App Error: unknown blockId in _readSetting: %1").arg(blockId));
return false;
@@ -1130,6 +1138,7 @@ namespace {
uint32 size = 11 * (sizeof(quint32) + sizeof(qint32));
size += sizeof(quint32) + _stringSize(cAskDownloadPath() ? QString() : cDownloadPath());
size += sizeof(quint32) + sizeof(qint32) + cGetRecentEmojis().size() * (sizeof(uint32) + sizeof(ushort));
size += sizeof(quint32) + _stringSize(cDialogLastPath());
EncryptedDescriptor data(size);
data.stream << quint32(dbiSendKey) << qint32(cCtrlEnter() ? dbiskCtrlEnter : dbiskEnter);
@@ -1144,6 +1153,7 @@ namespace {
data.stream << quint32(dbiDownloadPath) << (cAskDownloadPath() ? QString() : cDownloadPath());
data.stream << quint32(dbiCompressPastedImage) << qint32(cCompressPastedImage());
data.stream << quint32(dbiEmojiTab) << qint32(cEmojiTab());
data.stream << quint32(dbiDialogLastPath) << cDialogLastPath();
RecentEmojiPreload v;
v.reserve(cGetRecentEmojis().size());