qtui: Refactor the system tray implementations
authorManuel Nickschas <sputnick@quassel-irc.org>
Wed, 13 Jun 2018 21:47:52 +0000 (23:47 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Fri, 15 Jun 2018 23:30:32 +0000 (01:30 +0200)
commit39dffd095bb5dbca49199d2173438c7f90c4e6fa
tree6c34e11bf6ac87cc69dabd8c23086e9f1a2a7ac1
parentf788ce32deb5df0351488c908fd5bacd25d7b6cf
qtui: Refactor the system tray implementations

Replace the mess of virtual methods and init() and other weird
shenanigans by a cleaner architecture. Handle mode/state changes
in the base class and let the implementations explicitly act on
changes. This should make it much clearer how the implementations
behave if mode or state change.

Simplify the D-Bus parts of StatusNotifierItem quite a bit by
keeping the SNI watcher always alive; no need to kill it when
unregistering. Add error handling to the final D-Bus registration
call and fall back to the legacy icon if something went wrong.
src/qtui/legacysystemtray.cpp
src/qtui/legacysystemtray.h
src/qtui/mainwin.cpp
src/qtui/statusnotifieritem.cpp
src/qtui/statusnotifieritem.h
src/qtui/systemtray.cpp
src/qtui/systemtray.h