Compare commits
9 Commits
ubuntu/que
...
upstream/0
Author | SHA1 | Date | |
---|---|---|---|
|
0b9fac1710 | ||
|
81ee27d5e8 | ||
|
0b59afdcf5 | ||
|
40bcb51c8e | ||
|
a051e93cac | ||
|
2e7cc6bbed | ||
|
ed9ce054e2 | ||
|
6a60f296c0 | ||
|
3e7083d4cb |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
build
|
|
4
AUTHORS
4
AUTHORS
@ -4,7 +4,7 @@ Upstream Authors:
|
|||||||
|
|
||||||
Copyright:
|
Copyright:
|
||||||
Copyright (c) 2010-2012 Razor team
|
Copyright (c) 2010-2012 Razor team
|
||||||
Copyright (c) 2012-2014 LXQt team
|
Copyright (c) 2012-2017 LXQt team
|
||||||
|
|
||||||
License: GPL-2 and LGPL-2.1+
|
License: LGPL-2.1+
|
||||||
The full text of the licenses can be found in the 'COPYING' file.
|
The full text of the licenses can be found in the 'COPYING' file.
|
||||||
|
219
CHANGELOG
Normal file
219
CHANGELOG
Normal file
@ -0,0 +1,219 @@
|
|||||||
|
|
||||||
|
lxqt-notificationd-0.12.0 / 2017-10-21
|
||||||
|
======================================
|
||||||
|
|
||||||
|
* Set patch version
|
||||||
|
* Don't export github templates
|
||||||
|
* Improvement for notification settings, see https://github.com/lxde/lxqt/issues/744#issuecomment-138601402
|
||||||
|
* Updated Lithuanian language
|
||||||
|
* Drops Qt5Core_VERSION_STRING
|
||||||
|
* lxqt-config-notificationd: set Qt::AA_UseHighDpiPixmaps to true
|
||||||
|
* Add a basic cli to lxqt-config-notificationd Add a basic cli to lxqt-notificationd
|
||||||
|
* Added default CMAKE_BUILD_TYPE and LXQT_NOTIFICATION_PATCH_VERSION
|
||||||
|
* Create lxqt-config-notificationd_pl_PL.desktop
|
||||||
|
* Fixes a FTBFS in superbuild mode
|
||||||
|
* Added merged autostart to CMakeLists.txt
|
||||||
|
* Updated *_da.desktop files and removed *_da_DK.desktop files
|
||||||
|
* Update desktop entries and Replace fr_FR by fr
|
||||||
|
* Update Greek translation (el) Remove country variant from language code
|
||||||
|
* CMake: Adds Runtime and Devel install COMPONENTs
|
||||||
|
* Coding style changes
|
||||||
|
* Updates the build system to use the Targets infrastructure
|
||||||
|
* Drops hardcoded /etc/xdg paths
|
||||||
|
* Updated german translation, replaced Qt4 by Qt in all xsession/translations
|
||||||
|
* Updates translations infrastructure
|
||||||
|
* Update the required minimum cmake version
|
||||||
|
* remove dead template lines switch OnlyShowIn from Razor -> LXQt stringchanges LxQt -> LXQt
|
||||||
|
* Support lxqt-session and add necessary xdg autostart desktop entry files.
|
||||||
|
* Fix a typo: singals -> signals
|
||||||
|
* Bump year
|
||||||
|
|
||||||
|
0.11.1 / 2017-01-01
|
||||||
|
===================
|
||||||
|
|
||||||
|
* Release 0.11.1: Update changelog
|
||||||
|
* Updated da translation. Removed da_DK
|
||||||
|
* Update and rename French .desktop file
|
||||||
|
* Make CMakeList.txt more uniform.
|
||||||
|
* Remove cpack (#53)
|
||||||
|
|
||||||
|
0.11.0 / 2016-09-24
|
||||||
|
===================
|
||||||
|
|
||||||
|
* Release 0.11.0: Add changelog
|
||||||
|
* Update and extend README.md
|
||||||
|
* Add Catalan translation
|
||||||
|
* build: Use external translations
|
||||||
|
* ts-files removal (#50)
|
||||||
|
* Clean up qDebugs/comments in notification.cpp
|
||||||
|
* config: Use our specific icon for demo
|
||||||
|
* Fix used licenses in AUTHORS, lxqt-notificationd is pure LGPL Bump year in AUTHORS
|
||||||
|
* Italian translation update
|
||||||
|
* Updated Russian translation Removed ru_RU files
|
||||||
|
* notification: Default icon
|
||||||
|
* notification: Fill background
|
||||||
|
* update lxqt-config-notificationd_hu.ts
|
||||||
|
* Update lxqt-config-notificationd_it.ts
|
||||||
|
|
||||||
|
0.10.0 / 2015-10-31
|
||||||
|
===================
|
||||||
|
|
||||||
|
* Update translations
|
||||||
|
* Remove docs/notification-spec-latest.html in favour of an upstream link
|
||||||
|
* Fix license file
|
||||||
|
* Switch all connect() calls to the new-style syntax
|
||||||
|
* Handle clicks on text labels properly (workaround for QTBUG-49025)
|
||||||
|
* Don't force rich text formatting on app, summary and body labels.
|
||||||
|
* Fix and improve action buttons.
|
||||||
|
* lxqt-config-notificationd: Fix Advanced Settings Ui Layout
|
||||||
|
* OnlyShowIn=LXQt;
|
||||||
|
* Update Greek (el) translation Remove country variant from language code
|
||||||
|
* Rename LxQt to LXQt everywhere
|
||||||
|
* Handles CMake policy CMP0063
|
||||||
|
* Use the LXQtCompilerSettings CMake module
|
||||||
|
* Adds Runtime install COMPONENT
|
||||||
|
* Coding style changes
|
||||||
|
* Use GNUInstallDirs
|
||||||
|
* Use CMAKE_AUTOUIC, drop qt5_wrap_ui()
|
||||||
|
* Removes unneeded include_directories() entries
|
||||||
|
* Updated german translation.
|
||||||
|
* Updated template for new translations.
|
||||||
|
* Updates the build system to use the Targets infrastructure
|
||||||
|
* fix building
|
||||||
|
* Remove trailing whitespaces
|
||||||
|
* Replace LXDE-Qt with LXQt in documentation/comment
|
||||||
|
* lxqt_translate_ts: Fixes wrong argument position
|
||||||
|
* config-nototification_hu.ts modified
|
||||||
|
*_hu.ts added
|
||||||
|
* Hungarian translatons
|
||||||
|
* Update lxqt-config-notificationd_it.desktop
|
||||||
|
* Create lxqt-config-notificationd_it.ts
|
||||||
|
* Create lxqt-config-notificationd_hr.ts
|
||||||
|
* Fix image format for images with 3 channels
|
||||||
|
* Easier selection of notifications stop
|
||||||
|
* Fix notifications disappearing on mouse leave
|
||||||
|
* lxqt-config-notificationd_fr_FR.desktop: french translation update
|
||||||
|
* notification: set fixed width of text labels for correct sizeHint after setText
|
||||||
|
* config: more options to configure notification placement (added center ver/hor)
|
||||||
|
* Fix Russian duplicated entries on .desktop files
|
||||||
|
* Update lxqt-config-notificationd_it_IT.desktop
|
||||||
|
* notification: multilined plain text formatting
|
||||||
|
* Remove KF5/ prefix as done in lxde/liblxqt#36
|
||||||
|
* settings: possibility to configure more than 99s shown time
|
||||||
|
* Unified german translation
|
||||||
|
* Updated german translation
|
||||||
|
* Added german translation.
|
||||||
|
|
||||||
|
0.9.0 / 2015-01-06
|
||||||
|
==================
|
||||||
|
|
||||||
|
* Portuguese language update
|
||||||
|
* Fix typos in tests
|
||||||
|
* - Unify naming for a unique lxqt. No more suffixes
|
||||||
|
* Add icon to config window
|
||||||
|
* Use the new LxQt::SingleApplication
|
||||||
|
* CMakeLists.txt maintenance.
|
||||||
|
* fix a translation mistake for zh_CN
|
||||||
|
* Uses the new translations cmake modules
|
||||||
|
* Update Russian translation
|
||||||
|
* Display a clearer test notification right after changing the settings
|
||||||
|
* Notifications must not cover the panel. Fixes lxde/lxde-qt#315.
|
||||||
|
* Port to KWindowSystem
|
||||||
|
* Update deprecated dbus annotation
|
||||||
|
* Use lxqt.org as vendor
|
||||||
|
* Drop Qt4 support in code
|
||||||
|
* Clean up CMakeLists.txt and drop Qt 4 support
|
||||||
|
|
||||||
|
0.8.0 / 2014-10-13
|
||||||
|
==================
|
||||||
|
|
||||||
|
* Adapt to the translation infrastructure
|
||||||
|
* Fix xde/lxde-qt #67 - Notifications are shown in the wrong location.
|
||||||
|
* Make the notification stay on top, fix bug lxde/lxde-qt #6 - Notifications show up under calendar plugin.
|
||||||
|
* Cleanup for Qt5 ready includes
|
||||||
|
* Use cmake 2.8.9 by default and use 2.8.11 for qt5. * Simplify qt5 support.
|
||||||
|
* Initial Qt5 support.
|
||||||
|
* Use new LXQt header files.
|
||||||
|
* Swap Spacing and Width
|
||||||
|
|
||||||
|
0.7.0 / 2014-05-07
|
||||||
|
==================
|
||||||
|
|
||||||
|
* Update COPYING
|
||||||
|
|
||||||
|
0.6.99 / 2014-04-30
|
||||||
|
===================
|
||||||
|
|
||||||
|
* remove old templates from translations remove icon translations from desktop file translations
|
||||||
|
* Style fixes to the advanced config
|
||||||
|
* Update AUTHORS
|
||||||
|
* Add CPack rules for creating tarball
|
||||||
|
* Rename main window to Desktop Notifications
|
||||||
|
* Better wording in desktop files
|
||||||
|
* fixed: worng (and debug) qlabel color qss; moving bottom-left notification out of screen in some conditions
|
||||||
|
* Removed CMAKE_SOURCE_DIR usage from CMakeLists.txt files
|
||||||
|
* Add a dirty hack to workaround repainting issues and fix razor-qt bug 536. See https://github.com/Razor-qt/razor-qt/issues/536 for details.
|
||||||
|
* Use the correct updated org.freedesktop.Notifications.xml file from razor-resources.
|
||||||
|
* Fix renaming bugs, replacing lxqt-qt with lxde-qt
|
||||||
|
* Finish the crazy razor=>lxqt renaming tasks.
|
||||||
|
* rename razor to lxqt in strings
|
||||||
|
* Add missing files.
|
||||||
|
* Rename binaries and replace razor with lxqt. * Use the latest liblxqt and libqtxdg.
|
||||||
|
* Add COPYING and AUTHORS
|
||||||
|
* X-RAZOR changed to Razor in desktop files
|
||||||
|
* fixed #611 Notifications HTML rendering and buttons versus combo-box
|
||||||
|
* Set foreground colors for dark themes
|
||||||
|
* Fix CMakeLists.txt for 'Unknown CMake command "razor_translate_ts"'
|
||||||
|
* Translations updated
|
||||||
|
* first part of fixes based on Coverity Scan (code static analysis)
|
||||||
|
* Generate translation files
|
||||||
|
* Fix components missing translations
|
||||||
|
* Delete bad en_GB translations
|
||||||
|
* Update translations
|
||||||
|
* Translations updated
|
||||||
|
* Replace <p> tag with newlines since it's not valid notification markup
|
||||||
|
* notifications: fix button/combobox displaying for actions (stringlist should be checked divided by 2)
|
||||||
|
* Translations
|
||||||
|
* Deleted old translation methods.
|
||||||
|
* notifications: do not grow height in time (after days of use we were getting higher notification widgets)
|
||||||
|
* fixed #383 Identical notifications get increasingly large
|
||||||
|
* New translation infrastructure
|
||||||
|
* notification, dbus: no need for ReloadSettings anymore because it works out of the box now
|
||||||
|
* Fix variable (Issue #387)
|
||||||
|
* Fix for Issue #290 Fails to build on BSD
|
||||||
|
* fixed #324 Add a notification queue
|
||||||
|
* Fix for fix for commit 1c31b24 "compiles with qt 4.6.x as well"
|
||||||
|
* Fix for commit 1c31b24f3b43de5d6fb82f26e41d1a183d0c61e0 "compiles with qt 4.6.x as well"
|
||||||
|
* compiles with qt 4.6.x as well
|
||||||
|
* ad #329 - default actions and docs
|
||||||
|
* part of #329: on-click on notification launces default action or it tries to find appropariate window to raise; xfitman method renamed + one new
|
||||||
|
* don't display summary if its content equals appLabel
|
||||||
|
* issue #325: do not display default app icon if there is no icon found for notification
|
||||||
|
* fixed #327 Focused notifications should not time out
|
||||||
|
* suggestion for #325 - notifications are much smaller now. And it can be set to use smaller fornt in theme as well
|
||||||
|
* Add warning if a different notifications daemon is running
|
||||||
|
* Fix for #308
|
||||||
|
* notifications: devel docs
|
||||||
|
* notifications: settings are synced with config tool (dbus); layouting fixes
|
||||||
|
* razorqt-notificationd: Fix the placement restore configuration Ui
|
||||||
|
* Add Hints support
|
||||||
|
* Add license headers
|
||||||
|
* notification icon fix
|
||||||
|
* proper actions handling
|
||||||
|
* notification widget expands as required
|
||||||
|
* notif: final fix for signals and slots
|
||||||
|
* notif. config: do not limit notification to 99px by default
|
||||||
|
* notiications test app
|
||||||
|
* port icon code for qt4.6.x
|
||||||
|
* Fix issue 308 Calling setMinimumSize and setMaximumSize when widget is not shown will do nothing
|
||||||
|
* slot name fix
|
||||||
|
* fixed action handling
|
||||||
|
* Let CMake generate the adaptor
|
||||||
|
* Add use parts of razor-runner theme for notifications
|
||||||
|
* Fix .desktop file generation
|
||||||
|
* notifications: vrious fixes; more options (hardcoded values removed); layouting
|
||||||
|
* fixes; begin of movabe notifications
|
||||||
|
* config app for notifications
|
||||||
|
* xdg notification actions implemented
|
||||||
|
* notifications: razorapplication used (theming); qtxdg used; spec icon loading implemented
|
||||||
|
* new notification solution (initial import)
|
@ -1,35 +1,42 @@
|
|||||||
cmake_minimum_required(VERSION 2.8.11)
|
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
||||||
|
|
||||||
project(lxqt-notificationd)
|
project(lxqt-notificationd)
|
||||||
|
|
||||||
option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
set(CMAKE_AUTOUIC ON)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
set(CMAKE_AUTOMOC ON)
|
|
||||||
|
|
||||||
find_package(Qt5Widgets REQUIRED QUIET)
|
option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF)
|
||||||
find_package(Qt5DBus REQUIRED QUIET)
|
|
||||||
find_package(Qt5LinguistTools REQUIRED QUIET)
|
|
||||||
find_package(KF5WindowSystem REQUIRED QUIET)
|
|
||||||
|
|
||||||
find_package(lxqt REQUIRED QUIET)
|
find_package(Qt5DBus REQUIRED)
|
||||||
find_package(qt5xdg REQUIRED)
|
find_package(Qt5LinguistTools REQUIRED)
|
||||||
|
find_package(Qt5Widgets REQUIRED)
|
||||||
|
message(STATUS "Building with Qt${Qt5Core_VERSION}")
|
||||||
|
|
||||||
include(${LXQT_USE_FILE})
|
find_package(KF5WindowSystem REQUIRED)
|
||||||
include(${QTXDG_USE_FILE})
|
|
||||||
|
|
||||||
|
find_package(lxqt REQUIRED)
|
||||||
|
|
||||||
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
|
set(CMAKE_BUILD_TYPE Release)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Patch Version
|
||||||
|
set(LXQT_NOTIFICATIOND_PATCH_VERSION 0)
|
||||||
|
|
||||||
|
set(LXQT_NOTIFICATIOND_VERSION ${LXQT_MAJOR_VERSION}.${LXQT_MINOR_VERSION}.${LXQT_NOTIFICATIOND_PATCH_VERSION})
|
||||||
|
add_definitions("-DLXQT_NOTIFICATIOND_VERSION=\"${LXQT_NOTIFICATIOND_VERSION}\"")
|
||||||
|
|
||||||
|
include(LXQtCompilerSettings NO_POLICY_SCOPE)
|
||||||
|
|
||||||
|
# Translations **********************************
|
||||||
include(LXQtTranslate)
|
include(LXQtTranslate)
|
||||||
|
|
||||||
add_subdirectory(src)
|
|
||||||
add_subdirectory(config)
|
add_subdirectory(config)
|
||||||
|
add_subdirectory(src)
|
||||||
|
|
||||||
# building tarball with CPack -------------------------------------------------
|
## merged from lxqt-common
|
||||||
include(InstallRequiredSystemLibraries)
|
add_subdirectory(autostart)
|
||||||
set(CPACK_PACKAGE_VERSION_MAJOR ${LXQT_MAJOR_VERSION})
|
|
||||||
set(CPACK_PACKAGE_VERSION_MINOR ${LXQT_MINOR_VERSION})
|
|
||||||
set(CPACK_PACKAGE_VERSION_PATCH ${LXQT_PATCH_VERSION})
|
|
||||||
set(CPACK_GENERATOR TBZ2)
|
|
||||||
set(CPACK_SOURCE_GENERATOR TBZ2)
|
|
||||||
set(CPACK_SOURCE_IGNORE_FILES /build/;.gitignore;.*~;.git;.kdev4;temp)
|
|
||||||
include(CPack)
|
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
|
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
Version 2.1, February 1999
|
Version 2.1, February 1999
|
||||||
|
|
||||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
@ -23,8 +22,7 @@ specially designated software packages--typically libraries--of the
|
|||||||
Free Software Foundation and other authors who decide to use it. You
|
Free Software Foundation and other authors who decide to use it. You
|
||||||
can use it too, but we suggest you first think carefully about whether
|
can use it too, but we suggest you first think carefully about whether
|
||||||
this license or the ordinary General Public License is the better
|
this license or the ordinary General Public License is the better
|
||||||
strategy to use in any particular case, based on the explanations
|
strategy to use in any particular case, based on the explanations below.
|
||||||
below.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom of use,
|
When we speak of free software, we are referring to freedom of use,
|
||||||
not price. Our General Public Licenses are designed to make sure that
|
not price. Our General Public Licenses are designed to make sure that
|
||||||
@ -89,9 +87,9 @@ libraries. However, the Lesser license provides advantages in certain
|
|||||||
special circumstances.
|
special circumstances.
|
||||||
|
|
||||||
For example, on rare occasions, there may be a special need to
|
For example, on rare occasions, there may be a special need to
|
||||||
encourage the widest possible use of a certain library, so that it
|
encourage the widest possible use of a certain library, so that it becomes
|
||||||
becomes a de-facto standard. To achieve this, non-free programs must
|
a de-facto standard. To achieve this, non-free programs must be
|
||||||
be allowed to use the library. A more frequent case is that a free
|
allowed to use the library. A more frequent case is that a free
|
||||||
library does the same job as widely used non-free libraries. In this
|
library does the same job as widely used non-free libraries. In this
|
||||||
case, there is little to gain by limiting the free library to free
|
case, there is little to gain by limiting the free library to free
|
||||||
software only, so we use the Lesser General Public License.
|
software only, so we use the Lesser General Public License.
|
||||||
@ -138,8 +136,8 @@ included without limitation in the term "modification".)
|
|||||||
"Source code" for a work means the preferred form of the work for
|
"Source code" for a work means the preferred form of the work for
|
||||||
making modifications to it. For a library, complete source code means
|
making modifications to it. For a library, complete source code means
|
||||||
all the source code for all modules it contains, plus any associated
|
all the source code for all modules it contains, plus any associated
|
||||||
interface definition files, plus the scripts used to control
|
interface definition files, plus the scripts used to control compilation
|
||||||
compilation and installation of the library.
|
and installation of the library.
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
Activities other than copying, distribution and modification are not
|
||||||
covered by this License; they are outside its scope. The act of
|
covered by this License; they are outside its scope. The act of
|
||||||
@ -305,10 +303,10 @@ of these things:
|
|||||||
the user installs one, as long as the modified version is
|
the user installs one, as long as the modified version is
|
||||||
interface-compatible with the version that the work was made with.
|
interface-compatible with the version that the work was made with.
|
||||||
|
|
||||||
c) Accompany the work with a written offer, valid for at least
|
c) Accompany the work with a written offer, valid for at
|
||||||
three years, to give the same user the materials specified in
|
least three years, to give the same user the materials
|
||||||
Subsection 6a, above, for a charge no more than the cost of
|
specified in Subsection 6a, above, for a charge no more
|
||||||
performing this distribution.
|
than the cost of performing this distribution.
|
||||||
|
|
||||||
d) If distribution of the work is made by offering access to copy
|
d) If distribution of the work is made by offering access to copy
|
||||||
from a designated place, offer equivalent access to copy the above
|
from a designated place, offer equivalent access to copy the above
|
||||||
@ -386,10 +384,9 @@ all those who receive copies directly or indirectly through you, then
|
|||||||
the only way you could satisfy both it and this License would be to
|
the only way you could satisfy both it and this License would be to
|
||||||
refrain entirely from distribution of the Library.
|
refrain entirely from distribution of the Library.
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under
|
If any portion of this section is held invalid or unenforceable under any
|
||||||
any particular circumstance, the balance of the section is intended to
|
particular circumstance, the balance of the section is intended to apply,
|
||||||
apply, and the section as a whole is intended to apply in other
|
and the section as a whole is intended to apply in other circumstances.
|
||||||
circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
It is not the purpose of this section to induce you to infringe any
|
||||||
patents or other property right claims or to contest validity of any
|
patents or other property right claims or to contest validity of any
|
||||||
@ -407,11 +404,11 @@ be a consequence of the rest of this License.
|
|||||||
|
|
||||||
12. If the distribution and/or use of the Library is restricted in
|
12. If the distribution and/or use of the Library is restricted in
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
original copyright holder who places the Library under this License
|
original copyright holder who places the Library under this License may add
|
||||||
may add an explicit geographical distribution limitation excluding those
|
an explicit geographical distribution limitation excluding those countries,
|
||||||
countries, so that distribution is permitted only in or among
|
so that distribution is permitted only in or among countries not thus
|
||||||
countries not thus excluded. In such case, this License incorporates
|
excluded. In such case, this License incorporates the limitation as if
|
||||||
the limitation as if written in the body of this License.
|
written in the body of this License.
|
||||||
|
|
||||||
13. The Free Software Foundation may publish revised and/or new
|
13. The Free Software Foundation may publish revised and/or new
|
||||||
versions of the Lesser General Public License from time to time.
|
versions of the Lesser General Public License from time to time.
|
33
README.md
Normal file
33
README.md
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# lxqt-notificationd
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
`lxqt-notificationd` is LXQt's implementation of a daemon according to the [Desktop Notifications Specification](https://developer.gnome.org/notification-spec/).
|
||||||
|
|
||||||
|
This specification defines a way to display notifications in pop-up windows on desktops. Notifications like this are e. g. frequently used by chat or mail clients to inform about incoming messages, by media players to indicate the beginning of another track but also by the desktop environment itself to indicate volume changes or similar.
|
||||||
|
|
||||||
|
lxqt-notificationd is comprising binaries `lxqt-notificationd` and `lxqt-config-notificationd`.
|
||||||
|
`lxqt-notificationd` is running in a daemon-like manner as so-called [LXQt Module](https://github.com/lxde/lxqt-session#lxqt-modules) and doing the actual work. GUI "Desktop Notifications", binary `lxqt-config-notificationd`, is used to customize the notifications.
|
||||||
|
|
||||||
|
lxqt-notificationd is implementing version 1.2 of the said specification.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Compiling source code
|
||||||
|
|
||||||
|
Runtime dependencies are KWindowSystem, [liblxqt](https://github.com/lxde/liblxqt) and [lxqt-common](https://github.com/lxde/lxqt-common).
|
||||||
|
Additional build dependencies are CMake and optionally Git to pull latest VCS checkouts. The localization files were outsourced to repository [lxqt-l10n](https://github.com/lxde/lxqt-l10n) so the corresponding dependencies are needed, too. Please refer to this repository's `README.md` for further information.
|
||||||
|
|
||||||
|
Code configuration is handled by CMake. CMake variable `CMAKE_INSTALL_PREFIX` has to be set to `/usr` on most operating systems.
|
||||||
|
|
||||||
|
To build run `make`, to install `make install` which accepts variable `DESTDIR` as usual.
|
||||||
|
|
||||||
|
### Binary packages
|
||||||
|
|
||||||
|
Official binary packages are provided by all major Linux distributions like Arch Linux, Debian (as of Debian stretch only), Fedora and openSUSE. Just use your package manager to search for string `lxqt-notificationd`.
|
||||||
|
|
||||||
|
## Configuration, Usage
|
||||||
|
|
||||||
|
As `lxqt-notificationd` is run as LXQt Module it can be adjusted from section "Basic Settings" in configuration dialogue [LXQt Session Settings](https://github.com/lxde/lxqt-session#lxqt-session-settings) of [lxqt-session](https://github.com/lxde/lxqt-session).
|
||||||
|
|
||||||
|
Configuration dialogue "Desktop Notifications" (binary `lxqt-config-notificationd`) which is used to customize notifications can be opened from the panel's main menu - Preferences - LXQt Settings - Desktop Notifications and is provided by the [Configuration Center](https://github.com/lxde/lxqt-config#configuration-center) of [lxqt-config](https://github.com/lxde/lxqt-config) as well.
|
17
autostart/CMakeLists.txt
Normal file
17
autostart/CMakeLists.txt
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
||||||
|
|
||||||
|
file(GLOB DESKTOP_FILES_IN *.desktop.in)
|
||||||
|
|
||||||
|
# Translations **********************************
|
||||||
|
lxqt_translate_desktop(DESKTOP_FILES
|
||||||
|
SOURCES
|
||||||
|
${DESKTOP_FILES_IN}
|
||||||
|
)
|
||||||
|
add_custom_target(lxqt_notificationd_autostart_desktop_files ALL DEPENDS ${DESKTOP_FILES})
|
||||||
|
#************************************************
|
||||||
|
|
||||||
|
install(FILES
|
||||||
|
${DESKTOP_FILES}
|
||||||
|
DESTINATION "${LXQT_ETC_XDG_DIR}/autostart"
|
||||||
|
COMPONENT Runtime
|
||||||
|
)
|
9
autostart/lxqt-notifications.desktop.in
Normal file
9
autostart/lxqt-notifications.desktop.in
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=Notification Daemon
|
||||||
|
TryExec=lxqt-notificationd
|
||||||
|
Exec=lxqt-notificationd
|
||||||
|
OnlyShowIn=LXQt;
|
||||||
|
X-LXQt-Module=true
|
||||||
|
|
||||||
|
#TRANSLATIONS_DIR=translations
|
2
autostart/translations/lxqt-notifications_ar.desktop
Normal file
2
autostart/translations/lxqt-notifications_ar.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[ar]=بريمج الإشعارات
|
2
autostart/translations/lxqt-notifications_cs.desktop
Normal file
2
autostart/translations/lxqt-notifications_cs.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[cs]=Oznamovací démon
|
2
autostart/translations/lxqt-notifications_cs_CZ.desktop
Normal file
2
autostart/translations/lxqt-notifications_cs_CZ.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[cs_CZ]=Oznamovací démon
|
2
autostart/translations/lxqt-notifications_da.desktop
Normal file
2
autostart/translations/lxqt-notifications_da.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[da]=Notifikationsbaggrundsprogram
|
2
autostart/translations/lxqt-notifications_de.desktop
Normal file
2
autostart/translations/lxqt-notifications_de.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[de]=Benachrichtigungsdaemon
|
2
autostart/translations/lxqt-notifications_el.desktop
Normal file
2
autostart/translations/lxqt-notifications_el.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[el]=Υπηρεσία ειδοποιήσεων
|
2
autostart/translations/lxqt-notifications_eo.desktop
Normal file
2
autostart/translations/lxqt-notifications_eo.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[eo]=Demono de atentigoj
|
2
autostart/translations/lxqt-notifications_es.desktop
Normal file
2
autostart/translations/lxqt-notifications_es.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[es]=Demonio de notificaciones
|
2
autostart/translations/lxqt-notifications_es_VE.desktop
Normal file
2
autostart/translations/lxqt-notifications_es_VE.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[es_VE]=Demonio de notificaciones
|
2
autostart/translations/lxqt-notifications_eu.desktop
Normal file
2
autostart/translations/lxqt-notifications_eu.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[eu]=Jakinarazpen-deabrua
|
2
autostart/translations/lxqt-notifications_fi.desktop
Normal file
2
autostart/translations/lxqt-notifications_fi.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[fi]=Ilmoituspalvelu
|
2
autostart/translations/lxqt-notifications_fr.desktop
Normal file
2
autostart/translations/lxqt-notifications_fr.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[fr]=Démon de notification
|
2
autostart/translations/lxqt-notifications_hu.desktop
Normal file
2
autostart/translations/lxqt-notifications_hu.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[hu]=Értesítő szolgáltatás
|
2
autostart/translations/lxqt-notifications_it_IT.desktop
Normal file
2
autostart/translations/lxqt-notifications_it_IT.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[it_IT]=Demone delle notifiche
|
2
autostart/translations/lxqt-notifications_ja.desktop
Normal file
2
autostart/translations/lxqt-notifications_ja.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[ja]=通知デーモン
|
2
autostart/translations/lxqt-notifications_lt.desktop
Normal file
2
autostart/translations/lxqt-notifications_lt.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[lt]=Pranešimų tarnyba
|
2
autostart/translations/lxqt-notifications_nl.desktop
Normal file
2
autostart/translations/lxqt-notifications_nl.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[nl]=notificatie Daemon
|
2
autostart/translations/lxqt-notifications_pl_PL.desktop
Normal file
2
autostart/translations/lxqt-notifications_pl_PL.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[pl_PL]=Daemon Powiadomień
|
2
autostart/translations/lxqt-notifications_pt.desktop
Normal file
2
autostart/translations/lxqt-notifications_pt.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[pt]=Serviço de notificações
|
2
autostart/translations/lxqt-notifications_pt_BR.desktop
Normal file
2
autostart/translations/lxqt-notifications_pt_BR.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[pt_BR]=Daemon de notificação
|
2
autostart/translations/lxqt-notifications_ro_RO.desktop
Normal file
2
autostart/translations/lxqt-notifications_ro_RO.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[ro_RO]=Daemon de notificare
|
2
autostart/translations/lxqt-notifications_ru.desktop
Normal file
2
autostart/translations/lxqt-notifications_ru.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[ru]=демон Cообщение
|
2
autostart/translations/lxqt-notifications_ru_RU.desktop
Normal file
2
autostart/translations/lxqt-notifications_ru_RU.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[ru_RU]=Служба уведомлений
|
2
autostart/translations/lxqt-notifications_sl.desktop
Normal file
2
autostart/translations/lxqt-notifications_sl.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[sl]=Obvestilnik
|
2
autostart/translations/lxqt-notifications_th_TH.desktop
Normal file
2
autostart/translations/lxqt-notifications_th_TH.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[th_TH]=ดีมอนการแจ้งเตือน
|
2
autostart/translations/lxqt-notifications_tr.desktop
Normal file
2
autostart/translations/lxqt-notifications_tr.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[tr]=Bildirim Artsüreci
|
2
autostart/translations/lxqt-notifications_uk.desktop
Normal file
2
autostart/translations/lxqt-notifications_uk.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[uk]=Демон сповіщень
|
2
autostart/translations/lxqt-notifications_zh_CN.desktop
Normal file
2
autostart/translations/lxqt-notifications_zh_CN.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[zh_CN]=通知服务
|
2
autostart/translations/lxqt-notifications_zh_TW.desktop
Normal file
2
autostart/translations/lxqt-notifications_zh_TW.desktop
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Translations
|
||||||
|
Name[zh_TW]=系統通知程序
|
@ -1,10 +1,5 @@
|
|||||||
project(lxqt-config-notificationd)
|
project(lxqt-config-notificationd)
|
||||||
|
|
||||||
include_directories (
|
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
|
||||||
)
|
|
||||||
|
|
||||||
set(NOTIFICATIONS_CONF_SRC
|
set(NOTIFICATIONS_CONF_SRC
|
||||||
advancedsettings.cpp
|
advancedsettings.cpp
|
||||||
basicsettings.cpp
|
basicsettings.cpp
|
||||||
@ -19,23 +14,32 @@ set(NOTIFICATIONS_CONF_UI
|
|||||||
|
|
||||||
|
|
||||||
# Translations **********************************
|
# Translations **********************************
|
||||||
lxqt_translate_ts(NOTIFICATIONS_CONF_QM SOURCES
|
lxqt_translate_ts(NOTIFICATIONS_CONF_QM
|
||||||
UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS}
|
UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS}
|
||||||
|
SOURCES
|
||||||
${NOTIFICATIONS_CONF_MOC}
|
${NOTIFICATIONS_CONF_MOC}
|
||||||
${NOTIFICATIONS_CONF_SRC}
|
${NOTIFICATIONS_CONF_SRC}
|
||||||
${NOTIFICATIONS_CONF_UI}
|
${NOTIFICATIONS_CONF_UI}
|
||||||
INSTALL_DIR "${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}"
|
INSTALL_DIR "${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}"
|
||||||
|
PULL_TRANSLATIONS
|
||||||
|
${PULL_TRANSLATIONS}
|
||||||
|
CLEAN_TRANSLATIONS
|
||||||
|
${CLEAN_TRANSLATIONS}
|
||||||
|
TRANSLATIONS_REPO
|
||||||
|
${TRANSLATIONS_REPO}
|
||||||
|
TRANSLATIONS_REFSPEC
|
||||||
|
${TRANSLATIONS_REFSPEC}
|
||||||
|
REPO_SUBDIR
|
||||||
|
"lxqt-notificationd/${PROJECT_NAME}"
|
||||||
)
|
)
|
||||||
|
|
||||||
lxqt_app_translation_loader(QM_LOADER ${PROJECT_NAME})
|
lxqt_app_translation_loader(QM_LOADER ${PROJECT_NAME})
|
||||||
lxqt_translate_desktop(DESKTOP_FILES SOURCES lxqt-config-notificationd.desktop.in)
|
lxqt_translate_desktop(DESKTOP_FILES SOURCES lxqt-config-notificationd.desktop.in)
|
||||||
#************************************************
|
#************************************************
|
||||||
|
|
||||||
qt5_wrap_ui(NOTIFICATIONS_CONF_UI_CPP ${NOTIFICATIONS_CONF_UI})
|
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME}
|
add_executable(${PROJECT_NAME}
|
||||||
${NOTIFICATIONS_CONF_SRC}
|
${NOTIFICATIONS_CONF_SRC}
|
||||||
${NOTIFICATIONS_CONF_UI_CPP}
|
|
||||||
${NOTIFICATIONS_CONF_QM}
|
${NOTIFICATIONS_CONF_QM}
|
||||||
${DESKTOP_FILES}
|
${DESKTOP_FILES}
|
||||||
${QM_LOADER}
|
${QM_LOADER}
|
||||||
@ -44,8 +48,16 @@ add_executable(${PROJECT_NAME}
|
|||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME}
|
||||||
KF5::WindowSystem
|
KF5::WindowSystem
|
||||||
Qt5::Widgets
|
Qt5::Widgets
|
||||||
${LXQT_LIBRARIES}
|
lxqt
|
||||||
)
|
)
|
||||||
|
|
||||||
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
|
install(TARGETS
|
||||||
install(FILES ${DESKTOP_FILES} DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications")
|
${PROJECT_NAME}
|
||||||
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||||
|
COMPONENT Runtime
|
||||||
|
)
|
||||||
|
install(FILES
|
||||||
|
${DESKTOP_FILES}
|
||||||
|
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications"
|
||||||
|
COMPONENT Runtime
|
||||||
|
)
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
|
|
||||||
AdvancedSettings::AdvancedSettings(LxQt::Settings* settings, QWidget *parent):
|
AdvancedSettings::AdvancedSettings(LXQt::Settings* settings, QWidget *parent):
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
mSettings(settings)
|
mSettings(settings)
|
||||||
{
|
{
|
||||||
|
@ -37,14 +37,14 @@ class AdvancedSettings : public QWidget, public Ui::AdvancedSettings
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit AdvancedSettings(LxQt::Settings* settings, QWidget* parent = 0);
|
explicit AdvancedSettings(LXQt::Settings* settings, QWidget* parent = 0);
|
||||||
~AdvancedSettings();
|
~AdvancedSettings();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void restoreSettings();
|
void restoreSettings();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LxQt::Settings* mSettings;
|
LXQt::Settings* mSettings;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void save();
|
void save();
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>340</width>
|
<width>350</width>
|
||||||
<height>284</height>
|
<height>301</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
@ -70,6 +70,12 @@
|
|||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Some notifications set their own on-screen duration.</string>
|
<string>Some notifications set their own on-screen duration.</string>
|
||||||
</property>
|
</property>
|
||||||
@ -92,6 +98,9 @@
|
|||||||
<property name="suffix">
|
<property name="suffix">
|
||||||
<string> sec</string>
|
<string> sec</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>7200</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
|
|
||||||
BasicSettings::BasicSettings(LxQt::Settings* settings, QWidget *parent) :
|
BasicSettings::BasicSettings(LXQt::Settings* settings, QWidget *parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
mSettings(settings)
|
mSettings(settings)
|
||||||
{
|
{
|
||||||
@ -39,28 +39,25 @@ BasicSettings::BasicSettings(LxQt::Settings* settings, QWidget *parent) :
|
|||||||
|
|
||||||
restoreSettings();
|
restoreSettings();
|
||||||
|
|
||||||
connect(topLeftButton, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
connect(topLeftRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||||
connect(topRightButton, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
connect(topCenterRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||||
connect(bottomRightButton, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
connect(topRightRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||||
connect(bottomLeftButton, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
connect(centerLeftRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||||
|
connect(centerRightRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||||
|
connect(bottomLeftRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||||
|
connect(bottomCenterRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||||
|
connect(bottomRightRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||||
|
|
||||||
LxQt::Notification serverTest;
|
LXQt::Notification serverTest;
|
||||||
QString serverName = serverTest.serverInfo().name;
|
QString serverName = serverTest.serverInfo().name;
|
||||||
if (serverName != "lxqt-notificationd")
|
if (serverName != "lxqt-notificationd")
|
||||||
{
|
{
|
||||||
if (serverName.isEmpty())
|
if (serverName.isEmpty())
|
||||||
{
|
warningLabel->setText(tr("<b>Warning:</b> No notifications daemon is running.\n"
|
||||||
warningLabel->setText(tr(
|
"A fallback will be used."));
|
||||||
"<b>Warning:</b> No notifications daemon is running.\n"
|
|
||||||
"A fallback will be used."));
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
warningLabel->setText(tr("<b>Warning:</b> A third-party notifications daemon (%1) is running.\n"
|
||||||
warningLabel->setText(tr(
|
"These settings won't have any effect on it!").arg(serverName));
|
||||||
"<b>Warning:</b> A third-party notifications daemon (%1) is running.\n"
|
|
||||||
"These settings won't have any effect on it!"
|
|
||||||
).arg(serverName));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,33 +67,49 @@ BasicSettings::~BasicSettings()
|
|||||||
|
|
||||||
void BasicSettings::restoreSettings()
|
void BasicSettings::restoreSettings()
|
||||||
{
|
{
|
||||||
QString placement = mSettings->value("placement", "bottom-right").toString().toLower();
|
QString placement = mSettings->value(QStringLiteral("placement"),
|
||||||
if (placement == "bottom-right")
|
QStringLiteral("bottom-right")).toString().toLower();
|
||||||
bottomRightButton->setChecked(true);
|
|
||||||
else if (placement == "bottom-left")
|
if (QStringLiteral("top-left") == placement)
|
||||||
bottomLeftButton->setChecked(true);
|
topLeftRB->setChecked(true);
|
||||||
else if (placement == "top-right")
|
else if (QStringLiteral("top-center") == placement)
|
||||||
topRightButton->setChecked(true);
|
topCenterRB->setChecked(true);
|
||||||
else if (placement == "top-left")
|
else if (QStringLiteral("top-right") == placement)
|
||||||
topLeftButton->setChecked(true);
|
topRightRB->setChecked(true);
|
||||||
else
|
else if (QStringLiteral("center-left") == placement)
|
||||||
bottomRightButton->setChecked(true);
|
centerLeftRB->setChecked(true);
|
||||||
|
else if (QStringLiteral("center-right") == placement)
|
||||||
|
centerRightRB->setChecked(true);
|
||||||
|
else if (QStringLiteral("bottom-left") == placement)
|
||||||
|
bottomLeftRB->setChecked(true);
|
||||||
|
else if (QStringLiteral("bottom-center") == placement)
|
||||||
|
bottomCenterRB->setChecked(true);
|
||||||
|
else if (QStringLiteral("bottom-right") == placement)
|
||||||
|
bottomRightRB->setChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BasicSettings::updateNotification()
|
void BasicSettings::updateNotification()
|
||||||
{
|
{
|
||||||
if (bottomRightButton->isChecked())
|
QString align;
|
||||||
mSettings->setValue("placement", "bottom-right");
|
if (topLeftRB->isChecked())
|
||||||
else if (bottomLeftButton->isChecked())
|
align = QStringLiteral("top-left");
|
||||||
mSettings->setValue("placement", "bottom-left");
|
else if (topCenterRB->isChecked())
|
||||||
else if (topRightButton->isChecked())
|
align = QStringLiteral("top-center");
|
||||||
mSettings->setValue("placement", "top-right");
|
else if (topRightRB->isChecked())
|
||||||
else if (topLeftButton->isChecked())
|
align = QStringLiteral("top-right");
|
||||||
mSettings->setValue("placement", "top-left");
|
else if (centerLeftRB->isChecked())
|
||||||
|
align = QStringLiteral("center-left");
|
||||||
|
else if (centerRightRB->isChecked())
|
||||||
|
align = QStringLiteral("center-right");
|
||||||
|
else if (bottomLeftRB->isChecked())
|
||||||
|
align = QStringLiteral("bottom-left");
|
||||||
|
else if (bottomCenterRB->isChecked())
|
||||||
|
align = QStringLiteral("bottom-center");
|
||||||
|
else // if (bottomRightRB->isChecked())
|
||||||
|
align = QStringLiteral("bottom-right");
|
||||||
|
|
||||||
LxQt::Notification::notify(//"lxqt-config-notificationd",
|
mSettings->setValue(QStringLiteral("placement"), align);
|
||||||
tr("Notification demo"),
|
LXQt::Notification::notify(tr("Notification demo ") + align,
|
||||||
tr("This is a test notification.\n"
|
tr("This is a test notification.\n All notifications will now appear here on LXQt."),
|
||||||
"All notifications will now appear here on LXQt."),
|
QStringLiteral("lxqt"));
|
||||||
"lxqt-logo.png");
|
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ class BasicSettings : public QWidget, public Ui::BasicSettings
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit BasicSettings(LxQt::Settings* settings, QWidget* parent = 0);
|
explicit BasicSettings(LXQt::Settings* settings, QWidget* parent = 0);
|
||||||
~BasicSettings();
|
~BasicSettings();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
@ -47,7 +47,7 @@ private slots:
|
|||||||
void updateNotification();
|
void updateNotification();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LxQt::Settings* mSettings;
|
LXQt::Settings* mSettings;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BASICSETTINGS_H
|
#endif // BASICSETTINGS_H
|
||||||
|
@ -6,12 +6,12 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>244</width>
|
<width>398</width>
|
||||||
<height>218</height>
|
<height>354</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item row="0" column="0">
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
@ -24,44 +24,166 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" colspan="2">
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Position on screen</string>
|
<string>Position on screen</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<item row="2" column="4">
|
||||||
<widget class="QRadioButton" name="topLeftButton">
|
<widget class="QRadioButton" name="bottomRightRB">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Top/Left</string>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="4">
|
||||||
|
<widget class="QRadioButton" name="centerRightRB">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QRadioButton" name="topRightButton">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="text">
|
<property name="orientation">
|
||||||
<string>Top/Right</string>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QRadioButton" name="topCenterRB">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QRadioButton" name="bottomCenterRB">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QRadioButton" name="topLeftRB">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="4">
|
||||||
|
<widget class="QRadioButton" name="topRightRB">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QRadioButton" name="bottomLeftButton">
|
<widget class="QRadioButton" name="centerLeftRB">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Bottom/Left</string>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="2" column="0">
|
||||||
<widget class="QRadioButton" name="bottomRightButton">
|
<widget class="QRadioButton" name="bottomLeftRB">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Bottom/Right</string>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<spacer name="spacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Minimum</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>90</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<spacer name="spacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Minimum</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>90</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
@ -69,12 +191,12 @@
|
|||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>105</width>
|
<width>105</width>
|
||||||
<height>51</height>
|
<height>21</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" colspan="2">
|
<item>
|
||||||
<widget class="QLabel" name="warningLabel">
|
<widget class="QLabel" name="warningLabel">
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -85,4 +207,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
<buttongroups>
|
||||||
|
<buttongroup name="buttonGroup"/>
|
||||||
|
</buttongroups>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -6,6 +6,6 @@ Comment=Configure desktop notifications
|
|||||||
Exec=lxqt-config-notificationd
|
Exec=lxqt-config-notificationd
|
||||||
Icon=preferences-desktop-theme
|
Icon=preferences-desktop-theme
|
||||||
Categories=Settings;DesktopSettings;Qt;LXQt;
|
Categories=Settings;DesktopSettings;Qt;LXQt;
|
||||||
OnlyShowIn=LXQt;LXDE;
|
OnlyShowIn=LXQt;
|
||||||
|
|
||||||
#TRANSLATIONS_DIR=translations
|
#TRANSLATIONS_DIR=translations
|
||||||
|
@ -29,13 +29,25 @@
|
|||||||
|
|
||||||
#include <XdgIcon>
|
#include <XdgIcon>
|
||||||
#include <LXQt/Settings>
|
#include <LXQt/Settings>
|
||||||
|
#include <QCommandLineParser>
|
||||||
|
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
LxQt::SingleApplication a(argc, argv);
|
LXQt::SingleApplication a(argc, argv);
|
||||||
|
a.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||||
|
|
||||||
|
QCommandLineParser parser;
|
||||||
|
parser.setApplicationDescription(QStringLiteral("LXQt Config Notificationd"));
|
||||||
|
const QString VERINFO = QStringLiteral(LXQT_NOTIFICATIOND_VERSION
|
||||||
|
"\nliblxqt " LXQT_VERSION
|
||||||
|
"\nQt " QT_VERSION_STR);
|
||||||
|
a.setApplicationVersion(VERINFO);
|
||||||
|
parser.addVersionOption();
|
||||||
|
parser.addHelpOption();
|
||||||
|
parser.process(a);
|
||||||
|
|
||||||
MainWindow w;
|
MainWindow w;
|
||||||
w.setWindowIcon(QIcon::fromTheme("preferences-desktop-theme"));
|
w.setWindowIcon(QIcon::fromTheme("preferences-desktop-theme"));
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent) :
|
MainWindow::MainWindow(QWidget *parent) :
|
||||||
LxQt::ConfigDialog(tr("Desktop Notifications"), new LxQt::Settings("notifications"), parent)
|
LXQt::ConfigDialog(tr("Desktop Notifications"), new LXQt::Settings("notifications"), parent)
|
||||||
{
|
{
|
||||||
BasicSettings* basic = new BasicSettings(mSettings, this);
|
BasicSettings* basic = new BasicSettings(mSettings, this);
|
||||||
addPage(basic, tr("Basic Settings"), "preferences-desktop-notification");
|
addPage(basic, tr("Basic Settings"), "preferences-desktop-notification");
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include <LXQt/ConfigDialog>
|
#include <LXQt/ConfigDialog>
|
||||||
|
|
||||||
|
|
||||||
class MainWindow : public LxQt::ConfigDialog
|
class MainWindow : public LXQt::ConfigDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@ -1,107 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE TS>
|
|
||||||
<TS version="2.0" language="en_US">
|
|
||||||
<context>
|
|
||||||
<name>AdvancedSettings</name>
|
|
||||||
<message>
|
|
||||||
<source>Menu Configuration</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Notification Duration</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>For some the notification's expiration time is dependent on the notification server's settings.</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>"Server Decides" Time:</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source> sec</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Sizes</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Notification Spacing:</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source> px</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Notification Width:</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>BasicSettings</name>
|
|
||||||
<message>
|
|
||||||
<source>Basic Settings</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Display Notifications</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Top/Left</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Top/Right</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Bottom/Left</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Bottom/Right</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Test Notification</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source><b>Warning:</b> No notifications daemon is running.
|
|
||||||
A fallback will be used.</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source><b>Warning:</b> A third-party notifications daemon (%1) is running.
|
|
||||||
These settings won't have an effect on it!</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Notification Summary</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Notification Body</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>MainWindow</name>
|
|
||||||
<message>
|
|
||||||
<source>Desktop Notifications</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Basic Settings</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Advanced Settings</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
</TS>
|
|
4
config/translations/lxqt-config-notificationd_ca.desktop
Normal file
4
config/translations/lxqt-config-notificationd_ca.desktop
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Translations
|
||||||
|
Name[ca]=Notificacions de l'escriptori
|
||||||
|
GenericName[ca]=Ajusts de les notificacions de LXQt
|
||||||
|
Comment[ca]=Configureu les notificacions de l'escriptori
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[cs]=Nastavení oznamování v LxQtu
|
GenericName[cs]=Nastavení oznamování v LXQtu
|
||||||
Name[cs]=Nastavení oznamování v LxQtu
|
Name[cs]=Nastavení oznamování v LXQtu
|
||||||
Comment[cs]=Nastavit oznamování na ploše LxQt
|
Comment[cs]=Nastavit oznamování na ploše LXQt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[cs_CZ]=Nastavení oznamování v LxQtu
|
GenericName[cs_CZ]=Nastavení oznamování v LXQtu
|
||||||
Name[cs_CZ]=Nastavení oznamování v LxQtu
|
Name[cs_CZ]=Nastavení oznamování v LXQtu
|
||||||
Comment[cs_CZ]=Nastavit oznamování na ploše LxQt
|
Comment[cs_CZ]=Nastavit oznamování na ploše LXQt
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# Translations
|
Name[da]=Skrivebordsnotifikationer
|
||||||
GenericName[da]=Notesblok
|
GenericName[da]=LXQt-notifikationsindstillinger
|
||||||
Name[da]=Strømstyring
|
Comment[da]=Konfigurér skrivebordsnotifikationer
|
||||||
Comment[da]=Indstil freedesktop meddelelser på LxQt skrivebord
|
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
GenericName[da_DK]=LxQt freedesktop Meddelelsesindstillinger
|
|
||||||
Name[da_DK]=LxQt freedesktop Meddelelsesindstillinger
|
|
||||||
Comment[da_DK]=Indstil freedesktop meddelelser på LxQt skrivebord
|
|
@ -1,3 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[de]=LxQt Konfigurations Center
|
Name[de]=Mitteilungen der Arbeitsfläche
|
||||||
Name[de]=LxQt Konfiguration
|
GenericName[de]=LXQt Mitteilungseinstellungen
|
||||||
|
Comment[de]=Konfiguration von Benachrichtigungen
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
GenericName[de_DE]=Anwendungsmenü
|
|
||||||
Name[de_DE]=LxQt Freedesktop Mitteilungen Konfiguration
|
|
||||||
Comment[de_DE]=Freedesktop Mitteilungen für LxQt Desktop konfigurieren
|
|
4
config/translations/lxqt-config-notificationd_el.desktop
Normal file
4
config/translations/lxqt-config-notificationd_el.desktop
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Translations
|
||||||
|
Name[el]=Ειδοποιήσεις επιφάνειας εργασίας
|
||||||
|
GenericName[el]=Ρυθμίσεις ειδοποιήσεων LXQt
|
||||||
|
Comment[el]=Διαμόρφωση των ειδοποιήσεων της επιφάνειας εργασίας LXQt
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
GenericName[el_GR]=Διαμόρφωση ειδοποιήσεων LxQt
|
|
||||||
Name[el_GR]=Διαμόρφωση ειδοποιήσεων LxQt
|
|
||||||
Comment[el_GR]=Διαμόρφωση ειδοποιήσεων στην επιφάνεια εργασίας LxQt
|
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[eo]=Agordoj de muso por LxQto
|
GenericName[eo]=Agordoj de muso por LXQto
|
||||||
Name[eo]=Agordoj de muso por LxQto
|
Name[eo]=Agordoj de muso por LXQto
|
||||||
Comment[eo]=Agordi atentigojn de freedesktop en LxQt-labortablo
|
Comment[eo]=Agordi atentigojn de freedesktop en LXQt-labortablo
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[es]=Administrador de tareas
|
GenericName[es]=Administrador de tareas
|
||||||
Name[es]=Configuración de sesiones LxQt
|
Name[es]=Configuración de sesiones LXQt
|
||||||
Comment[es]=Configure las notificacionde de freedesktop en el escritorio LxQt
|
Comment[es]=Configure las notificacionde de freedesktop en el escritorio LXQt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[es_VE]=Configuracion de notificaciones de Escritorio LxQt
|
GenericName[es_VE]=Configuracion de notificaciones de Escritorio LXQt
|
||||||
Name[es_VE]=Configuracion de notificaciones de Escritorio LxQt
|
Name[es_VE]=Configuracion de notificaciones de Escritorio LXQt
|
||||||
Comment[es_VE]=Configura las notificacones en el Escritoro LxQt
|
Comment[es_VE]=Configura las notificacones en el Escritoro LXQt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[eu]=LxQt Freedesktop jakinarazpenen konfigurazioa
|
GenericName[eu]=LXQt Freedesktop jakinarazpenen konfigurazioa
|
||||||
Name[eu]=LxQt Freedesktop jakinarazpenen konfigurazioa
|
Name[eu]=LXQt Freedesktop jakinarazpenen konfigurazioa
|
||||||
Comment[eu]=Konfiguratu LxQt mahaigaineko Freedesktop jakinarazpenak
|
Comment[eu]=Konfiguratu LXQt mahaigaineko Freedesktop jakinarazpenak
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[fi]=LxQt-työpöydän ilmoitusasetukset
|
GenericName[fi]=LXQt-työpöydän ilmoitusasetukset
|
||||||
Name[fi]=LxQt-työpöydän ilmoitusasetukset
|
Name[fi]=LXQt-työpöydän ilmoitusasetukset
|
||||||
Comment[fi]=Muokkaa LxQt-työpöydän ilmoituksia
|
Comment[fi]=Muokkaa LXQt-työpöydän ilmoituksia
|
||||||
|
4
config/translations/lxqt-config-notificationd_fr.desktop
Normal file
4
config/translations/lxqt-config-notificationd_fr.desktop
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Translations
|
||||||
|
Name[fr]=Paramétrage des notifications
|
||||||
|
GenericName[fr]=Paramétrage des notifications du bureau LXQt
|
||||||
|
Comment[fr]=Paramétrage des notifications du bureau LXQt
|
@ -1,3 +0,0 @@
|
|||||||
# Translations
|
|
||||||
GenericName[fr_FR]=Bloc-notes
|
|
||||||
Name[fr_FR]=Paramétreur de session LxQt
|
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[hu]=Alkalmazásmenü
|
GenericName[hu]=Az asztali értesítések beállítása
|
||||||
Name[hu]=LxQt beállítóközpont
|
Name[hu]=LXQt értesítések beállítása
|
||||||
Comment[hu]=A Freedesktop értesítések beállítása
|
Comment[hu]=A felbukkanó értesítések beállítása
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[id_ID]=Hell World
|
GenericName[id_ID]=Hell World
|
||||||
Name[id_ID]=Konfigurator Desktop LxQt
|
Name[id_ID]=Konfigurator Desktop LXQt
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[it]=Centro di Configurazione LxQt
|
GenericName[it]=Notifiche
|
||||||
Name[it]=Configura LxQt
|
Name[it]=Configura notifiche
|
||||||
|
Comment[it]=Configura le notifiche Freedesktop del Desktop LXQt
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
GenericName[it_IT]=Esci
|
|
||||||
Name[it_IT]=Esci dal sistema
|
|
||||||
Comment[it_IT]=Configura le notifiche freedesktop nel desktop LxQt
|
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[ja]=LxQtフリーデスクトップ通知の設定
|
GenericName[ja]=LXQtフリーデスクトップ通知の設定
|
||||||
Name[ja]=LxQtフリーデスクトップ通知の設定
|
Name[ja]=LXQtフリーデスクトップ通知の設定
|
||||||
Comment[ja]=LxQtデスクトップでフリーデスクトップ通知を設定
|
Comment[ja]=LXQtデスクトップでフリーデスクトップ通知を設定
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[lt]=Qlipper
|
GenericName[lt]=LXQt pranešimų nustatymai
|
||||||
Name[lt]=Energijos naudojimo nustatymai
|
Name[lt]=Darbalaukio pranešimai
|
||||||
Comment[lt]=Konfigūruoti freedesktop pranešimus LxQt darbalaukyje
|
Comment[lt]=Konfigūruoti darbalaukio pranešimus
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[nl]=Notepad
|
GenericName[nl]=Notepad
|
||||||
Name[nl]=Energiebeheer
|
Name[nl]=Energiebeheer
|
||||||
Comment[nl]=Configureren freedesktop meldingen in LxQt desktop
|
Comment[nl]=Configureren freedesktop meldingen in LXQt desktop
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[pl]=Menu
|
GenericName[pl]=Menu
|
||||||
Name[pl]=Panel sterowania LxQt
|
Name[pl]=Panel sterowania LXQt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[pl_PL]=Konfiguracja wyglądu LxQt
|
Name[pl_PL]=Powiadomienia ekranowe
|
||||||
Name[pl_PL]=Konfiguracja wyglądu LxQt
|
GenericName[pl_PL]=Ustawienia powiadomień LXQt
|
||||||
Comment[pl_PL]=Konfiguruj powiadomienia freedesktop w LxQt
|
Comment[pl_PL]=Konfiguruj powiadomienia ekranowe
|
||||||
|
@ -1,109 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE TS>
|
|
||||||
<TS version="2.0" language="pt">
|
|
||||||
<context>
|
|
||||||
<name>AdvancedSettings</name>
|
|
||||||
<message>
|
|
||||||
<source>Menu Configuration</source>
|
|
||||||
<translation>Configuração do menu</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Notification Duration</source>
|
|
||||||
<translation>Duração da notificação</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>For some the notification's expiration time is dependent on the notification server's settings.</source>
|
|
||||||
<translation>Para algumas notificações, o tempo limite depende das definições das notificações do servidor.</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>"Server Decides" Time:</source>
|
|
||||||
<translation>Tempo para "Decisão do servidor":</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source> sec</source>
|
|
||||||
<translation> seg</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Sizes</source>
|
|
||||||
<translation>Tamanhos</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Notification Spacing:</source>
|
|
||||||
<translation>Espaçamento da notificação:</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source> px</source>
|
|
||||||
<translation> px</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Notification Width:</source>
|
|
||||||
<translation>Largura da notificaçao:</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>BasicSettings</name>
|
|
||||||
<message>
|
|
||||||
<source>Basic Settings</source>
|
|
||||||
<translation>Definições básicas</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Display Notifications</source>
|
|
||||||
<translation>Mostrar notificações</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Top/Left</source>
|
|
||||||
<translation>Cima/Esquerda</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Top/Right</source>
|
|
||||||
<translation>Cima/Direita</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Bottom/Left</source>
|
|
||||||
<translation>Baixo/Esquerda</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Bottom/Right</source>
|
|
||||||
<translation>Baixo/Direita</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Test Notification</source>
|
|
||||||
<translation>Testar notificação</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source><b>Warning:</b> No notifications daemon is running.
|
|
||||||
A fallback will be used.</source>
|
|
||||||
<translation><b>Aviso:</b> o serviço de notificaçoes não está em execução.
|
|
||||||
Será utilizada uma solução alternativa.</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source><b>Warning:</b> A third-party notifications daemon (%1) is running.
|
|
||||||
These settings won't have an effect on it!</source>
|
|
||||||
<translation><b>Aviso:</b> já está a ser executado um serviço de notificações (%1).
|
|
||||||
Estas definições não produzirão qualquer efeito!</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Notification Summary</source>
|
|
||||||
<translation>Resumo da notificação</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Notification Body</source>
|
|
||||||
<translation>Corpo da notificação</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>MainWindow</name>
|
|
||||||
<message>
|
|
||||||
<source>Desktop Notifications</source>
|
|
||||||
<translation>Notificações do ambiente de trabalho</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Basic Settings</source>
|
|
||||||
<translation>Definições básicas</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Advanced Settings</source>
|
|
||||||
<translation>Definições avançadas</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
</TS>
|
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[pt_BR]=Suspender Automaticamente
|
GenericName[pt_BR]=Suspender Automaticamente
|
||||||
Name[pt_BR]=Gerenciamento de energia
|
Name[pt_BR]=Gerenciamento de energia
|
||||||
Comment[pt_BR]=Configurar as notificações do freedesktop na área de trabalho do LxQt
|
Comment[pt_BR]=Configurar as notificações do freedesktop na área de trabalho do LXQt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[ro_RO]=Părăsește
|
GenericName[ro_RO]=Părăsește
|
||||||
Name[ro_RO]=Părăsește sistemul
|
Name[ro_RO]=Părăsește sistemul
|
||||||
Comment[ro_RO]=Configurează notificările freedesktop în desktop-ul LxQt
|
Comment[ro_RO]=Configurează notificările freedesktop în desktop-ul LXQt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[ru]=Настройки уведомлений LxQt
|
GenericName[ru]=Настройки уведомлений LXQt
|
||||||
Name[ru]=Уведомления рабочего стола
|
Name[ru]=Уведомления рабочего стола
|
||||||
Comment[ru]=Настроить уведомления рабочего стола
|
Comment[ru]=Настроить уведомления рабочего стола
|
@ -1,125 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE TS>
|
|
||||||
<TS version="2.1" language="ru">
|
|
||||||
<context>
|
|
||||||
<name>AdvancedSettings</name>
|
|
||||||
<message>
|
|
||||||
<location filename="../advancedsettings.ui" line="17"/>
|
|
||||||
<source>Sizes</source>
|
|
||||||
<translation>Размеры</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../advancedsettings.ui" line="25"/>
|
|
||||||
<source>Width:</source>
|
|
||||||
<translation>Ширина:</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../advancedsettings.ui" line="32"/>
|
|
||||||
<location filename="../advancedsettings.ui" line="56"/>
|
|
||||||
<source> px</source>
|
|
||||||
<translation> пикс</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../advancedsettings.ui" line="49"/>
|
|
||||||
<source>Spacing:</source>
|
|
||||||
<translation>Расстояние:</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../advancedsettings.ui" line="68"/>
|
|
||||||
<source>Duration</source>
|
|
||||||
<translation>Длительность</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../advancedsettings.ui" line="74"/>
|
|
||||||
<source>Some notifications set their own on-screen duration.</source>
|
|
||||||
<translation>Некоторые уведомления сами устанавливают свою длительность на экране.</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../advancedsettings.ui" line="86"/>
|
|
||||||
<source>Default duration:</source>
|
|
||||||
<translation>Длительность по умолчанию:</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../advancedsettings.ui" line="93"/>
|
|
||||||
<source> sec</source>
|
|
||||||
<translation> сек</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>BasicSettings</name>
|
|
||||||
<message>
|
|
||||||
<location filename="../basicsettings.ui" line="23"/>
|
|
||||||
<source>Basic Settings</source>
|
|
||||||
<translation>Основные настройки</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../basicsettings.ui" line="30"/>
|
|
||||||
<source>Position on screen</source>
|
|
||||||
<translation>Расположение на экране</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../basicsettings.ui" line="36"/>
|
|
||||||
<source>Top/Left</source>
|
|
||||||
<translation>Вверху слева</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../basicsettings.ui" line="43"/>
|
|
||||||
<source>Top/Right</source>
|
|
||||||
<translation>Вверху справа</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../basicsettings.ui" line="50"/>
|
|
||||||
<source>Bottom/Left</source>
|
|
||||||
<translation>Внизу слева</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../basicsettings.ui" line="57"/>
|
|
||||||
<source>Bottom/Right</source>
|
|
||||||
<translation>Внизу справа</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../basicsettings.cpp" line="53"/>
|
|
||||||
<source><b>Warning:</b> No notifications daemon is running.
|
|
||||||
A fallback will be used.</source>
|
|
||||||
<translation><b>Внимание:</b> Демон уведомлений не запущен.
|
|
||||||
Будет использован резервный вариант.</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../basicsettings.cpp" line="59"/>
|
|
||||||
<source><b>Warning:</b> A third-party notifications daemon (%1) is running.
|
|
||||||
These settings won't have any effect on it!</source>
|
|
||||||
<translation><b>Внимание:</b> Демон уведомлений третьей сторон (%1) запущен.
|
|
||||||
Эти настройки не будут иметь никакого эффекта для него!</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../basicsettings.cpp" line="98"/>
|
|
||||||
<source>Notification demo</source>
|
|
||||||
<translation>Демонстрация уведомления</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../basicsettings.cpp" line="99"/>
|
|
||||||
<source>This is a test notification.
|
|
||||||
All notifications will now appear here on LXQt.</source>
|
|
||||||
<translation>Это тестовое уведомление.
|
|
||||||
Все уведомления на LXQt будут появляться здесь.</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>MainWindow</name>
|
|
||||||
<message>
|
|
||||||
<location filename="../mainwindow.cpp" line="40"/>
|
|
||||||
<source>Desktop Notifications</source>
|
|
||||||
<translation>Системные уведомления</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../mainwindow.cpp" line="43"/>
|
|
||||||
<source>Basic Settings</source>
|
|
||||||
<translation>Основные настройки</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../mainwindow.cpp" line="47"/>
|
|
||||||
<source>Advanced Settings</source>
|
|
||||||
<translation>Расширенные настройки</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
</TS>
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
GenericName[ru]=Настройки уведомлений LxQt
|
|
||||||
Name[ru]=Уведомления рабочего стола
|
|
||||||
Comment[ru]=Настроить уведомления рабочего стола
|
|
@ -1,125 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE TS>
|
|
||||||
<TS version="2.1" language="ru_RU">
|
|
||||||
<context>
|
|
||||||
<name>AdvancedSettings</name>
|
|
||||||
<message>
|
|
||||||
<location filename="../advancedsettings.ui" line="17"/>
|
|
||||||
<source>Sizes</source>
|
|
||||||
<translation>Размеры</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../advancedsettings.ui" line="25"/>
|
|
||||||
<source>Width:</source>
|
|
||||||
<translation>Ширина:</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../advancedsettings.ui" line="32"/>
|
|
||||||
<location filename="../advancedsettings.ui" line="56"/>
|
|
||||||
<source> px</source>
|
|
||||||
<translation> пикс</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../advancedsettings.ui" line="49"/>
|
|
||||||
<source>Spacing:</source>
|
|
||||||
<translation>Расстояние:</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../advancedsettings.ui" line="68"/>
|
|
||||||
<source>Duration</source>
|
|
||||||
<translation>Длительность</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../advancedsettings.ui" line="74"/>
|
|
||||||
<source>Some notifications set their own on-screen duration.</source>
|
|
||||||
<translation>Некоторые уведомления сами устанавливают свою длительность на экране.</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../advancedsettings.ui" line="86"/>
|
|
||||||
<source>Default duration:</source>
|
|
||||||
<translation>Длительность по умолчанию:</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../advancedsettings.ui" line="93"/>
|
|
||||||
<source> sec</source>
|
|
||||||
<translation> сек</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>BasicSettings</name>
|
|
||||||
<message>
|
|
||||||
<location filename="../basicsettings.ui" line="23"/>
|
|
||||||
<source>Basic Settings</source>
|
|
||||||
<translation>Основные настройки</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../basicsettings.ui" line="30"/>
|
|
||||||
<source>Position on screen</source>
|
|
||||||
<translation>Расположение на экране</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../basicsettings.ui" line="36"/>
|
|
||||||
<source>Top/Left</source>
|
|
||||||
<translation>Вверху слева</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../basicsettings.ui" line="43"/>
|
|
||||||
<source>Top/Right</source>
|
|
||||||
<translation>Вверху справа</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../basicsettings.ui" line="50"/>
|
|
||||||
<source>Bottom/Left</source>
|
|
||||||
<translation>Внизу слева</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../basicsettings.ui" line="57"/>
|
|
||||||
<source>Bottom/Right</source>
|
|
||||||
<translation>Внизу справа</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../basicsettings.cpp" line="53"/>
|
|
||||||
<source><b>Warning:</b> No notifications daemon is running.
|
|
||||||
A fallback will be used.</source>
|
|
||||||
<translation><b>Внимание:</b> Демон уведомлений не запущен.
|
|
||||||
Будет использован резервный вариант.</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../basicsettings.cpp" line="59"/>
|
|
||||||
<source><b>Warning:</b> A third-party notifications daemon (%1) is running.
|
|
||||||
These settings won't have any effect on it!</source>
|
|
||||||
<translation><b>Внимание:</b> Демон уведомлений третьей сторон (%1) запущен.
|
|
||||||
Эти настройки не будут иметь никакого эффекта для него!</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../basicsettings.cpp" line="98"/>
|
|
||||||
<source>Notification demo</source>
|
|
||||||
<translation>Демонстрация уведомления</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../basicsettings.cpp" line="99"/>
|
|
||||||
<source>This is a test notification.
|
|
||||||
All notifications will now appear here on LXQt.</source>
|
|
||||||
<translation>Это тестовое уведомление.
|
|
||||||
Все уведомления на LXQt будут появляться здесь.</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>MainWindow</name>
|
|
||||||
<message>
|
|
||||||
<location filename="../mainwindow.cpp" line="40"/>
|
|
||||||
<source>Desktop Notifications</source>
|
|
||||||
<translation>Системные уведомления</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../mainwindow.cpp" line="43"/>
|
|
||||||
<source>Basic Settings</source>
|
|
||||||
<translation>Основные настройки</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../mainwindow.cpp" line="47"/>
|
|
||||||
<source>Advanced Settings</source>
|
|
||||||
<translation>Расширенные настройки</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
</TS>
|
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[sl]=Nastavitve obvestil
|
GenericName[sl]=Nastavitve obvestil
|
||||||
Name[sl]=Nastavitve obvestil na namizju
|
Name[sl]=Nastavitve obvestil na namizju
|
||||||
Comment[sl]=Nastavite obvestila na namizju LxQt
|
Comment[sl]=Nastavite obvestila na namizju LXQt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[th_TH]=การตั้งค่าการเตือนต่างๆ ของ LxQt Freedesktop
|
GenericName[th_TH]=การตั้งค่าการเตือนต่างๆ ของ LXQt Freedesktop
|
||||||
Name[th_TH]=การตั้งค่าการเตือนต่างๆ ของ LxQt Freedesktop
|
Name[th_TH]=การตั้งค่าการเตือนต่างๆ ของ LXQt Freedesktop
|
||||||
Comment[th_TH]=ตั้งค่าการเตือนต่างๆ ของ freedesktop ในเดสก์ท็อป LxQt
|
Comment[th_TH]=ตั้งค่าการเตือนต่างๆ ของ freedesktop ในเดสก์ท็อป LXQt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[tr]=Not Defteri
|
GenericName[tr]=Not Defteri
|
||||||
Name[tr]=Güç yönetimi
|
Name[tr]=Güç yönetimi
|
||||||
Comment[tr]=LxQt masaüstünde freedesktop bildirimlerini ayarla
|
Comment[tr]=LXQt masaüstünde freedesktop bildirimlerini ayarla
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[uk]=Налаштування Freedesktop сповіщень LxQt
|
GenericName[uk]=Налаштування Freedesktop сповіщень LXQt
|
||||||
Name[uk]=Налаштування Freedesktop сповіщень LxQt
|
Name[uk]=Налаштування Freedesktop сповіщень LXQt
|
||||||
Comment[uk]=Налаштувати Freedesktop сповіщення в стільниці LxQt
|
Comment[uk]=Налаштувати Freedesktop сповіщення в стільниці LXQt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[zh_CN]=qxkb
|
GenericName[zh_CN]=qxkb
|
||||||
Name[zh_CN]=LxQt 通知配置
|
Name[zh_CN]=LXQt 通知配置
|
||||||
Comment[zh_CN]=配置 LxQt 桌面的通知
|
Comment[zh_CN]=配置 LXQt 桌面的通知
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[zh_TW]=LxQt通知設定
|
GenericName[zh_TW]=LXQt通知設定
|
||||||
Name[zh_TW]=LxQt通知設定
|
Name[zh_TW]=LXQt通知設定
|
||||||
Comment[zh_TW]=LxQt桌面上的FreeDesktop通知設定
|
Comment[zh_TW]=LXQt桌面上的FreeDesktop通知設定
|
||||||
|
@ -1,538 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Desktop Notifications Specification</title><link rel="stylesheet" href="docbook.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /></head><body><div class="article" title="Desktop Notifications Specification"><div class="titlepage"><div><div><h2 class="title"><a id="index"></a>Desktop Notifications Specification</h2></div><div><div class="authorgroup"><div class="author"><h3 class="author"><span class="firstname">Mike</span> <span class="surname">Hearn</span></h3><div class="affiliation"><div class="address"><p><br />
|
|
||||||
<code class="email"><<a class="email" href="mailto:mike@navi.cx">mike@navi.cx</a>></code><br />
|
|
||||||
</p></div></div></div><div class="author"><h3 class="author"><span class="firstname">Christian</span> <span class="surname">Hammond</span></h3><div class="affiliation"><div class="address"><p><br />
|
|
||||||
<code class="email"><<a class="email" href="mailto:chipx86@chipx86.com">chipx86@chipx86.com</a>></code><br />
|
|
||||||
</p></div></div></div><div class="author"><h3 class="author"><span class="firstname">William Jon</span> <span class="surname">McCann</span></h3><div class="affiliation"><div class="address"><p><br />
|
|
||||||
<code class="email"><<a class="email" href="mailto:jmccann@redhat.com">jmccann@redhat.com</a>></code><br />
|
|
||||||
</p></div></div></div></div></div><div><p class="releaseinfo">Version 1.2</p></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#introduction">Introduction</a></span></dt><dt><span class="sect1"><a href="#basic-design">Basic Design</a></span></dt><dt><span class="sect1"><a href="#backwards-compat">Backwards Compatibility</a></span></dt><dt><span class="sect1"><a href="#markup">Markup</a></span></dt><dd><dl><dt><span class="sect2"><a href="#hyperlinks">Hyperlinks</a></span></dt><dt><span class="sect2"><a href="#images">Images</a></span></dt></dl></dd><dt><span class="sect1"><a href="#icons-and-images">Icons and Images</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id2776582">Priorities</a></span></dt><dt><span class="sect2"><a href="#icons-and-images-formats">Formats</a></span></dt></dl></dd><dt><span class="sect1"><a href="#categories">Categories</a></span></dt><dt><span class="sect1"><a href="#urgency-levels">Urgency Levels</a></span></dt><dt><span class="sect1"><a href="#hints">Hints</a></span></dt><dt><span class="sect1"><a href="#protocol">D-BUS Protocol</a></span></dt><dd><dl><dt><span class="sect2"><a href="#commands">Message commands</a></span></dt><dt><span class="sect2"><a href="#signals">Signals</a></span></dt></dl></dd></dl></div><div class="sect1" title="Introduction"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="introduction"></a>Introduction</h2></div></div></div><p>
|
|
||||||
This is a draft standard for a desktop notifications service,
|
|
||||||
through which applications can generate passive popups to notify
|
|
||||||
the user in an asynchronous manner of events.
|
|
||||||
</p><p>
|
|
||||||
This specification explicitly does not include other types of
|
|
||||||
notification presentation such as modal message boxes, window manager
|
|
||||||
decorations or window list annotations.
|
|
||||||
</p><p>
|
|
||||||
Example use cases include:
|
|
||||||
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Messages from chat programs</p></li><li class="listitem"><p>Scheduled alarm</p></li><li class="listitem"><p>Completed file transfer</p></li><li class="listitem"><p>New mail notification</p></li><li class="listitem"><p>Low disk space/battery warnings</p></li></ul></div></div><div class="sect1" title="Basic Design"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="basic-design"></a>Basic Design</h2></div></div></div><p>
|
|
||||||
In order to ensure that multiple notifications can easily be
|
|
||||||
displayed at once, and to provide a convenient implementation, all
|
|
||||||
notifications are controlled by a single session-scoped service which
|
|
||||||
exposes a D-BUS interface.
|
|
||||||
</p><p>
|
|
||||||
On startup, a conforming implementation should take the
|
|
||||||
<code class="literal">org.freedesktop.Notifications</code> service on
|
|
||||||
the session bus. This service will be referred to as the "notification
|
|
||||||
server" or just "the server" in this document. It can optionally be
|
|
||||||
activated automatically by the bus process, however this is not required
|
|
||||||
and notification server clients must not assume that it is available.
|
|
||||||
</p><p>
|
|
||||||
The server should implement the
|
|
||||||
<code class="literal">org.freedesktop.Notifications</code> interface on
|
|
||||||
an object with the path <code class="literal">"/org/freedesktop/Notifications"</code>.
|
|
||||||
This is the only interface required by this version of the specification.
|
|
||||||
</p><p>
|
|
||||||
A notification has the following components:
|
|
||||||
</p><div class="table"><a id="id2780838"></a><p class="title"><b>Table 1. Notification Components</b></p><div class="table-contents"><table summary="Notification Components" border="1"><colgroup><col /><col /></colgroup><thead><tr><th>Component</th><th>Description</th></tr></thead><tbody valign="top"><tr><td valign="top">Application Name</td><td valign="top">
|
|
||||||
This is the optional name of the application sending the notification.
|
|
||||||
This should be the application's formal name, rather than some sort
|
|
||||||
of ID. An example would be "FredApp E-Mail Client," rather than
|
|
||||||
"fredapp-email-client."
|
|
||||||
</td></tr><tr><td valign="top">Replaces ID</td><td valign="top">
|
|
||||||
An optional ID of an existing notification that this
|
|
||||||
notification is intended to replace.
|
|
||||||
</td></tr><tr><td valign="top">Notification Icon</td><td valign="top">
|
|
||||||
The notification icon. See <a class="xref" href="#icons-and-images-formats" title="Formats">Icons and Images Formats</a>.
|
|
||||||
</td></tr><tr><td valign="top">Summary</td><td valign="top">
|
|
||||||
This is a single line overview of the notification. For instance,
|
|
||||||
"You have mail" or "A friend has come online". It should generally
|
|
||||||
not be longer than 40 characters, though this is not a requirement,
|
|
||||||
and server implementations should word wrap if necessary. The summary
|
|
||||||
must be encoded using UTF-8.
|
|
||||||
</td></tr><tr><td valign="top">Body</td><td valign="top">
|
|
||||||
<p>
|
|
||||||
This is a multi-line body of text. Each line is a paragraph, server
|
|
||||||
implementations are free to word wrap them as they see fit.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The body may contain simple markup as specified in
|
|
||||||
<a class="xref" href="#markup" title="Markup">Markup</a>. It must be encoded using UTF-8.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
If the body is omitted, just the summary is displayed.
|
|
||||||
</p>
|
|
||||||
</td></tr><tr><td valign="top">Actions</td><td valign="top">
|
|
||||||
<p>
|
|
||||||
The actions send a request message back to the notification client
|
|
||||||
when invoked. This functionality may not be implemented by the
|
|
||||||
notification server, conforming clients should check if it is available
|
|
||||||
before using it (see the GetCapabilities message in
|
|
||||||
<a class="xref" href="#protocol" title="D-BUS Protocol">Protocol</a>). An implementation is free to ignore any
|
|
||||||
requested by the client. As an example one possible rendering of
|
|
||||||
actions would be as buttons in the notification popup.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Actions are sent over as a list of pairs. Each even element in the
|
|
||||||
list (starting at index 0) represents the identifier for the action.
|
|
||||||
Each odd element in the list is the localized string that will be
|
|
||||||
displayed to the user.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The default action (usually invoked my clicking the notification)
|
|
||||||
should have a key named <code class="literal">"default"</code>. The name can
|
|
||||||
be anything, though implementations are free not to display it.
|
|
||||||
</p>
|
|
||||||
</td></tr><tr><td valign="top">Hints</td><td valign="top">
|
|
||||||
<p>
|
|
||||||
Hints are a way to provide extra data to a notification server that
|
|
||||||
the server may be able to make use of.
|
|
||||||
</p>
|
|
||||||
<p>See <a class="xref" href="#hints" title="Hints">Hints</a> for a list of available hints.</p>
|
|
||||||
</td></tr><tr><td valign="top">Expiration Timeout</td><td valign="top">
|
|
||||||
<p>
|
|
||||||
The timeout time in milliseconds since the display of the notification
|
|
||||||
at which the notification should automatically close.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
If -1, the notification's expiration time is dependent on the
|
|
||||||
notification server's settings, and may vary for the type of
|
|
||||||
notification.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
If 0, the notification never expires.
|
|
||||||
</p>
|
|
||||||
</td></tr></tbody></table></div></div><br class="table-break" /><p>
|
|
||||||
Each notification displayed is allocated a unique ID by the server.
|
|
||||||
This is unique within the session. While the notification server is
|
|
||||||
running, the ID will not be recycled unless the capacity of a uint32 is
|
|
||||||
exceeded.
|
|
||||||
</p><p>
|
|
||||||
This can be used to hide the notification before the expiration timeout
|
|
||||||
is reached. It can also be used to atomically replace the notification
|
|
||||||
with another. This allows you to (for instance) modify the contents of
|
|
||||||
a notification while it's on-screen.
|
|
||||||
</p></div><div class="sect1" title="Backwards Compatibility"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="backwards-compat"></a>Backwards Compatibility</h2></div></div></div><p>
|
|
||||||
Clients should try and avoid making assumptions about the presentation and
|
|
||||||
abilities of the notification server. The message content is the most
|
|
||||||
important thing.
|
|
||||||
</p><p>
|
|
||||||
Clients can check with the server what capabilities are supported
|
|
||||||
using the <code class="literal">GetCapabilities</code> message. See
|
|
||||||
<a class="xref" href="#protocol" title="D-BUS Protocol">Protocol</a>.
|
|
||||||
</p><p>
|
|
||||||
If a client requires a response from a passive popup, it should be
|
|
||||||
coded such that a non-focus-stealing message box can be used in the
|
|
||||||
case that the notification server does not support this feature.
|
|
||||||
</p></div><div class="sect1" title="Markup"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="markup"></a>Markup</h2></div></div></div><p>
|
|
||||||
Body text may contain markup. The markup is XML-based, and consists
|
|
||||||
of a small subset of HTML along with a few additional tags.
|
|
||||||
</p><p>
|
|
||||||
The following tags should be supported by the notification server.
|
|
||||||
Though it is optional, it is recommended. Notification servers that do
|
|
||||||
not support these tags should filter them out.
|
|
||||||
</p><div class="informaltable"><table border="1"><colgroup><col /><col /></colgroup><tbody valign="top"><tr><td valign="top">
|
|
||||||
<code class="sgmltag-starttag"><b></code> ...
|
|
||||||
<code class="sgmltag-endtag"></b></code>
|
|
||||||
</td><td valign="top">Bold</td></tr><tr><td valign="top">
|
|
||||||
<code class="sgmltag-starttag"><i></code> ...
|
|
||||||
<code class="sgmltag-endtag"></i></code>
|
|
||||||
</td><td valign="top">Italic</td></tr><tr><td valign="top">
|
|
||||||
<code class="sgmltag-starttag"><u></code> ...
|
|
||||||
<code class="sgmltag-endtag"></u></code>
|
|
||||||
</td><td valign="top">Underline</td></tr><tr><td valign="top">
|
|
||||||
<code class="sgmltag-starttag"><a href="..."></code> ...
|
|
||||||
<code class="sgmltag-endtag"></a></code>
|
|
||||||
</td><td valign="top">Hyperlink</td></tr><tr><td valign="top">
|
|
||||||
<code class="sgmltag-emptytag"><img src="..." alt="..."/></code>
|
|
||||||
</td><td valign="top">Image</td></tr></tbody></table></div><p>
|
|
||||||
A full-blown HTML implementation is not required of this spec, and
|
|
||||||
notifications should never take advantage of tags that are not listed
|
|
||||||
above. As notifications are not a substitute for web browsers or complex
|
|
||||||
dialogs, advanced layout is not necessary, and may in fact limit the
|
|
||||||
number of systems that notification services can run on, due to memory
|
|
||||||
usage and screen space. Such examples are PDAs, certain cell phones, and
|
|
||||||
slow PCs or laptops with little memory.
|
|
||||||
</p><p>
|
|
||||||
For the same reason, a full XML or XHTML implementation using XSLT or
|
|
||||||
CSS stylesheets is not part of this specification. Information that
|
|
||||||
must be presented in a more complex form should use an application-specific
|
|
||||||
dialog, a web browser, or some other display mechanism.
|
|
||||||
</p><p>
|
|
||||||
The tags specified above mark up the content in a way that allows them
|
|
||||||
to be stripped out on some implementations without impacting the actual
|
|
||||||
content.
|
|
||||||
</p><div class="sect2" title="Hyperlinks"><div class="titlepage"><div><div><h3 class="title"><a id="hyperlinks"></a>Hyperlinks</h3></div></div></div><p>
|
|
||||||
Hyperlinks allow for linking one or more words to a URI. There is no
|
|
||||||
requirement to allow for images to be linked, and it is highly suggested
|
|
||||||
that implementations do not allow this, as there is no clean-looking,
|
|
||||||
standard visual indicator for a hyperlinked image.
|
|
||||||
</p><p>
|
|
||||||
Hyperlinked text should appear in the standard blue underline format.
|
|
||||||
</p><p>
|
|
||||||
Hyperlinks cannot function as a replacement for actions. They are
|
|
||||||
used to link to local directories or remote sites using standard URI
|
|
||||||
schemes.
|
|
||||||
</p><p>
|
|
||||||
Implementations are not required to support hyperlinks.
|
|
||||||
</p></div><div class="sect2" title="Images"><div class="titlepage"><div><div><h3 class="title"><a id="images"></a>Images</h3></div></div></div><p>
|
|
||||||
Images may be placed in the notification, but this should be done with
|
|
||||||
caution. The image should never exceed 200x100, but this should be thought
|
|
||||||
of as a maximum size. Images should always have alternative text
|
|
||||||
provided through the <code class="literal">alt="..."</code> attribute.
|
|
||||||
</p><p>
|
|
||||||
Image data cannot be embedded in the message itself. Images referenced
|
|
||||||
must always be local files.
|
|
||||||
</p><p>
|
|
||||||
Implementations are not required to support images.
|
|
||||||
</p></div></div><div class="sect1" title="Icons and Images"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="icons-and-images"></a>Icons and Images</h2></div></div></div><p>
|
|
||||||
A notification can optionally have an associated icon and/or image.
|
|
||||||
</p><p>
|
|
||||||
The icon is defined by the "app_icon" parameter.
|
|
||||||
The image can be defined by the "image-path", the "image-data" hint or the
|
|
||||||
deprecated "icon_data" hint.
|
|
||||||
</p><div class="sect2" title="Priorities"><div class="titlepage"><div><div><h3 class="title"><a id="id2776582"></a>Priorities</h3></div></div></div><p>
|
|
||||||
An implementation which only displays one image or icon must choose which one
|
|
||||||
to display using the following order:
|
|
||||||
</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>"image-data"</p></li><li class="listitem"><p>"image-path"</p></li><li class="listitem"><p>app_icon parameter</p></li><li class="listitem"><p>for compatibility reason, "icon_data"</p></li></ol></div><p>
|
|
||||||
</p><p>
|
|
||||||
An implementation which can display both the image and icon must show the
|
|
||||||
icon from the "app_icon" parameter and choose which image to display using
|
|
||||||
the following order:
|
|
||||||
</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>"image-data"</p></li><li class="listitem"><p>"image-path"</p></li><li class="listitem"><p>for compatibility reason, "icon_data"</p></li></ol></div><p>
|
|
||||||
</p></div><div class="sect2" title="Formats"><div class="titlepage"><div><div><h3 class="title"><a id="icons-and-images-formats"></a>Formats</h3></div></div></div><p>
|
|
||||||
The "image-data" and "icon_data" hints should be a raw image data structure
|
|
||||||
of signature (iiibiiay) which describes the width, height, rowstride, has
|
|
||||||
alpha, bits per sample, channels and image data respectively.
|
|
||||||
</p><p>
|
|
||||||
The "app_icon" parameter and "image-path" hint should be either an URI
|
|
||||||
(file:// is the only URI schema supported right now) or a name in a
|
|
||||||
freedesktop.org-compliant icon theme (not a GTK+ stock ID).
|
|
||||||
</p></div></div><div class="sect1" title="Categories"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="categories"></a>Categories</h2></div></div></div><p>
|
|
||||||
Notifications can optionally have a type indicator. Although neither
|
|
||||||
client or nor server must support this, some may choose to. Those servers
|
|
||||||
implementing categories may use them to intelligently display
|
|
||||||
the notification in a certain way, or group notifications of similar
|
|
||||||
types.
|
|
||||||
</p><p>
|
|
||||||
Categories are in
|
|
||||||
<code class="literal"><em class="replaceable"><code>class.specific</code></em></code> form.
|
|
||||||
<code class="literal">class</code> specifies the generic type of notification, and
|
|
||||||
<code class="literal">specific</code> specifies the more specific type of
|
|
||||||
notification.
|
|
||||||
</p><p>
|
|
||||||
If a specific type of notification does not exist for your notification,
|
|
||||||
but the generic kind does, a notification of type
|
|
||||||
<code class="literal"><em class="replaceable"><code>class</code></em></code> is acceptable.
|
|
||||||
</p><p>
|
|
||||||
Third parties, when defining their own categories, should discuss
|
|
||||||
the possibility of standardizing on the hint with other parties, preferably
|
|
||||||
in a place such as the
|
|
||||||
<a class="ulink" href="http://freedesktop.org/mailman/listinfo/xdg" target="_top">xdg</a>
|
|
||||||
mailing list at
|
|
||||||
<a class="ulink" href="http://freedesktop.org/" target="_top">freedesktop.org</a>. If it
|
|
||||||
warrants a standard, it will be added to the table above. If no
|
|
||||||
consensus is reached, the category should be in the form of
|
|
||||||
"<code class="literal">x-<em class="replaceable"><code>vendor</code></em>.<em class="replaceable"><code>class</code></em>.<em class="replaceable"><code>name</code></em></code>."
|
|
||||||
</p><p>
|
|
||||||
The following table lists standard notifications as defined by this spec.
|
|
||||||
More will be added in time.
|
|
||||||
</p><div class="table"><a id="id2776772"></a><p class="title"><b>Table 2. Categories</b></p><div class="table-contents"><table summary="Categories" border="1"><colgroup><col /><col /></colgroup><thead><tr><th>Type</th><th>Description</th></tr></thead><tbody valign="top"><tr><td valign="top"><code class="literal">"device"</code></td><td valign="top">
|
|
||||||
A generic device-related notification that doesn't fit into
|
|
||||||
any other category.
|
|
||||||
</td></tr><tr><td valign="top"><code class="literal">"device.added"</code></td><td valign="top">A device, such as a USB device, was added to the system.</td></tr><tr><td valign="top"><code class="literal">"device.error"</code></td><td valign="top">A device had some kind of error.</td></tr><tr><td valign="top"><code class="literal">"device.removed"</code></td><td valign="top">
|
|
||||||
A device, such as a USB device, was removed from the system.
|
|
||||||
</td></tr><tr><td valign="top"><code class="literal">"email"</code></td><td valign="top">
|
|
||||||
A generic e-mail-related notification that doesn't fit into any
|
|
||||||
other category.
|
|
||||||
</td></tr><tr><td valign="top"><code class="literal">"email.arrived"</code></td><td valign="top">A new e-mail notification.</td></tr><tr><td valign="top"><code class="literal">"email.bounced"</code></td><td valign="top">A notification stating that an e-mail has bounced.</td></tr><tr><td valign="top"><code class="literal">"im"</code></td><td valign="top">
|
|
||||||
A generic instant message-related notification that doesn't fit
|
|
||||||
into any other category.
|
|
||||||
</td></tr><tr><td valign="top"><code class="literal">"im.error"</code></td><td valign="top">An instant message error notification.</td></tr><tr><td valign="top"><code class="literal">"im.received"</code></td><td valign="top">A received instant message notification.</td></tr><tr><td valign="top"><code class="literal">"network"</code></td><td valign="top">
|
|
||||||
A generic network notification that doesn't fit into any other
|
|
||||||
category.
|
|
||||||
</td></tr><tr><td valign="top"><code class="literal">"network.connected"</code></td><td valign="top">
|
|
||||||
A network connection notification, such as successful sign-on to a
|
|
||||||
network service. This should not be confused with
|
|
||||||
<code class="literal">device.added</code> for new network devices.
|
|
||||||
</td></tr><tr><td valign="top"><code class="literal">"network.disconnected"</code></td><td valign="top">
|
|
||||||
A network disconnected notification. This should not be confused with
|
|
||||||
<code class="literal">device.removed</code> for disconnected network devices.
|
|
||||||
</td></tr><tr><td valign="top"><code class="literal">"network.error"</code></td><td valign="top">
|
|
||||||
A network-related or connection-related error.
|
|
||||||
</td></tr><tr><td valign="top"><code class="literal">"presence"</code></td><td valign="top">
|
|
||||||
A generic presence change notification that doesn't fit into
|
|
||||||
any other category, such as going away or idle.
|
|
||||||
</td></tr><tr><td valign="top"><code class="literal">"presence.offline"</code></td><td valign="top">An offline presence change notification.</td></tr><tr><td valign="top"><code class="literal">"presence.online"</code></td><td valign="top">An online presence change notification.</td></tr><tr><td valign="top"><code class="literal">"transfer"</code></td><td valign="top">
|
|
||||||
A generic file transfer or download notification that doesn't fit
|
|
||||||
into any other category.
|
|
||||||
</td></tr><tr><td valign="top"><code class="literal">"transfer.complete"</code></td><td valign="top">A file transfer or download complete notification.</td></tr><tr><td valign="top"><code class="literal">"transfer.error"</code></td><td valign="top">A file transfer or download error.</td></tr></tbody></table></div></div><br class="table-break" /></div><div class="sect1" title="Urgency Levels"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="urgency-levels"></a>Urgency Levels</h2></div></div></div><p>
|
|
||||||
Notifications have an urgency level associated with them. This defines
|
|
||||||
the importance of the notification. For example, "Joe Bob signed on"
|
|
||||||
would be a low urgency. "You have new mail" or "A USB device was unplugged"
|
|
||||||
would be a normal urgency. "Your computer is on fire" would be a critical
|
|
||||||
urgency.
|
|
||||||
</p><p>Urgency levels are defined as follows:</p><div class="table"><a id="id2824982"></a><p class="title"><b>Table 3. Urgency Levels</b></p><div class="table-contents"><table summary="Urgency Levels" border="1"><colgroup><col /><col /></colgroup><thead><tr><th>Type</th><th>Description</th></tr></thead><tbody valign="top"><tr><td valign="top">0</td><td valign="top">Low</td></tr><tr><td valign="top">1</td><td valign="top">Normal</td></tr><tr><td valign="top">2</td><td valign="top">Critical</td></tr></tbody></table></div></div><br class="table-break" /><p>
|
|
||||||
Developers must use their own judgement when deciding the urgency of a
|
|
||||||
notification. Typically, if the majority of programs are using the same
|
|
||||||
level for a specific type of urgency, other applications should follow
|
|
||||||
them.
|
|
||||||
</p><p>
|
|
||||||
For low and normal urgencies, server implementations may display the
|
|
||||||
notifications how they choose. They should, however, have a sane
|
|
||||||
expiration timeout dependent on the urgency level.
|
|
||||||
</p><p>
|
|
||||||
Critical notifications should not automatically expire, as they are
|
|
||||||
things that the user will most likely want to know about. They should
|
|
||||||
only be closed when the user dismisses them, for example, by clicking on
|
|
||||||
the notification.
|
|
||||||
</p></div><div class="sect1" title="Hints"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="hints"></a>Hints</h2></div></div></div><p>
|
|
||||||
Hints are a way to provide extra data to a notification server that
|
|
||||||
the server may be able to make use of.
|
|
||||||
</p><p>
|
|
||||||
Neither clients nor notification servers are required to support any
|
|
||||||
hints. Both sides should assume that hints are not passed, and should
|
|
||||||
ignore any hints they do not understand.
|
|
||||||
</p><p>
|
|
||||||
Third parties, when defining their own hints, should discuss the
|
|
||||||
possibility of standardizing on the hint with other parties, preferably
|
|
||||||
in a place such as the
|
|
||||||
<a class="ulink" href="http://freedesktop.org/mailman/listinfo/xdg" target="_top">xdg</a>
|
|
||||||
mailing list at
|
|
||||||
<a class="ulink" href="http://freedesktop.org/" target="_top">freedesktop.org</a>. If it
|
|
||||||
warrants a standard, it will be added to the table above. If no
|
|
||||||
consensus is reached, the hint name should be in the form of
|
|
||||||
<code class="literal">"x-<em class="replaceable"><code>vendor</code></em>-<em class="replaceable"><code>name</code></em>."</code>
|
|
||||||
</p><p>
|
|
||||||
The value type for the hint dictionary in D-BUS is of the
|
|
||||||
<code class="literal">DBUS_TYPE_VARIANT</code> container type. This allows different
|
|
||||||
data types (string, integer, boolean, etc.) to be used for hints. When
|
|
||||||
adding a dictionary of hints, this type must be used, rather than putting
|
|
||||||
the actual hint value in as the dictionary value.
|
|
||||||
</p><p>
|
|
||||||
The following table lists the standard hints as defined by this
|
|
||||||
specification. Future hints may be proposed and added to this list
|
|
||||||
over time. Once again, implementations are not required to support these.
|
|
||||||
</p><div class="table"><a id="id2825136"></a><p class="title"><b>Table 4. Standard Hints</b></p><div class="table-contents"><table summary="Standard Hints" border="1"><colgroup><col /><col /></colgroup><thead><tr><th>Name</th><th>Value Type</th><th>Description</th><th>Spec Version</th></tr></thead><tbody valign="top"><tr><td valign="top"><code class="literal">"action-icons"</code></td><td valign="top">boolean</td><td valign="top">
|
|
||||||
When set, a server that has the "action-icons" capability will
|
|
||||||
attempt to interpret any action identifier as a named icon.
|
|
||||||
The localized display name will be used to annotate the icon
|
|
||||||
for accessibility purposes. The icon name should be compliant
|
|
||||||
with the Freedesktop.org Icon Naming Specification.
|
|
||||||
</td><td valign="top">>= 1.2</td></tr><tr><td valign="top"><code class="literal">"category"</code></td><td valign="top">string</td><td valign="top">
|
|
||||||
The type of notification this is.
|
|
||||||
</td><td valign="top"> </td></tr><tr><td valign="top"><code class="literal">"desktop-entry"</code></td><td valign="top">string</td><td valign="top">
|
|
||||||
This specifies the name of the desktop filename representing the
|
|
||||||
calling program. This should be the same as the prefix used for the
|
|
||||||
application's .desktop file. An example would be "rhythmbox" from
|
|
||||||
"rhythmbox.desktop". This can be used by the daemon to retrieve the
|
|
||||||
correct icon for the application, for logging purposes, etc.
|
|
||||||
</td><td valign="top"> </td></tr><tr><td valign="top"><code class="literal">"image-data"</code></td><td valign="top">(iiibiiay)</td><td valign="top">
|
|
||||||
This is a raw data image format which describes the width, height,
|
|
||||||
rowstride, has alpha, bits per sample, channels and image data
|
|
||||||
respectively.
|
|
||||||
</td><td valign="top">>= 1.2</td></tr><tr><td valign="top"><code class="literal">"image_data"</code></td><td valign="top">(iiibiiay)</td><td valign="top">
|
|
||||||
<span class="emphasis"><em>Deprecated</em></span>. Use image-data instead.
|
|
||||||
</td><td valign="top">= 1.1</td></tr><tr><td valign="top"><code class="literal">"image-path"</code></td><td valign="top">string</td><td valign="top">
|
|
||||||
Alternative way to define the notification image. See <a class="xref" href="#icons-and-images" title="Icons and Images">Icons and Images</a>.
|
|
||||||
</td><td valign="top">>= 1.2</td></tr><tr><td valign="top"><code class="literal">"image_path"</code></td><td valign="top">string</td><td valign="top">
|
|
||||||
<span class="emphasis"><em>Deprecated</em></span>. Use image-path instead.
|
|
||||||
</td><td valign="top">= 1.1</td></tr><tr><td valign="top"><code class="literal">"icon_data"</code></td><td valign="top">(iiibiiay)</td><td valign="top">
|
|
||||||
<span class="emphasis"><em>Deprecated</em></span>. Use image-data instead.
|
|
||||||
</td><td valign="top">< 1.1</td></tr><tr><td valign="top"><code class="literal">"resident"</code></td><td valign="top">boolean</td><td valign="top">
|
|
||||||
When set the server will not automatically remove the
|
|
||||||
notification when an action has been invoked. The notification
|
|
||||||
will remain resident in the server until it is explicitly
|
|
||||||
removed by the user or by the sender. This hint is likely only
|
|
||||||
useful when the server has the "persistence" capability.
|
|
||||||
</td><td valign="top">>= 1.2</td></tr><tr><td valign="top"><code class="literal">"sound-file"</code></td><td valign="top">string</td><td valign="top">
|
|
||||||
The path to a sound file to play when the notification pops up.
|
|
||||||
</td><td valign="top"> </td></tr><tr><td valign="top"><code class="literal">"sound-name"</code></td><td valign="top">string</td><td valign="top">
|
|
||||||
A themeable named sound from the freedesktop.org
|
|
||||||
<a class="ulink" href="http://0pointer.de/public/sound-naming-spec.html" target="_top">sound naming specification</a>
|
|
||||||
to play when the notification pops up. Similar to icon-name, only for
|
|
||||||
sounds. An example would be "message-new-instant".
|
|
||||||
</td><td valign="top"> </td></tr><tr><td valign="top"><code class="literal">"suppress-sound"</code></td><td valign="top">boolean</td><td valign="top">
|
|
||||||
Causes the server to suppress playing any sounds, if it has that
|
|
||||||
ability. This is usually set when the client itself is going to
|
|
||||||
play its own sound.
|
|
||||||
</td><td valign="top"> </td></tr><tr><td valign="top"><code class="literal">"transient"</code></td><td valign="top">boolean</td><td valign="top">
|
|
||||||
When set the server will treat the notification as transient
|
|
||||||
and by-pass the server's persistence capability, if it should
|
|
||||||
exist.
|
|
||||||
</td><td valign="top">>= 1.2</td></tr><tr><td valign="top"><code class="literal">"x"</code></td><td valign="top">int</td><td valign="top">
|
|
||||||
Specifies the X location on the screen that the notification should
|
|
||||||
point to. The <code class="literal">"y"</code> hint must also be specified.
|
|
||||||
</td><td valign="top"> </td></tr><tr><td valign="top"><code class="literal">"y"</code></td><td valign="top">int</td><td valign="top">
|
|
||||||
Specifies the Y location on the screen that the notification should
|
|
||||||
point to. The <code class="literal">"x"</code> hint must also be specified.
|
|
||||||
</td><td valign="top"> </td></tr><tr><td valign="top"><code class="literal">"urgency"</code></td><td valign="top">byte</td><td valign="top">
|
|
||||||
The urgency level.
|
|
||||||
</td><td valign="top"> </td></tr></tbody></table></div></div><br class="table-break" /></div><div class="sect1" title="D-BUS Protocol"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="protocol"></a>D-BUS Protocol</h2></div></div></div><p>
|
|
||||||
The following messages <span class="emphasis"><em>must</em></span> be supported by all
|
|
||||||
implementations.
|
|
||||||
</p><div class="sect2" title="Message commands"><div class="titlepage"><div><div><h3 class="title"><a id="commands"></a>Message commands</h3></div></div></div><div class="sect3" title="org.freedesktop.Notifications.GetCapabilities"><div class="titlepage"><div><div><h4 class="title"><a id="command-get-capabilities"></a><code class="literal">org.freedesktop.Notifications.GetCapabilities</code></h4></div></div></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">STRING_ARRAY
|
|
||||||
<b class="fsfunc">org.freedesktop.Notifications.GetCapabilities</b>
|
|
||||||
(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="funcprototype-spacer"> </div></div><p>
|
|
||||||
This message takes no parameters.
|
|
||||||
</p><p>
|
|
||||||
It returns an array of strings. Each string describes an optional
|
|
||||||
capability implemented by the server. The following values are
|
|
||||||
defined by this spec:
|
|
||||||
</p><div class="table"><a id="id2825605"></a><p class="title"><b>Table 5. Server Capabilities</b></p><div class="table-contents"><table summary="Server Capabilities" border="1"><colgroup><col /><col /></colgroup><tbody valign="top"><tr><td valign="top"><code class="literal">"action-icons"</code></td><td valign="top">
|
|
||||||
Supports using icons instead of text for displaying actions.
|
|
||||||
Using icons for actions must be enabled on a per-notification
|
|
||||||
basis using the "action-icons" hint.
|
|
||||||
</td></tr><tr><td valign="top"><code class="literal">"actions"</code></td><td valign="top">
|
|
||||||
The server will provide the specified actions to the user. Even if
|
|
||||||
this cap is missing, actions may still be specified by the client,
|
|
||||||
however the server is free to ignore them.
|
|
||||||
</td></tr><tr><td valign="top"><code class="literal">"body"</code></td><td valign="top">
|
|
||||||
Supports body text. Some implementations may only show the
|
|
||||||
summary (for instance, onscreen displays, marquee/scrollers)
|
|
||||||
</td></tr><tr><td valign="top"><code class="literal">"body-hyperlinks"</code></td><td valign="top">
|
|
||||||
The server supports hyperlinks in the notifications.
|
|
||||||
</td></tr><tr><td valign="top"><code class="literal">"body-images"</code></td><td valign="top">
|
|
||||||
The server supports images in the notifications.
|
|
||||||
</td></tr><tr><td valign="top"><code class="literal">"body-markup"</code></td><td valign="top">
|
|
||||||
Supports markup in the body text. If marked up text is sent
|
|
||||||
to a server that does not give this cap, the markup will show
|
|
||||||
through as regular text so must be stripped clientside.
|
|
||||||
</td></tr><tr><td valign="top"><code class="literal">"icon-multi"</code></td><td valign="top">
|
|
||||||
The server will render an animation of all the frames in a given
|
|
||||||
image array. The client may still specify multiple frames even if
|
|
||||||
this cap and/or <code class="literal">"icon-static"</code> is missing, however
|
|
||||||
the server is free to ignore them and use only the primary frame.
|
|
||||||
</td></tr><tr><td valign="top"><code class="literal">"icon-static"</code></td><td valign="top">
|
|
||||||
Supports display of exactly 1 frame of any given image array.
|
|
||||||
This value is mutually exclusive with
|
|
||||||
<code class="literal">"icon-multi"</code>, it is a protocol error for the
|
|
||||||
server to specify both.
|
|
||||||
</td></tr><tr><td valign="top"><code class="literal">"persistence"</code></td><td valign="top">
|
|
||||||
The server supports persistence of notifications.
|
|
||||||
Notifications will be retained until they are acknowledged or
|
|
||||||
removed by the user or recalled by the sender. The presence
|
|
||||||
of this capability allows clients to depend on the server to
|
|
||||||
ensure a notification is seen and eliminate the need for
|
|
||||||
the client to display a reminding function (such as a status
|
|
||||||
icon) of its own.
|
|
||||||
</td></tr><tr><td valign="top"><code class="literal">"sound"</code></td><td valign="top">
|
|
||||||
The server supports sounds on notifications. If returned, the
|
|
||||||
server must support the <code class="literal">"sound-file"</code> and
|
|
||||||
<code class="literal">"suppress-sound"</code> hints.
|
|
||||||
</td></tr></tbody></table></div></div><br class="table-break" /><p>
|
|
||||||
New vendor-specific caps may be specified as long as they start with
|
|
||||||
<code class="literal">"x-<em class="replaceable"><code>vendor</code></em>"</code>. For instance,
|
|
||||||
<code class="literal">"x-gnome-foo-cap"</code>. Capability names must not
|
|
||||||
contain spaces. They are limited to alpha-numeric characters and dashes
|
|
||||||
(<code class="literal">"-"</code>).
|
|
||||||
</p></div><div class="sect3" title="org.freedesktop.Notifications.Notify"><div class="titlepage"><div><div><h4 class="title"><a id="command-notify"></a><code class="literal">org.freedesktop.Notifications.Notify</code></h4></div></div></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">UINT32
|
|
||||||
<b class="fsfunc">org.freedesktop.Notifications.Notify</b>
|
|
||||||
(</code></td><td><var class="pdparam">app_name</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">replaces_id</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">app_icon</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">summary</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">body</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">actions</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">hints</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">expire_timeout</var><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>STRING <var class="pdparam">app_name</var></code>;<br /><code>UINT32 <var class="pdparam">replaces_id</var></code>;<br /><code>STRING <var class="pdparam">app_icon</var></code>;<br /><code>STRING <var class="pdparam">summary</var></code>;<br /><code>STRING <var class="pdparam">body</var></code>;<br /><code>ARRAY <var class="pdparam">actions</var></code>;<br /><code>DICT <var class="pdparam">hints</var></code>;<br /><code>INT32 <var class="pdparam">expire_timeout</var></code>;</div><div class="funcprototype-spacer"> </div></div><p>
|
|
||||||
Sends a notification to the notification server.
|
|
||||||
</p><div class="table"><a id="id2825920"></a><p class="title"><b>Table 6. Notify Parameters</b></p><div class="table-contents"><table summary="Notify Parameters" border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody valign="top"><tr><td valign="top"><em class="parameter"><code>app_name</code></em></td><td valign="top">STRING</td><td valign="top">
|
|
||||||
The optional name of the application sending the notification.
|
|
||||||
Can be blank.
|
|
||||||
</td></tr><tr><td valign="top"><em class="parameter"><code>replaces_id</code></em></td><td valign="top">UINT32</td><td valign="top">
|
|
||||||
The optional notification ID that this notification replaces. The
|
|
||||||
server must atomically (ie with no flicker or other visual cues)
|
|
||||||
replace the given notification with this one. This allows clients to
|
|
||||||
effectively modify the notification while it's active. A value of
|
|
||||||
value of 0 means that this notification won't replace any
|
|
||||||
existing notifications.
|
|
||||||
</td></tr><tr><td valign="top"><em class="parameter"><code>app_icon</code></em></td><td valign="top">STRING</td><td valign="top">
|
|
||||||
The optional program icon of the calling application. See <a class="xref" href="#icons-and-images" title="Icons and Images">Icons and Images</a>.
|
|
||||||
Can be an empty string, indicating no icon.
|
|
||||||
</td></tr><tr><td valign="top"><em class="parameter"><code>summary</code></em></td><td valign="top">STRING</td><td valign="top">The summary text briefly describing the notification.</td></tr><tr><td valign="top"><em class="parameter"><code>body</code></em></td><td valign="top">STRING</td><td valign="top">The optional detailed body text. Can be empty.</td></tr><tr><td valign="top"><em class="parameter"><code>actions</code></em></td><td valign="top">ARRAY</td><td valign="top">
|
|
||||||
Actions are sent over as a list of pairs. Each even element in
|
|
||||||
the list (starting at index 0) represents the identifier for the
|
|
||||||
action. Each odd element in the list is the localized string
|
|
||||||
that will be displayed to the user.
|
|
||||||
</td></tr><tr><td valign="top"><em class="parameter"><code>hints</code></em></td><td valign="top">DICT</td><td valign="top">
|
|
||||||
Optional hints that can be passed to the server from the client
|
|
||||||
program. Although clients and servers should never assume each other
|
|
||||||
supports any specific hints, they can be used to pass along
|
|
||||||
information, such as the process PID or window ID, that the server
|
|
||||||
may be able to make use of. See <a class="xref" href="#hints" title="Hints">Hints</a>. Can be
|
|
||||||
empty.
|
|
||||||
</td></tr><tr><td valign="top"><em class="parameter"><code>expire_timeout</code></em></td><td valign="top">INT32</td><td valign="top">
|
|
||||||
<p>
|
|
||||||
The timeout time in milliseconds since the display of the notification at
|
|
||||||
which the notification should automatically close.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
If -1, the notification's expiration time is dependent on the
|
|
||||||
notification server's settings, and may vary for the type of
|
|
||||||
notification.
|
|
||||||
|
|
||||||
If 0, never expire.
|
|
||||||
</p>
|
|
||||||
</td></tr></tbody></table></div></div><br class="table-break" /><p>
|
|
||||||
If <em class="parameter"><code>replaces_id</code></em> is 0, the return value is a
|
|
||||||
UINT32 that represent the notification. It is unique, and will not be
|
|
||||||
reused unless a <code class="constant">MAXINT</code> number of notifications
|
|
||||||
have been generated. An acceptable implementation may just use an
|
|
||||||
incrementing counter for the ID. The returned ID is always greater than
|
|
||||||
zero. Servers must make sure not to return zero as an ID.
|
|
||||||
</p><p>
|
|
||||||
If <em class="parameter"><code>replaces_id</code></em> is not 0, the returned value
|
|
||||||
is the same value as <em class="parameter"><code>replaces_id</code></em>.
|
|
||||||
</p></div><div class="sect3" title="org.freedesktop.Notifications.CloseNotification"><div class="titlepage"><div><div><h4 class="title"><a id="command-close-notification"></a><code class="literal">org.freedesktop.Notifications.CloseNotification</code></h4></div></div></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void
|
|
||||||
<b class="fsfunc">org.freedesktop.Notifications.CloseNotification</b>
|
|
||||||
(</code></td><td><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>UINT32 id</code>;</div><div class="funcprototype-spacer"> </div></div><p>
|
|
||||||
Causes a notification to be forcefully closed and removed from the user's
|
|
||||||
view. It can be used, for example, in the event that what the
|
|
||||||
notification pertains to is no longer relevant, or to cancel a
|
|
||||||
notification with no expiration time.
|
|
||||||
</p><p>
|
|
||||||
The <code class="literal">NotificationClosed</code> signal is emitted by this
|
|
||||||
method.
|
|
||||||
</p><p>
|
|
||||||
If the notification no longer exists, an empty D-BUS Error message is
|
|
||||||
sent back.
|
|
||||||
</p></div><div class="sect3" title="org.freedesktop.Notifications.GetServerInformation"><div class="titlepage"><div><div><h4 class="title"><a id="command-get-server-information"></a><code class="literal">org.freedesktop.Notifications.GetServerInformation</code></h4></div></div></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">
|
|
||||||
void
|
|
||||||
<b class="fsfunc">org.freedesktop.Notifications.GetServerInformation</b>
|
|
||||||
(</code></td><td><var class="pdparam">name</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">vendor</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">version</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">spec_version</var><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>out STRING <var class="pdparam">name</var></code>;<br /><code>out STRING <var class="pdparam">vendor</var></code>;<br /><code>out STRING <var class="pdparam">version</var></code>;<br /><code>out STRING <var class="pdparam">spec_version</var></code>;</div><div class="funcprototype-spacer"> </div></div><p>
|
|
||||||
This message returns the information on the server. Specifically,
|
|
||||||
the server name, vendor, and version number.
|
|
||||||
</p><div class="table"><a id="id2826276"></a><p class="title"><b>Table 7. GetServerInformation Return Values</b></p><div class="table-contents"><table summary="GetServerInformation Return Values" border="1"><colgroup><col /><col /></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody valign="top"><tr><td valign="top"><em class="parameter"><code>name</code></em></td><td valign="top">STRING</td><td valign="top">The product name of the server.</td></tr><tr><td valign="top"><em class="parameter"><code>vendor</code></em></td><td valign="top">STRING</td><td valign="top">
|
|
||||||
The vendor name. For example, "KDE," "GNOME,"
|
|
||||||
"freedesktop.org," or "Microsoft."
|
|
||||||
</td></tr><tr><td valign="top"><em class="parameter"><code>version</code></em></td><td valign="top">STRING</td><td valign="top">The server's version number.</td></tr><tr><td valign="top"><em class="parameter"><code>spec_version</code></em></td><td valign="top">STRING</td><td valign="top">The specification version the server is compliant with.</td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="sect2" title="Signals"><div class="titlepage"><div><div><h3 class="title"><a id="signals"></a>Signals</h3></div></div></div><div class="sect3" title="org.freedesktop.Notifications.NotificationClosed"><div class="titlepage"><div><div><h4 class="title"><a id="signal-notification-closed"></a><code class="literal">org.freedesktop.Notifications.NotificationClosed</code></h4></div></div></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">
|
|
||||||
<b class="fsfunc">org.freedesktop.Notifications.NotificationClosed</b>
|
|
||||||
(</code></td><td><var class="pdparam">id</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">reason</var><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>UINT32 <var class="pdparam">id</var></code>;<br /><code>UINT32 <var class="pdparam">reason</var></code>;</div><div class="funcprototype-spacer"> </div></div><p>
|
|
||||||
A completed notification is one that has timed out, or has been
|
|
||||||
dismissed by the user.
|
|
||||||
</p><div class="table"><a id="id2826433"></a><p class="title"><b>Table 8. NotificationClosed Parameters</b></p><div class="table-contents"><table summary="NotificationClosed Parameters" border="1"><colgroup><col /><col /></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody valign="top"><tr><td valign="top"><em class="parameter"><code>id</code></em></td><td valign="top">UINT32</td><td valign="top">The ID of the notification that was closed.</td></tr><tr><td valign="top"><em class="parameter"><code>reason</code></em></td><td valign="top">UINT32</td><td valign="top">
|
|
||||||
<p>The reason the notification was closed.</p>
|
|
||||||
<p>1 - The notification expired.</p>
|
|
||||||
<p>2 - The notification was dismissed by the user.</p>
|
|
||||||
<p>3 - The notification was closed by a call to
|
|
||||||
<code class="literal">CloseNotification</code>.</p>
|
|
||||||
<p>4 - Undefined/reserved reasons.</p>
|
|
||||||
</td></tr></tbody></table></div></div><br class="table-break" /><p>
|
|
||||||
The ID specified in the signal is invalidated
|
|
||||||
<span class="emphasis"><em>before</em></span> the signal is sent and may not be used
|
|
||||||
in any further communications with the server.
|
|
||||||
</p></div><div class="sect3" title="org.freedesktop.Notifications.ActionInvoked"><div class="titlepage"><div><div><h4 class="title"><a id="signal-action-invoked"></a><code class="literal">org.freedesktop.Notifications.ActionInvoked</code></h4></div></div></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">
|
|
||||||
<b class="fsfunc">org.freedesktop.Notifications.ActionInvoked</b>
|
|
||||||
(</code></td><td><var class="pdparam">id</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">action_key</var><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>UINT32 <var class="pdparam">id</var></code>;<br /><code>STRING <var class="pdparam">action_key</var></code>;</div><div class="funcprototype-spacer"> </div></div><p>
|
|
||||||
This signal is emitted when one of the following occurs:
|
|
||||||
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
|
|
||||||
The user performs some global "invoking" action upon a notification.
|
|
||||||
For instance, clicking somewhere on the notification itself.
|
|
||||||
</p></li><li class="listitem"><p>
|
|
||||||
The user invokes a specific action as specified in the original
|
|
||||||
Notify request. For example, clicking on an action button.
|
|
||||||
</p></li></ul></div><div class="table"><a id="id2826603"></a><p class="title"><b>Table 9. ActionInvoked Parameters</b></p><div class="table-contents"><table summary="ActionInvoked Parameters" border="1"><colgroup><col /><col /></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody valign="top"><tr><td valign="top"><em class="parameter"><code>id</code></em></td><td valign="top">UINT32</td><td valign="top">
|
|
||||||
The ID of the notification emitting the ActionInvoked signal.
|
|
||||||
</td></tr><tr><td valign="top"><em class="parameter"><code>action_key</code></em></td><td valign="top">STRING</td><td valign="top">
|
|
||||||
The key of the action invoked. These match the keys sent over
|
|
||||||
in the list of actions.
|
|
||||||
</td></tr></tbody></table></div></div><br class="table-break" /><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
|
|
||||||
Clients should not assume the server will generate this signal. Some
|
|
||||||
servers may not support user interaction at all, or may not support
|
|
||||||
the concept of being able to "invoke" a notification.
|
|
||||||
</p></div></div></div></div></div></body></html>
|
|
@ -1,8 +1,3 @@
|
|||||||
include_directories(
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
|
||||||
)
|
|
||||||
|
|
||||||
set(NOTIFICATIONS_SRC
|
set(NOTIFICATIONS_SRC
|
||||||
main.cpp
|
main.cpp
|
||||||
notificationarea.cpp
|
notificationarea.cpp
|
||||||
@ -16,18 +11,28 @@ set(NOTIFICATIONS_UI
|
|||||||
notification.ui
|
notification.ui
|
||||||
)
|
)
|
||||||
|
|
||||||
qt5_wrap_ui(NOTIFICATIONS_UI_CPP ${NOTIFICATIONS_UI})
|
|
||||||
qt5_add_dbus_adaptor(NOTIFICATIONS_SRC
|
qt5_add_dbus_adaptor(NOTIFICATIONS_SRC
|
||||||
org.freedesktop.Notifications.xml
|
org.freedesktop.Notifications.xml
|
||||||
notifyd.h Notifyd
|
notifyd.h Notifyd
|
||||||
)
|
)
|
||||||
|
|
||||||
# Translations **********************************
|
# Translations **********************************
|
||||||
lxqt_translate_ts(NOTIFICATIONS_QM_FILES SOURCES
|
lxqt_translate_ts(NOTIFICATIONS_QM_FILES
|
||||||
UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS}
|
UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS}
|
||||||
|
SOURCES
|
||||||
${NOTIFICATIONS_SRC}
|
${NOTIFICATIONS_SRC}
|
||||||
${NOTIFICATIONS_UI}
|
${NOTIFICATIONS_UI}
|
||||||
INSTALL_DIR "${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}"
|
INSTALL_DIR "${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}"
|
||||||
|
PULL_TRANSLATIONS
|
||||||
|
${PULL_TRANSLATIONS}
|
||||||
|
CLEAN_TRANSLATIONS
|
||||||
|
${CLEAN_TRANSLATIONS}
|
||||||
|
TRANSLATIONS_REPO
|
||||||
|
${TRANSLATIONS_REPO}
|
||||||
|
TRANSLATIONS_REFSPEC
|
||||||
|
${TRANSLATIONS_REFSPEC}
|
||||||
|
REPO_SUBDIR
|
||||||
|
"lxqt-notificationd/${PROJECT_NAME}"
|
||||||
)
|
)
|
||||||
|
|
||||||
lxqt_app_translation_loader(QM_LOADER ${PROJECT_NAME})
|
lxqt_app_translation_loader(QM_LOADER ${PROJECT_NAME})
|
||||||
@ -35,7 +40,6 @@ lxqt_app_translation_loader(QM_LOADER ${PROJECT_NAME})
|
|||||||
|
|
||||||
add_executable(lxqt-notificationd
|
add_executable(lxqt-notificationd
|
||||||
${NOTIFICATIONS_SRC}
|
${NOTIFICATIONS_SRC}
|
||||||
${NOTIFICATIONS_UI_CPP}
|
|
||||||
${NOTIFICATIONS_QM_FILES}
|
${NOTIFICATIONS_QM_FILES}
|
||||||
${QM_LOADER}
|
${QM_LOADER}
|
||||||
)
|
)
|
||||||
@ -43,9 +47,12 @@ add_executable(lxqt-notificationd
|
|||||||
target_link_libraries(lxqt-notificationd
|
target_link_libraries(lxqt-notificationd
|
||||||
Qt5::Widgets
|
Qt5::Widgets
|
||||||
Qt5::DBus
|
Qt5::DBus
|
||||||
${QTXDG_LIBRARIES}
|
lxqt
|
||||||
${LXQT_LIBRARIES}
|
|
||||||
KF5::WindowSystem
|
KF5::WindowSystem
|
||||||
)
|
)
|
||||||
|
|
||||||
install(TARGETS lxqt-notificationd RUNTIME DESTINATION bin)
|
install(TARGETS
|
||||||
|
lxqt-notificationd
|
||||||
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||||
|
COMPONENT Runtime
|
||||||
|
)
|
||||||
|
19
src/main.cpp
19
src/main.cpp
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QtDBus/QDBusConnection>
|
#include <QtDBus/QDBusConnection>
|
||||||
|
#include <QCommandLineParser>
|
||||||
|
|
||||||
#include <LXQt/Application>
|
#include <LXQt/Application>
|
||||||
|
|
||||||
@ -34,7 +35,7 @@
|
|||||||
#include "notifyd.h"
|
#include "notifyd.h"
|
||||||
|
|
||||||
|
|
||||||
/*! \mainpage LXDE-Qt notification daemon
|
/*! \mainpage LXQt notification daemon
|
||||||
*
|
*
|
||||||
* Running in user session; implementing standard as described in:
|
* Running in user session; implementing standard as described in:
|
||||||
* docs/nodification-spec-latest.html
|
* docs/nodification-spec-latest.html
|
||||||
@ -65,16 +66,25 @@
|
|||||||
*/
|
*/
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
LxQt::Application a(argc, argv);
|
LXQt::Application a(argc, argv);
|
||||||
|
|
||||||
a.setQuitOnLastWindowClosed(false);
|
a.setQuitOnLastWindowClosed(false);
|
||||||
|
|
||||||
|
QCommandLineParser parser;
|
||||||
|
parser.setApplicationDescription(QStringLiteral("LXQt Notification Daemon"));
|
||||||
|
const QString VERINFO = QStringLiteral(LXQT_NOTIFICATIOND_VERSION
|
||||||
|
"\nliblxqt " LXQT_VERSION
|
||||||
|
"\nQt " QT_VERSION_STR);
|
||||||
|
a.setApplicationVersion(VERINFO);
|
||||||
|
parser.addVersionOption();
|
||||||
|
parser.addHelpOption();
|
||||||
|
parser.process(a);
|
||||||
|
|
||||||
// Ensure the helper widgets are hidden
|
// Ensure the helper widgets are hidden
|
||||||
a.setStyleSheet(a.styleSheet() +
|
a.setStyleSheet(a.styleSheet() +
|
||||||
"NotificationArea {background: transparent;}"
|
"NotificationArea {background: transparent;}"
|
||||||
"NotificationLayout {background: transparent;}"
|
"NotificationLayout {background: transparent;}"
|
||||||
);
|
);
|
||||||
|
|
||||||
Notifyd* daemon = new Notifyd();
|
Notifyd* daemon = new Notifyd();
|
||||||
new NotificationsAdaptor(daemon);
|
new NotificationsAdaptor(daemon);
|
||||||
|
|
||||||
@ -84,6 +94,5 @@ int main(int argc, char** argv)
|
|||||||
if (!connection.registerObject("/org/freedesktop/Notifications", daemon))
|
if (!connection.registerObject("/org/freedesktop/Notifications", daemon))
|
||||||
qDebug() << "registerObject failed: another object with '/org/freedesktop/Notifications' runs already";
|
qDebug() << "registerObject failed: another object with '/org/freedesktop/Notifications' runs already";
|
||||||
|
|
||||||
|
|
||||||
return a.exec();
|
return a.exec();
|
||||||
}
|
}
|
||||||
|
@ -32,13 +32,16 @@
|
|||||||
#include <QtDBus/QDBusArgument>
|
#include <QtDBus/QDBusArgument>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <XdgIcon>
|
#include <XdgIcon>
|
||||||
#include <KF5/KWindowSystem/KWindowSystem>
|
#include <KWindowSystem/KWindowSystem>
|
||||||
|
#include <QMouseEvent>
|
||||||
|
#include <QPushButton>
|
||||||
|
|
||||||
#include "notification.h"
|
#include "notification.h"
|
||||||
#include "notificationwidgets.h"
|
#include "notificationwidgets.h"
|
||||||
|
|
||||||
#define ICONSIZE QSize(32, 32)
|
#define ICONSIZE QSize(32, 32)
|
||||||
|
|
||||||
|
|
||||||
Notification::Notification(const QString &application,
|
Notification::Notification(const QString &application,
|
||||||
const QString &summary, const QString &body,
|
const QString &summary, const QString &body,
|
||||||
const QString &icon, int timeout,
|
const QString &icon, int timeout,
|
||||||
@ -46,6 +49,7 @@ Notification::Notification(const QString &application,
|
|||||||
QWidget *parent)
|
QWidget *parent)
|
||||||
: QWidget(parent),
|
: QWidget(parent),
|
||||||
m_timer(0),
|
m_timer(0),
|
||||||
|
m_linkHovered(false),
|
||||||
m_actionWidget(0)
|
m_actionWidget(0)
|
||||||
{
|
{
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
@ -57,7 +61,14 @@ Notification::Notification(const QString &application,
|
|||||||
|
|
||||||
setValues(application, summary, body, icon, timeout, actions, hints);
|
setValues(application, summary, body, icon, timeout, actions, hints);
|
||||||
|
|
||||||
connect(closeButton, SIGNAL(clicked()), this, SLOT(closeButton_clicked()));
|
connect(closeButton, &QPushButton::clicked, this, &Notification::closeButton_clicked);
|
||||||
|
|
||||||
|
for (QLabel *label : {bodyLabel, summaryLabel})
|
||||||
|
{
|
||||||
|
connect(label, &QLabel::linkHovered, this, &Notification::linkHovered);
|
||||||
|
|
||||||
|
label->installEventFilter(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Notification::setValues(const QString &application,
|
void Notification::setValues(const QString &application,
|
||||||
@ -77,22 +88,18 @@ void Notification::setValues(const QString &application,
|
|||||||
if (!hints["image_data"].isNull())
|
if (!hints["image_data"].isNull())
|
||||||
{
|
{
|
||||||
m_pixmap = getPixmapFromHint(hints["image_data"]);
|
m_pixmap = getPixmapFromHint(hints["image_data"]);
|
||||||
// qDebug() << application << "from image_data" << m_pixmap.isNull();
|
|
||||||
}
|
}
|
||||||
else if (!hints["image_path"].isNull())
|
else if (!hints["image_path"].isNull())
|
||||||
{
|
{
|
||||||
m_pixmap = getPixmapFromString(hints["image_path"].toString());
|
m_pixmap = getPixmapFromString(hints["image_path"].toString());
|
||||||
// qDebug() << application << "from image_path" << m_pixmap.isNull();
|
|
||||||
}
|
}
|
||||||
else if (!icon.isEmpty())
|
else if (!icon.isEmpty())
|
||||||
{
|
{
|
||||||
m_pixmap = getPixmapFromString(icon);
|
m_pixmap = getPixmapFromString(icon);
|
||||||
// qDebug() << application << "from icon" << icon << m_pixmap.isNull();
|
|
||||||
}
|
}
|
||||||
else if (!hints["icon_data"].isNull())
|
else if (!hints["icon_data"].isNull())
|
||||||
{
|
{
|
||||||
m_pixmap = getPixmapFromHint(hints["icon_data"]);
|
m_pixmap = getPixmapFromHint(hints["icon_data"]);
|
||||||
// qDebug() << application << "from icon_data" << m_pixmap.isNull();
|
|
||||||
}
|
}
|
||||||
// issue #325: Do not display icon if it's not found...
|
// issue #325: Do not display icon if it's not found...
|
||||||
if (m_pixmap.isNull())
|
if (m_pixmap.isNull())
|
||||||
@ -109,21 +116,27 @@ void Notification::setValues(const QString &application,
|
|||||||
iconLabel->setPixmap(m_pixmap);
|
iconLabel->setPixmap(m_pixmap);
|
||||||
iconLabel->show();
|
iconLabel->show();
|
||||||
}
|
}
|
||||||
|
//XXX: workaround to properly set text labels widths (for correct sizeHints after setText)
|
||||||
|
adjustSize();
|
||||||
|
|
||||||
// application
|
// application
|
||||||
appLabel->setVisible(!application.isEmpty());
|
appLabel->setVisible(!application.isEmpty());
|
||||||
|
appLabel->setFixedWidth(appLabel->width());
|
||||||
appLabel->setText(application);
|
appLabel->setText(application);
|
||||||
|
|
||||||
// summary
|
// summary
|
||||||
summaryLabel->setVisible(!summary.isEmpty());
|
summaryLabel->setVisible(!summary.isEmpty() && application != summary);
|
||||||
|
summaryLabel->setFixedWidth(summaryLabel->width());
|
||||||
summaryLabel->setText(summary);
|
summaryLabel->setText(summary);
|
||||||
|
|
||||||
if (application == summary)
|
|
||||||
summaryLabel->setVisible(false);
|
|
||||||
|
|
||||||
// body
|
// body
|
||||||
bodyLabel->setVisible(!body.isEmpty());
|
bodyLabel->setVisible(!body.isEmpty());
|
||||||
bodyLabel->setText(body);
|
bodyLabel->setFixedWidth(bodyLabel->width());
|
||||||
|
//https://developer.gnome.org/notification-spec
|
||||||
|
//Body - This is a multi-line body of text. Each line is a paragraph, server implementations are free to word wrap them as they see fit.
|
||||||
|
//XXX: remove all unsupported tags?!? (supported <b>, <i>, <u>, <a>, <img>)
|
||||||
|
QString formatted(body);
|
||||||
|
bodyLabel->setText(formatted.replace('\n', QStringLiteral("<br/>")));
|
||||||
|
|
||||||
// Timeout
|
// Timeout
|
||||||
// Special values:
|
// Special values:
|
||||||
@ -139,15 +152,14 @@ void Notification::setValues(const QString &application,
|
|||||||
if (timeout > 0)
|
if (timeout > 0)
|
||||||
{
|
{
|
||||||
m_timer = new NotificationTimer(this);
|
m_timer = new NotificationTimer(this);
|
||||||
connect(m_timer, SIGNAL(timeout()), this, SIGNAL(timeout()));
|
connect(m_timer, &NotificationTimer::timeout, this, &Notification::timeout);
|
||||||
m_timer->start(timeout);
|
m_timer->start(timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Categories *********************
|
// Categories *********************
|
||||||
// TODO/FIXME: Categories - how to handle it?
|
|
||||||
if (!hints["category"].isNull())
|
if (!hints["category"].isNull())
|
||||||
{
|
{
|
||||||
qDebug() << "Notification" << application << "category" << hints["category"];
|
// TODO/FIXME: Categories - how to handle it?
|
||||||
}
|
}
|
||||||
|
|
||||||
// Urgency Levels *********************
|
// Urgency Levels *********************
|
||||||
@ -155,10 +167,9 @@ void Notification::setValues(const QString &application,
|
|||||||
// 0 Low
|
// 0 Low
|
||||||
// 1 Normal
|
// 1 Normal
|
||||||
// 2 Critical
|
// 2 Critical
|
||||||
// TODO/FIXME: Urgencies - how to handle it?
|
|
||||||
if (!hints["urgency"].isNull())
|
if (!hints["urgency"].isNull())
|
||||||
{
|
{
|
||||||
qDebug() << "Notification" << application << "urgency" << hints["urgency"];
|
// TODO/FIXME: Urgencies - how to handle it?
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
@ -168,8 +179,10 @@ void Notification::setValues(const QString &application,
|
|||||||
m_actionWidget = new NotificationActionsButtonsWidget(actions, this);
|
m_actionWidget = new NotificationActionsButtonsWidget(actions, this);
|
||||||
else
|
else
|
||||||
m_actionWidget = new NotificationActionsComboWidget(actions, this);
|
m_actionWidget = new NotificationActionsComboWidget(actions, this);
|
||||||
connect(m_actionWidget, SIGNAL(actionTriggered(const QString &)),
|
|
||||||
this, SIGNAL(actionTriggered(const QString &)));
|
connect(m_actionWidget, &NotificationActionsWidget::actionTriggered,
|
||||||
|
this, &Notification::actionTriggered);
|
||||||
|
|
||||||
actionsLayout->addWidget(m_actionWidget);
|
actionsLayout->addWidget(m_actionWidget);
|
||||||
m_actionWidget->show();
|
m_actionWidget->show();
|
||||||
}
|
}
|
||||||
@ -225,7 +238,14 @@ QPixmap Notification::getPixmapFromHint(const QVariant &argument) const
|
|||||||
arg >> channels;
|
arg >> channels;
|
||||||
arg >> data;
|
arg >> data;
|
||||||
arg.endStructure();
|
arg.endStructure();
|
||||||
QImage img = QImage((uchar*)data.constData(), width, height, QImage::Format_ARGB32).rgbSwapped();
|
|
||||||
|
bool rgb = !hasAlpha && channels == 3 && bitsPerSample == 8;
|
||||||
|
QImage::Format imageFormat = rgb ? QImage::Format_RGB888 : QImage::Format_ARGB32;
|
||||||
|
|
||||||
|
QImage img = QImage((uchar*)data.constData(), width, height, imageFormat);
|
||||||
|
|
||||||
|
if (!rgb)
|
||||||
|
img = img.rgbSwapped();
|
||||||
|
|
||||||
return QPixmap::fromImage(img);
|
return QPixmap::fromImage(img);
|
||||||
}
|
}
|
||||||
@ -259,6 +279,25 @@ void Notification::leaveEvent(QEvent * event)
|
|||||||
m_timer->resume();
|
m_timer->resume();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Notification::eventFilter(QObject *obj, QEvent *event)
|
||||||
|
{
|
||||||
|
// Catch mouseReleaseEvent on child labels if a link is not currently being hovered.
|
||||||
|
//
|
||||||
|
// This workarounds QTBUG-49025 where clicking on text does not propagate the mouseReleaseEvent
|
||||||
|
// to the parent even though the text is not selectable and no link is being clicked.
|
||||||
|
if (event->type() == QEvent::MouseButtonRelease && !m_linkHovered)
|
||||||
|
{
|
||||||
|
mouseReleaseEvent(static_cast<QMouseEvent*>(event));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Notification::linkHovered(QString link)
|
||||||
|
{
|
||||||
|
m_linkHovered = !link.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
void Notification::mouseReleaseEvent(QMouseEvent * event)
|
void Notification::mouseReleaseEvent(QMouseEvent * event)
|
||||||
{
|
{
|
||||||
// qDebug() << "CLICKED" << event;
|
// qDebug() << "CLICKED" << event;
|
||||||
@ -310,7 +349,7 @@ void NotificationTimer::pause()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
stop();
|
stop();
|
||||||
m_intervalMsec = m_startTime.msecsTo(QDateTime());
|
m_intervalMsec = m_startTime.msecsTo(QDateTime::currentDateTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotificationTimer::resume()
|
void NotificationTimer::resume()
|
||||||
|
@ -86,7 +86,7 @@ protected:
|
|||||||
- if there is one action or at least one default action, this
|
- if there is one action or at least one default action, this
|
||||||
default action is triggered on click.
|
default action is triggered on click.
|
||||||
\see NotificationActionsWidget::hasDefaultAction()
|
\see NotificationActionsWidget::hasDefaultAction()
|
||||||
\see NotificationActionsWidget::defaultAction()
|
\see NotificationActionsWidget::defaultAction()
|
||||||
- it tries to find caller window by
|
- it tries to find caller window by
|
||||||
a) application name. \see XfitMan::getApplicationName()
|
a) application name. \see XfitMan::getApplicationName()
|
||||||
b) window title. \see XfitMan::getWindowTitle()
|
b) window title. \see XfitMan::getWindowTitle()
|
||||||
@ -99,6 +99,7 @@ private:
|
|||||||
NotificationTimer *m_timer;
|
NotificationTimer *m_timer;
|
||||||
|
|
||||||
QPixmap m_pixmap;
|
QPixmap m_pixmap;
|
||||||
|
bool m_linkHovered;
|
||||||
|
|
||||||
NotificationActionsWidget *m_actionWidget;
|
NotificationActionsWidget *m_actionWidget;
|
||||||
|
|
||||||
@ -106,9 +107,11 @@ private:
|
|||||||
void paintEvent(QPaintEvent *);
|
void paintEvent(QPaintEvent *);
|
||||||
QPixmap getPixmapFromHint(const QVariant &argument) const;
|
QPixmap getPixmapFromHint(const QVariant &argument) const;
|
||||||
QPixmap getPixmapFromString(const QString &str) const;
|
QPixmap getPixmapFromString(const QString &str) const;
|
||||||
|
bool eventFilter(QObject *obj, QEvent *event);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void closeButton_clicked();
|
void closeButton_clicked();
|
||||||
|
void linkHovered(QString);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,6 +10,9 @@
|
|||||||
<height>77</height>
|
<height>77</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="horizontalSpacing">
|
<property name="horizontalSpacing">
|
||||||
<number>9</number>
|
<number>9</number>
|
||||||
@ -82,7 +85,7 @@
|
|||||||
<string notr="true">TextLabel</string>
|
<string notr="true">TextLabel</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="textFormat">
|
<property name="textFormat">
|
||||||
<enum>Qt::RichText</enum>
|
<enum>Qt::PlainText</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@ -136,6 +139,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">x</string>
|
<string notr="true">x</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="window-close"/>
|
||||||
|
</property>
|
||||||
<property name="autoRaise">
|
<property name="autoRaise">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -55,10 +55,10 @@ NotificationArea::NotificationArea(QWidget *parent)
|
|||||||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
|
||||||
connect(m_layout, SIGNAL(allNotificationsClosed()), this, SLOT(close()));
|
connect(m_layout, &NotificationLayout::allNotificationsClosed, this, &NotificationArea::close);
|
||||||
connect(m_layout, SIGNAL(notificationAvailable()), this, SLOT(show()));
|
connect(m_layout, &NotificationLayout::notificationAvailable, this, &NotificationArea::show);
|
||||||
connect(m_layout, SIGNAL(heightChanged(int)), this, SLOT(setHeight(int)));
|
connect(m_layout, &NotificationLayout::heightChanged, this, &NotificationArea::setHeight);
|
||||||
connect(qApp->desktop(), SIGNAL(workAreaResized(int)), SLOT(setHeight()));
|
connect(qApp->desktop(), &QDesktopWidget::workAreaResized, this, &NotificationArea::setHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotificationArea::setHeight(int contentHeight)
|
void NotificationArea::setHeight(int contentHeight)
|
||||||
@ -78,38 +78,44 @@ void NotificationArea::setHeight(int contentHeight)
|
|||||||
// I think it's a bug of Qt.
|
// I think it's a bug of Qt.
|
||||||
QRect workArea = qApp->desktop()->availableGeometry(qApp->desktop()->primaryScreen());
|
QRect workArea = qApp->desktop()->availableGeometry(qApp->desktop()->primaryScreen());
|
||||||
|
|
||||||
int h = workArea.height();
|
workArea -= QMargins(m_spacing, m_spacing, m_spacing, m_spacing);
|
||||||
int safeHeight = contentHeight > h ? h : contentHeight;
|
QRect notif_rect = workArea.normalized();
|
||||||
int x, y;
|
notif_rect.setWidth(width());
|
||||||
|
if (notif_rect.height() > contentHeight)
|
||||||
|
notif_rect.setHeight(contentHeight);
|
||||||
|
|
||||||
if (m_placement == "bottom-right")
|
// no move needed for "top-left"
|
||||||
|
if ("top-center" == m_placement)
|
||||||
{
|
{
|
||||||
x = workArea.right() - width() - m_spacing;
|
notif_rect.moveCenter(workArea.center());
|
||||||
y = workArea.bottom() - safeHeight - m_spacing;
|
notif_rect.moveTop(workArea.top());
|
||||||
}
|
} else if ("top-right" == m_placement)
|
||||||
else if (m_placement == "bottom-left")
|
|
||||||
{
|
{
|
||||||
x = workArea.x() + m_spacing;
|
notif_rect.moveRight(workArea.right());
|
||||||
y = workArea.bottom() - safeHeight - m_spacing;
|
} else if ("center-left" == m_placement)
|
||||||
}
|
|
||||||
else if (m_placement == "top-right")
|
|
||||||
{
|
{
|
||||||
x = workArea.right() - width() - m_spacing;
|
notif_rect.moveCenter(workArea.center());
|
||||||
y = workArea.y() + m_spacing;
|
notif_rect.moveLeft(workArea.left());
|
||||||
}
|
} else if ("center-center" == m_placement)
|
||||||
else if (m_placement == "top-left")
|
|
||||||
{
|
{
|
||||||
x = workArea.x() + m_spacing;
|
notif_rect.moveCenter(workArea.center());
|
||||||
y = workArea.y() + m_spacing;
|
} else if ("center-right" == m_placement)
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
x = workArea.right() - width() - m_spacing;
|
notif_rect.moveCenter(workArea.center());
|
||||||
y = workArea.bottom() - safeHeight;
|
notif_rect.moveRight(workArea.right());
|
||||||
|
} else if ("bottom-left" == m_placement)
|
||||||
|
{
|
||||||
|
notif_rect.moveBottom(workArea.bottom());
|
||||||
|
} else if ("bottom-center" == m_placement)
|
||||||
|
{
|
||||||
|
notif_rect.moveCenter(workArea.center());
|
||||||
|
notif_rect.moveBottom(workArea.bottom());
|
||||||
|
} else if ("bottom-right" == m_placement)
|
||||||
|
{
|
||||||
|
notif_rect.moveBottomRight(workArea.bottomRight());
|
||||||
}
|
}
|
||||||
|
|
||||||
move(x, y);
|
setGeometry(notif_rect);
|
||||||
resize(width(), safeHeight);
|
|
||||||
// always show the latest notification
|
// always show the latest notification
|
||||||
ensureVisible(0, contentHeight, 0, 0);
|
ensureVisible(0, contentHeight, 0, 0);
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ NotificationLayout::NotificationLayout(QWidget *parent)
|
|||||||
setPalette(palette);
|
setPalette(palette);
|
||||||
// Required to display wallpaper
|
// Required to display wallpaper
|
||||||
setAttribute(Qt::WA_TranslucentBackground);
|
setAttribute(Qt::WA_TranslucentBackground);
|
||||||
|
|
||||||
// Make the window stay on top
|
// Make the window stay on top
|
||||||
setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
|
setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
|
||||||
|
|
||||||
@ -96,10 +96,10 @@ void NotificationLayout::addNotification(uint id, const QString &application,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(n, SIGNAL(timeout()), this, SLOT(removeNotificationTimeout()));
|
connect(n, &Notification::timeout, this, &NotificationLayout::removeNotificationTimeout);
|
||||||
connect(n, SIGNAL(userCanceled()), this, SLOT(removeNotificationUser()));
|
connect(n, &Notification::userCanceled, this, &NotificationLayout::removeNotificationUser);
|
||||||
connect(n, SIGNAL(actionTriggered(QString)),
|
connect(n, &Notification::actionTriggered,
|
||||||
this, SLOT(notificationActionCalled(QString)));
|
this, &NotificationLayout::notificationActionCalled);
|
||||||
m_notifications[id] = n;
|
m_notifications[id] = n;
|
||||||
m_layout->addWidget(n);
|
m_layout->addWidget(n);
|
||||||
n->show();
|
n->show();
|
||||||
|
@ -39,77 +39,77 @@
|
|||||||
NotificationActionsWidget::NotificationActionsWidget(const QStringList& actions, QWidget *parent)
|
NotificationActionsWidget::NotificationActionsWidget(const QStringList& actions, QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < actions.count(); ++i)
|
for (int i = 0; i < actions.count(); i += 2)
|
||||||
{
|
{
|
||||||
if (i == actions.count()-1)
|
QString key = actions[i];
|
||||||
|
QString value;
|
||||||
|
|
||||||
|
if (i == actions.count() - 1)
|
||||||
{
|
{
|
||||||
qDebug() << "NotificationActionsWidget actions has contains pairs (id, value, id, value...) got odd count:" << actions.count() << "Actions:" << actions;
|
value = key;
|
||||||
m_actionMap[actions.at(i)] = actions.at(i);
|
qWarning() << "Odd number of elements in action list. Last action will use key as text (" << key << ")";
|
||||||
|
} else {
|
||||||
|
value = actions[i + 1];
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
if (key == "default")
|
||||||
m_actionMap[actions.at(i)] = actions.at(i+1);
|
m_defaultAction = key;
|
||||||
}
|
|
||||||
++i; // move to the next ID
|
m_actions.append({key, value});
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there is only one action let's take it as a default one
|
// if there is only one action let's use it as the default one
|
||||||
if (m_actionMap.count() == 1)
|
if (m_actions.count() == 1)
|
||||||
m_defaultAction = m_actionMap[m_actionMap.keys().at(0)];
|
m_defaultAction = m_actions[0].first;
|
||||||
|
|
||||||
qDebug() << "NotificationActionsWidget processed actions:" << m_actionMap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NotificationActionsButtonsWidget::NotificationActionsButtonsWidget(const QStringList& actions, QWidget *parent)
|
NotificationActionsButtonsWidget::NotificationActionsButtonsWidget(const QStringList& actions, QWidget *parent)
|
||||||
: NotificationActionsWidget(actions, parent)
|
: NotificationActionsWidget(actions, parent)
|
||||||
{
|
{
|
||||||
QHashIterator<QString,QString> it(m_actionMap);
|
|
||||||
QHBoxLayout *l = new QHBoxLayout();
|
QHBoxLayout *l = new QHBoxLayout();
|
||||||
setLayout(l);
|
setLayout(l);
|
||||||
|
|
||||||
QButtonGroup *group = new QButtonGroup(this);
|
QButtonGroup *group = new QButtonGroup(this);
|
||||||
|
|
||||||
while (it.hasNext())
|
for (auto const & action : m_actions)
|
||||||
{
|
{
|
||||||
it.next();
|
QPushButton *b = new QPushButton(action.second, this);
|
||||||
QPushButton *b = new QPushButton(it.value(), this);
|
b->setObjectName(action.first);
|
||||||
l->addWidget(b);
|
l->addWidget(b);
|
||||||
group->addButton(b);
|
group->addButton(b);
|
||||||
if (it.key() == "default")
|
|
||||||
{
|
if (action.first == m_defaultAction)
|
||||||
b->setFocus(Qt::OtherFocusReason);
|
b->setFocus(Qt::OtherFocusReason);
|
||||||
m_defaultAction = it.key();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
connect(group, SIGNAL(buttonClicked(QAbstractButton*)),
|
connect(group, static_cast<void (QButtonGroup::*)(QAbstractButton*)>(&QButtonGroup::buttonClicked),
|
||||||
this, SLOT(actionButtonActivated(QAbstractButton*)));
|
this, &NotificationActionsButtonsWidget::actionButtonActivated);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotificationActionsButtonsWidget::actionButtonActivated(QAbstractButton* button)
|
void NotificationActionsButtonsWidget::actionButtonActivated(QAbstractButton* button)
|
||||||
{
|
{
|
||||||
emit actionTriggered(m_actionMap.key(button->text()));
|
emit actionTriggered(button->objectName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NotificationActionsComboWidget::NotificationActionsComboWidget(const QStringList& actions, QWidget *parent)
|
NotificationActionsComboWidget::NotificationActionsComboWidget(const QStringList& actions, QWidget *parent)
|
||||||
: NotificationActionsWidget(actions, parent)
|
: NotificationActionsWidget(actions, parent)
|
||||||
{
|
{
|
||||||
QHashIterator<QString,QString> it(m_actionMap);
|
|
||||||
QHBoxLayout *l = new QHBoxLayout();
|
QHBoxLayout *l = new QHBoxLayout();
|
||||||
setLayout(l);
|
setLayout(l);
|
||||||
|
|
||||||
l->addWidget(new QLabel(tr("Actions:"), this));
|
l->addWidget(new QLabel(tr("Actions:"), this));
|
||||||
m_comboBox = new QComboBox(this);
|
m_comboBox = new QComboBox(this);
|
||||||
int currentIndex = -1;
|
int currentIndex = -1;
|
||||||
while (it.hasNext())
|
|
||||||
|
for (int i = 0; i < m_actions.count(); ++i)
|
||||||
{
|
{
|
||||||
it.next();
|
auto const & action = m_actions[i];
|
||||||
m_comboBox->addItem(it.value(), it.key());
|
|
||||||
if (it.key() == "default")
|
m_comboBox->addItem(action.second, action.first);
|
||||||
|
if (action.first == m_defaultAction)
|
||||||
{
|
{
|
||||||
currentIndex = m_comboBox->count()-1;
|
currentIndex = i;
|
||||||
m_defaultAction = it.key();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
l->addWidget(m_comboBox);
|
l->addWidget(m_comboBox);
|
||||||
@ -119,8 +119,8 @@ NotificationActionsComboWidget::NotificationActionsComboWidget(const QStringList
|
|||||||
|
|
||||||
QPushButton *b = new QPushButton(tr("OK"), this);
|
QPushButton *b = new QPushButton(tr("OK"), this);
|
||||||
l->addWidget(b);
|
l->addWidget(b);
|
||||||
connect(b, SIGNAL(clicked()),
|
connect(b, &QPushButton::clicked,
|
||||||
this, SLOT(actionComboBoxActivated()));
|
this, &NotificationActionsComboWidget::actionComboBoxActivated);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotificationActionsComboWidget::actionComboBoxActivated()
|
void NotificationActionsComboWidget::actionComboBoxActivated()
|
||||||
@ -130,5 +130,5 @@ void NotificationActionsComboWidget::actionComboBoxActivated()
|
|||||||
int ix = m_comboBox->currentIndex();
|
int ix = m_comboBox->currentIndex();
|
||||||
if (ix == -1)
|
if (ix == -1)
|
||||||
return;
|
return;
|
||||||
emit actionTriggered(m_actionMap.key(m_comboBox->itemText(ix)));
|
emit actionTriggered(m_actions[ix].first);
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ signals:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
QString m_defaultAction;
|
QString m_defaultAction;
|
||||||
QHash<QString,QString> m_actionMap;
|
QList<QPair<QString/*action key*/, QString/*action value*/>> m_actions;
|
||||||
};
|
};
|
||||||
|
|
||||||
class NotificationActionsButtonsWidget : public NotificationActionsWidget
|
class NotificationActionsButtonsWidget : public NotificationActionsWidget
|
||||||
|
@ -40,21 +40,21 @@ Notifyd::Notifyd(QObject* parent)
|
|||||||
mId(0)
|
mId(0)
|
||||||
{
|
{
|
||||||
m_area = new NotificationArea();
|
m_area = new NotificationArea();
|
||||||
m_settings = new LxQt::Settings("notifications");
|
m_settings = new LXQt::Settings("notifications");
|
||||||
reloadSettings();
|
reloadSettings();
|
||||||
|
|
||||||
connect(this, SIGNAL(notificationAdded(uint,QString,QString,QString,QString,int,QStringList,QVariantMap)),
|
connect(this, &Notifyd::notificationAdded,
|
||||||
m_area->layout(), SLOT(addNotification(uint,QString,QString,QString,QString,int,QStringList,QVariantMap)));
|
m_area->layout(), &NotificationLayout::addNotification);
|
||||||
connect(this, SIGNAL(notificationClosed(uint, uint)),
|
connect(this, &Notifyd::notificationClosed,
|
||||||
m_area->layout(), SLOT(removeNotification(uint, uint)));
|
m_area->layout(), &NotificationLayout::removeNotification);
|
||||||
// feedback for original caller
|
// feedback for original caller
|
||||||
connect(m_area->layout(), SIGNAL(notificationClosed(uint,uint)),
|
connect(m_area->layout(), &NotificationLayout::notificationClosed,
|
||||||
this, SIGNAL(NotificationClosed(uint,uint)));
|
this, &Notifyd::NotificationClosed);
|
||||||
connect(m_area->layout(), SIGNAL(actionInvoked(uint, QString)),
|
connect(m_area->layout(), &NotificationLayout::actionInvoked,
|
||||||
this, SIGNAL(ActionInvoked(uint,QString)));
|
this, &Notifyd::ActionInvoked);
|
||||||
|
|
||||||
connect(m_settings, SIGNAL(settingsChanged()),
|
connect(m_settings, &LXQt::Settings::settingsChanged,
|
||||||
this, SLOT(reloadSettings()));
|
this, &Notifyd::reloadSettings);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ signals:
|
|||||||
*/
|
*/
|
||||||
void NotificationClosed(uint in0, uint in1);
|
void NotificationClosed(uint in0, uint in1);
|
||||||
|
|
||||||
// singals for our implementation - internal usage
|
// signals for our implementation - internal usage
|
||||||
|
|
||||||
/*! Promote the external request for notification closing into the display engine.
|
/*! Promote the external request for notification closing into the display engine.
|
||||||
* \param id an notification ID (obtained from \c Notify)
|
* \param id an notification ID (obtained from \c Notify)
|
||||||
@ -129,7 +129,7 @@ private:
|
|||||||
NotificationArea *m_area;
|
NotificationArea *m_area;
|
||||||
int m_serverTimeout;
|
int m_serverTimeout;
|
||||||
|
|
||||||
LxQt::Settings *m_settings;
|
LXQt::Settings *m_settings;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void reloadSettings();
|
void reloadSettings();
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE TS>
|
|
||||||
<TS version="2.0" language="en_US">
|
|
||||||
<context>
|
|
||||||
<name>NotificationActionsComboWidget</name>
|
|
||||||
<message>
|
|
||||||
<source>Actions:</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>OK</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
</TS>
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user