From 1fc405ea52ac9ea36f89f3d73cefc8b8f6fbbdb6 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 15 Dec 2014 23:29:02 +0300 Subject: [PATCH] version 0.7 - fixed single column layout, two-symbol hashtags --- Telegram/PrepareWin.bat | 6 +++--- Telegram/SourceFiles/application.cpp | 2 +- Telegram/SourceFiles/config.h | 8 ++++---- Telegram/SourceFiles/gui/text.cpp | 2 +- Telegram/SourceFiles/historywidget.cpp | 4 ++-- Telegram/SourceFiles/main.cpp | 8 +++----- Telegram/Telegram.plist | 2 +- Telegram/Telegram.rc | Bin 5540 -> 5532 bytes Telegram/Telegram.xcodeproj/project.pbxproj | 12 ++++++------ Telegram/Version.sh | 2 +- 10 files changed, 22 insertions(+), 24 deletions(-) diff --git a/Telegram/PrepareWin.bat b/Telegram/PrepareWin.bat index 3da1f9c1f6..4c798bf898 100644 --- a/Telegram/PrepareWin.bat +++ b/Telegram/PrepareWin.bat @@ -1,8 +1,8 @@ @echo OFF -set "AppVersionStrSmall=0.6.21" -set "AppVersionStr=0.6.21" -set "AppVersionStrFull=0.6.21.0" +set "AppVersionStrSmall=0.7" +set "AppVersionStr=0.7.0" +set "AppVersionStrFull=0.7.0.0" echo. echo Preparing version %AppVersionStr%.. diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 2741f8e416..03c1a3c4d7 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -680,7 +680,7 @@ void Application::startApp() { if (Local::oldMapVersion() < AppVersion) { psRegisterCustomScheme(); if (Local::oldMapVersion() && Local::oldMapVersion() <= FeaturesNotifyVersionFrom && AppVersion == FeaturesNotifyVersion) { - QString versionFeatures(QString::fromUtf8(FeaturesNotify)); + QString versionFeatures(QString::fromUtf8(FeaturesNotify).arg(QString::fromStdWString(AppVersionStr))); if (!versionFeatures.isEmpty()) { window->serviceNotification(versionFeatures); } diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 103fe21921..9cea74027e 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -17,8 +17,8 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org */ #pragma once -static const int32 AppVersion = 6021; -static const wchar_t *AppVersionStr = L"0.6.21"; +static const int32 AppVersion = 7000; +static const wchar_t *AppVersionStr = L"0.7"; static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; static const wchar_t *AppName = L"Telegram Desktop"; @@ -26,8 +26,8 @@ static const wchar_t *AppName = L"Telegram Desktop"; static const wchar_t *AppId = L"{53F49750-6209-4FBF-9CA8-7A333C87D1ED}"; // used in updater.cpp and Setup.iss for Windows static const wchar_t *AppFile = L"Telegram"; -static const int32 FeaturesNotifyVersion = 6021; -static const int32 FeaturesNotifyVersionFrom = 6017; +static const int32 FeaturesNotifyVersion = 7000; +static const int32 FeaturesNotifyVersionFrom = 6021; extern const char *FeaturesNotify; #include "settings.h" diff --git a/Telegram/SourceFiles/gui/text.cpp b/Telegram/SourceFiles/gui/text.cpp index 8ce0b26eb5..bd6d5286f9 100644 --- a/Telegram/SourceFiles/gui/text.cpp +++ b/Telegram/SourceFiles/gui/text.cpp @@ -137,7 +137,7 @@ namespace { const QRegularExpression reExplicitDomain(QString::fromUtf8("(?|'\"\\[\\]\\{\\}`\\~\\!\\%\\^\\*\\(\\)\\-\\+=\\x10])#[A-Za-z_\\.0-9]{4,20}([\\s\\.,:;<>|'\"\\[\\]\\{\\}`\\~\\!\\%\\^\\*\\(\\)\\-\\+=\\x10]|$)")); + const QRegularExpression reHashtag(qsl("(^|[\\s\\.,:;<>|'\"\\[\\]\\{\\}`\\~\\!\\%\\^\\*\\(\\)\\-\\+=\\x10])#[A-Za-z_\\.0-9]{2,20}([\\s\\.,:;<>|'\"\\[\\]\\{\\}`\\~\\!\\%\\^\\*\\(\\)\\-\\+=\\x10]|$)")); QSet validProtocols, validTopDomains; void initLinkSets(); diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 517b0c3584..24452f798e 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -2718,8 +2718,8 @@ void HistoryWidget::paintTopBar(QPainter &p, float64 over, int32 decreaseWidth) if (!hist) return; - int32 increaseLeft = decreaseWidth; - if (!cWideMode()) decreaseWidth += (st::topBarForwardPadding.right() - st::topBarForwardPadding.left()); + int32 increaseLeft = cWideMode() ? 0 : (st::topBarForwardPadding.right() - st::topBarForwardPadding.left()); + decreaseWidth += increaseLeft; QRect rectForName(st::topBarForwardPadding.left() + increaseLeft, st::topBarForwardPadding.top(), width() - decreaseWidth - st::topBarForwardPadding.left() - st::topBarForwardPadding.right(), st::msgNameFont->height); p.setFont(st::dlgHistFont->f); if (hist->typing.isEmpty()) { diff --git a/Telegram/SourceFiles/main.cpp b/Telegram/SourceFiles/main.cpp index d9287d3521..9335d78075 100644 --- a/Telegram/SourceFiles/main.cpp +++ b/Telegram/SourceFiles/main.cpp @@ -20,12 +20,10 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org #include "pspecific.h" const char *FeaturesNotify = "\ -Telegram Desktop was updated to version 0.6.21\n\ +Telegram Desktop was updated to version %1\n\ \n\ - \xe2\x80\x94 Single column layout for smaller window sizes.\n\ - \xe2\x80\x94 Photos are sent up to 1280x1280 size.\n\ - \xe2\x80\x94 New device login notification added.\n\ - \xe2\x80\x94 New version notification added.\n\ + \xe2\x80\x94 Improved single column navigation.\n\ + \xe2\x80\x94 Improved image viewer for large documents.\n\ \n\ Full versions log is available here:\n\ https://desktop.telegram.org/#changelog"; diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist index 0d73904426..e943df3465 100644 --- a/Telegram/Telegram.plist +++ b/Telegram/Telegram.plist @@ -11,7 +11,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.6.21 + 0.7 CFBundleSignature ???? CFBundleURLTypes diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index ab9f4994541e9faeed4811268c09bb461b0661c4..5ba327ded3b558119fd42d65001421a344f04d61 100644 GIT binary patch delta 69 zcmZ3YJx6;(4lk=YgARkitUR`b|8z^Eh`6I97<^#NWOh5&CUjQV=8n diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index 6e7c169477..e957e92186 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -1577,7 +1577,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.6.21; + CURRENT_PROJECT_VERSION = 0.7; DEBUG_INFORMATION_FORMAT = dwarf; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -1595,7 +1595,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 0.6.21; + CURRENT_PROJECT_VERSION = 0.7; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = fast; GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h; @@ -1621,10 +1621,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.6.21; + CURRENT_PROJECT_VERSION = 0.7; DEBUG_INFORMATION_FORMAT = dwarf; DYLIB_COMPATIBILITY_VERSION = 0.6; - DYLIB_CURRENT_VERSION = 0.6.21; + DYLIB_CURRENT_VERSION = 0.7; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; @@ -1764,10 +1764,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.6.21; + CURRENT_PROJECT_VERSION = 0.7; DEBUG_INFORMATION_FORMAT = dwarf; DYLIB_COMPATIBILITY_VERSION = 0.6; - DYLIB_CURRENT_VERSION = 0.6.21; + DYLIB_CURRENT_VERSION = 0.7; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; diff --git a/Telegram/Version.sh b/Telegram/Version.sh index 86fa237c6d..0061b825ca 100755 --- a/Telegram/Version.sh +++ b/Telegram/Version.sh @@ -1,2 +1,2 @@ -echo 6021 0.6.21 +echo 7000 0.7.0