From 3bb53b6ed1a3cc1d29ca651c9138d3fd0cd95b5e Mon Sep 17 00:00:00 2001
From: John Preston <johnprestonmail@gmail.com>
Date: Thu, 9 Jun 2016 20:54:31 +0300
Subject: [PATCH] Projects ready for Xcode and QtCreator. Retina circle masks
 fixed. 9049004 beta.

---
 Telegram/Resources/winrc/Telegram.rc         |  8 ++++----
 Telegram/Resources/winrc/Updater.rc          |  8 ++++----
 Telegram/SourceFiles/core/version.h          |  2 +-
 Telegram/SourceFiles/ui/style/style_core.cpp |  6 +++---
 Telegram/Telegram.pro                        |  6 +++++-
 Telegram/Telegram.xcodeproj/project.pbxproj  | 12 ++++++++++++
 Telegram/build/version                       |  2 +-
 7 files changed, 30 insertions(+), 14 deletions(-)

diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc
index 05fc7cf896..e721792ddd 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 0,9,49,3
- PRODUCTVERSION 0,9,49,3
+ FILEVERSION 0,9,49,4
+ PRODUCTVERSION 0,9,49,4
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -51,10 +51,10 @@ BEGIN
         BLOCK "040904b0"
         BEGIN
             VALUE "CompanyName", "Telegram Messenger LLP"
-            VALUE "FileVersion", "0.9.49.3"
+            VALUE "FileVersion", "0.9.49.4"
             VALUE "LegalCopyright", "Copyright (C) 2014-2016"
             VALUE "ProductName", "Telegram Desktop"
-            VALUE "ProductVersion", "0.9.49.3"
+            VALUE "ProductVersion", "0.9.49.4"
         END
     END
     BLOCK "VarFileInfo"
diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc
index 59db216422..99a67db219 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 0,9,49,3
- PRODUCTVERSION 0,9,49,3
+ FILEVERSION 0,9,49,4
+ PRODUCTVERSION 0,9,49,4
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -43,10 +43,10 @@ BEGIN
         BEGIN
             VALUE "CompanyName", "Telegram Messenger LLP"
             VALUE "FileDescription", "Telegram Updater"
-            VALUE "FileVersion", "0.9.49.3"
+            VALUE "FileVersion", "0.9.49.4"
             VALUE "LegalCopyright", "Copyright (C) 2014-2016"
             VALUE "ProductName", "Telegram Desktop"
-            VALUE "ProductVersion", "0.9.49.3"
+            VALUE "ProductVersion", "0.9.49.4"
         END
     END
     BLOCK "VarFileInfo"
diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h
index 592f529937..a3b1a79b8b 100644
--- a/Telegram/SourceFiles/core/version.h
+++ b/Telegram/SourceFiles/core/version.h
@@ -22,7 +22,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
 
 #include "core/basic_types.h"
 
-#define BETA_VERSION_MACRO (9049003ULL)
+#define BETA_VERSION_MACRO (9049004ULL)
 
 constexpr int AppVersion = 9049;
 constexpr str_const AppVersionStr = "0.9.49";
