Commit Graph

234 Commits

Author SHA1 Message Date
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 14034c255e Replace QSharedPointer with std::shared_ptr. 2017-12-18 13:07:18 +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
Mike Zueff 64e9958585 Fixed awesome WM tray icon. 2017-12-07 09:11:39 +04:00
John Preston 21b1ba1f88 Move build to Ubuntu 14.04 and GCC 7.2.
To be able to run on the same distributions as before we need to have
the same GLIBC version dependency as in Ubuntu 12.04, which is 2.15.

For that we need to remove all usages of GLIBC features from 2.16 and above.
Currently there are three methods used, so they're wrapped in a separate
static library, linux_glibc_wraps.

It is a separate library because it must be compiled without '-flto' flag,
otherwise the inline __asm__ is not working and we get unresolved symbols.
2017-11-16 07:59:05 +04:00
John Preston f4d9618487 Improve layer / section exchange for Info. 2017-11-16 07:59:04 +04:00
eegorov 8bfe407610 New build option: without GTK and appindicator
Signed-off-by: Egor Y. Egorov <egor.y.egorov@gmail.com> (github: eegorov)
2017-09-28 18:32:51 +03:00
Jan Niklas Hasse e42cc02d0e Prefer AppIndicator if DBus interface is available
Starting with Ubuntu 17.10 the interface will be provided by an
extension (shipped by default):

https://github.com/ubuntu/gnome-shell-extension-appindicator

Legacy tray icons have been completely removed in GNOME 3.26. By
checking the interface, this will allow users of other distributions
with GNOME to also use Telegram's indicator with the extension.

Signed-off-by: Jan Niklas Hasse <jhasse@bixense.com> (github: jhasse)
2017-09-28 12:59:46 +03: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 8e433971c9 Improve current executable path computing.
Fixes #960 (hopefully).
2017-08-30 19:15:35 +03:00
John Preston 17cef93ac0 Use gsl::finally() instead of base::scope_guard(). 2017-08-30 19:15:26 +03:00
John Preston b08732cf28 Move MediaView from MainWindow to Messenger. 2017-08-25 14:39:27 +03:00
John Preston f316e3bd17 Add debug logs for window position and autoupdate. 2017-07-03 15:23:41 +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 983c2c0869 Support non-standard binary names in autoupdater.
On Linux and Windows support non-standard application binary name.
2017-05-30 21:26:53 +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 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 a7e695d914 Better show in folder in Windows / Linux.
Inspired by https://github.com/qbittorrent/qBittorrent.
2017-05-07 16:28:58 +03:00
John Preston 5444b8166c Finalize rename / move of files. 2017-04-07 18:13:18 +03:00
John Preston 4384c80961 Prefer appindicator only on Unity and Pantheon.
Commit dcd6028e91 introduced a regression which caused
appindicator tray icon to be preferred everywhere else.
2017-04-04 12:59:48 +03:00
John Preston c1aa1c5a0f Enable Qt tray icon in GNOME and derivatives.
As tested in Fedora Qt 5.6.2 tray icon works well in GNOME.
Also add more logs about DE and tray icon. Fix #3175 #3188
2017-04-03 20:46:09 +03:00
John Preston 8884cb190a Version 1.0.27: Fix launch in Ubuntu 17.04
Ubuntu 17.04 launch results in segfault if the build was done
by GCC 6.2 (works fine with GCC 4.9). Backtrace shows that it
crashes in gtk_init_check() call somewhere in libmirclient and
tests show that it works fine with GDK_BACKEND=x11.

So we use gdk_set_allowed_backends() method to explicitly state
that we support only "x11" GDK backend, that way it doesn't try
to use libmirclient and it does not crash.

