Skip to content

Commit

Permalink
version 0.8.51 prepared, with win7 and winxp fix
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Aug 16, 2015
1 parent 2039cd4 commit 6a05924
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 46 deletions.
10 changes: 5 additions & 5 deletions Telegram/PrepareWin.bat
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion Telegram/SourceFiles/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
6 changes: 3 additions & 3 deletions Telegram/SourceFiles/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
36 changes: 18 additions & 18 deletions Telegram/SourceFiles/dialogswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -969,22 +969,22 @@ 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;
}
} 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;
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
21 changes: 11 additions & 10 deletions Telegram/SourceFiles/pspecific_wnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
#include "passcodewidget.h"

#include <Shobjidl.h>
#include <dbghelp.h>
#include <shellapi.h>

#include <roapi.h>
#include <wrl\client.h>
#include <wrl\implements.h>
#include <windows.ui.notifications.h>

#include <dbghelp.h>
#include <Shlwapi.h>
#include <Strsafe.h>
#include <shlobj.h>
Expand All @@ -46,11 +52,6 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
#include <intsafe.h>
#include <guiddef.h>

#include <roapi.h>
#include <wrl\client.h>
#include <wrl\implements.h>
#include <windows.ui.notifications.h>

#include <qpa/qplatformnativeinterface.h>

#define min(a, b) ((a) < (b) ? (a) : (b))
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -2223,7 +2224,7 @@ void RegisterCustomScheme() {

void psNewVersion() {
RegisterCustomScheme();
if (Local::oldSettingsVersion() < 8050) {
if (Local::oldSettingsVersion() < 8051) {
CheckPinnedAppUserModelId();
}
}
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Telegram/SourceFiles/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <openssl/bn.h>
Expand Down
2 changes: 1 addition & 1 deletion Telegram/Telegram.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.8.50</string>
<string>0.8.51</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>CFBundleSignature</key>
Expand Down
Binary file modified Telegram/Telegram.rc
Binary file not shown.
12 changes: 6 additions & 6 deletions Telegram/Telegram.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Telegram/Version.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
echo 0.8 8050 0.8.50 1
echo 0.8 8051 0.8.51 0
# AppVersionStrMajor AppVersion AppVersionStr DevChannel

0 comments on commit 6a05924

Please sign in to comment.