Commit Graph

181 Commits

Author SHA1 Message Date
Ilya Fedin d4d688d494 Merge two ifndef blocks in main_window_linux 2021-01-05 11:43:24 +04:00
Ilya Fedin b3892f49fa Fix kSNIWatcherService/kSNIWatcherInterface misusage
Even though they're the same, there should be interface specified
2021-01-05 11:43:24 +04:00
Ilya Fedin b9acea9cef Move GSDMediaKeys initialization to SetWatchingMediaKeys 2021-01-04 11:55:10 +04:00
Ilya Fedin 39f9147790 Check for dbus menu exporter instead of menu path 2020-12-30 11:50:01 +04:00
Ilya Fedin e247be7e33 Operate with QString instead of QDBusObjectPath 2020-12-28 17:00:05 +04:00
Ilya Fedin e594b75f4c Use more forward declarations in main_window_linux 2020-12-28 17:00:05 +04:00
Ilya Fedin 28f857f763 Add support for G-S-D's media-keys extension
This fixes media keys handling on (but not limited to, probably):
* GNOME
* Cinnamon
* MATE
* Budgie
* Pantheon (elementaryOS)
* Unity
2020-12-28 17:00:05 +04:00
Ilya Fedin 56728a066e Fix blurry tray icon with svg themes
QIcon::actualSize doesn't work as expected with svg themes, get actual pixmap and check its size instead.
2020-12-24 22:46:09 +03:00
Ilya Fedin b1b01385d0 Restore 16px tray icon size
Looks like there are support for this size since b703f4e555
2020-11-19 18:36:57 +03:00
John Preston a086afb152 Fix legacy group service message in chats list. 2020-11-19 16:47:17 +03:00
Ilya Fedin 9d6e5f2a5b Adapt linux tray icon implementation to the new QIcon::pixmap behavior
More info: https://codereview.qt-project.org/c/qt/qtbase/+/314618
2020-11-16 13:03:43 +03:00
Ilya Fedin 5c8a19b7f7 Use only really supported icon sizes 2020-11-16 12:34:19 +03:00
Ilya Fedin 620c596200 Remove the last workaround in tray implementation
Since tdesktop gets icon theme pretty well now, there's no need for any workaround.
2020-11-16 12:34:19 +03:00
Ilya Fedin ede7ad1a4c Remove TDESKTOP_FORCE_PANEL_ICON variable since tdesktop gets current icon theme just fine now 2020-11-05 14:38:03 +03:00
Ilya Fedin 55167ea95b Handle snap icon problem in snapcraft.yaml rather than in code 2020-11-05 14:38:03 +03:00
Ilya Fedin af6b07b780 Use crl::on_main in MainWindow::sniSignalEmitted 2020-10-30 11:30:03 +03:00
Ilya Fedin 8f5b136003 Implement possibility to hide taskbar icon on Linux 2020-10-30 11:27:42 +03:00
23rd 367b028094 Moved contacts box preparing to single place. 2020-10-23 13:31:24 +03:00
Ilya Fedin 093fcc3821 Subscribe to StatusNotifierHostRegistered signal 2020-10-07 13:06:06 +03:00
Ilya Fedin a0af748fc5 Update SNI state even if tray is deactivated 2020-10-02 19:19:16 +03:00
Ilya Fedin 4c2779bbaf Fix saving maximized state on Linux 2020-09-29 18:25:57 +03:00
Ilya Fedin 3c8c059447 Eliminate the need of Q_OBJECT in main_window_linux and main_window_win 2020-08-30 17:00:43 +04:00
Ilya Fedin 6dfefa3f21 g_message is a more appropriate log level for some messages 2020-08-18 08:16:17 +04:00
Ilya Fedin 1dcbb103a8 Move gtk clibpboard to linux_libs 2020-08-15 17:43:28 +04:00
Ilya Fedin 1de1747c38 Fix length of some lines in specific_linux and main_window_linux 2020-08-15 17:43:28 +04:00
Ilya Fedin 5dad293335 Add warnings about some build options and environment variables 2020-08-15 17:43:28 +04:00
John Preston b703f4e555 Fix build on Linux. 2020-08-11 18:21:40 +04:00
Ilya Fedin 252bdd2353 TDESKTOP_DISABLE_DBUS_INTEGRATION -> DESKTOP_APP_DISABLE_DBUS_INTEGRATION 2020-08-11 10:55:50 +04:00
John Preston 8c4e8212cd Add 'respect system dark mode' checkbox. 2020-07-22 17:18:17 +04:00
Ilya Fedin c24da4c3df Don't generate 64px tray icon since badge counter generator doesn't support it 2020-07-22 10:33:12 +04:00
Ilya Fedin ba50393e86 Update icon theme on the fly 2020-07-16 07:07:33 +04:00
Ilya Fedin e081ed4b4a Follow device pixel ratio in TrayIconFile 2020-07-13 06:53:45 +04:00
Ilya Fedin 916601a52c Don't request IsStatusNotifierHostRegistered when SNI become available
To avoid situations when StatusNotifierItem registers icon, but tdesktop assumes that there are still no SNI
2020-06-29 16:58:00 +04:00
Ilya Fedin 806f2e0b50 Check for all needed gtk functions for gtk clipboard 2020-06-29 16:27:45 +04:00
John Preston 9703f7460a Fix build on Linux. 2020-06-26 12:27:54 +04:00
John Preston 325840703e Fix launching with a passcode on macOS. 2020-06-26 11:51:05 +04:00
John Preston e7b8a52278 Move terms lock from Core::App to Session. 2020-06-24 11:56:16 +04:00
John Preston 357caf8007 Keep separate MTP::Config's for separate accounts. 2020-06-23 21:53:41 +04:00
John Preston bc144377c0 Support logout of a secondary account. 2020-06-23 21:53:41 +04:00
Ilya Fedin 3a91003eea Use gtk clipboard when available to avoid https://bugreports.qt.io/browse/QTBUG-56595 2020-06-17 20:34:47 +04:00
Ilya Fedin c83b8d4043 Fix naming of static variables 2020-06-01 18:19:34 +04:00
Ilya Fedin 13c2d6ff72 Detect global menu at runtime 2020-05-05 09:54:35 +04:00
Ilya Fedin 5180d31b40 Fix decoration applying and trigger repainting on update
For some reason this is needed for newer Qt in flatpak
2020-05-02 16:29:00 +04:00
Ilya Fedin 161e51757c Change color of wayland decoration according to theme 2020-05-01 12:26:10 +04:00
Ilya Fedin 41d39012d2 Synchronize AppMenu availability check with Qt 2020-04-21 14:06:03 +04:00
Ilya Fedin a1a7399023 Don't remove SNI object when SNI is lost 2020-04-13 10:43:37 +04:00
Ilya Fedin 86b9927965 Log global menu usage 2020-03-29 14:17:11 +04:00
Ilya Fedin 13e8b60d6c Don't recreate tray icon if it is disabled 2020-03-24 17:21:00 +04:00
Ilya Fedin d2291f5b17 Fix panel icon forcing 2020-03-19 01:02:15 +04:00
Ilya Fedin 9823615a84 Check if icon has desired size when saving 2020-03-16 16:57:22 +04:00
Ilya Fedin da926d7f10 Disable SNI tray icon name setting in snap
Otherwise there are a dummy icon when tray counter is disabled
2020-03-16 13:03:53 +04:00
John Preston fec6a8dd96 Beta version 1.9.20: Fix build without dbus. 2020-03-14 16:13:33 +04:00
Ilya Fedin 46445e0542 Implement global menu on Linux 2020-03-14 15:32:10 +04:00
Ilya Fedin 5f33abd391 Change tray implementation on demand 2020-03-14 15:26:13 +04:00
Ilya Fedin 75d54adfce Add TDESKTOP_FORCE_PANEL_ICON environment variable for possibility to use system icon even if it is not detected 2020-03-13 11:00:09 +04:00
Ilya Fedin 3fb6bbeae4 Optimize icon regeneration 2020-03-06 18:28:56 +04:00
Ilya Fedin 7202ffca76 Remove unneeded TrayIconFileTemplate function
Use /.flatpak-info instead of deprecated /run/user/$UID/flatpak-info

