conflicts fixed
|
@ -102,16 +102,16 @@
|
||||||
<_ProjectFileVersion>11.0.60610.1</_ProjectFileVersion>
|
<_ProjectFileVersion>11.0.60610.1</_ProjectFileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<IntDir>$(SolutionDir)$(Platform)\$(Configuration)IntermediateMeta\</IntDir>
|
<IntDir>$(SolutionDir)$(Platform)\$(Configuration)IntermediateStyle\</IntDir>
|
||||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)Meta\</OutDir>
|
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)Style\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)Meta\</OutDir>
|
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)Style\</OutDir>
|
||||||
<IntDir>$(SolutionDir)$(Platform)\$(Configuration)IntermediateMeta\</IntDir>
|
<IntDir>$(SolutionDir)$(Platform)\$(Configuration)IntermediateStyle\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Deploy|Win32'">
|
||||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)Meta\</OutDir>
|
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)Style\</OutDir>
|
||||||
<IntDir>$(SolutionDir)$(Platform)\$(Configuration)IntermediateMeta\</IntDir>
|
<IntDir>$(SolutionDir)$(Platform)\$(Configuration)IntermediateStyle\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
|
|
|
@ -377,3 +377,5 @@ lng_about_text: "Unofficial free messaging app based on [a href=\"https://core.t
|
||||||
This software is licensed under [a href=\"https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE\"]GNU GPL[/a] version 3,
|
This software is licensed under [a href=\"https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE\"]GNU GPL[/a] version 3,
|
||||||
source code is available on [a href=\"https://github.com/telegramdesktop/tdesktop\"]GitHub[/a].";
|
source code is available on [a href=\"https://github.com/telegramdesktop/tdesktop\"]GitHub[/a].";
|
||||||
lng_about_done: "Done";
|
lng_about_done: "Done";
|
||||||
|
|
||||||
|
// Keys finished
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
|
|
||||||
#define MyAppShortName "Telegram"
|
#define MyAppShortName "Telegram"
|
||||||
#define MyAppName "Telegram Win (Unofficial)"
|
#define MyAppName "Telegram Win (Unofficial)"
|
||||||
#define MyAppVersion "0.5.1"
|
#define MyAppVersion "0.5.2"
|
||||||
#define MyAppVersionZero "0.5.1"
|
#define MyAppVersionZero "0.5.2"
|
||||||
#define MyAppFullVersion "0.5.1.0"
|
#define MyAppFullVersion "0.5.2.0"
|
||||||
#define MyAppPublisher "Telegram (Unofficial)"
|
#define MyAppPublisher "Telegram (Unofficial)"
|
||||||
#define MyAppURL "https://tdesktop.com"
|
#define MyAppURL "https://tdesktop.com"
|
||||||
#define MyAppExeName "Telegram.exe"
|
#define MyAppExeName "Telegram.exe"
|
||||||
|
|
|
@ -587,7 +587,7 @@ namespace App {
|
||||||
break;
|
break;
|
||||||
case mtpc_contacts_myLinkEmpty:
|
case mtpc_contacts_myLinkEmpty:
|
||||||
case mtpc_contacts_myLinkRequested:
|
case mtpc_contacts_myLinkRequested:
|
||||||
if (myLink.c_contacts_myLinkRequested().vcontact.v) {
|
if (myLink.type() == mtpc_contacts_myLinkRequested && myLink.c_contacts_myLinkRequested().vcontact.v) {
|
||||||
user->contact = 1;
|
user->contact = 1;
|
||||||
} else {
|
} else {
|
||||||
switch (foreignLink.type()) {
|
switch (foreignLink.type()) {
|
||||||
|
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
|
@ -17,8 +17,8 @@ Copyright (c) 2014 John Preston, https://tdesktop.com
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
static const int32 AppVersion = 5001;
|
static const int32 AppVersion = 5002;
|
||||||
static const wchar_t *AppVersionStr = L"0.5.1";
|
static const wchar_t *AppVersionStr = L"0.5.2";
|
||||||
static const wchar_t *AppName = L"Telegram Win (Unofficial)";
|
static const wchar_t *AppName = L"Telegram Win (Unofficial)";
|
||||||
static const wchar_t *AppId = L"{53F49750-6209-4FBF-9CA8-7A333C87D1ED}";
|
static const wchar_t *AppId = L"{53F49750-6209-4FBF-9CA8-7A333C87D1ED}";
|
||||||
|
|
||||||
|
|
|
@ -1063,8 +1063,11 @@ public:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool elidedLine = _elideLast && (_y + _lineHeight >= _yTo);
|
int32 elidedLineHeight = qMax(_lineHeight, blockHeight);
|
||||||
if (f != j && !elidedLine) {
|
bool elidedLine = _elideLast && (_y + elidedLineHeight >= _yTo);
|
||||||
|
if (elidedLine) {
|
||||||
|
_lineHeight = elidedLineHeight;
|
||||||
|
} else if (f != j) {
|
||||||
j = f;
|
j = f;
|
||||||
_wLeft = f_wLeft;
|
_wLeft = f_wLeft;
|
||||||
_lineHeight = f_lineHeight;
|
_lineHeight = f_lineHeight;
|
||||||
|
@ -1088,7 +1091,11 @@ public:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool elidedLine = _elideLast && (_y + _lineHeight >= _yTo);
|
int32 elidedLineHeight = qMax(_lineHeight, blockHeight);
|
||||||
|
bool elidedLine = _elideLast && (_y + elidedLineHeight >= _yTo);
|
||||||
|
if (elidedLine) {
|
||||||
|
_lineHeight = elidedLineHeight;
|
||||||
|
}
|
||||||
if (!drawLine(elidedLine ? _blockEnd(_t, i, e) : b->from(), i, e)) return;
|
if (!drawLine(elidedLine ? _blockEnd(_t, i, e) : b->from(), i, e)) return;
|
||||||
_y += _lineHeight;
|
_y += _lineHeight;
|
||||||
_lineHeight = qMax(0, blockHeight);
|
_lineHeight = qMax(0, blockHeight);
|
||||||
|
@ -1536,7 +1543,7 @@ public:
|
||||||
void elideSaveBlock(int32 blockIndex, ITextBlock *&_endBlock, int32 elideStart, int32 elideWidth) {
|
void elideSaveBlock(int32 blockIndex, ITextBlock *&_endBlock, int32 elideStart, int32 elideWidth) {
|
||||||
_elideSavedIndex = blockIndex;
|
_elideSavedIndex = blockIndex;
|
||||||
_elideSavedBlock = _t->_blocks[blockIndex];
|
_elideSavedBlock = _t->_blocks[blockIndex];
|
||||||
const_cast<Text*>(_t)->_blocks[blockIndex] = new SkipBlock(_t->_font, _t->_text, elideStart, elideWidth, _f->height, _elideSavedBlock->lnkIndex());
|
const_cast<Text*>(_t)->_blocks[blockIndex] = new TextBlock(_t->_font, _t->_text, QFIXED_MAX, elideStart, 0, _elideSavedBlock->flags(), _elideSavedBlock->color(), _elideSavedBlock->lnkIndex());
|
||||||
_blocksSize = blockIndex + 1;
|
_blocksSize = blockIndex + 1;
|
||||||
_endBlock = (blockIndex + 1 < _t->_blocks.size() ? _t->_blocks[blockIndex + 1] : 0);
|
_endBlock = (blockIndex + 1 < _t->_blocks.size() ? _t->_blocks[blockIndex + 1] : 0);
|
||||||
}
|
}
|
||||||
|
@ -1648,9 +1655,11 @@ public:
|
||||||
lineLength += _Elide.size();
|
lineLength += _Elide.size();
|
||||||
|
|
||||||
if (!repeat) {
|
if (!repeat) {
|
||||||
for (; _t->_blocks[blockIndex] != _endBlock && _t->_blocks[blockIndex]->from() < elideStart; ++blockIndex) {
|
for (; blockIndex < _blocksSize && _t->_blocks[blockIndex] != _endBlock && _t->_blocks[blockIndex]->from() < elideStart; ++blockIndex) {
|
||||||
|
}
|
||||||
|
if (blockIndex < _blocksSize) {
|
||||||
|
elideSaveBlock(blockIndex, _endBlock, elideStart, elideWidth);
|
||||||
}
|
}
|
||||||
elideSaveBlock(blockIndex, _endBlock, elideStart, elideWidth);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -439,9 +439,9 @@ namespace MTP {
|
||||||
_localKey.setKey(key);
|
_localKey.setKey(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
void start() {
|
void start() {
|
||||||
unixtimeInit();
|
unixtimeInit();
|
||||||
|
|
||||||
if (!localKey().created()) {
|
if (!localKey().created()) {
|
||||||
LOG(("App Error: trying to start MTP without local key!"));
|
LOG(("App Error: trying to start MTP without local key!"));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -81,24 +81,24 @@ namespace {
|
||||||
volatile bool unixtimeWasSet = false;
|
volatile bool unixtimeWasSet = false;
|
||||||
volatile uint64 _msgIdStart, _msgIdLocal = 0, _msgIdMsStart;
|
volatile uint64 _msgIdStart, _msgIdLocal = 0, _msgIdMsStart;
|
||||||
uint32 _reqId = 0;
|
uint32 _reqId = 0;
|
||||||
|
|
||||||
void _initMsgIdConstants() {
|
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
LARGE_INTEGER li;
|
|
||||||
QueryPerformanceCounter(&li);
|
|
||||||
_msgIdMsStart = li.QuadPart;
|
|
||||||
#elif defined Q_OS_MAC
|
|
||||||
_msgIdMsStart = mach_absolute_time();
|
|
||||||
#else
|
|
||||||
timespec ts;
|
|
||||||
clock_gettime(CLOCK_REALTIME, &ts);
|
|
||||||
_msgIdMsStart = 1000000000 * uint64(ts.tv_sec) + uint64(ts.tv_nsec);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
uint32 msgIdRand;
|
void _initMsgIdConstants() {
|
||||||
memset_rand(&msgIdRand, sizeof(uint32));
|
#ifdef Q_OS_WIN
|
||||||
_msgIdStart = (((uint64)((uint32)unixtime()) << 32) | (uint64)msgIdRand);
|
LARGE_INTEGER li;
|
||||||
}
|
QueryPerformanceCounter(&li);
|
||||||
|
_msgIdMsStart = li.QuadPart;
|
||||||
|
#elif defined Q_OS_MAC
|
||||||
|
_msgIdMsStart = mach_absolute_time();
|
||||||
|
#else
|
||||||
|
timespec ts;
|
||||||
|
clock_gettime(CLOCK_REALTIME, &ts);
|
||||||
|
_msgIdMsStart = 1000000000 * uint64(ts.tv_sec) + uint64(ts.tv_nsec);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
uint32 msgIdRand;
|
||||||
|
memset_rand(&msgIdRand, sizeof(uint32));
|
||||||
|
_msgIdStart = (((uint64)((uint32)unixtime()) << 32) | (uint64)msgIdRand);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 myunixtime() {
|
int32 myunixtime() {
|
||||||
|
@ -106,27 +106,27 @@ int32 myunixtime() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void unixtimeInit() {
|
void unixtimeInit() {
|
||||||
{
|
{
|
||||||
QWriteLocker locker(&unixtimeLock);
|
QWriteLocker locker(&unixtimeLock);
|
||||||
unixtimeWasSet = false;
|
unixtimeWasSet = false;
|
||||||
unixtimeDelta = 0;
|
unixtimeDelta = 0;
|
||||||
}
|
}
|
||||||
_initMsgIdConstants();
|
_initMsgIdConstants();
|
||||||
}
|
}
|
||||||
|
|
||||||
void unixtimeSet(int32 serverTime, bool force) {
|
void unixtimeSet(int32 serverTime, bool force) {
|
||||||
{
|
{
|
||||||
QWriteLocker locker(&unixtimeLock);
|
QWriteLocker locker(&unixtimeLock);
|
||||||
if (force) {
|
if (force) {
|
||||||
DEBUG_LOG(("MTP Info: forced setting client unixtime to %1").arg(serverTime));
|
DEBUG_LOG(("MTP Info: forced setting client unixtime to %1").arg(serverTime));
|
||||||
} else {
|
} else {
|
||||||
if (unixtimeWasSet) return;
|
if (unixtimeWasSet) return;
|
||||||
DEBUG_LOG(("MTP Info: setting client unixtime to %1").arg(serverTime));
|
DEBUG_LOG(("MTP Info: setting client unixtime to %1").arg(serverTime));
|
||||||
}
|
}
|
||||||
unixtimeWasSet = true;
|
unixtimeWasSet = true;
|
||||||
unixtimeDelta = serverTime + 1 - myunixtime();
|
unixtimeDelta = serverTime + 1 - myunixtime();
|
||||||
}
|
}
|
||||||
_initMsgIdConstants();
|
_initMsgIdConstants();
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 unixtime() {
|
int32 unixtime() {
|
||||||
|
@ -193,7 +193,7 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void _msInitialize() {
|
void _msInitialize() {
|
||||||
static _MsInitializer _msInitializer;
|
static _MsInitializer _msInitializer;
|
||||||
}
|
}
|
||||||
|
@ -232,10 +232,10 @@ uint64 msgid() {
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
LARGE_INTEGER li;
|
LARGE_INTEGER li;
|
||||||
QueryPerformanceCounter(&li);
|
QueryPerformanceCounter(&li);
|
||||||
int64 result = _msgIdStart + (int64)floor((li.QuadPart - _msgIdMsStart) * _msgIdCoef);
|
uint64 result = _msgIdStart + (uint64)floor((li.QuadPart - _msgIdMsStart) * _msgIdCoef);
|
||||||
#elif defined Q_OS_MAC
|
#elif defined Q_OS_MAC
|
||||||
int64 msCount = mach_absolute_time();
|
uint64 msCount = mach_absolute_time();
|
||||||
int64 result = _msgIdStart + (int64)floor((msCount - _msgIdMsStart) * _msgIdCoef);
|
uint64 result = _msgIdStart + (uint64)floor((msCount - _msgIdMsStart) * _msgIdCoef);
|
||||||
#else
|
#else
|
||||||
uint64 result = 0;
|
uint64 result = 0;
|
||||||
//TODO
|
//TODO
|
||||||
|
|
|
@ -793,11 +793,11 @@
|
||||||
</CustomBuild>
|
</CustomBuild>
|
||||||
<CustomBuild Include="Resources\style_classes.txt">
|
<CustomBuild Include="Resources\style_classes.txt">
|
||||||
<Outputs>.\GeneratedFiles\style_classes.h</Outputs>
|
<Outputs>.\GeneratedFiles\style_classes.h</Outputs>
|
||||||
<Command>"$(SolutionDir)$(Platform)\$(Configuration)Meta\MetaStyle.exe" -classes_in ".\Resources\style_classes.txt" -classes_out ".\GeneratedFiles\style_classes.h" -styles_in ".\Resources\style.txt" -styles_out ".\GeneratedFiles\style_auto.h"</Command>
|
<Command>"$(SolutionDir)$(Platform)\$(Configuration)Style\MetaStyle.exe" -classes_in ".\Resources\style_classes.txt" -classes_out ".\GeneratedFiles\style_classes.h" -styles_in ".\Resources\style.txt" -styles_out ".\GeneratedFiles\style_auto.h"</Command>
|
||||||
</CustomBuild>
|
</CustomBuild>
|
||||||
<CustomBuild Include="Resources\style.txt">
|
<CustomBuild Include="Resources\style.txt">
|
||||||
<Outputs>.\GeneratedFiles\style_auto.h</Outputs>
|
<Outputs>.\GeneratedFiles\style_auto.h</Outputs>
|
||||||
<Command>"$(SolutionDir)$(Platform)\$(Configuration)Meta\MetaStyle.exe" -classes_in ".\Resources\style_classes.txt" -classes_out ".\GeneratedFiles\style_classes.h" -styles_in ".\Resources\style.txt" -styles_out ".\GeneratedFiles\style_auto.h"</Command>
|
<Command>"$(SolutionDir)$(Platform)\$(Configuration)Style\MetaStyle.exe" -classes_in ".\Resources\style_classes.txt" -classes_out ".\GeneratedFiles\style_classes.h" -styles_in ".\Resources\style.txt" -styles_out ".\GeneratedFiles\style_auto.h"</Command>
|
||||||
</CustomBuild>
|
</CustomBuild>
|
||||||
<CustomBuild Include="Resources\lang.txt">
|
<CustomBuild Include="Resources\lang.txt">
|
||||||
<Outputs>.\GeneratedFiles\lang.h</Outputs>
|
<Outputs>.\GeneratedFiles\lang.h</Outputs>
|
||||||
|
|