Commit Graph

238 Commits

Author SHA1 Message Date
23rd 9c60d2be80 Updated for archive support. 2019-05-27 15:34:58 +02:00
23rd 3b7123d159 Added auto updating of button images when peer changed userpic. 2019-05-27 15:34:57 +02:00
23rd 2f2847bfdf Moved Saved Messages button to subclass. 2019-05-27 15:34:57 +02:00
23rd 8099305c53 Added buttons of pinned dialogs in main touch bar. 2019-05-27 15:34:56 +02:00
23rd 3eadc62cd5 Added close player button, slightly improved switching of touch bar. 2019-05-27 15:34:55 +02:00
23rd c9f56abce5 Added initial implementation of switching between touch bars. 2019-05-27 15:34:55 +02:00
23rd 58604406f8 Added initial implementation touchbar. 2019-05-27 15:34:54 +02:00
John Preston edc8c23772 Fix custom download path in Mac App Store build.
Fixes #5903.
2019-04-13 19:49:13 +04:00
John Preston 7cfb122dea Fix crash with event loop nesting tracking. 2019-04-12 17:30:43 +04:00
John Preston 6c17ed2242 Fix crash in event loop nesting. 2019-04-07 11:18:38 +04:00
John Preston 0df628dc7a Fix notifications hiding on Linux.
Regression was introduced in 3372dfcd3e.

Only when platform-specific code can give us the global time of the
last user input event we rely on idle time for notifications hiding.

Fixes #5791.
2019-03-14 21:59:10 +04:00
John Preston 9a616edf2a Add new animations engine. 2019-03-11 12:08:17 +04:00
23rd 3372dfcd3e Refactored checking of last input while notifications are displayed.
- Removed condition for Windows platform only.
 - Added smooth hiding of notifications in case video is watched or voice message is recorded.
 - psUserActionDone() was completely replaced with Core::App().updateNonIdle().
2019-03-10 22:02:58 +04:00
23rd 78d00bcf22 Refactored counting idle time.
- psIdleTime() was replaced with Platform::LastUserInputTime().
 - _lastTimeVideoPlayedAt was moved to Application as _lastNonIdleTime.
 - Call of updateNonIdle() was added while voice is recording.
 - Fixed #5695.
 - Thanks Preston. =)
