This commit is contained in:
John Preston 2015-12-25 00:44:04 +03:00
commit eeb8c1297f
7 changed files with 31 additions and 57 deletions

View File

@ -27,4 +27,5 @@ Replace '\-lopenal' '\/usr\/local\/lib\/libopenal\.a'
Replace '\-lavformat' '\/usr\/local\/lib\/libavformat\.a' Replace '\-lavformat' '\/usr\/local\/lib\/libavformat\.a'
Replace '\-lavcodec' '\/usr\/local\/lib\/libavcodec\.a' Replace '\-lavcodec' '\/usr\/local\/lib\/libavcodec\.a'
Replace '\-lswresample' '\/usr\/local\/lib\/libswresample\.a' Replace '\-lswresample' '\/usr\/local\/lib\/libswresample\.a'
Replace '\-lswscale' '\/usr\/local\/lib\/libswscale\.a'
Replace '\-lavutil' '\/usr\/local\/lib\/libavutil\.a' Replace '\-lavutil' '\/usr\/local\/lib\/libavutil\.a'

View File

@ -27,4 +27,5 @@ Replace '\-lopenal' '\/usr\/local\/lib\/libopenal\.a'
Replace '\-lavformat' '\/usr\/local\/lib\/libavformat\.a' Replace '\-lavformat' '\/usr\/local\/lib\/libavformat\.a'
Replace '\-lavcodec' '\/usr\/local\/lib\/libavcodec\.a' Replace '\-lavcodec' '\/usr\/local\/lib\/libavcodec\.a'
Replace '\-lswresample' '\/usr\/local\/lib\/libswresample\.a' Replace '\-lswresample' '\/usr\/local\/lib\/libswresample\.a'
Replace '\-lswscale' '\/usr\/local\/lib\/libswscale\.a'
Replace '\-lavutil' '\/usr\/local\/lib\/libavutil\.a' Replace '\-lavutil' '\/usr\/local\/lib\/libavutil\.a'

View File

@ -23,7 +23,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org
static const int32 AppVersion = 9015; static const int32 AppVersion = 9015;
static const wchar_t *AppVersionStr = L"0.9.15"; static const wchar_t *AppVersionStr = L"0.9.15";
static const bool DevVersion = false; static const bool DevVersion = false;
//#define BETA_VERSION (9014003ULL) // just comment this line to build public version #define BETA_VERSION (9015001ULL) // just comment this line to build public version
static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)";
static const wchar_t *AppName = L"Telegram Desktop"; static const wchar_t *AppName = L"Telegram Desktop";

View File