Improve indentation in UseXDGDesktopPortal and IsAppIndicator

Remove unneeded NeedTrayIconFile and rename IsAppIndicator to IsIndicatorApplication

Include only needed part of QtDBus in main_window_linux.cpp

Remove usage of QDBusInterface from SandboxAutostart and IsSNIAvailable

Don't check dbus activatable services in IsIndicatorApplication

Move XEmbed menu initialization to initTrayMenuHook, tray availability check to initHook

Don't create unneeded file for tooltip icon, since indicator-application doesn't support tooltips

Passthrough counter from updateIconCounters

Suppress log errors for LastUserInputTime on GNOME

Set applcation name and icon name for pulseaudio
2020-03-06 18:28:56 +04:00
Ilya Fedin 7bd0598555 Unified function to detect icon name on Linux 2020-02-27 15:17:32 +04:00
Ilya Fedin 9979c220ce Multiple sizes for linux tray icon 2020-02-24 19:57:42 +04:00
Ilya Fedin db2aa7000a Fallback to non-panel icon when tray counter is disabled 2020-02-21 18:25:08 +04:00
Ilya Fedin 5bdc0db9e2 Generalize backward compatibility of linux launcher 2020-02-21 18:12:48 +04:00
Ilya Fedin 9d0ae61ee0 Revert tray icon size to 22 on Linux (except KDE) and fix tray counter disabling in KDE 2020-02-18 11:37:17 +04:00
John Preston a88423a33f Fix bad window rendering with maximize-on-launch.
I have no idea why MainWindow is ruined completely in case you call
MainWindow::show, MainWindow::setWindowState(maximized) and then
in the same context (without crl::on_main) create full screen viewer.
2020-02-12 12:09:17 +04:00
Ilya Fedin 6206b6f843 Adapt indicator-application check for sandboxed environments
Fix quality loss in the tray icon image

