Compare commits
372 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a69f3c7fd | ||
|
|
48889ce56e | ||
|
|
4532e59933 | ||
|
|
91d784f9bd | ||
|
|
6f56097c53 | ||
|
|
5b0ad0508a | ||
|
|
f1c06d6743 | ||
|
|
e5949dbb86 | ||
|
|
2b95b96fa3 | ||
|
|
147079ce2a | ||
|
|
e992702783 | ||
|
|
2d05281ba9 | ||
|
|
9a1069c1ae | ||
|
|
561d3e0670 | ||
|
|
d7a41ce8f7 | ||
|
|
784b0a2248 | ||
|
|
346cb4e203 | ||
|
|
de8518a112 | ||
|
|
8ef67c393b | ||
|
|
496c361bdc | ||
|
|
3646301ce4 | ||
|
|
9042109d04 | ||
|
|
91c85ec86b | ||
|
|
7d3919e3f7 | ||
|
|
3a928aac9f | ||
|
|
8b6e24e83d | ||
|
|
ef38572d5a | ||
|
|
a2b04c9d71 | ||
|
|
c20ab0b93e | ||
|
|
c496a34f57 | ||
|
|
27103889a4 | ||
|
|
e781b29d57 | ||
|
|
751506d5b5 | ||
|
|
2061248224 | ||
|
|
dcb748c544 | ||
|
|
ec37867d72 | ||
|
|
20c1b58307 | ||
|
|
e482f041a8 | ||
|
|
ef64d9c188 | ||
|
|
466444e17d | ||
|
|
b420f5b41b | ||
|
|
53a719e1b1 | ||
|
|
5f665b8ecb | ||
|
|
65b2db2160 | ||
|
|
617d21129f | ||
|
|
2d1fdc4485 | ||
|
|
5aa2e66d02 | ||
|
|
8850d974a2 | ||
|
|
e6c4c48261 | ||
|
|
8eb0f3b60a | ||
|
|
5192049194 | ||
|
|
fabf830132 | ||
|
|
c9159e2191 | ||
|
|
f2348fc749 | ||
|
|
264ab285a7 | ||
|
|
f28a92be1d | ||
|
|
d38a6e5047 | ||
|
|
3447aac940 | ||
|
|
711b8cfa36 | ||
|
|
91a6af71a0 | ||
|
|
885e7f0471 | ||
|
|
8c1e546123 | ||
|
|
fd4dedcbdf | ||
|
|
88a82eecf3 | ||
|
|
906122a334 | ||
|
|
6f1529d730 | ||
|
|
46162ed3c4 | ||
|
|
3b911f19f6 | ||
|
|
4e6f55e176 | ||
|
|
14cae1b59a | ||
|
|
9aa23dac80 | ||
|
|
eb099c70e6 | ||
|
|
4837117719 | ||
|
|
550b67236e | ||
|
|
8000ff2cd7 | ||
|
|
da358615e0 | ||
|
|
8f387891e2 | ||
|
|
a961615076 | ||
|
|
bf31722931 | ||
|
|
251f51ca1b | ||
|
|
e8722e1cb2 | ||
|
|
6db4972208 | ||
|
|
f0e18ac619 | ||
|
|
8e7117fa22 | ||
|
|
959859f57c | ||
|
|
f8eef7c9a6 | ||
|
|
595134cab5 | ||
|
|
8b76428c7e | ||
|
|
591fbf0ec6 | ||
|
|
4b5b79e415 | ||
|
|
5a50248055 | ||
|
|
113f665295 | ||
|
|
d56a3d015b | ||
|
|
85c59762a4 | ||
|
|
01b4e1946a | ||
|
|
17cde3426a | ||
|
|
19e407532b | ||
|
|
c5d20a21f7 | ||
|
|
54f2b1b2d8 | ||
|
|
5e872e4d2d | ||
|
|
a429e22b93 | ||
|
|
44eac2bf07 | ||
|
|
500ecb464c | ||
|
|
5b4abe69aa | ||
|
|
f2866442d2 | ||
|
|
3cdfa1014a | ||
|
|
0d4ad1b635 | ||
|
|
19a9a990b6 | ||
|
|
149639a53d | ||
|
|
2812d2911f | ||
|
|
2b2b9c2f03 | ||
|
|
b847c8424a | ||
|
|
59a97ffb99 | ||
|
|
d5ec85c1d8 | ||
|
|
979db97859 | ||
|
|
e896971fa4 | ||
|
|
ec49ff31ef | ||
|
|
1ec9137fd7 | ||
|
|
d6f4886c5b | ||
|
|
b6128b6fe0 | ||
|
|
9436789d6d | ||
|
|
fd53385c1f | ||
|
|
0e9ad5d82b | ||
|
|
759bbe63dc | ||
|
|
e8a390c251 | ||
|
|
631e51a493 | ||
|
|
81a9554caa | ||
|
|
3f1f070d3f | ||
|
|
987fa198c8 | ||
|
|
2444acb041 | ||
|
|
3992cea084 | ||
|
|
f9632d5c43 | ||
|
|
f43752b3ad | ||
|
|
44496c7053 | ||
|
|
9f90d3a7fc | ||
|
|
be6e329e94 | ||
|
|
83919492d3 | ||
|
|
9d4d3cc5e3 | ||
|
|
ee8819681f | ||
|
|
a0ff432ac8 | ||
|
|
a27e9ad734 | ||
|
|
6ba0755e15 | ||
|
|
1b4f3a7529 | ||
|
|
b322f986a8 | ||
|
|
e712a51833 | ||
|
|
06629e8cd9 | ||
|
|
841abc2e87 | ||
|
|
f362702856 | ||
|
|
0f535a98a7 | ||
|
|
cf338e669a | ||
|
|
eaa50adf75 | ||
|
|
052fabcae3 | ||
|
|
a6b325f0d0 | ||
|
|
1411dfb711 | ||
|
|
ccaec28d0b | ||
|
|
36f72191ad | ||
|
|
25cefc6eab | ||
|
|
29432d5d6a | ||
|
|
20e303d3e6 | ||
|
|
1c79f85d00 | ||
|
|
4f43f1dd0f | ||
|
|
81a2cf9086 | ||
|
|
8c440cc3c5 | ||
|
|
b66f32fe9e | ||
|
|
3521255d9e | ||
|
|
d485a05935 | ||
|
|
7ee1af5348 | ||
|
|
f493d69bd2 | ||
|
|
a70613d929 | ||
|
|
352fc55234 | ||
|
|
fdfc767930 | ||
|
|
9b449a1d26 | ||
|
|
18b74b9045 | ||
|
|
1cf4d3b4d2 | ||
|
|
a7772b922c | ||
|
|
131f7ec5bb | ||
|
|
971d0efda9 | ||
|
|
6e566e0165 | ||
|
|
a949c5e287 | ||
|
|
7ec4d9af3e | ||
|
|
9b85dd27ca | ||
|
|
cf9f7ef508 | ||
|
|
7f39d917ab | ||
|
|
2e5a0e056c | ||
|
|
850efbde95 | ||
|
|
a11fb2816b | ||
|
|
23c2ae49c6 | ||
|
|
96556d4a4c | ||
|
|
d601b60903 | ||
|
|
e451dec70c | ||
|
|
51cbb9b310 | ||
|
|
1c4f374e3c | ||
|
|
fd0719db6d | ||
|
|
04dd4e30a8 | ||
|
|
1ffbec0215 | ||
|
|
f68466b072 | ||
|
|
02a8b693af | ||
|
|
53219bcf70 | ||
|
|
81f9c70279 | ||
|
|
233a87a8bc | ||
|
|
00e4cfc345 | ||
|
|
9388e154cf | ||
|
|
3ba2a7931e | ||
|
|
377689ae86 | ||
|
|
62ffd93cb7 | ||
|
|
fe9f02e485 | ||
|
|
130aa67ba0 | ||
|
|
97a4c76043 | ||
|
|
3d89a34adf | ||
|
|
5c7155c3a5 | ||
|
|
f582fbf010 | ||
|
|
c2039da600 | ||
|
|
ffc4cd3415 | ||
|
|
c4ca180745 | ||
|
|
673fea47bd | ||
|
|
83fda73ce3 | ||
|
|
a5f407a458 | ||
|
|
88175aff1f | ||
|
|
2f408cd773 | ||
|
|
7d8ba66211 | ||
|
|
c1ae9e9680 | ||
|
|
34665cd6da | ||
|
|
0c8709ca5f | ||
|
|
12ebae01b0 | ||
|
|
165511fb14 | ||
|
|
fbf3c005ff | ||
|
|
bbe6d2d13b | ||
|
|
633ff4b60e | ||
|
|
b8c2c3991f | ||
|
|
38f788f545 | ||
|
|
9af70551f3 | ||
|
|
316d015d23 | ||
|
|
cfce189201 | ||
|
|
482ecf12ff | ||
|
|
50b0b61118 | ||
|
|
a7b1d83a3c | ||
|
|
8c1cc51c2e | ||
|
|
e2207e33ef | ||
|
|
3f543347b8 | ||
|
|
a7725f03bb | ||
|
|
f0d092f126 | ||
|
|
4f16ad6757 | ||
|
|
689aed7258 | ||
|
|
e966213ff8 | ||
|
|
4169927d83 | ||
|
|
eacc6b7b6e | ||
|
|
4b87363a20 | ||
|
|
9ba331693f | ||
|
|
12be795de7 | ||
|
|
49f56a38fb | ||
|
|
4e80d54be1 | ||
|
|
2096007ed9 | ||
|
|
47ce695142 | ||
|
|
80cd74edc8 | ||
|
|
55583c2237 | ||
|
|
069232ec1b | ||
|
|
5733f4079f | ||
|
|
55fe977d54 | ||
|
|
736789a9ed | ||
|
|
7150811aef | ||
|
|
63103ede81 | ||
|
|
c86252777b | ||
|
|
2bcdf27b03 | ||
|
|
2001d3c617 | ||
|
|
8210a51fdc | ||
|
|
08ff324b1b | ||
|
|
55f60866cb | ||
|
|
e2f08d4161 | ||
|
|
2e7f4c2f21 | ||
|
|
a58c082cfa | ||
|
|
5824afa941 | ||
|
|
adcc11c474 | ||
|
|
4769a1a49f | ||
|
|
f6a6a39d3b | ||
|
|
2940023cb0 | ||
|
|
d426f7242a | ||
|
|
2f9d65b4eb | ||
|
|
a4c1d5fe9d | ||
|
|
13c7c99965 | ||
|
|
fbfa7e7be3 | ||
|
|
e5dda6dd49 | ||
|
|
b9af3c7f34 | ||
|
|
64b8adb3d0 | ||
|
|
cb371f09ac | ||
|
|
9147c12687 | ||
|
|
b5c870d677 | ||
|
|
62a396b661 | ||
|
|
81731139e9 | ||
|
|
8a371b9c1b | ||
|
|
51092fb6a9 | ||
|
|
018abd6aad | ||
|
|
5292d75617 | ||
|
|
401e1166f9 | ||
|
|
45c1427f91 | ||
|
|
73be099d7f | ||
|
|
735faa2d11 | ||
|
|
46946c7323 | ||
|
|
d98bbca353 | ||
|
|
83fcb8e8ed | ||
|
|
ec61aa0080 | ||
|
|
4211501acf | ||
|
|
ae6afad885 | ||
|
|
3b8cee64b8 | ||
|
|
a8da0c18ee | ||
|
|
dac0471157 | ||
|
|
07007ee5a5 | ||
|
|
b78c08a30a | ||
|
|
5a487bc30c | ||
|
|
c913c77fef | ||
|
|
557d363d02 | ||
|
|
839885910c | ||
|
|
ee16070abe | ||
|
|
b8b5ab6378 | ||
|
|
5b88f4d3d2 | ||
|
|
34eb834d94 | ||
|
|
82a3cd9bdb | ||
|
|
e25ecce887 | ||
|
|
9f6d683415 | ||
|
|
dc114d62c5 | ||
|
|
6bf3006eb9 | ||
|
|
fddc3d6ad9 | ||
|
|
f76a2bc224 | ||
|
|
6558a32794 | ||
|
|
b935d54fe7 | ||
|
|
cb827406ca | ||
|
|
36fcf2c60e | ||
|
|
7c173bd63f | ||
|
|
3c43f621ce | ||
|
|
bdab477040 | ||
|
|
550c159ca8 | ||
|
|
aeec5d1542 | ||
|
|
b4aa213c64 | ||
|
|
a241e10208 | ||
|
|
90f6642d33 | ||
|
|
7bd289ed0f | ||
|
|
c8aa35d23c | ||
|
|
4e0e472f97 | ||
|
|
a76658ba46 | ||
|
|
6796204126 | ||
|
|
1c5e91c9a8 | ||
|
|
7f16675d2f | ||
|
|
6c7c442ad2 | ||
|
|
82fb2151a0 | ||
|
|
36b7c1c720 | ||
|
|
06bf67c146 | ||
|
|
8cc0fbc687 | ||
|
|
c846a14118 | ||
|
|
097424c535 | ||
|
|
c7ed36d558 | ||
|
|
95eab45108 | ||
|
|
f852813734 | ||
|
|
ca6a331a26 | ||
|
|
bfae205fbe | ||
|
|
aaa1245430 | ||
|
|
a99ae76ad4 | ||
|
|
6429e8b532 | ||
|
|
cb338e330f | ||
|
|
d12bd0824d | ||
|
|
4c0551ebb1 | ||
|
|
06fc23fc59 | ||
|
|
41977bf515 | ||
|
|
ffd2817d18 | ||
|
|
c48937a2f5 | ||
|
|
091d1157da | ||
|
|
be043a4437 | ||
|
|
fae0bccc9c | ||
|
|
b44cf4a094 | ||
|
|
90f4187ca9 | ||
|
|
ae272074b9 | ||
|
|
9972f7b90e | ||
|
|
f68cefbdc1 | ||
|
|
08841ed895 |
@@ -48,7 +48,7 @@ GOTO:EOF
|
||||
git submodule init
|
||||
git submodule update
|
||||
cd %SRC_DIR%\Telegram
|
||||
call gyp\refresh.bat
|
||||
call gyp\refresh.bat --api-id 17349 --api-hash 344583e45741c457fe1862106095a5eb
|
||||
GOTO:EOF
|
||||
|
||||
:configureBuild
|
||||
|
||||
5
.github/CONTRIBUTING.md
vendored
@@ -24,6 +24,8 @@ If we find issues with your pull request, we may suggest some changes and improv
|
||||
|
||||
Unfortunately we **do not merge** any pull requests that have new feature implementations, translations to new languages and those which introduce any new user interface elements.
|
||||
|
||||
If you have a translations-related contribution, check out [Translations platform][translate].
|
||||
|
||||
Telegram Desktop is not a standalone application but a part of [Telegram project][telegram], so all the decisions about the features, languages, user experience, user interface and the design are made inside Telegram team, often according to some roadmap which is not public.
|
||||
|
||||
## Build instructions
|
||||
@@ -33,7 +35,7 @@ environments.
|
||||
|
||||
## Pull upstream changes into your fork regularly
|
||||
|
||||
Telegram Desktop is advancing quickly. It is therefore critical that you pull upstream changes into your fork on a regular basis. Nothing is worse than putting in a days of hard work into a pull request only to have it rejected because it has diverged too far from upstram.
|
||||
Telegram Desktop is advancing quickly. It is therefore critical that you pull upstream changes into your fork on a regular basis. Nothing is worse than putting in a days of hard work into a pull request only to have it rejected because it has diverged too far from upstream.
|
||||
|
||||
To pull in upstream changes:
|
||||
|
||||
@@ -113,3 +115,4 @@ Before you submit a pull request, please test your changes. Verify that Telegram
|
||||
[pr]: https://github.com/telegramdesktop/tdesktop/compare
|
||||
[build_instructions]: https://github.com/telegramdesktop/tdesktop/blob/master/README.md#build-instructions
|
||||
[closing-issues-via-commit-messages]: https://help.github.com/articles/closing-issues-via-commit-messages/
|
||||
[translate]: https://translations.telegram.org
|
||||
|
||||
5
.github/ISSUE_TEMPLATE.md
vendored
@@ -22,8 +22,5 @@ Tell us what happens instead
|
||||
**Used theme**:
|
||||
|
||||
<details><summary><b>Logs</b>:</summary>
|
||||
Insert logs here (if necessary)
|
||||
|
||||
<!-- You can type `debugmode` in settings and then see ~/.TelegramDesktop/DebugLogs/log_...txt for log files.
|
||||
Type `debugmode` in settings again to disable logs. -->
|
||||
Insert log.txt here (if necessary)
|
||||
</details>
|
||||
|
||||
9
.gitignore
vendored
@@ -50,6 +50,15 @@ ipch/
|
||||
project.xcworkspace
|
||||
xcuserdata
|
||||
|
||||
parts
|
||||
prime
|
||||
stage
|
||||
*.snap
|
||||
.snapcraft
|
||||
/snap/gui/*.png
|
||||
/snap/gui/*.desktop
|
||||
/snap/plugins/__pycache__
|
||||
|
||||
/Telegram/*.user.*
|
||||
*.pro.user
|
||||
/Linux/
|
||||
|
||||
3
.gitmodules
vendored
@@ -13,3 +13,6 @@
|
||||
[submodule "Telegram/ThirdParty/crl"]
|
||||
path = Telegram/ThirdParty/crl
|
||||
url = https://github.com/telegramdesktop/crl.git
|
||||
[submodule "Telegram/ThirdParty/xxHash"]
|
||||
path = Telegram/ThirdParty/xxHash
|
||||
url = https://github.com/Cyan4973/xxHash.git
|
||||
|
||||
@@ -40,7 +40,7 @@ FFMPEG_PATH="$BUILD/ffmpeg"
|
||||
FFMPEG_CACHE_VERSION="3"
|
||||
|
||||
OPENAL_PATH="$BUILD/openal-soft"
|
||||
OPENAL_CACHE_VERSION="3"
|
||||
OPENAL_CACHE_VERSION="4"
|
||||
|
||||
GYP_DEFINES=""
|
||||
|
||||
@@ -472,10 +472,12 @@ buildOpenAL() {
|
||||
rm -rf "$EXTERNAL/openal-soft"
|
||||
fi
|
||||
cd $OPENAL_PATH
|
||||
rm -rf *
|
||||
sudo rm -rf *
|
||||
|
||||
cd "$EXTERNAL"
|
||||
git clone https://github.com/kcat/openal-soft.git
|
||||
cd openal-soft
|
||||
git checkout openal-soft-1.19.1
|
||||
|
||||
cd "$EXTERNAL/openal-soft/build"
|
||||
cmake \
|
||||
@@ -673,6 +675,8 @@ buildTelegram() {
|
||||
|
||||
cd "$UPSTREAM/Telegram/gyp"
|
||||
"$GYP_PATH/gyp" \
|
||||
-Dapi_id=17349 \
|
||||
-Dapi_hash=344583e45741c457fe1862106095a5eb \
|
||||
-Dbuild_defines=${GYP_DEFINES:1} \
|
||||
-Dlinux_path_xkbcommon=$XKB_PATH \
|
||||
-Dlinux_path_va=$VA_PATH \
|
||||
|
||||
@@ -16,7 +16,8 @@ The source code is published under GPLv3 with OpenSSL exception, the license is
|
||||
* Mac OS X 10.8 - Mac OS X 10.11
|
||||
* Mac OS X 10.6 - Mac OS X 10.7 (separate build)
|
||||
* Ubuntu 12.04 - Ubuntu 18.04
|
||||
* Fedora 22 - Fedora 24
|
||||
* Fedora 22 - Fedora 28
|
||||
* [Snappy](https://snapcraft.io/telegram-desktop)
|
||||
|
||||
## Third-party
|
||||
|
||||
@@ -39,6 +40,7 @@ The source code is published under GPLv3 with OpenSSL exception, the license is
|
||||
* Open Sans font ([Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0.html))
|
||||
* Emoji alpha codes ([MIT License](https://github.com/emojione/emojione/blob/master/extras/alpha-codes/LICENSE.md))
|
||||
* Catch test framework ([Boost License](https://github.com/philsquared/Catch/blob/master/LICENSE.txt))
|
||||
* xxHash ([BSD License](https://github.com/Cyan4973/xxHash/blob/dev/LICENSE))
|
||||
|
||||
## Build instructions
|
||||
|
||||
|
||||
@@ -252,6 +252,43 @@ index 41834b21ae..8cdf4ab145 100644
|
||||
if (value == WSAEADDRNOTAVAIL) {
|
||||
setError(QAbstractSocket::NetworkError, AddressNotAvailableErrorString);
|
||||
socketState = QAbstractSocket::UnconnectedState;
|
||||
diff --git a/src/platformsupport/dbustray/qdbustrayicon.cpp b/src/platformsupport/dbustray/qdbustrayicon.cpp
|
||||
index 4d6e70720d..9bdb0beb67 100644
|
||||
--- a/src/platformsupport/dbustray/qdbustrayicon.cpp
|
||||
+++ b/src/platformsupport/dbustray/qdbustrayicon.cpp
|
||||
@@ -58,9 +58,18 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
Q_LOGGING_CATEGORY(qLcTray, "qt.qpa.tray")
|
||||
|
||||
+static QString cachePath()
|
||||
+{
|
||||
+ QString xdgCache = QString::fromUtf8(getenv("XDG_CACHE_HOME"));
|
||||
+ if (xdgCache.isEmpty()) {
|
||||
+ xdgCache = QDir::cleanPath(QDir::homePath() + QStringLiteral("/.cache"));
|
||||
+ }
|
||||
+ return xdgCache;
|
||||
+}
|
||||
+
|
||||
static const QString KDEItemFormat = QStringLiteral("org.kde.StatusNotifierItem-%1-%2");
|
||||
static const QString KDEWatcherService = QStringLiteral("org.kde.StatusNotifierWatcher");
|
||||
-static const QString TempFileTemplate = QDir::tempPath() + QStringLiteral("/qt-trayicon-XXXXXX.png");
|
||||
+static const QString TempFileTemplate = cachePath() + QStringLiteral("/qt-trayicon-XXXXXX.png");
|
||||
static const QString XdgNotificationService = QStringLiteral("org.freedesktop.Notifications");
|
||||
static const QString XdgNotificationPath = QStringLiteral("/org/freedesktop/Notifications");
|
||||
static const QString DefaultAction = QStringLiteral("default");
|
||||
@@ -151,6 +160,12 @@ QTemporaryFile *QDBusTrayIcon::tempIcon(const QIcon &icon)
|
||||
uint pid = session.interface()->servicePid(KDEWatcherService).value();
|
||||
QString processName = QLockFilePrivate::processNameByPid(pid);
|
||||
necessary = processName.endsWith(QStringLiteral("indicator-application-service"));
|
||||
+ if (!necessary) {
|
||||
+ QString xdgDesktop = QString::fromUtf8(getenv("XDG_CURRENT_DESKTOP"));
|
||||
+ QStringList desktops = xdgDesktop.toLower().split(QLatin1Char(':'));
|
||||
+ necessary = desktops.contains(QStringLiteral("unity")) ||
|
||||
+ desktops.contains(QStringLiteral("ubuntu"));
|
||||
+ }
|
||||
necessity_checked = true;
|
||||
}
|
||||
if (!necessary)
|
||||
diff --git a/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp b/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp
|
||||
index 728b166b71..1dc64593e1 100644
|
||||
--- a/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp
|
||||
@@ -413,7 +450,7 @@ index 8ebabf3419..7bb8abd0d0 100644
|
||||
}
|
||||
populateFromPattern(pattern);
|
||||
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
|
||||
index 566abf2126..5b9c714ffa 100644
|
||||
index 566abf2126..5c5fde9813 100644
|
||||
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
|
||||
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
|
||||
@@ -265,6 +265,13 @@ static void getFontDescription(CTFontDescriptorRef font, FontDescription *fd)
|
||||
@@ -430,6 +467,20 @@ index 566abf2126..5b9c714ffa 100644
|
||||
fd->styleName = (CFStringRef)CTFontDescriptorCopyAttribute(font, kCTFontStyleNameAttribute);
|
||||
fd->weight = QFont::Normal;
|
||||
fd->style = QFont::StyleNormal;
|
||||
@@ -300,9 +307,10 @@ static void getFontDescription(CTFontDescriptorRef font, FontDescription *fd)
|
||||
|
||||
if (styles) {
|
||||
if (CFNumberRef weightValue = (CFNumberRef) CFDictionaryGetValue(styles, kCTFontWeightTrait)) {
|
||||
- float normalizedWeight;
|
||||
- if (CFNumberGetValue(weightValue, kCFNumberFloatType, &normalizedWeight))
|
||||
- fd->weight = QCoreTextFontEngine::qtWeightFromCFWeight(normalizedWeight);
|
||||
+ // Patch: backport bugfix from 'b64ea4a3ab' commit.
|
||||
+ double normalizedWeight;
|
||||
+ if (CFNumberGetValue(weightValue, kCFNumberFloat64Type, &normalizedWeight))
|
||||
+ fd->weight = QCoreTextFontEngine::qtWeightFromCFWeight(float(normalizedWeight));
|
||||
}
|
||||
if (CFNumberRef italic = (CFNumberRef) CFDictionaryGetValue(styles, kCTFontSlantTrait)) {
|
||||
double d;
|
||||
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
|
||||
index 7b459584ea..2ed2fd9b3b 100644
|
||||
--- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
|
||||
@@ -630,7 +681,7 @@ index c2d206fb45..9b9739862d 100644
|
||||
}
|
||||
return ret;
|
||||
diff --git a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
|
||||
index 8152c57ffd..5ddd7b353d 100644
|
||||
index 8152c57ffd..87ba2f3f72 100644
|
||||
--- a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
|
||||
+++ b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
|
||||
@@ -94,6 +94,8 @@ QT_USE_NAMESPACE
|
||||
@@ -746,7 +797,19 @@ index 8152c57ffd..5ddd7b353d 100644
|
||||
systray = sys;
|
||||
imageCell = [[QNSImageView alloc] initWithParent:self];
|
||||
[item setView: imageCell];
|
||||
@@ -482,6 +513,10 @@ QT_END_NAMESPACE
|
||||
@@ -448,6 +479,11 @@ QT_END_NAMESPACE
|
||||
-(void)dealloc {
|
||||
[[NSStatusBar systemStatusBar] removeStatusItem:item];
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:imageCell];
|
||||
+
|
||||
+ // Patch: Fix crash in macOS 10.14.
|
||||
+ // Somehow item and imageCell are retained and attempt to be drawn if left in view.
|
||||
+ [item setView: nil];
|
||||
+
|
||||
[imageCell release];
|
||||
[item release];
|
||||
[super dealloc];
|
||||
@@ -482,6 +518,10 @@ QT_END_NAMESPACE
|
||||
selector:@selector(menuTrackingDone:)
|
||||
name:NSMenuDidEndTrackingNotification
|
||||
object:m];
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 2.3 MiB |
|
Before Width: | Height: | Size: 2.2 MiB |
|
Before Width: | Height: | Size: 3.2 MiB |
@@ -243,12 +243,6 @@ dragPadding: margins(20px, 10px, 20px, 10px);
|
||||
|
||||
dragHeight: 72px;
|
||||
|
||||
minPhotoSize: 100px;
|
||||
maxMediaSize: 430px;
|
||||
maxStickerSize: 256px;
|
||||
maxGifSize: 320px;
|
||||
maxSignatureSize: 144px;
|
||||
|
||||
radialSize: size(50px, 50px);
|
||||
radialLine: 3px;
|
||||
radialDuration: 350;
|
||||
|
||||
@@ -444,6 +444,9 @@ historyComposeButtonBg: historyComposeAreaBg; // unblock / join channel / mute c
|
||||
historyComposeButtonBgOver: windowBgOver; // unblock / join channel / mute channel button background with mouse over
|
||||
historyComposeButtonBgRipple: windowBgRipple; // unblock / join channel / mute channel button ripple effect
|
||||
|
||||
mapPointDrop: #fd4444; // geo location marker background
|
||||
mapPointDot: #ffffff; // geo location marker point
|
||||
|
||||
// overview
|
||||
overviewCheckBg: #00000040; // shared media / files / links checkbox background for not selected rows when some rows are selected
|
||||
overviewCheckBgActive: windowBgActive; // shared media / files / links checkbox background for selected rows
|
||||
|
||||
BIN
Telegram/Resources/day-blue.tdesktop-theme
Normal file
BIN
Telegram/Resources/emoji/emoji_1.webp
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
Telegram/Resources/emoji/emoji_2.webp
Normal file
|
After Width: | Height: | Size: 1.5 MiB |
BIN
Telegram/Resources/emoji/emoji_3.webp
Normal file
|
After Width: | Height: | Size: 1.6 MiB |
BIN
Telegram/Resources/emoji/emoji_4.webp
Normal file
|
After Width: | Height: | Size: 1.6 MiB |
BIN
Telegram/Resources/emoji/emoji_5.webp
Normal file
|
After Width: | Height: | Size: 894 KiB |
@@ -245,6 +245,14 @@ a.block_link:hover {
|
||||
.history {
|
||||
padding: 16px 0;
|
||||
}
|
||||
.message {
|
||||
margin: 0 -10px;
|
||||
transition: background-color 2.0s ease;
|
||||
}
|
||||
div.selected {
|
||||
background-color: rgba(242,246,250,255);
|
||||
transition: background-color 0.5s ease;
|
||||
}
|
||||
.service {
|
||||
padding: 10px 24px;
|
||||
}
|
||||
@@ -264,10 +272,10 @@ a.block_link:hover {
|
||||
font-size: 16px;
|
||||
}
|
||||
.default {
|
||||
padding: 10px 0 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
.default.joined {
|
||||
padding-top: 0;
|
||||
margin-top: -10px;
|
||||
}
|
||||
.default .from_name {
|
||||
color: #3892db;
|
||||
@@ -379,6 +387,26 @@ a.block_link:hover {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.toast_container {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
opacity: 0;
|
||||
transition: opacity 3.0s ease;
|
||||
}
|
||||
.toast_body {
|
||||
margin: 0 -50%;
|
||||
float: left;
|
||||
border-radius: 15px;
|
||||
padding: 10px 20px;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
color: #ffffff;
|
||||
}
|
||||
div.toast_shown {
|
||||
opacity: 1;
|
||||
transition: opacity 0.4s ease;
|
||||
}
|
||||
|
||||
.section.calls {
|
||||
background-image: url(../images/section_calls.png);
|
||||
}
|
||||
|
||||
189
Telegram/Resources/export_html/js/script.js
Normal file
@@ -0,0 +1,189 @@
|
||||
"use strict";
|
||||
|
||||
window.AllowBackFromHistory = false;
|
||||
function CheckLocation() {
|
||||
var start = "#go_to_message";
|
||||
var hash = location.hash;
|
||||
if (hash.substr(0, start.length) == start) {
|
||||
var messageId = parseInt(hash.substr(start.length));
|
||||
if (messageId) {
|
||||
GoToMessage(messageId);
|
||||
}
|
||||
} else if (hash == "#allow_back") {
|
||||
window.AllowBackFromHistory = true;
|
||||
}
|
||||
}
|
||||
|
||||
function ShowToast(text) {
|
||||
var container = document.createElement("div");
|
||||
container.className = "toast_container";
|
||||
var inner = container.appendChild(document.createElement("div"));
|
||||
inner.className = "toast_body";
|
||||
inner.appendChild(document.createTextNode(text));
|
||||
var appended = document.body.appendChild(container);
|
||||
setTimeout(function () {
|
||||
AddClass(appended, "toast_shown");
|
||||
setTimeout(function () {
|
||||
RemoveClass(appended, "toast_shown");
|
||||
setTimeout(function () {
|
||||
document.body.removeChild(appended);
|
||||
}, 3000);
|
||||
}, 3000);
|
||||
}, 0);
|
||||
}
|
||||
|
||||
function ShowHashtag(tag) {
|
||||
ShowToast("This is a hashtag '#" + tag + "' link.");
|
||||
return false;
|
||||
}
|
||||
|
||||
function ShowCashtag(tag) {
|
||||
ShowToast("This is a cashtag '$" + tag + "' link.");
|
||||
return false;
|
||||
}
|
||||
|
||||
function ShowBotCommand(command) {
|
||||
ShowToast("This is a bot command '/" + command + "' link.");
|
||||
return false;
|
||||
}
|
||||
|
||||
function ShowMentionName() {
|
||||
ShowToast("This is a link to a user mentioned by name.");
|
||||
return false;
|
||||
}
|
||||
|
||||
function AddClass(element, name) {
|
||||
var current = element.className;
|
||||
var expression = new RegExp('(^|\\s)' + name + '(\\s|$)', 'g');
|
||||
if (expression.test(current)) {
|
||||
return;
|
||||
}
|
||||
element.className = current + ' ' + name;
|
||||
}
|
||||
|
||||
function RemoveClass(element, name) {
|
||||
var current = element.className;
|
||||
var expression = new RegExp('(^|\\s)' + name + '(\\s|$)', '');
|
||||
var match = expression.exec(current);
|
||||
while ((match = expression.exec(current)) != null) {
|
||||
if (match[1].length > 0 && match[2].length > 0) {
|
||||
current = current.substr(0, match.index + match[1].length)
|
||||
+ current.substr(match.index + match[0].length);
|
||||
} else {
|
||||
current = current.substr(0, match.index)
|
||||
+ current.substr(match.index + match[0].length);
|
||||
}
|
||||
}
|
||||
element.className = current;
|
||||
}
|
||||
|
||||
function EaseOutQuad(t) {
|
||||
return t * t;
|
||||
}
|
||||
|
||||
function EaseInOutQuad(t) {
|
||||
return (t < 0.5) ? (2 * t * t) : ((4 - 2 * t) * t - 1);
|
||||
}
|
||||
|
||||
function ScrollHeight() {
|
||||
if ("innerHeight" in window) {
|
||||
return window.innerHeight;
|
||||
} else if (document.documentElement) {
|
||||
return document.documentElement.clientHeight;
|
||||
}
|
||||
return document.body.clientHeight;
|
||||
}
|
||||
|
||||
function ScrollTo(top, callback) {
|
||||
var html = document.documentElement;
|
||||
var current = html.scrollTop;
|
||||
var delta = top - current;
|
||||
var finish = function () {
|
||||
html.scrollTop = top;
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
if (!window.performance.now || delta == 0) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
var transition = EaseOutQuad;
|
||||
var max = 300;
|
||||
if (delta < -max) {
|
||||
current = top + max;
|
||||
delta = -max;
|
||||
} else if (delta > max) {
|
||||
current = top - max;
|
||||
delta = max;
|
||||
} else {
|
||||
transition = EaseInOutQuad;
|
||||
}
|
||||
var duration = 150;
|
||||
var interval = 7;
|
||||
var time = window.performance.now();
|
||||
var animate = function () {
|
||||
var now = window.performance.now();
|
||||
if (now >= time + duration) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
var dt = (now - time) / duration;
|
||||
html.scrollTop = Math.round(current + delta * transition(dt));
|
||||
setTimeout(animate, interval);
|
||||
};
|
||||
setTimeout(animate, interval);
|
||||
}
|
||||
|
||||
function ScrollToElement(element, callback) {
|
||||
var header = document.getElementsByClassName("page_header")[0];
|
||||
var headerHeight = header.offsetHeight;
|
||||
var html = document.documentElement;
|
||||
var scrollHeight = ScrollHeight();
|
||||
var available = scrollHeight - headerHeight;
|
||||
var padding = 10;
|
||||
var top = element.offsetTop;
|
||||
var height = element.offsetHeight;
|
||||
var desired = top
|
||||
- Math.max((available - height) / 2, padding)
|
||||
- headerHeight;
|
||||
var scrollTopMax = html.offsetHeight - scrollHeight;
|
||||
ScrollTo(Math.min(desired, scrollTopMax), callback);
|
||||
}
|
||||
|
||||
function GoToMessage(messageId) {
|
||||
var element = document.getElementById("message" + messageId);
|
||||
if (element) {
|
||||
var hash = "#go_to_message" + messageId;
|
||||
if (location.hash != hash) {
|
||||
location.hash = hash;
|
||||
}
|
||||
ScrollToElement(element, function () {
|
||||
AddClass(element, "selected");
|
||||
setTimeout(function () {
|
||||
RemoveClass(element, "selected");
|
||||
}, 1000);
|
||||
});
|
||||
} else {
|
||||
ShowToast("This message was not exported. Maybe it was deleted.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function GoBack(anchor) {
|
||||
if (!window.AllowBackFromHistory) {
|
||||
return true;
|
||||
}
|
||||
history.back();
|
||||
if (!anchor || !anchor.getAttribute) {
|
||||
return true;
|
||||
}
|
||||
var destination = anchor.getAttribute("href");
|
||||
if (!destination) {
|
||||
return true;
|
||||
}
|
||||
setTimeout(function () {
|
||||
location.href = destination;
|
||||
}, 100);
|
||||
return false;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 380 B |
|
Before Width: | Height: | Size: 708 B |
|
Before Width: | Height: | Size: 316 B |
|
Before Width: | Height: | Size: 579 B |
BIN
Telegram/Resources/icons/box_button_back@3x.png
Normal file
|
After Width: | Height: | Size: 251 B |
BIN
Telegram/Resources/icons/box_button_close@3x.png
Normal file
|
After Width: | Height: | Size: 590 B |
BIN
Telegram/Resources/icons/box_search@3x.png
Normal file
|
After Width: | Height: | Size: 825 B |
BIN
Telegram/Resources/icons/bubble_tail@3x.png
Normal file
|
After Width: | Height: | Size: 343 B |
BIN
Telegram/Resources/icons/call_answer@3x.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
Telegram/Resources/icons/call_arrow_in@3x.png
Normal file
|
After Width: | Height: | Size: 449 B |
BIN
Telegram/Resources/icons/call_arrow_out@3x.png
Normal file
|
After Width: | Height: | Size: 443 B |
BIN
Telegram/Resources/icons/call_discard@3x.png
Normal file
|
After Width: | Height: | Size: 886 B |
BIN
Telegram/Resources/icons/call_rating@3x.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
Telegram/Resources/icons/call_rating_filled@3x.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
Telegram/Resources/icons/call_record_active@3x.png
Normal file
|
After Width: | Height: | Size: 945 B |
BIN
Telegram/Resources/icons/call_record_muted@3x.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
Telegram/Resources/icons/call_shadow_left@3x.png
Normal file
|
After Width: | Height: | Size: 139 B |
BIN
Telegram/Resources/icons/call_shadow_top@3x.png
Normal file
|
After Width: | Height: | Size: 141 B |
BIN
Telegram/Resources/icons/call_shadow_top_left@3x.png
Normal file
|
After Width: | Height: | Size: 927 B |
BIN
Telegram/Resources/icons/color_slider_arrow@3x.png
Normal file
|
After Width: | Height: | Size: 310 B |
BIN
Telegram/Resources/icons/color_slider_arrow_vertical@3x.png
Normal file
|
After Width: | Height: | Size: 357 B |
BIN
Telegram/Resources/icons/connecting_body@3x.png
Normal file
|
After Width: | Height: | Size: 144 B |
BIN
Telegram/Resources/icons/connecting_body_shadow@3x.png
Normal file
|
After Width: | Height: | Size: 207 B |
BIN
Telegram/Resources/icons/connecting_left@3x.png
Normal file
|
After Width: | Height: | Size: 940 B |
BIN
Telegram/Resources/icons/connecting_left_shadow@3x.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
Telegram/Resources/icons/connecting_right@3x.png
Normal file
|
After Width: | Height: | Size: 926 B |
BIN
Telegram/Resources/icons/connecting_right_shadow@3x.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
Telegram/Resources/icons/contacts_add@3x.png
Normal file
|
After Width: | Height: | Size: 174 B |
BIN
Telegram/Resources/icons/default_checkbox_check@3x.png
Normal file
|
After Width: | Height: | Size: 296 B |
BIN
Telegram/Resources/icons/dialogs_calendar@3x.png
Normal file
|
After Width: | Height: | Size: 344 B |
BIN
Telegram/Resources/icons/dialogs_cancel_search@3x.png
Normal file
|
After Width: | Height: | Size: 393 B |
BIN
Telegram/Resources/icons/dialogs_channel@3x.png
Normal file
|
After Width: | Height: | Size: 494 B |
BIN
Telegram/Resources/icons/dialogs_chat@3x.png
Normal file
|
After Width: | Height: | Size: 578 B |
BIN
Telegram/Resources/icons/dialogs_feed@3x.png
Normal file
|
After Width: | Height: | Size: 841 B |
BIN
Telegram/Resources/icons/dialogs_lock@3x.png
Normal file
|
After Width: | Height: | Size: 598 B |
BIN
Telegram/Resources/icons/dialogs_menu@3x.png
Normal file
|
After Width: | Height: | Size: 190 B |
BIN
Telegram/Resources/icons/dialogs_pinned@3x.png
Normal file
|
After Width: | Height: | Size: 792 B |
BIN
Telegram/Resources/icons/dialogs_received@3x.png
Normal file
|
After Width: | Height: | Size: 321 B |
BIN
Telegram/Resources/icons/dialogs_search_from@3x.png
Normal file
|
After Width: | Height: | Size: 838 B |
BIN
Telegram/Resources/icons/dialogs_sending@3x.png
Normal file
|
After Width: | Height: | Size: 512 B |
BIN
Telegram/Resources/icons/dialogs_sent@3x.png
Normal file
|
After Width: | Height: | Size: 272 B |
BIN
Telegram/Resources/icons/dialogs_unlock@3x.png
Normal file
|
After Width: | Height: | Size: 578 B |
BIN
Telegram/Resources/icons/dialogs_verified_check@3x.png
Normal file
|
After Width: | Height: | Size: 404 B |
BIN
Telegram/Resources/icons/dialogs_verified_star@3x.png
Normal file
|
After Width: | Height: | Size: 694 B |
BIN
Telegram/Resources/icons/dropdown_submenu_arrow@3x.png
Normal file
|
After Width: | Height: | Size: 293 B |
BIN
Telegram/Resources/icons/emoji_activity@3x.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
Telegram/Resources/icons/emoji_delete@3x.png
Normal file
|
After Width: | Height: | Size: 408 B |
BIN
Telegram/Resources/icons/emoji_delete_bg@3x.png
Normal file
|
After Width: | Height: | Size: 337 B |
BIN
Telegram/Resources/icons/emoji_faved@3x.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
Telegram/Resources/icons/emoji_food@3x.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
Telegram/Resources/icons/emoji_nature@3x.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
Telegram/Resources/icons/emoji_objects@3x.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
Telegram/Resources/icons/emoji_people@3x.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
Telegram/Resources/icons/emoji_recent@3x.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
Telegram/Resources/icons/emoji_settings@3x.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
Telegram/Resources/icons/emoji_switch@3x.png
Normal file
|
After Width: | Height: | Size: 556 B |
BIN
Telegram/Resources/icons/emoji_symbols@3x.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
Telegram/Resources/icons/emoji_travel@3x.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
Telegram/Resources/icons/emoji_trending@3x.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
Telegram/Resources/icons/fade_horizontal@3x.png
Normal file
|
After Width: | Height: | Size: 165 B |
BIN
Telegram/Resources/icons/fast_share@3x.png
Normal file
|
After Width: | Height: | Size: 696 B |
BIN
Telegram/Resources/icons/history_action_edit@3x.png
Normal file
|
After Width: | Height: | Size: 584 B |
BIN
Telegram/Resources/icons/history_action_forward@3x.png
Normal file
|
After Width: | Height: | Size: 504 B |
BIN
Telegram/Resources/icons/history_action_reply@3x.png
Normal file
|
After Width: | Height: | Size: 994 B |
BIN
Telegram/Resources/icons/history_down_arrow@3x.png
Normal file
|
After Width: | Height: | Size: 717 B |
BIN
Telegram/Resources/icons/history_down_circle@3x.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
Telegram/Resources/icons/history_down_shadow@3x.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
Telegram/Resources/icons/history_file_cancel@3x.png
Normal file
|
After Width: | Height: | Size: 469 B |
BIN
Telegram/Resources/icons/history_file_document@3x.png
Normal file
|
After Width: | Height: | Size: 506 B |
BIN
Telegram/Resources/icons/history_file_download@3x.png
Normal file
|
After Width: | Height: | Size: 592 B |
BIN
Telegram/Resources/icons/history_file_image@3x.png
Normal file
|
After Width: | Height: | Size: 879 B |
BIN
Telegram/Resources/icons/history_file_pause@3x.png
Normal file
|
After Width: | Height: | Size: 229 B |
BIN
Telegram/Resources/icons/history_file_play@3x.png
Normal file
|
After Width: | Height: | Size: 532 B |
BIN
Telegram/Resources/icons/history_received@3x.png
Normal file
|
After Width: | Height: | Size: 533 B |
BIN
Telegram/Resources/icons/history_sent@3x.png
Normal file
|
After Width: | Height: | Size: 472 B |
BIN
Telegram/Resources/icons/history_unread_mention@3x.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
Telegram/Resources/icons/history_views@3x.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |