From 5a1079e3676d2bf91d3f2e73f3abec01b0c6bf7a Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 19 Aug 2015 16:54:17 +0300 Subject: [PATCH] version 0.8.52 with some fixes --- Telegram/PrepareWin.bat | 8 ++++---- Telegram/SourceFiles/application.cpp | 4 ++-- Telegram/SourceFiles/config.h | 4 ++-- Telegram/SourceFiles/localstorage.cpp | 4 +++- Telegram/SourceFiles/pspecific_wnd.cpp | 6 +++++- Telegram/Telegram.plist | 2 +- Telegram/Telegram.rc | Bin 5540 -> 5540 bytes Telegram/Telegram.xcodeproj/project.pbxproj | 12 ++++++------ Telegram/Version.sh | 2 +- 9 files changed, 24 insertions(+), 18 deletions(-) diff --git a/Telegram/PrepareWin.bat b/Telegram/PrepareWin.bat index 2e28a555b..4a1fa200f 100644 --- a/Telegram/PrepareWin.bat +++ b/Telegram/PrepareWin.bat @@ -1,10 +1,10 @@ @echo OFF set "AppVersionStrMajor=0.8" -set "AppVersion=8051" -set "AppVersionStrSmall=0.8.51" -set "AppVersionStr=0.8.51" -set "AppVersionStrFull=0.8.51.0" +set "AppVersion=8052" +set "AppVersionStrSmall=0.8.52" +set "AppVersionStr=0.8.52" +set "AppVersionStrFull=0.8.52.0" set "DevChannel=0" if %DevChannel% neq 0 goto preparedev diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 85096cf9c..960793b67 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -658,8 +658,8 @@ void Application::checkMapVersion() { QString versionFeatures; if (cDevVersion() && Local::oldMapVersion() < 8050) { versionFeatures = QString::fromUtf8("\xe2\x80\x94 Bug fixes in Windows notifications\n\xe2\x80\x94 Fixed input methods on Linux (Fcitx and IBus)");// .replace('@', qsl("@") + QChar(0x200D)); - } else if (!cDevVersion() && Local::oldMapVersion() < 8051) { - versionFeatures = lang(lng_new_version_text).trimmed(); + } else if (!cDevVersion() && Local::oldMapVersion() < 8052) { + versionFeatures = lang(lng_new_version_minor).trimmed(); } if (!versionFeatures.isEmpty()) { versionFeatures = lng_new_version_wrap(lt_version, QString::fromStdWString(AppVersionStr), lt_changes, versionFeatures, lt_link, qsl("https://desktop.telegram.org/#changelog")); diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 3490453cd..6b9d80a95 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -17,8 +17,8 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org */ #pragma once -static const int32 AppVersion = 8051; -static const wchar_t *AppVersionStr = L"0.8.51"; +static const int32 AppVersion = 8052; +static const wchar_t *AppVersionStr = L"0.8.52"; static const bool DevVersion = false; static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; diff --git a/Telegram/SourceFiles/localstorage.cpp b/Telegram/SourceFiles/localstorage.cpp index 125041324..a1eb4837a 100644 --- a/Telegram/SourceFiles/localstorage.cpp +++ b/Telegram/SourceFiles/localstorage.cpp @@ -744,7 +744,9 @@ namespace { if (!_checkStreamStatus(stream)) return false; cSetWindowsNotifications(v == 1); - cSetCustomNotifies((App::wnd() ? App::wnd()->psHasNativeNotifications() : true) && !cWindowsNotifications()); + if (cPlatform() == dbipWindows) { + cSetCustomNotifies((App::wnd() ? !App::wnd()->psHasNativeNotifications() : true) || !cWindowsNotifications()); + } } break; case dbiWorkMode: { diff --git a/Telegram/SourceFiles/pspecific_wnd.cpp b/Telegram/SourceFiles/pspecific_wnd.cpp index 58832dc8f..af60a328a 100644 --- a/Telegram/SourceFiles/pspecific_wnd.cpp +++ b/Telegram/SourceFiles/pspecific_wnd.cpp @@ -119,6 +119,7 @@ namespace { }; typedef QMap ToastImages; ToastImages toastImages; + bool toastImageSaved = false; HWND createTaskbarHider() { HINSTANCE appinst = (HINSTANCE)GetModuleHandle(0); @@ -2148,7 +2149,9 @@ void psStart() { } void psFinish() { - psDeleteDir(cWorkingDir() + qsl("tdata/temp")); + if (toastImageSaved) { + psDeleteDir(cWorkingDir() + qsl("tdata/temp")); + } } namespace { @@ -2706,6 +2709,7 @@ QString toastImage(const StorageKey &key, PeerData *peer) { App::wnd()->iconLarge().save(v.path, "PNG"); } i = toastImages.insert(key, v); + toastImageSaved = true; } return i->path; } diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist index 37e739bf7..b4aada093 100644 --- a/Telegram/Telegram.plist +++ b/Telegram/Telegram.plist @@ -11,7 +11,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.8.51 + 0.8.52 LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) CFBundleSignature diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index c9f1d53aa3a65d3f21592d8171b3064441d1c2e1..0473e1651598623718e07b9a955505635ca34c54 100644 GIT binary patch delta 53 zcmZ3Yy+nIM5ig_B