From 8c06b08f30e4b135b7120c76b1726180c00c556a Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 15 Mar 2017 13:31:36 +0300 Subject: [PATCH] Alpha 1.0.23: Add blocked users list box in settings. Also fixed build for Xcode. --- Telegram/Resources/uwp/AppX/AppxManifest.xml | 2 +- Telegram/Resources/winrc/Telegram.rc | 8 ++-- Telegram/Resources/winrc/Updater.rc | 8 ++-- Telegram/SourceFiles/boxes/peer_list_box.h | 16 ++++--- Telegram/SourceFiles/core/version.h | 4 +- Telegram/SourceFiles/messenger.cpp | 2 +- .../settings_blocked_box_controller.cpp | 2 +- Telegram/build/deploy.sh | 42 +++++++++++++++---- Telegram/build/version | 6 +-- changelog.txt | 10 +++-- 10 files changed, 67 insertions(+), 33 deletions(-) diff --git a/Telegram/Resources/uwp/AppX/AppxManifest.xml b/Telegram/Resources/uwp/AppX/AppxManifest.xml index dd3f233ee..ceeb41af5 100644 --- a/Telegram/Resources/uwp/AppX/AppxManifest.xml +++ b/Telegram/Resources/uwp/AppX/AppxManifest.xml @@ -9,7 +9,7 @@ + Version="1.0.23.0" /> Telegram Desktop Telegram Messenger LLP diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc index bffb198a0..eae8e29dd 100644 --- a/Telegram/Resources/winrc/Telegram.rc +++ b/Telegram/Resources/winrc/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,22,0 - PRODUCTVERSION 1,0,22,0 + FILEVERSION 1,0,23,0 + PRODUCTVERSION 1,0,23,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -52,10 +52,10 @@ BEGIN BEGIN VALUE "CompanyName", "Telegram Messenger LLP" VALUE "FileDescription", "Telegram Desktop" - VALUE "FileVersion", "1.0.22.0" + VALUE "FileVersion", "1.0.23.0" VALUE "LegalCopyright", "Copyright (C) 2014-2017" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "1.0.22.0" + VALUE "ProductVersion", "1.0.23.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc index 8429fc785..99402fe3e 100644 --- a/Telegram/Resources/winrc/Updater.rc +++ b/Telegram/Resources/winrc/Updater.rc @@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,22,0 - PRODUCTVERSION 1,0,22,0 + FILEVERSION 1,0,23,0 + PRODUCTVERSION 1,0,23,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -43,10 +43,10 @@ BEGIN BEGIN VALUE "CompanyName", "Telegram Messenger LLP" VALUE "FileDescription", "Telegram Desktop Updater" - VALUE "FileVersion", "1.0.22.0" + VALUE "FileVersion", "1.0.23.0" VALUE "LegalCopyright", "Copyright (C) 2014-2017" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "1.0.22.0" + VALUE "ProductVersion", "1.0.23.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/SourceFiles/boxes/peer_list_box.h b/Telegram/SourceFiles/boxes/peer_list_box.h index 07d296e35..7a097dd1c 100644 --- a/Telegram/SourceFiles/boxes/peer_list_box.h +++ b/Telegram/SourceFiles/boxes/peer_list_box.h @@ -175,9 +175,7 @@ public: // callback takes two iterators, like [](auto &begin, auto &end). template - void reorderRows(ReorderCallback &&callback) { - _inner->reorderRows(std::forward(callback)); - } + void reorderRows(ReorderCallback &&callback); protected: void prepare() override; @@ -194,7 +192,6 @@ private: object_ptr> _select = { nullptr }; - class Inner; QPointer _inner; std::unique_ptr _controller; @@ -262,7 +259,8 @@ private: void appendGlobalSearchRow(std::unique_ptr row); struct RowIndex { - RowIndex() = default; + RowIndex() { + } explicit RowIndex(int value) : value(value) { } int value = -1; @@ -275,7 +273,8 @@ private: } struct Selected { - Selected() = default; + Selected() { + } Selected(RowIndex index, bool action) : index(index), action(action) { } Selected(int index, bool action) : index(index), action(action) { @@ -363,3 +362,8 @@ private: std::map _globalSearchQueries; }; + +template +inline void PeerListBox::reorderRows(ReorderCallback &&callback) { + _inner->reorderRows(std::forward(callback)); +} diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h index 8755c7f19..922b4a826 100644 --- a/Telegram/SourceFiles/core/version.h +++ b/Telegram/SourceFiles/core/version.h @@ -24,7 +24,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #define BETA_VERSION_MACRO (0ULL) -constexpr int AppVersion = 1000022; -constexpr str_const AppVersionStr = "1.0.22"; +constexpr int AppVersion = 1000023; +constexpr str_const AppVersionStr = "1.0.23"; constexpr bool AppAlphaVersion = true; constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO; diff --git a/Telegram/SourceFiles/messenger.cpp b/Telegram/SourceFiles/messenger.cpp index 30a53d9f5..14fc57355 100644 --- a/Telegram/SourceFiles/messenger.cpp +++ b/Telegram/SourceFiles/messenger.cpp @@ -638,7 +638,7 @@ void Messenger::checkMapVersion() { if (Local::oldMapVersion()) { QString versionFeatures; if ((cAlphaVersion() || cBetaVersion()) && Local::oldMapVersion() < 1000021) { - versionFeatures = QString::fromUtf8("\xE2\x80\x94 Send MP4/MOV files as videos that will play right inside Telegram.\n\xE2\x80\x94 Bug fixes and other minor improvements."); + versionFeatures = QString::fromUtf8("\xE2\x80\x94 Edit list of blocked users in Settings."); } else if (!(cAlphaVersion() || cBetaVersion()) && Local::oldMapVersion() < 1000012) { versionFeatures = langNewVersionText(); } else { diff --git a/Telegram/SourceFiles/settings/settings_blocked_box_controller.cpp b/Telegram/SourceFiles/settings/settings_blocked_box_controller.cpp index 9bfcfe8e4..73b2e13dc 100644 --- a/Telegram/SourceFiles/settings/settings_blocked_box_controller.cpp +++ b/Telegram/SourceFiles/settings/settings_blocked_box_controller.cpp @@ -209,7 +209,7 @@ void BlockUserBoxController::rebuildRows() { auto added = appendList(App::main()->dialogsList()); added += appendList(App::main()->contactsNoDialogsList()); if (!wasEmpty && added > 0) { - view()->reorderRows([](auto &begin, auto &end) { + view()->reorderRows([](auto &&begin, auto &&end) { // Place dialogs list before contactsNoDialogs list. std::stable_partition(begin, end, [](auto &row) { auto history = static_cast(*row).history(); diff --git a/Telegram/build/deploy.sh b/Telegram/build/deploy.sh index 911eabd5a..aba6a98bd 100755 --- a/Telegram/build/deploy.sh +++ b/Telegram/build/deploy.sh @@ -98,6 +98,7 @@ elif [ "$BuildTarget" == "mac" ]; then DropboxDeployPath="$DropboxPath/$AppVersionStrFull" DropboxSetupFile="$SetupFile" DropboxMac32SetupFile="$Mac32SetupFile" + BackupPath="/Volumes/Storage/backup/$AppVersionStrMajor/$AppVersionStrFull" elif [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" = "macstore" ]; then Error "No need to deploy this target." else @@ -134,6 +135,11 @@ if [ "$BetaVersion" != "0" ]; then WinUpdateFile="${WinUpdateFile}_${BetaSignature}" WinPortableFile="tbeta${BetaVersion}_${BetaSignature}.zip" fi +elif [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then + BackupPath="/media/psf/backup/$AppVersionStrMajor/$AppVersionStrFull/t$BuildTarget" + if [ ! -d "/media/psf/backup" ]; then + Error "Backup folder not found!" + fi fi #if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ] || [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" == "macstore" ]; then @@ -183,6 +189,12 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ] || [ "$Build if [ "$BuildTarget" != "mac" ] || [ "$DeployMac" == "1" ]; then rsync -av --progress "$DeployPath/$UpdateFile" "$DeployPath/$SetupFile" "tmaster:tdesktop/www/$RemoteFolder/" fi + if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then + if [ "$BetaVersion" == "0" ]; then + mkdir -p "$BackupPath" + cp "$DeployPath/$SetupFile" "$BackupPath" + fi + fi if [ "$BuildTarget" == "mac" ]; then if [ "$DeployMac32" == "1" ]; then rsync -av --progress "$Mac32DeployPath/$Mac32UpdateFile" "$Mac32DeployPath/$Mac32SetupFile" "tmaster:tdesktop/www/$Mac32RemoteFolder/" @@ -196,27 +208,41 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ] || [ "$Build fi if [ "$DeployMac" == "1" ]; then - cp -v "$DeployPath/$SetupFile" "$DropboxDeployPath/$DropboxSetupFile" if [ -d "$DropboxDeployPath/Telegram.app.dSYM" ]; then rm -rf "$DropboxDeployPath/Telegram.app.dSYM" fi cp -rv "$DeployPath/Telegram.app.dSYM" "$DropboxDeployPath/" + if [ "$BetaVersion" == "0" ]; then + mkdir -p "$BackupPath/tmac" + mv -v "$DeployPath/$SetupFile" "$BackupPath/tmac/" + fi fi if [ "$DeployMac32" == "1" ]; then - mv -v "$Mac32DeployPath/$Mac32SetupFile" "$DropboxDeployPath/$DropboxMac32SetupFile" if [ -d "$DropboxDeployPath/Telegram32.app.dSYM" ]; then rm -rf "$DropboxDeployPath/Telegram32.app.dSYM" fi mv -v "$Mac32DeployPath/Telegram.app.dSYM" "$DropboxDeployPath/Telegram32.app.dSYM" + if [ "$BetaVersion" == "0" ]; then + mkdir -p "$BackupPath/tmac32" + mv -v "$Mac32DeployPath/$Mac32SetupFile" "$BackupPath/tmac32/" + fi fi if [ "$DeployWin" == "1" ]; then - mv -v "$WinDeployPath/Telegram.pdb" "$DropboxDeployPath/" - mv -v "$WinDeployPath/Updater.exe" "$DropboxDeployPath/" - mv -v "$WinDeployPath/Updater.pdb" "$DropboxDeployPath/" - if [ "$BetaVersion" == "0" ]; then - mv -v "$WinDeployPath/$WinSetupFile" "$DropboxDeployPath/" + if [ -f "$WinDeployPath/Telegram.pdb" ]; then + mv -v "$WinDeployPath/Telegram.pdb" "$DropboxDeployPath/" + elif [ ! -f "$DropboxDeployPath/Telegram.pdb" ]; then + echo "Warning: Telegram.pdb not found." + fi + if [ -f "$WinDeployPath/Updater.pdb" ]; then + mv -v "$WinDeployPath/Updater.pdb" "$DropboxDeployPath/" + elif [ ! -f "$DropboxDeployPath/Updater.pdb" ]; then + echo "Warning: Updater.pdb not found." + fi + if [ "$BetaVersion" == "0" ]; then + mkdir -p "$BackupPath/tsetup" + mv -v "$WinDeployPath/$WinSetupFile" "$BackupPath/tsetup/" + mv -v "$WinDeployPath/$WinPortableFile" "$BackupPath/tsetup/" fi - mv -v "$WinDeployPath/$WinPortableFile" "$DropboxDeployPath/" fi fi fi diff --git a/Telegram/build/version b/Telegram/build/version index 68e2db932..e38048383 100644 --- a/Telegram/build/version +++ b/Telegram/build/version @@ -1,6 +1,6 @@ -AppVersion 1000022 +AppVersion 1000023 AppVersionStrMajor 1.0 -AppVersionStrSmall 1.0.22 -AppVersionStr 1.0.22 +AppVersionStrSmall 1.0.23 +AppVersionStr 1.0.23 AlphaChannel 1 BetaVersion 0 diff --git a/changelog.txt b/changelog.txt index 29ff16793..4c78da3e4 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,7 @@ +1.0.23 alpha (15.03.17) + +- Edit list of blocked users in Settings. + 1.0.22 alpha (13.03.17) - Bug fixes and other minor improvements. @@ -1162,12 +1166,12 @@ - Escape key closes photo view. - On OS X now Ctrl+Tab and Ctrl+Shift+Tab are working for dialogs switching. -- On Linux fixed notifies (they don't grab focus and aren't seen in windows switcher), fixed keyboard layout change. +- On Linux fixed notifies (they don't grab focus and aren't seen in windows switcher), fixed keyboard layout change. - On Linux all application data is now stored in ~/.TelegramDesktop directory. 0.5.9 (18.07.14) -- Choose between notification with preview, with only sender's name (message preview hidden) or without any information. +- Choose between notification with preview, with only sender's name (message preview hidden) or without any information. - Sending documents from "Send to" explorer context menu added, see a checkbox in Settings (only Windows version). - Little features: Ctrl+Tab / Ctrl+Shift+Tab switch to near dialogs, links without top-level domain highlight, version in About dialog now leads to version history. - Some bugs fixed: maximize button in Ubuntu, running different copies of app under different users at the same time in Windows, Surface touchscreen support fixed. @@ -1215,7 +1219,7 @@ 0.5.0 (30.05.14) -- Application source code is published on GitHub under GPL v3,
license is available here. +- Application source code is published on GitHub under GPL v3 0.4.18 (28.05.14)