From 6a05924dcfbf2a9fbe7a96fcfa9f3aca2e907b08 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 16 Aug 2015 19:37:56 +0300 Subject: [PATCH] version 0.8.51 prepared, with win7 and winxp fix --- Telegram/PrepareWin.bat | 10 +++--- Telegram/SourceFiles/application.cpp | 2 +- Telegram/SourceFiles/config.h | 6 ++-- Telegram/SourceFiles/dialogswidget.cpp | 36 ++++++++++---------- Telegram/SourceFiles/pspecific_wnd.cpp | 21 ++++++------ Telegram/SourceFiles/stdafx.h | 2 +- Telegram/Telegram.plist | 2 +- Telegram/Telegram.rc | Bin 5540 -> 5540 bytes Telegram/Telegram.xcodeproj/project.pbxproj | 12 +++---- Telegram/Version.sh | 2 +- 10 files changed, 47 insertions(+), 46 deletions(-) diff --git a/Telegram/PrepareWin.bat b/Telegram/PrepareWin.bat index 0697c6daad237a..2e28a555bcc6c3 100644 --- a/Telegram/PrepareWin.bat +++ b/Telegram/PrepareWin.bat @@ -1,11 +1,11 @@ @echo OFF set "AppVersionStrMajor=0.8" -set "AppVersion=8050" -set "AppVersionStrSmall=0.8.50" -set "AppVersionStr=0.8.50" -set "AppVersionStrFull=0.8.50.0" -set "DevChannel=1" +set "AppVersion=8051" +set "AppVersionStrSmall=0.8.51" +set "AppVersionStr=0.8.51" +set "AppVersionStrFull=0.8.51.0" +set "DevChannel=0" if %DevChannel% neq 0 goto preparedev diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index da51a09ebc9907..85096cf9c456ec 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -658,7 +658,7 @@ 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() < 8048) { + } else if (!cDevVersion() && Local::oldMapVersion() < 8051) { versionFeatures = lang(lng_new_version_text).trimmed(); } if (!versionFeatures.isEmpty()) { diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 01a097edfc8255..a2701766d0755f 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -17,9 +17,9 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org */ #pragma once -static const int32 AppVersion = 8050; -static const wchar_t *AppVersionStr = L"0.8.50"; -static const bool DevVersion = true; +static const int32 AppVersion = 8051; +static const wchar_t *AppVersionStr = L"0.8.51"; +static const bool DevVersion = false; static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; static const wchar_t *AppName = L"Telegram Desktop"; diff --git a/Telegram/SourceFiles/dialogswidget.cpp b/Telegram/SourceFiles/dialogswidget.cpp index 771efe276ccd7a..e28b385aa03ed4 100644 --- a/Telegram/SourceFiles/dialogswidget.cpp +++ b/Telegram/SourceFiles/dialogswidget.cpp @@ -969,7 +969,7 @@ void DialogsListWidget::selectSkip(int32 direction) { if (!sel) { if (dialogs.list.count && direction > 0) { sel = dialogs.list.begin; - } else if (contactsNoDialogs.list.count && direction > 0) { + } else if (false && contactsNoDialogs.list.count && direction > 0) { sel = contactsNoDialogs.list.begin; } else { return; @@ -977,14 +977,14 @@ void DialogsListWidget::selectSkip(int32 direction) { } else if (direction > 0) { if (sel->next->next) { sel = sel->next; - } else if (sel->next == dialogs.list.end && contactsNoDialogs.list.count) { + } else if (false && sel->next == dialogs.list.end && contactsNoDialogs.list.count) { sel = contactsNoDialogs.list.begin; contactSel = true; } } else { if (sel->prev) { sel = sel->prev; - } else if (sel == contactsNoDialogs.list.begin && dialogs.list.count) { + } else if (false && sel == contactsNoDialogs.list.begin && dialogs.list.count) { sel = dialogs.list.end->prev; contactSel = false; } @@ -1042,7 +1042,7 @@ void DialogsListWidget::scrollToPeer(const PeerId &peer, MsgId msgId) { DialogsList::RowByPeer::const_iterator i = dialogs.list.rowByPeer.constFind(peer); if (i != dialogs.list.rowByPeer.cend()) { fromY = i.value()->pos * st::dlgHeight; - } else { + } else if (false) { i = contactsNoDialogs.list.rowByPeer.constFind(peer); if (i != contactsNoDialogs.list.rowByPeer.cend()) { fromY = (i.value()->pos + dialogs.list.count) * st::dlgHeight; @@ -1077,7 +1077,7 @@ void DialogsListWidget::selectSkipPage(int32 pixels, int32 direction) { if (!sel) { if (direction > 0 && dialogs.list.count) { sel = dialogs.list.begin; - } else if (direction > 0 && contactsNoDialogs.list.count) { + } else if (false && direction > 0 && contactsNoDialogs.list.count) { sel = contactsNoDialogs.list.begin; } else { return; @@ -1087,7 +1087,7 @@ void DialogsListWidget::selectSkipPage(int32 pixels, int32 direction) { while (toSkip-- && sel->next->next) { sel = sel->next; } - if (toSkip >= 0 && sel->next == dialogs.list.end && contactsNoDialogs.list.count) { + if (false && toSkip >= 0 && sel->next == dialogs.list.end && contactsNoDialogs.list.count) { sel = contactsNoDialogs.list.begin; while (toSkip-- && sel->next->next) { sel = sel->next; @@ -1358,17 +1358,17 @@ void DialogsListWidget::peerAfter(const PeerData *inPeer, MsgId inMsg, PeerData if (_state == DefaultState) { DialogsList::RowByPeer::const_iterator i = dialogs.list.rowByPeer.constFind(inPeer->id); if (i == dialogs.list.rowByPeer.constEnd()) { - i = contactsNoDialogs.list.rowByPeer.constFind(inPeer->id); - if (i == contactsNoDialogs.list.rowByPeer.cend()) { - outPeer = 0; - outMsg = 0; - return; - } - if (i.value()->next != contactsNoDialogs.list.end) { - outPeer = i.value()->next->history->peer; - outMsg = ShowAtUnreadMsgId; - return; - } + //i = contactsNoDialogs.list.rowByPeer.constFind(inPeer->id); + //if (i == contactsNoDialogs.list.rowByPeer.cend()) { + // outPeer = 0; + // outMsg = 0; + // return; + //} + //if (i.value()->next != contactsNoDialogs.list.end) { + // outPeer = i.value()->next->history->peer; + // outMsg = ShowAtUnreadMsgId; + // return; + //} outPeer = 0; outMsg = 0; return; @@ -1378,7 +1378,7 @@ void DialogsListWidget::peerAfter(const PeerData *inPeer, MsgId inMsg, PeerData outPeer = i.value()->next->history->peer; outMsg = ShowAtUnreadMsgId; return; - } else if (contactsNoDialogs.list.count) { + } else if (false && contactsNoDialogs.list.count) { outPeer = contactsNoDialogs.list.begin->history->peer; outMsg = ShowAtUnreadMsgId; return; diff --git a/Telegram/SourceFiles/pspecific_wnd.cpp b/Telegram/SourceFiles/pspecific_wnd.cpp index 6fbbb4105206e7..58832dc8f22119 100644 --- a/Telegram/SourceFiles/pspecific_wnd.cpp +++ b/Telegram/SourceFiles/pspecific_wnd.cpp @@ -27,8 +27,14 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org #include "passcodewidget.h" #include -#include #include + +#include +#include +#include +#include + +#include #include #include #include @@ -46,11 +52,6 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org #include #include -#include -#include -#include -#include - #include #define min(a, b) ((a) < (b) ? (a) : (b)) @@ -762,7 +763,7 @@ namespace { } void setupPropSys() { HINSTANCE procId = LoadLibrary(L"PROPSYS.DLL"); - if (!loadFunction(procId, "PropVariantToString", procId)) return; + if (!loadFunction(procId, "PropVariantToString", propVariantToString)) return; } void setupToast(HINSTANCE procId) { if (!propVariantToString) return; @@ -2223,7 +2224,7 @@ void RegisterCustomScheme() { void psNewVersion() { RegisterCustomScheme(); - if (Local::oldSettingsVersion() < 8050) { + if (Local::oldSettingsVersion() < 8051) { CheckPinnedAppUserModelId(); } } @@ -2835,9 +2836,9 @@ void CheckPinnedAppUserModelId() { QString path = pinnedPath(); std::wstring p = QDir::toNativeSeparators(path).toStdWString(); - + WCHAR src[MAX_PATH]; - GetModuleFileNameEx(GetCurrentProcess(), nullptr, src, MAX_PATH); + GetModuleFileName(GetModuleHandle(0), src, MAX_PATH); BY_HANDLE_FILE_INFORMATION srcinfo = { 0 }; HANDLE srcfile = CreateFile(src, 0x00, 0x00, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (srcfile == INVALID_HANDLE_VALUE) return; diff --git a/Telegram/SourceFiles/stdafx.h b/Telegram/SourceFiles/stdafx.h index bb7cc5f4bafe33..6a17ea088c9b54 100644 --- a/Telegram/SourceFiles/stdafx.h +++ b/Telegram/SourceFiles/stdafx.h @@ -16,7 +16,7 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014 John Preston, https://desktop.telegram.org */ #define __HUGE - +#define PSAPI_VERSION 1 // fix WinXP //#define Q_NO_TEMPLATE_FRIENDS // fix some compiler difference issues #include diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist index 744911c585b27d..37e739bf79b3c5 100644 --- a/Telegram/Telegram.plist +++ b/Telegram/Telegram.plist @@ -11,7 +11,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.8.50 + 0.8.51 LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) CFBundleSignature diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index 63fef2cd598c769457efb7a74fcae50a9064ce1a..c9f1d53aa3a65d3f21592d8171b3064441d1c2e1 100644 GIT binary patch delta 53 zcmZ3Yy+nIM5ig_R)3 diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index 83eb1828816c3c..8e0a766476381d 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -1707,7 +1707,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.8.50; + CURRENT_PROJECT_VERSION = 0.8.51; DEBUG_INFORMATION_FORMAT = dwarf; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -1725,7 +1725,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 0.8.50; + CURRENT_PROJECT_VERSION = 0.8.51; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = fast; GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h; @@ -1751,10 +1751,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.8.50; + CURRENT_PROJECT_VERSION = 0.8.51; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 0.8; - DYLIB_CURRENT_VERSION = 0.8.50; + DYLIB_CURRENT_VERSION = 0.8.51; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; @@ -1885,10 +1885,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.8.50; + CURRENT_PROJECT_VERSION = 0.8.51; DEBUG_INFORMATION_FORMAT = dwarf; DYLIB_COMPATIBILITY_VERSION = 0.8; - DYLIB_CURRENT_VERSION = 0.8.50; + DYLIB_CURRENT_VERSION = 0.8.51; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; diff --git a/Telegram/Version.sh b/Telegram/Version.sh index a30d1e842bb635..497943c8429e6b 100755 --- a/Telegram/Version.sh +++ b/Telegram/Version.sh @@ -1,2 +1,2 @@ -echo 0.8 8050 0.8.50 1 +echo 0.8 8051 0.8.51 0 # AppVersionStrMajor AppVersion AppVersionStr DevChannel