diff --git a/Telegram/SourceFiles/ui/style/style_core.cpp b/Telegram/SourceFiles/ui/style/style_core.cpp
index c89e2ba49c..253dedf45c 100644
--- a/Telegram/SourceFiles/ui/style/style_core.cpp
+++ b/Telegram/SourceFiles/ui/style/style_core.cpp
@@ -104,14 +104,14 @@ namespace internal {
 
 QImage createCircleMask(int size, const QColor &bg, const QColor &fg) {
 	int realSize = size * cIntRetinaFactor();
-	auto result = QImage(size, size, QImage::Format::Format_Grayscale8);
+	auto result = QImage(realSize, realSize, QImage::Format::Format_Grayscale8);
 	{
 		QPainter pcircle(&result);
 		pcircle.setRenderHint(QPainter::HighQualityAntialiasing, true);
-		pcircle.fillRect(0, 0, size, size, bg);
+		pcircle.fillRect(0, 0, realSize, realSize, bg);
 		pcircle.setPen(Qt::NoPen);
 		pcircle.setBrush(fg);
-		pcircle.drawEllipse(0, 0, size, size);
+		pcircle.drawEllipse(0, 0, realSize, realSize);
 	}
 	result.setDevicePixelRatio(cRetinaFactor());
 	return result;
diff --git a/Telegram/Telegram.pro b/Telegram/Telegram.pro
index 309c5d1a02..cc3956cc39 100644
--- a/Telegram/Telegram.pro
+++ b/Telegram/Telegram.pro
@@ -127,12 +127,14 @@ SOURCES += \
     ./SourceFiles/core/click_handler.cpp \
     ./SourceFiles/core/click_handler_types.cpp \
     ./SourceFiles/core/observer.cpp \
+    ./SourceFiles/data/data_abstract_structure.cpp \
     ./SourceFiles/data/data_drafts.cpp \
     ./SourceFiles/dialogs/dialogs_indexed_list.cpp \
     ./SourceFiles/dialogs/dialogs_layout.cpp \
     ./SourceFiles/dialogs/dialogs_list.cpp \
     ./SourceFiles/dialogs/dialogs_row.cpp \
     ./SourceFiles/history/field_autocomplete.cpp \
+    ./SourceFiles/history/history_service_layout.cpp \
     ./SourceFiles/inline_bots/inline_bot_layout_internal.cpp \
     ./SourceFiles/inline_bots/inline_bot_layout_item.cpp \
     ./SourceFiles/inline_bots/inline_bot_result.cpp \
@@ -275,14 +277,16 @@ HEADERS += \
     ./SourceFiles/core/observer.h \
     ./SourceFiles/core/vector_of_moveable.h \
 	./SourceFiles/core/version.h \
+    ./SourceFiles/data/data_abstract_structure.h \
     ./SourceFiles/data/data_drafts.h \
     ./SourceFiles/dialogs/dialogs_common.h \
     ./SourceFiles/dialogs/dialogs_indexed_list.h \
     ./SourceFiles/dialogs/dialogs_layout.h \
     ./SourceFiles/dialogs/dialogs_list.h \
     ./SourceFiles/dialogs/dialogs_row.h \
-    ./SourceFiles/history/history_common.h \
     ./SourceFiles/history/field_autocomplete.h \
+    ./SourceFiles/history/history_common.h \
+    ./SourceFiles/history/history_service_layout.h \
     ./SourceFiles/inline_bots/inline_bot_layout_internal.h \
     ./SourceFiles/inline_bots/inline_bot_layout_item.h \
     ./SourceFiles/inline_bots/inline_bot_result.h \
diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj
index 38d4bb48cd..fc4e8a3f21 100644
--- a/Telegram/Telegram.xcodeproj/project.pbxproj
+++ b/Telegram/Telegram.xcodeproj/project.pbxproj
@@ -110,6 +110,8 @@
 		0755AEDD1AD12A80004D738A /* moc_abstractbox.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0755AEDA1AD12A80004D738A /* moc_abstractbox.cpp */; };
 		0755AEDE1AD12A80004D738A /* moc_intropwdcheck.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0755AEDB1AD12A80004D738A /* moc_intropwdcheck.cpp */; };
 		0755AEDF1AD12A80004D738A /* moc_sessionsbox.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0755AEDC1AD12A80004D738A /* moc_sessionsbox.cpp */; };
+		075CDF6A1D09E2BA009EA100 /* history_service_layout.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 075CDF681D09E2BA009EA100 /* history_service_layout.cpp */; };
+		075CDF6E1D09E2D0009EA100 /* data_abstract_structure.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 075CDF6C1D09E2D0009EA100 /* data_abstract_structure.cpp */; };
 		075FEBEC1C82336D0003ECA3 /* shortcuts.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 075FEBEA1C82336D0003ECA3 /* shortcuts.cpp */; };
 		0764D55A1ABAD6F900FBFEED /* apiwrap.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0764D5581ABAD6F900FBFEED /* apiwrap.cpp */; };
 		0764D55D1ABAD71B00FBFEED /* moc_apiwrap.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0764D55C1ABAD71B00FBFEED /* moc_apiwrap.cpp */; };