2019-03-10 22:02:58 +04:00
John Preston fe618bd652 Use crl::time/now instead of TimeMs/getms. 2019-02-19 11:06:33 +04:00
John Preston 032694ad9e Move files to media/audio and media/clip. 2019-02-13 15:41:33 +03:00
John Preston 646d15b257 Add LSFileQuarantineEnabled to the .plist 2019-01-29 14:52:33 +03:00
John Preston a70e72f75d Application->Sandbox, Messenger->Application. 2019-01-23 12:51:58 +04:00
John Preston 314e30272b Replace SingleTimer with base::Timer. 2019-01-18 16:41:08 +04:00
John Preston 65430d92ea Refactor calls settings panel. 2019-01-11 17:30:57 +04:00
Gregory K 11b991cddc Add call settings (#5540) 2019-01-05 15:08:02 +04:00
John Preston d1be4c6d96 Fix crash with event loop nesting. 2018-12-25 14:11:10 +04:00
John Preston de4a477686 Mark event loop nesting more carefully.
Fixes #5506. I hope fixes #5508.
2018-12-23 16:08:48 +04:00
John Preston 8b0e54a95c Fix macOS main menu items. 2018-12-17 10:45:48 +04:00
John Preston 6562a1f6af Add 'Count unread messages' option. 2018-12-04 14:32:48 +04:00
John Preston 3f58c930e3 Use separate download folder for support. 2018-11-22 17:15:52 +04:00
John Preston 4e6f55e176 Closed alpha version 1.4.4.1: Fix build for macOS. 2018-11-04 15:51:38 +04:00
John Preston 6db4972208 Fix blurry App Switcher icon on macOS.
Fixes #5267.
2018-11-04 15:51:38 +04:00
John Preston a429e22b93 Beta version 1.4.4: Add some checks. 2018-10-17 09:25:24 +03:00
Grishka 44eac2bf07 Added support for platform-specific microphone permission in calls 2018-10-17 08:53:23 +03:00
John Preston 5b4abe69aa Add interface scale (100%..150%) for Retina.
Fixes #69, fixes #3126, fixes #3789.
2018-10-16 23:00:55 +03:00
John Preston 19a9a990b6 Allow using any interface scale between 100%-300%. 2018-10-16 11:38:09 +03:00
John Preston 1ec9137fd7 Clear locations data on logout. Fixes a crash.
Also clear user notification center delegate on macOS.
2018-10-10 08:29:31 +03:00
John Preston 0f535a98a7 Closed alpha bersion 1.4.0.1: Fix macOS build. 2018-10-09 19:27:17 +03:00
John Preston eaa50adf75 Remove irrelevant menu items (support). 2018-10-09 19:27:17 +03:00
John Preston b66f32fe9e Version 1.4.0: Fix build for old OS X versions. 2018-09-28 15:50:47 +03:00
John Preston 6e566e0165 Swap 'alpha' and 'beta'. Happy debugging! 2018-09-26 21:23:08 +03:00
John Preston cf9f7ef508 Fix several bugs for macOS 10.14. 2018-09-26 13:18:59 +03:00
John Preston 2e5a0e056c Move to std::optional. 2018-09-21 19:28:46 +03:00
John Preston 0c8709ca5f Replace App::self() with Auth().user().
Always have self Auth().user() when AuthSession exists.
2018-09-19 19:22:13 +03:00
John Preston c8aa35d23c Don't show PopupMenu for inactive window on macOS.
This is a fixup for 06bf67c146.
2018-08-04 15:17:23 +03:00
John Preston 52e7ddf079 Add '-externalupdater' command-line argument.
Now no-autoupdater mode can be switched on in runtime.
Also TDESKTOP_DISABLE_AUTOUPDATE build is disabled in CI (trivial).

Fixes #4895.
2018-07-12 18:35:59 +03:00
John Preston 9ebeddbed8 Request, show and require accept for updated ToS. 2018-06-06 21:37:01 +03:00
John Preston 72f95b984f Replace cDebug() with Logs::DebugEnabled(). 2018-06-05 21:51:05 +03:00
John Preston 812ffb4297 Alpha version 1.3.1: Fix build for old OS X versions. 2018-06-04 23:58:39 +03:00
John Preston dd81f5d59f Replace base::lambda with shorter term.
base::lambda -> Fn (type alias for std::function).
base::lambda_once -> FnMut (type alias for base::unique_function).
base::lambda_guarded -> crl::guard.
base::lambda_call_type_t -> crl::deduced_call_type.
2018-06-04 18:38:27 +03:00
John Preston 67ea175fc6 Show choose file box over the passport panel. 2018-06-03 23:16:37 +03:00
John Preston ddb4527159 Start passport support: handle link, receive form. 2018-06-03 23:16:33 +03:00
John Preston e122353bfb Show better information in sessions list. 2018-06-03 23:14:44 +03:00
John Preston 5e7642b42a Support markdown and replaces in media captions. 2018-05-24 16:03:21 +03:00
John Preston a053384618 Fix mtproto-proxy working with domain names.
Also refactor a bit TcpConnection and HttpConnection classes.
2018-05-17 13:27:49 +03:00
John Preston 2aa477176c Fix build for Xcode / GCC. 2018-02-08 12:20:52 +03:00
John Preston ea7441ae77 Use single LEGAL file with license and copyright. 2018-01-03 13:23:14 +03:00
John Preston af552fb4c0 Replace base/task_queue with crl. 2017-12-31 00:28:38 +03:00
John Preston 0a4038d061 Fix build with TDESKTOP_DISABLE_CRASH_REPORTS.
Regression was introduced in 97c15865a5.

Fixes #4173.
2017-12-13 00:25:14 +04:00
John Preston 251176df47 Move relaunch / update logic to Core::Launcher.
Also pass "-workdir" argument through relaunch / update.

Fixes #4149.
2017-12-12 18:56:36 +04:00
John Preston 97c15865a5 Move some code around.
Move logs:SignalHandlers to core/crash_reports:CrashReports.
Move all pre-launch windows to core/crash_report_window module.
Move some global code to core/launcher:Launcher.
It should replace settings / platform_specific module in some way.
2017-12-12 16:47:32 +04:00
John Preston 9534121676 Fix issue number :/ Fixes #4150. 2017-12-11 15:19:13 +04:00
John Preston 10b76d921b Fix window scaling issue on macOS.
Fixes #4149.
2017-12-11 15:06:05 +04:00
John Preston 2432845df2 Optimize and rename base::weak_unique_ptr.
Rename base::enable_weak_from_this -> base::has_weak_ptr.
Rename base::weak_unique_ptr -> base::weak_ptr.
Rename base::make_weak_unique -> base::make_weak.
Rename base/weak_unique_ptr.h -> base/weak_ptr.h
2017-11-30 21:33:27 +04:00
John Preston 2850d456d0 Closed beta 1.1.23.8: Test an upstream fix backport for macOS issue. 2017-11-22 21:53:10 +04:00
John Preston bc7c88c511 Fix build in Xcode / GCC. 2017-11-19 20:31:58 +04:00
John Preston 5a159d0204 Improve string encoding. 2017-11-16 07:59:12 +04:00
John Preston 7fdeab829f Paint native title instead of using custom. 2017-11-16 07:59:12 +04:00
John Preston 508fa14385 Workaround render glitches on new MacBooks.
For unknown reason large windows have bad render glitches in High Sierra.
Forcing of OpenGL composition (by adding a fake child QOpenGLWidget) fixes it.
2017-11-16 07:59:07 +04:00
John Preston 25ffaaaa2d Replace t_assert() with Assert().
Also use this assertions for Expects(), Ensures() and Unexpected().
2017-08-30 19:15:42 +03:00
John Preston b3da99c302 Replace gsl::not_null<T*> with just not_null<T*>. 2017-08-30 19:15:41 +03:00
John Preston 8e433971c9 Improve current executable path computing.
Fixes #960 (hopefully).
2017-08-30 19:15:35 +03:00
John Preston a72453fb1b Remove ContactsBox and contacts_box module. 2017-08-30 19:15:30 +03:00
John Preston f7359093b4 Replace ContactsBox with PeerListBox in two cases.
- View contacts list in PeerListBox.
- Add participants when creating group / channel in PeerListBox.
2017-08-30 19:15:27 +03:00
John Preston a143505fd6 Remove lambda_slot() and lambda_slot_once(). 2017-08-25 14:39:15 +03:00
John Preston ca47e4ebfd Alpha 1.1.13: Fix build for Xcode. 2017-07-14 15:52:53 +03:00
John Preston f316e3bd17 Add debug logs for window position and autoupdate. 2017-07-03 15:23:41 +03:00
John Preston 4993ff1921 Finalize rename / move. 2017-06-30 09:21:45 +03:00
John Preston 7dd50fa931 Closed beta 1001007001: Fix build in Xcode. 2017-06-29 11:40:01 +03:00
John Preston f5353080e7 Use Qt UI language if system was not determined.
Also rename platform/mac/specific_mac.cpp to .mm
2017-06-29 11:39:47 +03:00
John Preston 139d4e72b5 Start cloud langpack support.
Change the way langpacks are stored.
Support custom langpacks in the new storage.
2017-06-29 11:39:42 +03:00
John Preston 110e7c8074 Finalize rename / move. 2017-06-29 11:39:38 +03:00
John Preston 1e6d4d6b41 Activate mediaview instead of main window.
If the mediaview is currently shown and we receive an activation
event for the main window we should activate and focus mediaview.
2017-05-24 16:25:08 +03:00
John Preston b74dea8662 Move logo images to Messenger. Set call panel icon. 2017-05-12 18:28:44 +03:00
John Preston 6f89d01452 Add new Media::Audio::Instance for audio tracks.
Move some audio-related code from Media::Player to Media::Audio.
2017-05-09 23:46:29 +03:00
John Preston 5f2e295d63 Improve calls panel in macOS.
Use Qt::Dialog instead of Qt::Tool which works better with window
activation / deactivation handling.

Stop displaying the panel on all spaces when the call is established.
2017-05-09 23:46:28 +03:00
John Preston 0cdac83f8a Fix calls build in Xcode. Fix calls panel in Retina.
Also implement panels that appear in all spaces on macOS.
Using them for calls panels and custom notifications, so it
will be possible to use custom notifications in macOS as well.
2017-05-09 23:46:27 +03:00
John Preston 71e653db30 Fix non-available API usage in OS X 10.6-10.7 version. 2017-04-18 22:00:51 +03:00
John Preston c10dee11e8 Fix crash in macOS notifications manager init.
Regression was introduced in 1725927aea.

Also create the thread only when it is first needed.
2017-04-15 20:39:25 +03:00
John Preston 1725927aea Clear macOS notifications in a separate thread.
Sometimes NSUserNotificationCenter -deliveredNotifications method call
freezes for a long time, so now we use it only in a separate thread and
we group all the requests for clearing while another clearing is done.
2017-04-12 15:50:35 +03:00
John Preston 50ea4e316e Improve macOS window behavior.
Don't deactivate the application when the main window is hidden.
Such behavior provides some unwanted windows reordering in the
current workspace when the window is hidden by Cmd+W.

Ignore app activation by applicationDidBecomeActive: notification
for a short period of time after a user notification for other app
instance was received (the system sends them sometimes and the main
window is shown + activated for a wrong instance of the application).
2017-04-12 15:50:12 +03:00
Viktor Oreshkin f1d97fb92c Fix build in Xcode (#3241)
Signed-off-by: Viktor Oreshkin <stek29@users.noreply.github.com>
2017-04-08 18:05:59 +03:00
John Preston 5444b8166c Finalize rename / move of files. 2017-04-07 18:13:18 +03:00
John Preston a5c83467d6 Respect macOS do not disturb settings. Fix #3095. 2017-03-08 13:12:02 +03:00
John Preston b5d9eee489 Fix macOS native notification callbacks. 2017-03-08 10:31:05 +03:00
John Preston 81790b2271 Notifications management moved to AuthSession.
Also implemented Global::WorkMode() as an base::Variable.
2017-03-06 18:38:15 +03:00
John Preston e88305d984 Fixed freezes in macOS clipboard requests.
Sometimes QClipboard::text() unexpectedly freezes on macOS, no known
causes for that. But before we were requesting the clipboard text after
each change in any text field to update macOS global menu items.

Now we use Cocoa API directly to find out if there were any changes to
the clipboard content and query text through Qt only if we have changes.

That way it should almost never freeze (at least) or even really never.
2017-03-05 23:18:27 +03:00
John Preston 83720d8789 Finalizing file renaming. 2017-03-04 13:23:56 +03:00
John Preston b0dbe9d353 Renamed / moved a bunch of files.
Next commit fixes the build.
2017-03-04 12:56:07 +03:00
John Preston 08167a6a91 Removed #include "stdafx.h" from all files.
Currently the build without implicitly included precompiled header
is not supported anyway (because Qt MOC source files do not include
stdafx.h, they include plain headers).

So when we decide to support building without implicitly included
precompiled headers we'll have to fix all the headers anyway.
2017-03-04 12:27:52 +03:00
John Preston f48d6dc464 Alpha 1.0.18: Fixed build for macOS. 2017-03-02 17:01:32 +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 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 5939c54d33 Version 1.0.13: fix unnecessary window activations.
A regression was introduced in 1.0.12 version which led to wrong
activations of the main window: if a custom popup menu was shown
for the tray icon or a custom notification was clicked.
2017-02-20 13:36:25 +03:00
John Preston 843089733b Better handle window hide / activate in macOS. #1278
When we hide window by 'x' title button or by cmd+w key we try to
deactivate the whole application (so some other app gets activated).

When we activate the application in any way we check if the main
window is hidden and if it is - we show it and activate it.
2017-02-18 16:34:18 +03:00
John Preston 041e366df7 Alpha 1.0.1: resize chats list with mouse press-and-drag.
Also fixed drag-n-drop images from Firefox in Windows.
Also some additional colors added to themes palette:
HistoryToDown button now has separate colors.
Windows title bar and buttons have separate active/inactive colors.
2017-01-16 16:27:11 +03:00
John Preston 7fb1463c43 Version 1.0 stable: bump copyright date to 2017. 2017-01-11 23:02:13 +04:00
John Preston c65a280b9d Alpha 0.10.23: small tiled background performance improved.
Also some error texts improved. Also Ctrl+W closes MediaView now.
2017-01-01 20:59:33 +04:00
John Preston eec5b78054 Delete for everyone checkbox added. Various bugfixes. 2017-01-01 15:47:00 +04:00
John Preston ef927c8465 Theme preview ready.
Also style::color is now copyable, constructed only inside a palette.
Also macOS setup new background ready.
2016-12-30 17:53:05 +04:00
John Preston 2436ad74bd Boxes redesigned. Common groups moved to Shared Media.
Also transparent images sending fixed.
2016-12-30 17:52:56 +04:00
John Preston 2b3631f3ae Closed beta 10019010: fixed build for Xcode. 2016-12-30 17:52:34 +04:00
John Preston 3cff50009c Closed beta 10019010: unified attach button, new intro, new stickers.
Now all files sending is confirmed before preparing for sending.
You can paste from clipboard and drag many files at once.
2016-12-30 17:52:32 +04:00
John Preston b1ca0f5ea3 Fixed build for macOS old versions. 2016-12-30 17:52:26 +04:00
John Preston 3186e1e495 Ripple animations done for IconButton, FlatButton and RoundButton.
Also moved input field classes to ui/widgets/input_fields module.
2016-12-30 17:52:08 +04:00
John Preston 8ff3779c9a Custom title bar for macOS 10.10+ improved, colors in palette now. 2016-12-30 17:51:54 +04:00
John Preston 475b35bf55 Custom title on macOS 10.10+ added. 2016-12-30 17:51:51 +04:00
John Preston 0326976473 Beta version 10019002: fixed build for Xcode. 2016-12-30 17:51:45 +04:00
John Preston 3a599e0752 New main menu in DialogsWidget.
Also "flip_horizontal" and "flip_vertical" modifiers support added.
Also moving parts of MainWindow to Window::MainWindow.
2016-12-30 17:51:38 +04:00
John Preston 0cbb0014db Removed blue window title, new small title used only in Windows. 2016-12-30 17:51:37 +04:00
John Preston e08f5437a6 Palette usage improvements. 2016-12-30 17:51:29 +04:00
John Preston dbb6371e67 First version on loading themes is ready. 2016-12-30 17:51:27 +04:00
John Preston 0902741b85 Respecting Quite Hours in Windows.
Also closing current chat on window close or passcode lock.
2016-10-17 13:55:17 +03:00
John Preston 9eb8a93719 Media::Player::Widget added instead of PlayerWidget.
New media player bar widget added. Switching between floating
media player panel and media player widget. New volume controller.
2016-10-12 22:36:48 +03:00
John Preston 377d333f1c Using same notification options for all notification managers. 2016-10-08 11:38:53 +03:00
John Preston 3c84899edf Version 0.10.12.alpha: returned native macOS notifications for 10.8+ 2016-10-07 16:37:31 +03:00
John Preston 15ee4b40dc Retina handling fixed in the new notifications. 2016-10-07 16:14:02 +03:00
John Preston 41dc0f4e98 Hide all button added to default notifications. 2016-10-05 19:56:27 +03:00
John Preston 043cba0a64 Custom notifications inline reply added, positioning broken. 2016-10-04 21:18:08 +03:00
John Preston 2d1d62a953 Code for replying from notifications, macOS uses notificationActivated(). 2016-10-02 20:06:34 +03:00
John Preston 7f950d2de2 Unified code for notification activation events in Windows version. 2016-10-02 19:32:46 +03:00
John Preston c2aa8d3c77 NB Broken! Build in Xcode fixed, macOS notifications done by Manager. 2016-10-02 18:44:54 +03:00
John Preston 0bf55835f5 NB Broken! Notifications refactored to Manager, only Windows working. 2016-10-02 16:54:27 +03:00
John Preston a41e0c4aa7 NB Broken! Started notification manager abstraction. 2016-10-02 12:30:28 +03:00
John Preston fdab386178 Most of the new Settings are done.
Left: auto update, privacy and security, local storage box +
some minor things, like design fixes, codes like loadlang and
clearing of the local storage (box) and temp download folder.
2016-08-26 22:49:18 -06:00
John Preston 90678d411f Started a special LayerWidget: Settings::Widget.
Also added some missing calls to parent event handlers in boxes.
2016-08-18 12:52:36 +03:00
John Preston cb0c99acc8 Seek done in video player in MediaView. Some memory leaks fixed.
Using pixmapFromImageInPlace() instead of QPixmap::fromImage().
2016-07-13 20:34:57 +03:00
John Preston db8922f53e Some buttons and scroll bars style improvements.
Not showing notification texts when OS X is in screen locked state.
2016-07-07 19:15:34 +03:00
John Preston 8e78cfed85 Fixed Xcode build. When hiding fullscreen window first exit fullscreen. 2016-06-16 18:17:39 +03:00
John Preston fd91893b51 Moved PsMainWindow to Platform::MainWindow, outside of pspecific module.
Currently only MSVC build is Ok, Xcode and QtCreator are broken.
2016-06-16 15:59:54 +03:00