Fix #3176 #3162
2017-03-31 13:46:55 +03:00
Nicholas Guriev 2e6c15ff9d Update .desktop file on Linux (#3109)
What has been done:

 * Removed deprecated Encoding key
 * Specified correct WM class for StartupWMClass key
 * Fixed icon name

I also fixed restarting when language is changed and there is no Updater

Signed-off-by: Nicholas Guriev <guriev-ns@ya.ru> (github: mymedia2)
2017-03-23 18:00:21 +03:00
John Preston e9ec09b91a Add MTP::Sender to replace RPCSender some day.
Also use c++1z language standard in Xcode build.
Also treat warnings as errors.
2017-03-23 14:37:38 +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 b14ba398e6 Fixed Linux build. 2017-03-06 01:43:35 +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 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 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 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 ffc557a0f9 Using standard library instead of std_ namespace.
Currently tested only in VS2015.
2017-02-21 16:45:56 +03:00
John Preston 296c800b39 Load libunity in all DEs to set dock icon counter. #956
Before we tried loading and using libunity only in Unity DE.
2017-02-10 20:45:11 +03:00
Marco Trevisan 28899a642b main-window-linux: unref tray Indicator and Unity Launcher Entry (#2661)
Signed-off-by: Marco Trevisan <mail@3v1n0.net> (github: 3v1n0)
2017-01-24 13:45:10 +03:00
Marco Trevisan 4518e94c8a main-window-linux: try to use AppIndicator in Unity (#2660)
Signed-off-by: Marco Trevisan <mail@3v1n0.net> (github: 3v1n0)
2017-01-24 13:44:46 +03:00
John Preston 7fb1463c43 Version 1.0 stable: bump copyright date to 2017. 2017-01-11 23:02:13 +04:00
John Preston 143181095f Alpha 0.10.26: t.me links, latest OpenAL code used.
Also inline results should be displayed above the message field.
2017-01-07 15:55:05 +04:00
John Preston 72e34dc5b1 Fixed alpha 0.10.23 build for Linux. 2017-01-01 21:49:44 +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 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 8958ae0377 Typing animations from android. 2016-12-30 17:52:36 +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 bd2be4e0c1 Build fixed for Linux, checking for compositing manager running.
Backported QX11Info::isCompositingManagerRunning from Qt 5.7.
2016-12-30 17:52:00 +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 dd9bd43331 Closed beta 10019002: fixed build for Linux. 2016-12-30 17:51:47 +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
Marco Trevisan 2dadf7ce57 linux-libs: parse XDG_CURRENT_DESKTOP as colon separated list (#2663)
Signed-off-by: Marco Trevisan <mail@3v1n0.net> (github: 3v1n0)
2016-11-23 10:25:11 +01:00
Marco Trevisan d460897f84 main-window-linux: parse XDG_CURRENT_DESKTOP as colon separated list (#2659)
As per freedesktop specifications¹, $XDG_CURRENT_DESKTOP is a
"colon-separated list of strings". Thus we need to parse it in that way.

[1] https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

Signed-off-by: Marco Trevisan <mail@3v1n0.net> (github: 3v1n0)
2016-11-22 09:46:08 +03:00
John Preston 77df38b4fd Fixed html encoding in native linux notifications. #2532
Also use case-insensitive filters in GTK file chooser.
2016-10-22 16:57:13 +03:00
John Preston 3503be03c9 Fix tray icon menu display in Fedora (Qt 5.6.2 broke it).
When activeChanged() is emitted we call updateTrayMenu(), that
always called trayIcon->setContextMenu(), which was hiding the
just-shown tray icon menu in case of right click with main
window being active. Now we call trayIcon->setContextMenu()
only if the contextMenu value has really changed for trayIcon.
2016-10-19 15:24:39 +03:00
John Preston fc7c5d0ab3 Fixed travis build for TDESKTOP_DISABLE_AUTOUPDATE case. 2016-10-18 10:56:38 +03: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 f1d52c12ae Version 0.10.13.alpha: crash fix in custom notifications.
Not sending inline bot request drafts to server by timeout.
2016-10-07 19:45:45 +03:00
John Preston 043cba0a64 Custom notifications inline reply added, positioning broken. 2016-10-04 21:18:08 +03:00
John Preston c8aa7672e9 Notifications by libnotify support improved. 2016-10-04 16:36:50 +03:00
John Preston c9288f2d0a Native notifications switched off by default. Libnotify supported. 2016-10-03 18:07:50 +03:00
John Preston 6db52f7fa9 LibNotify Linux notifications support added, testing. 2016-10-03 11:56:03 +03:00
John Preston 2d1d62a953 Code for replying from notifications, macOS uses notificationActivated(). 2016-10-02 20:06:34 +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 b5640fdb0a GYP build for Linux done: GYP -> CMake -> make. Testing. 2016-09-09 09:15:11 +03:00
John Preston e320be9626 Fixed build for QtCreator and Ubuntu. 2016-07-19 21:09:34 +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 a20dd065fb Building Qt with -no-gtkstyle and disable forcing "-style=0" in main.cpp
We can't use Qt gtk style, because it loads gtk-2 and we are possibly
loading and using gtk-3 for libappindicator3 and it crashes :(
2016-07-07 19:12:52 +03:00
John Preston f8d95bba71 Using GTK file dialog when it is available.
Should work both with GTK 2 and GTK 3.
2016-07-06 21:30:14 +03:00
eegorov bd8bb426be New define: TDESKTOP_DISABLE_UNITY_INTEGRATION
Signed-off-by: Egor Y. Egorov <egor.y.egorov@gmail.com> (github: eegorov)
2016-06-29 08:38:42 +06:00
John Preston 12c20faa44 Fixed Linux build. Alpha version 0.9.54. 2016-06-22 22:50:44 +03:00
John Preston c73b5a6da4 Styles improved. Members dropdown is shown with a delay.
Overview of chat photos fixed. Tray icon tries read a file on Linux.
2016-06-21 17:19:24 +03:00
John Preston 7a9dfb50e1 Build fixed for QtCreator. Linux libs loading order changed. 2016-06-16 20:20:58 +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