@@ -494,6 +496,10 @@
 		0755AEDA1AD12A80004D738A /* moc_abstractbox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_abstractbox.cpp; path = GeneratedFiles/Debug/moc_abstractbox.cpp; sourceTree = SOURCE_ROOT; };
 		0755AEDB1AD12A80004D738A /* moc_intropwdcheck.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_intropwdcheck.cpp; path = GeneratedFiles/Debug/moc_intropwdcheck.cpp; sourceTree = SOURCE_ROOT; };
 		0755AEDC1AD12A80004D738A /* moc_sessionsbox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_sessionsbox.cpp; path = GeneratedFiles/Debug/moc_sessionsbox.cpp; sourceTree = SOURCE_ROOT; };
+		075CDF681D09E2BA009EA100 /* history_service_layout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = history_service_layout.cpp; path = SourceFiles/history/history_service_layout.cpp; sourceTree = SOURCE_ROOT; };
+		075CDF691D09E2BA009EA100 /* history_service_layout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = history_service_layout.h; path = SourceFiles/history/history_service_layout.h; sourceTree = SOURCE_ROOT; };
+		075CDF6C1D09E2D0009EA100 /* data_abstract_structure.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = data_abstract_structure.cpp; path = SourceFiles/data/data_abstract_structure.cpp; sourceTree = SOURCE_ROOT; };
+		075CDF6D1D09E2D0009EA100 /* data_abstract_structure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = data_abstract_structure.h; path = SourceFiles/data/data_abstract_structure.h; sourceTree = SOURCE_ROOT; };
 		075F99A91A45EEF200915C72 /* lang_es.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = lang_es.strings; path = Resources/langs/lang_es.strings; sourceTree = SOURCE_ROOT; };
 		075FEBEA1C82336D0003ECA3 /* shortcuts.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = shortcuts.cpp; path = SourceFiles/shortcuts.cpp; sourceTree = SOURCE_ROOT; };
 		075FEBEB1C82336D0003ECA3 /* shortcuts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = shortcuts.h; path = SourceFiles/shortcuts.h; sourceTree = SOURCE_ROOT; };
@@ -938,6 +944,8 @@
 		0716C9A21D08255E00797B22 /* data */ = {
 			isa = PBXGroup;
 			children = (
+				075CDF6C1D09E2D0009EA100 /* data_abstract_structure.cpp */,
+				075CDF6D1D09E2D0009EA100 /* data_abstract_structure.h */,
 				0716C9A31D08256C00797B22 /* data_drafts.cpp */,
 				0716C9A41D08256C00797B22 /* data_drafts.h */,
 			);
@@ -1059,6 +1067,8 @@
 				076C51D21CE205120038F22A /* field_autocomplete.cpp */,
 				076C51D31CE205120038F22A /* field_autocomplete.h */,
 				076B1C571CBFC8D9002C0BC2 /* history_common.h */,
+				075CDF681D09E2BA009EA100 /* history_service_layout.cpp */,
+				075CDF691D09E2BA009EA100 /* history_service_layout.h */,
 			);
 			name = history;
 			sourceTree = "<group>";
@@ -1959,6 +1969,7 @@
 				0716C9A11D08251C00797B22 /* style_history.cpp in Compile Sources */,
 				0716C94D1D0589A700797B22 /* profile_cover.cpp in Compile Sources */,
 				0716C95D1D058C1B00797B22 /* report_box.cpp in Compile Sources */,
+				075CDF6A1D09E2BA009EA100 /* history_service_layout.cpp in Compile Sources */,
 				07DE92A71AA4925B00A18F6F /* autolockbox.cpp in Compile Sources */,
 				07D8509919F8320900623D75 /* usernamebox.cpp in Compile Sources */,
 				0747FF7E1CC6435100096FC3 /* style_basic_types.cpp in Compile Sources */,
@@ -1979,6 +1990,7 @@
 				07B604351B46A20900CA29FE /* moc_playerwidget.cpp in Compile Sources */,
 				8F6F5D7F82036331E8C6DAE6 /* moc_connection.cpp in Compile Sources */,
 				0716C9531D0589A700797B22 /* profile_section_memento.cpp in Compile Sources */,
+				075CDF6E1D09E2D0009EA100 /* data_abstract_structure.cpp in Compile Sources */,
 				B780F9E21269259B90A1F32A /* moc_dcenter.cpp in Compile Sources */,
 				07080BCF1A43588C00741A51 /* lang_auto.cpp in Compile Sources */,
 				07539B1D1A1416AF00083EFC /* moc_history.cpp in Compile Sources */,
diff --git a/Telegram/build/version b/Telegram/build/version
index 657352a489..343508822d 100644
--- a/Telegram/build/version
+++ b/Telegram/build/version
@@ -3,4 +3,4 @@ AppVersionStrMajor 0.9
 AppVersionStrSmall 0.9.49
 AppVersionStr      0.9.49
 AlphaChannel       0
-BetaVersion        9049003
+BetaVersion        9049004