forked from dmikushin/tray
-
-
Notifications
You must be signed in to change notification settings - Fork 12
feat: Cleanup Qt-based tray implementation #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Kishi85
wants to merge
28
commits into
LizardByte:master
Choose a base branch
from
Kishi85:simplify-qt-tray
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 26 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
df32a11
Import adapted QtTrayMenu class from upstream
Kishi85 a14dd42
Integrate upstream QtTrayMenu.h/cpp into tray_linux.cpp
Kishi85 ff0a4fe
doc: Add doxygen comments for public functions of QtTrayMenu
Kishi85 8359dd0
fix: Add default initialized values and change running state tracking
Kishi85 e36c5fd
Add support for spectacle screenshots on KDE
Kishi85 f319ee1
Revert example to non-notification variant
Kishi85 d9d6268
fix: Segfaults from unit tests
Kishi85 d29f2fb
WIP - process events during exit
Kishi85 ca2c5e9
Update test_tray.cpp
ReenigneArcher 4ba98bd
Provide default argv, hide menu, use popup
ReenigneArcher 25ab2ad
QApplication::quit() only for apps that we created.
Kishi85 65f5bba
Cleanup QtTrayMenu constructor
Kishi85 d69ddb6
Add option to fire notification using QSystemTray::showMessage on ini…
Kishi85 9e71ed2
(Re-)Implement tray notifications using libnotify with fallback to ba…
Kishi85 867accc
Refactor tray_linux.cpp notifications and add separate namespace for …
Kishi85 8eefa9f
fix: Properly cleanup notificationCurrent and notificationCurrentCall…
Kishi85 12163a4
refactor - Use acknowledge_notification to also clear previous notifi…
Kishi85 3aa88ca
fix: Allow using themed icons for tray icon
Kishi85 77873ce
fix: Always use absolute paths for filesystem-based notification icons
Kishi85 97b05d2
fix: Add missing/fix docstrings and unify variable style for namespac…
Kishi85 21e6e3e
fix: Remove Qt::DBus dependency
Kishi85 1aea7f6
fix: Fix potential issues with QtTrayMenu
Kishi85 c8036a0
fix: Re-init notify upon setting app_name
Kishi85 b19d1b3
fix: Process UI modifications using Qt event system
Kishi85 cf1f909
fix: Improve error handling on tray_init
Kishi85 6f718bc
tests: Increase delay for screenshot capture to 2000ms
Kishi85 c7f8378
fix: Only fail tray init on libnotify failure if Qt does not support …
Kishi85 b2479e5
fix: Requested changes from review
Kishi85 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -77,6 +77,7 @@ jobs: | |
| "imagemagick" | ||
| "ninja-build" | ||
| "xvfb" | ||
| "libnotify-dev" | ||
| ) | ||
|
|
||
| if [[ "${QT_VERSION}" == "5" ]]; then | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # - Try to find LibNotify | ||
| # This module defines the following variables: | ||
| # | ||
| # LIBNOTIFY_FOUND - LibNotify was found | ||
| # LIBNOTIFY_INCLUDE_DIRS - the LibNotify include directories | ||
| # LIBNOTIFY_LIBRARIES - link these to use LibNotify | ||
| # | ||
| # Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org> | ||
| # Copyright (C) 2014 Collabora Ltd. | ||
| # | ||
| # Redistribution and use in source and binary forms, with or without | ||
| # modification, are permitted provided that the following conditions | ||
| # are met: | ||
| # 1. Redistributions of source code must retain the above copyright | ||
| # notice, this list of conditions and the following disclaimer. | ||
| # 2. Redistributions in binary form must reproduce the above copyright | ||
| # notice, this list of conditions and the following disclaimer in the | ||
| # documentation and/or other materials provided with the distribution. | ||
| # | ||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS | ||
| # IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
| # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS | ||
| # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
| # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
| # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | ||
| # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
| # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | ||
| # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | ||
| # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
|
||
| find_package(PkgConfig) | ||
| pkg_check_modules(LIBNOTIFY QUIET libnotify) | ||
|
|
||
| find_path(LIBNOTIFY_INCLUDE_DIRS | ||
| NAMES notify.h | ||
| HINTS ${LIBNOTIFY_INCLUDEDIR} | ||
| ${LIBNOTIFY_INCLUDE_DIRS} | ||
| PATH_SUFFIXES libnotify | ||
| ) | ||
|
|
||
| find_library(LIBNOTIFY_LIBRARIES | ||
| NAMES notify | ||
| HINTS ${LIBNOTIFY_LIBDIR} | ||
| ${LIBNOTIFY_LIBRARY_DIRS} | ||
| ) | ||
|
|
||
| include(FindPackageHandleStandardArgs) | ||
| FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibNotify REQUIRED_VARS LIBNOTIFY_INCLUDE_DIRS LIBNOTIFY_LIBRARIES | ||
| VERSION_VAR LIBNOTIFY_VERSION) | ||
|
|
||
| mark_as_advanced( | ||
| LIBNOTIFY_INCLUDE_DIRS | ||
| LIBNOTIFY_LIBRARIES | ||
| ) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.