Commit Graph

2322 Commits

Author SHA1 Message Date
John Preston 12bbd971b3 Added Guideline Support Library as a dependency.
See https://github.com/Microsoft/GSL for information.
2017-03-04 12:01:07 +03:00
John Preston 0838d21a05 Removed virtual type getters in mtpFileLoader. 2017-03-04 12:01:06 +03:00
John Preston f48d6dc464 Alpha 1.0.18: Fixed build for macOS. 2017-03-02 17:01:32 +03:00
John Preston 6576959948 Alpha 1.0.18: destroying auth keys on sign up.
Also some debugging tools for mtproto endpoints added.
2017-03-01 21:42:36 +03:00
John Preston 3da0af3550 Merge branch 'master' into dev 2017-03-01 21:41:42 +03:00
John Preston 195d3d13d7 Fix regression from 87445ccf8c in a helper script. 2017-03-01 21:37:15 +03:00
Konstantin Lazutin 701acace21 Removed click at the end of the notification sound (#3052)
Signed-off-by: Konstantin Lazutin klazutin@gmail.com (github: klazutin)
2017-03-01 21:30:28 +03:00
John Preston bc76f5ee1e Debug feature added for overriding dc options.
Now you can type "endpoints" in Settings and choose a file with
a complete set of dc_options that will be used instead of built-in
or received through mtproto config till the end of current session.
2017-03-01 20:22:37 +03:00
John Preston 5f5770dd46 Support special seek whence for ffmpeg.
AVSEEK_SIZE is passed as a whence when ffmpeg needs just data size.
2017-03-01 10:31:36 +03:00
John Preston fb230a443e Fixed text with right bearings display.
Sometimes Text::_maxWidth was not accumulated correctly because
the intermediate text blocks had negative right bearing larger
than the whole width of the next text block, so the final computed
line width was less than some intermediate value. Now we accumulate
the _maxWidth value after each block making this value correct.
2017-02-28 19:38:23 +03:00
John Preston a4a7a77abd Closed beta 1000017001: enable auth_key_destroy.
Now we use only new authorization keys for signing in. If we are
preparing to sign in and we see, that some of the authorization
keys were not generated in this launch, but were read from file, we
destroy all existing auth keys and generate a completely new set.
2017-02-28 19:08:30 +03:00
John Preston 12705c9065 Removed legacy FileDialog::query* methods.
Everything is done easier and better through the FileDialog::Get*.
2017-02-28 19:04:52 +03:00
John Preston f8318177b9 Platform-dependent file methods called async.
Some major platform-dependent file operations refactoring.
All methods like "open file", "open file with", "show in folder"
were moved to core/file_utilities module with platform-dependent
backends. All methods interacting with DesktopServices made async.
2017-02-28 18:03:38 +03:00
John Preston 6f0cf30b12 Some platform-dependent modules refactoring.
Now each platform-dependent module declares its interface in
platform/platform_module.h file and after that includes platform-
specific headers like platform/win/module_win.h with implementation.

Also removed the legacy WinRT platform-dependent implementations.
2017-02-28 13:51:00 +03:00
John Preston ae08a2f697 Alpha 1.0.17: crash fix in file open.
ShellExecute() call reenters Qt event loop, so each time we
schedule a delayed action (like destroying FileLoader) and after
that we call ShellExecute (in psOpenFile) we destroy it inside
this call and can't use it after.

So now we perform ShellExecute calls only delayed (using task queue).
2017-02-28 11:18:27 +03:00
John Preston a5eb5a6ea2 Crash fix when setting a background image by URL. #3077
When we choose a file from URL we don't get the filename.
In background image apply method we test for a theme / palette
file extensions. Now we don't crash there, but we still can't set
a .tdesktop-theme or .tdesktop-palette file from URL. Who cares :)
2017-02-28 10:26:27 +03:00
John Preston d254058690 Alpha 1.0.16: fighting crashes.
An attempt to fix a crash in MTP::Instance destructor + additional
logging there to find out how this crash happens.
2017-02-27 21:47:29 +03:00
John Preston 2fa2fa41c5 Some special logging added for crash catching.
Special FileLoader destructor crash added to find the code path
leading to crashes that could be observed through the reports.

Looks like progress() signal handlers enter event loop somehow.
2017-02-27 21:33:42 +03:00
John Preston 3f8e822621 Fixing crash in logout from passcode.
If the MTP::Instance is not started yet (we forgot our passcode),
the logout attempt was attempting to use mtproto from Intro::Widget
constructor before it was created. Now we create it before logout.
2017-02-27 21:25:42 +03:00
John Preston fb2a26fb35 Alpha 1.0.15: various improvements.
Wrong supergroup members display fix, RTL text layout fix.
Linux GTK file chooser image preview added. Fix #3053 #2968
2017-02-27 13:44:14 +03:00
John Preston 6c2f16e9a0 Some improvements in mtproto data processing.
Readability improvements. Checking maximum padding size.
Checking SHA1 hash before validating inner message length.
2017-02-27 12:51:03 +03:00
Christoph 87445ccf8c Add interpreter path
Fix #3064
2017-02-27 09:42:11 +01:00
John Preston 4838d1bfc9 GTK file chooser image preview support added. #2968
Thanks to Chromium code.
Also fixed build on GCC / Linux.
2017-02-26 22:27:57 +03:00
John Preston e8b03248e1 Fix members list in supergroups when scrolling up.
When we load previous messages in chat history we add all authors
of the messages to lastAuthors in regular groups (so that we can
suggest them in mention autocomplete). The same logic was (blindly)
applied to supergroups lastParticipants list which is used not only
for the mention autocomplete but also in Profile members list. That
way we were showing there users who could've already left the group.
2017-02-26 21:02:47 +03:00
John Preston dcd6028e91 Loading libunity only in Unity and Pantheon. #3053
Commit 296c800b39 introduced a regression which caused crashes
in some ArchLinux distros when attempting to load or use libunity.
2017-02-26 21:02:46 +03:00
John Preston 5195b4d3ef RTL strings with trailing spaces render fix.
Commit 8d354382a4 introduced a regression in RTL phrases display.
When an RTL line had trailing spaces we started displaying them in
front of the text still assuming counted line width value that did
not include those trailing spaces.

