mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 02:01:40 -05:00
dev-version 0.8.5 prepared - new photoviewer, new default chat background
This commit is contained in:
parent
b770ea4f8d
commit
1d8ec7c7d6
19 changed files with 53 additions and 44 deletions
|
@ -1,10 +1,10 @@
|
|||
@echo OFF
|
||||
|
||||
set "AppVersion=8004"
|
||||
set "AppVersionStrSmall=0.8.4"
|
||||
set "AppVersionStr=0.8.4"
|
||||
set "AppVersionStrFull=0.8.4.0"
|
||||
set "DevChannel=0"
|
||||
set "AppVersion=8005"
|
||||
set "AppVersionStrSmall=0.8.5"
|
||||
set "AppVersionStr=0.8.5"
|
||||
set "AppVersionStrFull=0.8.5.0"
|
||||
set "DevChannel=1"
|
||||
|
||||
if %DevChannel% neq 0 goto preparedev
|
||||
|
||||
|
|
|
@ -831,7 +831,7 @@ msgLinkColor: #2a6dc2;
|
|||
msgPressedLinkColor: #004bad;
|
||||
msgSkip: 40px;
|
||||
msgPtr: 8px;
|
||||
msgBG: ':/gui/art/bg.png' / 2:':/gui/art/bg_125x.png' / 3:':/gui/art/bg_150x.png' / 4:':/gui/art/bg_200x.png';
|
||||
msgBG: ':/gui/art/bg.jpg';
|
||||
|
||||
msgSendingRect: sprite(260px, 20px, 20px, 20px);
|
||||
msgCheckRect: sprite(320px, 0px, 20px, 20px);
|
||||
|
|
BIN
Telegram/SourceFiles/art/bg.jpg
Normal file
BIN
Telegram/SourceFiles/art/bg.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 260 KiB |
Binary file not shown.
Before Width: | Height: | Size: 197 KiB |
Binary file not shown.
Before Width: | Height: | Size: 275 KiB |
Binary file not shown.
Before Width: | Height: | Size: 354 KiB |
Binary file not shown.
Before Width: | Height: | Size: 526 KiB |
|
@ -210,7 +210,7 @@ void BackgroundBox::onBackgroundChosen(int index) {
|
|||
if (index >= 0 && index < App::cServerBackgrounds().size()) {
|
||||
const App::WallPaper &paper(App::cServerBackgrounds().at(index));
|
||||
if (App::main()) App::main()->setChatBackground(paper);
|
||||
if (App::settings()) App::settings()->needBackgroundUpdate(!paper.id);
|
||||
if (App::settings()) App::settings()->needBackgroundUpdate(false);
|
||||
}
|
||||
emit closed();
|
||||
}
|
||||
|
|
|
@ -17,9 +17,9 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
|
|||
*/
|
||||
#pragma once
|
||||
|
||||
static const int32 AppVersion = 8004;
|
||||
static const wchar_t *AppVersionStr = L"0.8.4";
|
||||
static const bool DevChannel = false;
|
||||
static const int32 AppVersion = 8005;
|
||||
static const wchar_t *AppVersionStr = L"0.8.5";
|
||||
static const bool DevChannel = true;
|
||||
|
||||
static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)";
|
||||
static const wchar_t *AppName = L"Telegram Desktop";
|
||||
|
|
|
@ -24,8 +24,8 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
|
|||
|
||||
namespace {
|
||||
|
||||
const QRegularExpression _reDomain(QString::fromUtf8("(?<![A-Za-z\\$0-9А-Яа-яёЁ\\-\\_%=\\.])(?:([a-zA-Z]+)://)?((?:[A-Za-zА-яА-ЯёЁ0-9\\-\\_]+\\.){1,5}([A-Za-zрф\\-\\d]{2,22})(\\:\\d+)?)"));
|
||||
const QRegularExpression _reExplicitDomain(QString::fromUtf8("(?<![A-Za-z\\$0-9А-Яа-яёЁ\\-\\_%=\\.])(?:([a-zA-Z]+)://)((?:[A-Za-zА-яА-ЯёЁ0-9\\-\\_]+\\.){0,5}([A-Za-zрф\\-\\d]{2,22})(\\:\\d+)?)"));
|
||||
const QRegularExpression _reDomain(QString::fromUtf8("(?<![\\w\\$\\-\\_%=\\.])(?:([a-zA-Z]+)://)?((?:[A-Za-zА-яА-ЯёЁ0-9\\-\\_]+\\.){1,5}([A-Za-zрф\\-\\d]{2,22})(\\:\\d+)?)"), QRegularExpression::UseUnicodePropertiesOption);
|
||||
const QRegularExpression _reExplicitDomain(QString::fromUtf8("(?<![\\w\\$\\-\\_%=\\.])(?:([a-zA-Z]+)://)((?:[A-Za-zА-яА-ЯёЁ0-9\\-\\_]+\\.){0,5}([A-Za-zрф\\-\\d]{2,22})(\\:\\d+)?)"), QRegularExpression::UseUnicodePropertiesOption);
|
||||
const QRegularExpression _reMailName(qsl("[a-zA-Z\\-_\\.0-9]{1,256}$"));
|
||||
const QRegularExpression _reMailStart(qsl("^[a-zA-Z\\-_\\.0-9]{1,256}\\@"));
|
||||
const QRegularExpression _reHashtag(qsl("(^|[\\s\\.,:;<>|'\"\\[\\]\\{\\}`\\~\\!\\%\\^\\*\\(\\)\\-\\+=\\x10])#[\\w]{2,64}([\\W]|$)"), QRegularExpression::UseUnicodePropertiesOption);
|
||||
|
|
|
@ -2225,7 +2225,8 @@ namespace Local {
|
|||
QBuffer buf(&pngData);
|
||||
QImageReader reader(&buf);
|
||||
if (reader.read(&img)) {
|
||||
App::initBackground(id, img, true);
|
||||
if (!id) cSetTileBackground(false);
|
||||
App::initBackground(id, id ? img : QImage(), true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -2298,6 +2298,7 @@ void MainWidget::gotDifference(const MTPupdates_Difference &diff) {
|
|||
|
||||
updInited = true;
|
||||
|
||||
MTP_LOG(0, ("getDifference { good - after a slice of difference was received }"));
|
||||
getDifference();
|
||||
} break;
|
||||
case mtpc_updates_difference: {
|
||||
|
@ -2339,18 +2340,18 @@ void MainWidget::clearSkippedPtsUpdates() {
|
|||
bool MainWidget::updPtsUpdated(int pts, int ptsCount) { // return false if need to save that update and apply later
|
||||
if (!updInited || updSkipPtsUpdateLevel) return true;
|
||||
|
||||
updLastPts = qMax(updLastPts, pts);
|
||||
updPtsCount += ptsCount;
|
||||
if (updLastPts == updPtsCount) {
|
||||
applySkippedPtsUpdates();
|
||||
updGoodPts = updLastPts;
|
||||
return true;
|
||||
} else if (updLastPts < updPtsCount) {
|
||||
_byPtsTimer.startIfNotActive(1);
|
||||
} else {
|
||||
_byPtsTimer.startIfNotActive(WaitForSkippedTimeout);
|
||||
}
|
||||
return !ptsCount;
|
||||
updLastPts = qMax(updLastPts, pts);
|
||||
updPtsCount += ptsCount;
|
||||
if (updLastPts == updPtsCount) {
|
||||
applySkippedPtsUpdates();
|
||||
updGoodPts = updLastPts;
|
||||
return true;
|
||||
} else if (updLastPts < updPtsCount) {
|
||||
_byPtsTimer.startIfNotActive(1);
|
||||
} else {
|
||||
_byPtsTimer.startIfNotActive(WaitForSkippedTimeout);
|
||||
}
|
||||
return !ptsCount;
|
||||
}
|
||||
|
||||
void MainWidget::feedDifference(const MTPVector<MTPUser> &users, const MTPVector<MTPChat> &chats, const MTPVector<MTPMessage> &msgs, const MTPVector<MTPUpdate> &other) {
|
||||
|
@ -2375,6 +2376,7 @@ bool MainWidget::failDifference(const RPCError &error) {
|
|||
void MainWidget::getDifferenceForce() {
|
||||
if (MTP::authedId()) {
|
||||
updInited = true;
|
||||
MTP_LOG(0, ("getDifference { force - after get difference failed }"));
|
||||
getDifference();
|
||||
}
|
||||
}
|
||||
|
@ -2431,9 +2433,16 @@ bool MainWidget::started() {
|
|||
}
|
||||
|
||||
void MainWidget::openLocalUrl(const QString &url) {
|
||||
QRegularExpressionMatch m = QRegularExpression(qsl("^tg://resolve/?\\?domain=([a-zA-Z0-9\\.\\_]+)$"), QRegularExpression::CaseInsensitiveOption).match(url.trimmed());
|
||||
if (m.hasMatch()) {
|
||||
openUserByName(m.captured(1));
|
||||
QString u(url.trimmed());
|
||||
if (u.startsWith(QLatin1String("tg://resolve"), Qt::CaseInsensitive)) {
|
||||
QRegularExpressionMatch m = QRegularExpression(qsl("^tg://resolve/?\\?domain=([a-zA-Z0-9\\.\\_]+)$"), QRegularExpression::CaseInsensitiveOption).match(u);
|
||||
if (m.hasMatch()) {
|
||||
openUserByName(m.captured(1));
|
||||
}
|
||||
} else if (u.startsWith(QLatin1String("tg://join"), Qt::CaseInsensitive)) {
|
||||
QRegularExpressionMatch m = QRegularExpression(qsl("^tg://join/?\\?invite=([a-zA-Z0-9\\.\\_]+)$"), QRegularExpression::CaseInsensitiveOption).match(u);
|
||||
if (m.hasMatch()) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2749,6 +2758,7 @@ void MainWidget::updateReceived(const mtpPrime *from, const mtpPrime *end) {
|
|||
if (mtpTypeId(*from) == mtpc_new_session_created) {
|
||||
MTPNewSession newSession(from, end);
|
||||
updSeq = 0;
|
||||
MTP_LOG(0, ("getDifference { after new_session_created }"));
|
||||
return getDifference();
|
||||
} else {
|
||||
try {
|
||||
|
@ -2811,7 +2821,7 @@ void MainWidget::handleUpdates(const MTPUpdates &updates) {
|
|||
case mtpc_updateShortMessage: {
|
||||
const MTPDupdateShortMessage &d(updates.c_updateShortMessage());
|
||||
if (!App::userLoaded(d.vuser_id.v) || (d.has_fwd_from_id() && !App::userLoaded(d.vfwd_from_id.v))) {
|
||||
DEBUG_LOG(("Not loaded for updateShortMessage, good getDifference!"));
|
||||
MTP_LOG(0, ("getDifference { good - getting user for updateShortMessage }"));
|
||||
return getDifference();
|
||||
}
|
||||
if (!updPtsUpdated(d.vpts.v, d.vpts_count.v)) {
|
||||
|
@ -2830,7 +2840,7 @@ void MainWidget::handleUpdates(const MTPUpdates &updates) {
|
|||
case mtpc_updateShortChatMessage: {
|
||||
const MTPDupdateShortChatMessage &d(updates.c_updateShortChatMessage());
|
||||
if (!App::chatLoaded(d.vchat_id.v) || !App::userLoaded(d.vfrom_id.v) || (d.has_fwd_from_id() && !App::userLoaded(d.vfwd_from_id.v))) {
|
||||
DEBUG_LOG(("Not loaded for updateShortMessage, good getDifference!"));
|
||||
MTP_LOG(0, ("getDifference { good - getting user for updateShortChatMessage }"));
|
||||
return getDifference();
|
||||
}
|
||||
if (!updPtsUpdated(d.vpts.v, d.vpts_count.v)) {
|
||||
|
@ -2846,6 +2856,7 @@ void MainWidget::handleUpdates(const MTPUpdates &updates) {
|
|||
} break;
|
||||
|
||||
case mtpc_updatesTooLong: {
|
||||
MTP_LOG(0, ("getDifference { good - updatesTooLong received }"));
|
||||
return getDifference();
|
||||
} break;
|
||||
}
|
||||
|
|
|
@ -1088,7 +1088,7 @@ void MediaView::paintEvent(QPaintEvent *e) {
|
|||
p.setOpacity(_docRadialOpacity);
|
||||
p.setPen(_docRadialPen);
|
||||
|
||||
int len = 512 + a_docRadial.current() * 5744;
|
||||
int len = 16 + a_docRadial.current() * 5744;
|
||||
p.drawArc(arc, 1440 - a_docRadialStart.current() * 5760 - len, len);
|
||||
|
||||
p.setOpacity(1);
|
||||
|
|
|
@ -70,7 +70,7 @@ bool gCtrlEnter = false;
|
|||
QPixmapPointer gChatBackground = 0;
|
||||
int32 gChatBackgroundId = 0;
|
||||
QPixmapPointer gChatDogImage = 0;
|
||||
bool gTileBackground = true;
|
||||
bool gTileBackground = false;
|
||||
|
||||
uint32 gConnectionsInSession = 1;
|
||||
QString gLoggedPhoneNumber;
|
||||
|
|
|
@ -4,10 +4,7 @@
|
|||
<file>art/fonts/OpenSans-Bold.ttf</file>
|
||||
<file>art/fonts/OpenSans-Semibold.ttf</file>
|
||||
<file>art/newmsg.wav</file>
|
||||
<file>art/bg.png</file>
|
||||
<file>art/bg_125x.png</file>
|
||||
<file>art/bg_150x.png</file>
|
||||
<file>art/bg_200x.png</file>
|
||||
<file>art/bg.jpg</file>
|
||||
<file>art/sprite.png</file>
|
||||
<file>art/sprite_125x.png</file>
|
||||
<file>art/sprite_150x.png</file>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.8.4</string>
|
||||
<string>0.8.5</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
|
|
Binary file not shown.
|
@ -1683,7 +1683,7 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 0.8.4;
|
||||
CURRENT_PROJECT_VERSION = 0.8.5;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
|
@ -1701,7 +1701,7 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
CURRENT_PROJECT_VERSION = 0.8.4;
|
||||
CURRENT_PROJECT_VERSION = 0.8.5;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = fast;
|
||||
GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h;
|
||||
|
@ -1727,10 +1727,10 @@
|
|||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 0.8.4;
|
||||
CURRENT_PROJECT_VERSION = 0.8.5;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DYLIB_COMPATIBILITY_VERSION = 0.8;
|
||||
DYLIB_CURRENT_VERSION = 0.8.4;
|
||||
DYLIB_CURRENT_VERSION = 0.8.5;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
|
@ -1869,10 +1869,10 @@
|
|||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 0.8.4;
|
||||
CURRENT_PROJECT_VERSION = 0.8.5;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DYLIB_COMPATIBILITY_VERSION = 0.8;
|
||||
DYLIB_CURRENT_VERSION = 0.8.4;
|
||||
DYLIB_CURRENT_VERSION = 0.8.5;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = "";
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
echo 8004 0.8.4 0
|
||||
echo 8005 0.8.5 1
|
||||
# AppVersion AppVersionStr DevChannel
|
||||
|
|
Loading…
Add table
Reference in a new issue