@ -624,7 +624,7 @@ void ChannelHistory::addNewGroup(const MTPMessageGroup &group) {
for (Blocks::iterator i = blocks.begin(), e = blocks.end(); i != e; ++i) { for (Blocks::iterator i = blocks.begin(), e = blocks.end(); i != e; ++i) {
(*i)->y += dh; (*i)->y += dh;
} }
blocks.push_front(dateBlock); // date block blocks.push_front(dateBlock); // date block CHECK
height += dh; height += dh;
} }
} }
@ -719,7 +719,7 @@ HistoryJoined *ChannelHistory::insertJoinedMessage(bool unread) {
} }
} }
if (!block->items.isEmpty()) { if (!block->items.isEmpty()) {
blocks.push_front(block); blocks.push_front(block); // CHECK
if (width) { if (width) {
addToH += block->height; addToH += block->height;
++skip; ++skip;
@ -740,7 +740,7 @@ HistoryJoined *ChannelHistory::insertJoinedMessage(bool unread) {
addToH += dh; addToH += dh;
++skip; ++skip;
} }
blocks.push_front(dateBlock); // date block blocks.push_front(dateBlock); // date block CHECK
} }
if (width && addToH) { if (width && addToH) {
for (Blocks::iterator i = blocks.begin(), e = blocks.end(); i != e; ++i) { for (Blocks::iterator i = blocks.begin(), e = blocks.end(); i != e; ++i) {
@ -945,7 +945,7 @@ void ChannelHistory::switchMode() {
item->attach(block); item->attach(block);
prev = addItemAfterPrevToBlock(item, prev, block); prev = addItemAfterPrevToBlock(item, prev, block);
} }
blocks.push_back(block); blocks.push_back(block); // CHECK
if (width) { if (width) {
block->y = height; block->y = height;
height += block->height; height += block->height;
@ -1326,13 +1326,10 @@ HistoryItem *History::createItem(HistoryBlock *block, const MTPMessage &msg, boo
HistoryItem *result = App::histItemById(channelId(), msgId); HistoryItem *result = App::histItemById(channelId(), msgId);
if (result) { if (result) {
if (block) { if (block) {
if (result->detached()) { if (!result->detached()) {
result->attach(block); result->detach();
} else if (result->block() != block) {
LOG(("App Error: createItem() called for existing item in other block!"));
result->destroy();
result = 0;
} }
result->attach(block);
} }
if (result) { if (result) {
if (msg.type() == mtpc_message) { if (msg.type() == mtpc_message) {
@ -1600,7 +1597,14 @@ HistoryItem *History::addNewMessage(const MTPMessage &msg, NewMessageType type)
} else { } else {
to = blocks.back(); to = blocks.back();
} }
return addNewItem(to, newBlock, createItem(to, msg, (type == NewMessageUnread)), (type == NewMessageUnread)); HistoryItem *item = createItem((type == NewMessageLast) ? 0 : to, msg, (type == NewMessageUnread));
if (type == NewMessageLast) {
if (!item->detached()) {
return item;
}
item->attach(to);
}
return addNewItem(to, newBlock, item, (type == NewMessageUnread));
} }
HistoryItem *History::addToHistory(const MTPMessage &msg) { HistoryItem *History::addToHistory(const MTPMessage &msg) {
@ -1862,7 +1866,7 @@ HistoryItem *History::addMessageGroupAfterPrev(HistoryItem *newItem, HistoryItem
createInitialDateBlock(date); createInitialDateBlock(date);
block = new HistoryBlock(this); block = new HistoryBlock(this);
blocks.push_back(block); blocks.push_back(block); // CHECK
if (width) { if (width) {
block->y = height; block->y = height;
} }

View File

@ -96,6 +96,7 @@ SOURCES += \
./SourceFiles/lang.cpp \ ./SourceFiles/lang.cpp \
./SourceFiles/langloaderplain.cpp \ ./SourceFiles/langloaderplain.cpp \
./SourceFiles/layerwidget.cpp \ ./SourceFiles/layerwidget.cpp \
./SourceFiles/layout.cpp \
./SourceFiles/mediaview.cpp \ ./SourceFiles/mediaview.cpp \
./SourceFiles/overviewwidget.cpp \ ./SourceFiles/overviewwidget.cpp \
./SourceFiles/passcodewidget.cpp \ ./SourceFiles/passcodewidget.cpp \
@ -183,6 +184,7 @@ HEADERS += \
./SourceFiles/lang.h \ ./SourceFiles/lang.h \
./SourceFiles/langloaderplain.h \ ./SourceFiles/langloaderplain.h \
./SourceFiles/layerwidget.h \ ./SourceFiles/layerwidget.h \
./SourceFiles/layout.h \
./SourceFiles/mediaview.h \ ./SourceFiles/mediaview.h \
./SourceFiles/numbers.h \ ./SourceFiles/numbers.h \
./SourceFiles/overviewwidget.h \ ./SourceFiles/overviewwidget.h \
@ -306,7 +308,7 @@ INCLUDEPATH += "/usr/include/atk-1.0"
INCLUDEPATH += "/usr/include/dee-1.0" INCLUDEPATH += "/usr/include/dee-1.0"
INCLUDEPATH += "/usr/include/libdbusmenu-glib-0.4" INCLUDEPATH += "/usr/include/libdbusmenu-glib-0.4"
LIBS += -lcrypto -lssl -lz -ldl -llzma -lexif -lopenal -lavformat -lavcodec -lswresample -lavutil -lopus LIBS += -lcrypto -lssl -lz -ldl -llzma -lexif -lopenal -lavformat -lavcodec -lswresample -lswscale -lavutil -lopus
LIBS += ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.a \ LIBS += ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.a \
./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libibusplatforminputcontextplugin.a \ ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libibusplatforminputcontextplugin.a \
./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.a ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.a

View File

@ -13,36 +13,11 @@
#undef APSTUDIO_READONLY_SYMBOLS #undef APSTUDIO_READONLY_SYMBOLS
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Russian (Russia) resources // English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
@ -52,15 +27,6 @@ END
// Icon with lowest ID value placed first to ensure application icon // Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems. // remains consistent on all systems.
IDI_ICON1 ICON "SourceFiles\\art\\icon256.ico" IDI_ICON1 ICON "SourceFiles\\art\\icon256.ico"
#endif // Russian (Russia) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
@ -68,8 +34,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,9,15,0 FILEVERSION 0,9,15,1
PRODUCTVERSION 0,9,15,0 PRODUCTVERSION 0,9,15,1
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -85,10 +51,10 @@ BEGIN
BLOCK "040904b0" BLOCK "040904b0"
BEGIN BEGIN
VALUE "CompanyName", "Telegram Messenger LLP" VALUE "CompanyName", "Telegram Messenger LLP"
VALUE "FileVersion", "0.9.15.0" VALUE "FileVersion", "0.9.15.1"
VALUE "LegalCopyright", "Copyright (C) 2013" VALUE "LegalCopyright", "Copyright (C) 2013"
VALUE "ProductName", "Telegram Desktop" VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "0.9.15.0" VALUE "ProductVersion", "0.9.15.1"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@ -3,4 +3,4 @@ AppVersionStrMajor 0.9
AppVersionStrSmall 0.9.15 AppVersionStrSmall 0.9.15
AppVersionStr 0.9.15 AppVersionStr 0.9.15
DevChannel 0 DevChannel 0
BetaVersion 0 9014003 BetaVersion 9015001