Commit Graph

19 Commits

Author SHA1 Message Date
Tobias Fella
4c3d7ab011 Move Controller::toggleWindow to WindowController 2023-12-23 14:50:36 +00:00
Tobias Leupold
c1604a9c4f Trayicon tweaks
This fixes two minor inconveniences:

- When closing the chat window and re-showing it from the systray icon, the geometry was not properly restored. The window was always shown in the middle of the screen. Now, one gets the window back with it's actual last position and size.
- It is now possible to not only show the window from the systray icon, but also to close it. This is the way other chat programs do it (Kopete back in the day, Konversation, Quassel IRC etc.)
2023-08-22 20:58:04 +00:00
Tobias Fella
ed033a1c5e Raise compiler settings level to 5.105 2023-08-21 13:02:14 +02:00
Laurent Montel
6d45d126f8 Add explicit moc includes to sources for moc-covered headers
Add missing #pragma once + missing include

* speeds up incremental builds as changes to a header will not always
  need the full mocs_compilation.cpp for all the target's headers rebuild,
  while having a moc file sourced into a source file only adds minor
  extra costs, due to small own code and the used headers usually
  already covered by the source file, being for the same class/struct
* seems to not slow down clean builds, due to empty mocs_compilation.cpp
  resulting in those quickly processed, while the minor extra cost of the
  sourced moc files does not outweigh that in summary.
  Measured times actually improved by some percent points.
  (ideally CMake would just skip empty mocs_compilation.cpp & its object
  file one day)
* enables compiler to see all methods of a class in same compilation unit
  to do some sanity checks
* potentially more inlining in general, due to more in the compilation unit
* allows to keep using more forward declarations in the header, as with the
  moc code being sourced into the cpp file there definitions can be ensured
  and often are already for the needs of the normal class methods
2023-07-12 13:15:19 +00:00
Carl Schwan
28137c8c86 Display monochrome icon in tray
Fix #471
2021-12-25 15:30:20 +01:00
Nicolas Fella
16d43e9ee8 Use icon from qrc for system tray icon
Fixes the system tray on Windows
2021-12-11 20:10:59 +01:00
Tobias Fella
2cb81d1276 Unify License header style in C++ 2021-04-06 19:25:06 +02:00
Nicolas Fella
92e00587f7 Use QSystemTrayIcon instead of KStatusNotifierItem
KSNI doesn't support Windows and macOS and we don't need any of the features it provides over QSystemTrayIcon

Also remove some dead code
2021-02-02 21:51:05 +00:00
Carl Schwan
136a8f2af8 Clang-tidy + clang-format 2020-11-27 00:26:39 +01:00
Aleix Pol
0906e0c680 Fix system tray, clean it up
At first I noticed it wasn't working like it should, then realised it
was using APIs that are largely unadvised. Also I saw there's some kind
of system to render numbers in there but this is also something we
generally do not do. There's better ways to display such information
(e.g. using the com.canonical.Unity interface), so I wouldn't bother
having ad-hoc code in there. And if we need to have it, we better have
it in KNotifications.
It now will also use the icon from the theme.
2020-11-24 13:57:00 +00:00
Nicolas Fella
a0815adbe9 Open window on system tray left click 2020-11-22 23:19:39 +00:00
Tobias Fella
3a11ff614c Port away from qsTr/tr 2020-11-17 20:52:40 +01:00
Tobias Fella
d8dde6e082 Add license headers to code files 2020-11-11 15:17:23 +00:00
Carl Schwan
ce69506cf6 s/emit/Q_EMIT 2020-11-03 12:03:06 +01:00
Carl Schwan
bea870ad75 Apply Clang Format 2020-11-02 16:11:24 +01:00
Black Hat
2defc5a134 Revert "Embed cmark."
This reverts commit f35001112dc740ed827e4a4de6e4bb3d94b0e466
2019-07-20 11:13:09 +00:00
Black Hat
d304679303 Fix crash on macOS. 2019-07-14 14:41:00 +08:00
Black Hat
81fe2919ed Add online status indicator.
Attempt to resync as soon as system goes online. #145
2019-07-06 10:24:47 +08:00
Black Hat
3e0009a069 Show notification count in tray icon. 2019-07-01 18:19:00 +08:00