Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(icon): use Qt tray icon in all cases, remove platform specific ba…
Browse files Browse the repository at this point in the history
…ckends

qTox added specialized tray icon backends over time to work around bugs with
the default implementation, since then our GTK+2 backend has stopped working,
our appindicator backend was never selected by default by cmake, and
statusnotifier was never selected at SystemTrayIcon construction, leaving us
only ever using the broken GTK+2 backend, or theoretically the Unity backend,
which I didn't see selected on Ubuntu 16.04 Unity. In all other cases we would
fall back to the Qt backend.

Qt icon has improved over time, and our platform specific icons have become
stale, with GTK+2 becoming deprecated and GTK+3 not having a similar feature,
QSystemTrayIcon has been tested on a variety of DEs and works as well or better
in all cases, as shown in the table at
#5881 (comment)

Fix #5881
Fix #5859
  • Loading branch information
anthonybilinski committed Oct 16, 2019
1 parent 93c9eef commit e85d3f5
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 567 deletions.
50 changes: 0 additions & 50 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -526,9 +526,6 @@ set(${PROJECT_NAME}_SOURCES
src/widget/splitterrestorer.h
src/widget/style.cpp
src/widget/style.h
src/widget/systemtrayicon.cpp
src/widget/systemtrayicon.h
src/widget/systemtrayicon_private.h
src/widget/tool/activatedialog.cpp
src/widget/tool/activatedialog.h
src/widget/tool/adjustingscrollarea.cpp
Expand Down Expand Up @@ -628,59 +625,12 @@ if (NOT DEFINED ENABLE_STATUSNOTIFIER AND UNIX AND NOT APPLE)
set(ENABLE_STATUSNOTIFIER True)
endif()

if(${ENABLE_STATUSNOTIFIER})
search_dependency(GDK_PIXBUF PACKAGE gdk-pixbuf-2.0 OPTIONAL)
search_dependency(GLIB PACKAGE glib-2.0 OPTIONAL)
search_dependency(GTK PACKAGE gtk+-2.0 OPTIONAL)

if(GDK_PIXBUF_FOUND AND GLIB_FOUND AND GTK_FOUND)
set(${PROJECT_NAME}_SOURCES ${${PROJECT_NAME}_SOURCES}
src/platform/statusnotifier/closures.c
src/platform/statusnotifier/closures.h
src/platform/statusnotifier/enums.c
src/platform/statusnotifier/enums.h
src/platform/statusnotifier/interfaces.h
src/platform/statusnotifier/statusnotifier.c
src/platform/statusnotifier/statusnotifier.h)
add_definitions(-DENABLE_SYSTRAY_STATUSNOTIFIER_BACKEND=1)
endif()
endif()

if(AVFOUNDATION_FOUND)
set(${PROJECT_NAME}_SOURCES ${${PROJECT_NAME}_SOURCES}
src/platform/camera/avfoundation.mm
src/platform/camera/avfoundation.h)
endif()

if (NOT DEFINED ENABLE_APPINDICATOR AND UNIX AND NOT APPLE)
set(ENABLE_APPINDICATOR False)
endif()

if(${ENABLE_APPINDICATOR})
search_dependency(APPINDICATOR PACKAGE appindicator-0.1)
search_dependency(GDK_PIXBUF PACKAGE gdk-pixbuf-2.0)
search_dependency(GLIB PACKAGE glib-2.0)
search_dependency(GTK PACKAGE gtk+-2.0)

if(APPINDICATOR_FOUND)
add_definitions(-DENABLE_SYSTRAY_UNITY_BACKEND=1)
endif()
endif()

if (NOT DEFINED ENABLE_GTK_SYSTRAY AND UNIX AND NOT APPLE)
set(ENABLE_GTK_SYSTRAY True)
endif()

if(${ENABLE_GTK_SYSTRAY})
if(NOT GTK_FOUND)
search_dependency(GTK PACKAGE gtk+-2.0 OPTIONAL)
endif()

if(GTK_FOUND)
add_definitions(-DENABLE_SYSTRAY_GTK_BACKEND=1)
endif()
endif()

if(${USE_FILTERAUDIO})
search_dependency(FILTERAUDIO LIBRARY filteraudio HEADER filter_audio.h OPTIONAL)
if(${FILTERAUDIO_FOUND})
Expand Down
34 changes: 0 additions & 34 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,36 +88,6 @@ of spell check).

Disabled if dependencies are missing during compilation.

#### KDE Status Notifier / GTK tray backend

| Name | Version |
|-------------|---------|
| [Atk] | >= 2.14 |
| [Cairo] | |
| [GdkPixbuf] | >= 2.31 |
| [GLib] | >= 2.0 |
| [GTK+] | >= 2.0 |
| [Pango] | >= 1.18 |

To disable: `-DENABLE_STATUSNOTIFIER=False -DENABLE_GTK_SYSTRAY=False`

#### Unity tray backend

Disabled by default.

| Name | Version |
|-------------------|-----------|
| [Atk] | >= 2.14 |
| [Cairo] | |
| [DBus Menu] | >= 0.6 |
| [GdkPixbuf] | >= 2.31 |
| [GLib] | >= 2.0 |
| [GTK+] | >= 2.0 |
| [libappindicator] | >= 0.4.92 |
| [Pango] | >= 1.18 |

To enable: `-DENABLE_APPINDICATOR=True`

#### Snorenotify desktop notification backend

Disabled by default
Expand Down Expand Up @@ -832,10 +802,6 @@ Switches:
[DBus Menu]: https://launchpad.net/libdbusmenu
[FFmpeg]: https://www.ffmpeg.org/
[GCC]: https://gcc.gnu.org/
[GdkPixbuf]: https://developer.gnome.org/gdk-pixbuf/
[GLib]: https://wiki.gnome.org/Projects/GLib
[GTK+]: https://www.gtk.org/
[libappindicator]: https://launchpad.net/libappindicator
[libX11]: https://www.x.org/wiki/
[libXScrnSaver]: https://www.x.org/wiki/Releases/ModuleVersions/
[MinGW]: http://www.mingw.org/
Expand Down
Loading

0 comments on commit e85d3f5

Please sign in to comment.