Fix window showing by clicking on the tray icon on macOS

Fix tray icon displaying on KDE
2020-02-10 15:09:47 +04:00
Ilya Fedin 3b4dfa1381 Use LXQt's StatusNotifierItem implementation instead of appindicator 2020-02-05 18:38:34 +04:00
Ilya Fedin 2807c5ef19 Use system icon theme and increase icon size 2020-01-31 16:03:41 +03:00
Ilya Fedin a831c1703a Split launcher filename detection to a function 2020-01-31 15:46:39 +03:00
John Preston 74d848311b Replace str_const with base::const_string. 2020-01-29 12:47:50 +03:00
Ilya Fedin 9536a3c98e Use packaged build in the snap package 2020-01-28 20:38:12 +03:00
John Preston 24da40ef05 Fix -startintray on Ubuntu. 2020-01-28 11:41:05 +03:00
John Preston fef90ea363 Fix build for Linux. 2020-01-21 23:32:05 +03:00
Ilya Fedin 0480611bf8 Add possibility to build without dbus 2020-01-21 23:30:47 +03:00
John Preston 48b24d12b2 Always ask for TDESKTOP_LAUNCHER_BASENAME on Linux. 2020-01-21 18:47:36 +03:00
John Preston afe34121af Use MACRO_TO_STRING from lib_base. 2020-01-17 14:15:40 +03:00
John Preston 4eeac7dc18 Fix whitespace and indentation errors.
See #6672, thanks Sea-n.
2020-01-02 14:25:53 +03:00
ilya-fedin 3d36b4f866 Replace libnotify with QtDBus notification implementation (#6825) 2019-12-29 18:41:45 +03:00
John Preston 2fc9fd5887 Remove some unused code. 2019-10-19 12:27:56 +04:00
John Preston 0c713a930a Remove app.h / facades.h from precompiled header. 2019-10-01 23:59:46 +03:00
John Preston 12a020cd09 Beta version 1.8.5: Fix build for Linux. 2019-09-08 23:38:45 +03:00
Konstantin Popov b831766375 Make .desktop file search respect TDESKTOP_LAUNCHER_FILENAME 2019-08-09 11:51:35 +01:00
Nicholas Guriev 325989ed47 Fix small typo 2019-08-09 11:51:35 +01:00
John Preston 0868a9f7b9 Use Controller::account in MainWindow. 2019-06-06 14:59:00 +03:00
John Preston dd68c7e90d Use Window::Controller to manage MainWindow. 2019-06-06 14:20:21 +03:00
John Zimmermann 4d42e7e5b9 Correctly set _desktopFile to Telegram.desktop if Telegram.desktop was found 2019-04-25 13:39:40 +04:00
John Preston 7cfb122dea Fix crash with event loop nesting tracking. 2019-04-12 17:30:43 +04:00
John Preston fe618bd652 Use crl::time/now instead of TimeMs/getms. 2019-02-19 11:06:33 +04:00
John Zimmermann add2356c8a Generalize Unity Integration to not depend on libunity 2019-02-01 12:34:55 +03:00
John Preston a70e72f75d Application->Sandbox, Messenger->Application. 2019-01-23 12:51:58 +04:00
John Preston 3e7a688811 Fix tray icon counter on Linux.
Fixes #5525.
2019-01-11 17:30:57 +04:00
John Preston 6562a1f6af Add 'Count unread messages' option. 2018-12-04 14:32:48 +04: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
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
John Preston f316e3bd17 Add debug logs for window position and autoupdate. 2017-07-03 15:23:41 +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 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 81790b2271 Notifications management moved to AuthSession.
Also implemented Global::WorkMode() as an base::Variable.
2017-03-06 18:38:15 +03:00