Line width is not including trailing spaces width because it is
allowed to fit in the line any number of spaces.

Also text block "left padding" entity was eliminated. If we have
some spaces in the start of the text block (for example a text block
after a link) we just add an empty word and mark those spaces as its
right padding.
2017-02-26 21:02:45 +03:00
John Preston 692d115313 Use a Deleted Account phrase instead of Unknown. 2017-02-26 21:02:45 +03:00
John Preston c207743338 Made base::lambda a copyable value type.
Now base::lambda can be copied and can wrap any immutable lambda.
For mutable lambdas there is base::lambda_once (which you're
supposed to call only once to pass data through lambda captures,
for example by using std::unique_ptr). Generally base::lambda is
passed by value and base::lambda_once is passed by rvalue reference.
2017-02-26 21:01:23 +03:00
John Preston f82989c9c3 Using std::vector<> and const fields for emoji. 2017-02-25 23:35:55 +03:00
John Preston c48ed2e62b Closed beta 1000014001: fixed GCC build. 2017-02-25 21:17:50 +03:00
John Preston d1e37864ac Closed beta 1000014001: fixed crash in MTP destructor.
Some of MTP::Instance::Private fields access _instance in
destructors. All that cleanup should be performed before the
Instance::~Instance() (which invalidates _private) is called.
2017-02-25 20:55:11 +03:00
John Preston bcec2f6b84 Closed beta 1000014001: fixed Xcode build. 2017-02-25 20:46:21 +03:00
John Preston 6b70cc342a Closed beta 1000014001: testing MTP changes.
Destroying of the authorization keys disabled for now.
2017-02-25 20:15:30 +03:00
John Preston 7d89b54d1c Ability to delete authorization keys added.
If we start logging in and we know, that some of the authorization
keys were read from the hard drive, not generated, we destroy all
the existing authorization keys and start generating new keys.
2017-02-25 19:48:22 +03:00
John Preston dd933cf61c MTP global state moved to MTP::Instance class.
Now there will be ability to start multiple mtproto instances.
2017-02-25 19:48:21 +03:00
John Preston c3b3819d9f Moved AppClass to messenger.cpp:Messenger. 2017-02-25 19:48:20 +03:00
John Preston 63c61637f8 Moved MTP::authedId() to AuthSession::Current(). 2017-02-25 19:48:19 +03:00
John Preston a35947141c Encapsulated DcOptions to an independent class. 2017-02-25 19:48:19 +03:00
John Preston 90b3b5c3e5 MTP::AuthKey uses std::array for data.
Also using "volatile char*" iteration for secure memset on Mac/Linux.
2017-02-25 19:48:18 +03:00
John Preston 21efb44e81 TL scheme for destroy_auth_key query added. 2017-02-25 19:48:17 +03:00
John Preston e6672432bb Merge branch 'master' into dev 2017-02-25 19:47:10 +03:00
Mohammad Reza Espargham 8c63feb11e Added interpreter path (#3065)
Signed-off-by: MohammadReza Espargham <reza.espargham@owasp.org> (github: rezasp)
2017-02-23 22:37:24 +01:00
Mohammad Reza Espargham dbd4eaed48 Added interpreter path (#3061)
Signed-off-by: MohammadReza Espargham <reza.espargham@owasp.org> (github: rezasp)
2017-02-23 18:51:29 +01:00
John Preston 9e4b752830 Fix travis build warning on precompiled headers. 2017-02-22 14:00:08 +03:00
John Preston 958d3b7c15 Good alignment in palette reading generated code.
Also added -std=gnu++1y to CMake precompiled header generation.
2017-02-21 21:24:36 +03:00
John Preston 30ae322cf0 Move to GCC 6 and silent some warnings there. 2017-02-21 18:29:59 +03:00
John Preston 755325fef3 Updated Xcode build for using standard library.
Also trying to use g++-6 for travis build.
2017-02-21 17:37:53 +03:00
John Preston ffc557a0f9 Using standard library instead of std_ namespace.
Currently tested only in VS2015.
2017-02-21 16:45:56 +03:00
John Preston 27f015561a Using custom build of libc++ for old OS X version.
This will allow us to use C++14 library on all platforms.
Patches for macold versions got bigger and are now different for
crashpad and mini_chromium, so they were moved to a separate folder.
2017-02-21 15:37:52 +03:00
John Preston 228e2f7031 Use 'v140' msbuild_toolset for VS project.
We use /SUBSYSTEM:Windows and 'MinimumRequiredVersion': '5.01' to
make our app work in Windows XP, but we use 'v140' toolset instead
of 'v140_xp' so that we have access to modern APIs like WRL.
2017-02-21 15:27:34 +03:00