Compare commits
No commits in common. "ubuntu/questing" and "debian/0.10.0-2" have entirely different histories.
ubuntu/que
...
debian/0.1
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
build
|
10
AUTHORS
Normal file
10
AUTHORS
Normal file
@ -0,0 +1,10 @@
|
||||
Upstream Authors:
|
||||
LXQt team: http://lxqt.org
|
||||
Razor team: http://razor-qt.org
|
||||
|
||||
Copyright:
|
||||
Copyright (c) 2010-2012 Razor team
|
||||
Copyright (c) 2012-2014 LXQt team
|
||||
|
||||
License: GPL-2 and LGPL-2.1+
|
||||
The full text of the licenses can be found in the 'COPYING' file.
|
34
CMakeLists.txt
Normal file
34
CMakeLists.txt
Normal file
@ -0,0 +1,34 @@
|
||||
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
||||
|
||||
project(lxqt-notificationd)
|
||||
|
||||
option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
find_package(Qt5Widgets REQUIRED QUIET)
|
||||
find_package(Qt5DBus REQUIRED QUIET)
|
||||
find_package(Qt5LinguistTools REQUIRED QUIET)
|
||||
find_package(KF5WindowSystem REQUIRED QUIET)
|
||||
|
||||
find_package(lxqt REQUIRED QUIET)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
include(LXQtCompilerSettings NO_POLICY_SCOPE)
|
||||
include(LXQtTranslate)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(config)
|
||||
|
||||
# building tarball with CPack -------------------------------------------------
|
||||
include(InstallRequiredSystemLibraries)
|
||||
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)
|
458
LICENSE
Normal file
458
LICENSE
Normal file
@ -0,0 +1,458 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
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
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
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
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
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
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
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
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
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
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
11
README.md
Normal file
11
README.md
Normal file
@ -0,0 +1,11 @@
|
||||
# lxqt-notificationd
|
||||
|
||||
The LXQt Notification daemon
|
||||
|
||||
## Spec
|
||||
|
||||
lxqt-notificationd follows the Desktop Notifications Specification version 1.2.
|
||||
|
||||
It can be found here:
|
||||
|
||||
* https://people.gnome.org/~mccann/docs/notification-spec/notification-spec-latest.html
|
53
config/CMakeLists.txt
Normal file
53
config/CMakeLists.txt
Normal file
@ -0,0 +1,53 @@
|
||||
project(lxqt-config-notificationd)
|
||||
|
||||
set(NOTIFICATIONS_CONF_SRC
|
||||
advancedsettings.cpp
|
||||
basicsettings.cpp
|
||||
mainwindow.cpp
|
||||
main.cpp
|
||||
)
|
||||
|
||||
set(NOTIFICATIONS_CONF_UI
|
||||
advancedsettings.ui
|
||||
basicsettings.ui
|
||||
)
|
||||
|
||||
|
||||
# Translations **********************************
|
||||
lxqt_translate_ts(NOTIFICATIONS_CONF_QM
|
||||
UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS}
|
||||
SOURCES
|
||||
${NOTIFICATIONS_CONF_MOC}
|
||||
${NOTIFICATIONS_CONF_SRC}
|
||||
${NOTIFICATIONS_CONF_UI}
|
||||
INSTALL_DIR "${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}"
|
||||
)
|
||||
|
||||
lxqt_app_translation_loader(QM_LOADER ${PROJECT_NAME})
|
||||
lxqt_translate_desktop(DESKTOP_FILES SOURCES lxqt-config-notificationd.desktop.in)
|
||||
#************************************************
|
||||
|
||||
|
||||
add_executable(${PROJECT_NAME}
|
||||
${NOTIFICATIONS_CONF_SRC}
|
||||
${NOTIFICATIONS_CONF_QM}
|
||||
${DESKTOP_FILES}
|
||||
${QM_LOADER}
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
KF5::WindowSystem
|
||||
Qt5::Widgets
|
||||
lxqt
|
||||
)
|
||||
|
||||
install(TARGETS
|
||||
${PROJECT_NAME}
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||
COMPONENT Runtime
|
||||
)
|
||||
install(FILES
|
||||
${DESKTOP_FILES}
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications"
|
||||
COMPONENT Runtime
|
||||
)
|
66
config/advancedsettings.cpp
Normal file
66
config/advancedsettings.cpp
Normal file
@ -0,0 +1,66 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2010-2011 Razor team
|
||||
* Authors:
|
||||
* Petr Vanek <petr@scribus.info>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <QFileDialog>
|
||||
|
||||
#include "advancedsettings.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
|
||||
AdvancedSettings::AdvancedSettings(LXQt::Settings* settings, QWidget *parent):
|
||||
QWidget(parent),
|
||||
mSettings(settings)
|
||||
{
|
||||
setupUi(this);
|
||||
restoreSettings();
|
||||
|
||||
connect(serverDecidesBox, SIGNAL(valueChanged(int)), this, SLOT(save()));
|
||||
connect(spacingBox, SIGNAL(valueChanged(int)), this, SLOT(save()));
|
||||
connect(widthBox, SIGNAL(valueChanged(int)), this, SLOT(save()));
|
||||
}
|
||||
|
||||
AdvancedSettings::~AdvancedSettings()
|
||||
{
|
||||
}
|
||||
|
||||
void AdvancedSettings::restoreSettings()
|
||||
{
|
||||
int serverDecides = mSettings->value("server_decides", 10).toInt();
|
||||
if (serverDecides <= 0)
|
||||
serverDecides = 10;
|
||||
serverDecidesBox->setValue(serverDecides);
|
||||
|
||||
spacingBox->setValue(mSettings->value("spacing", 6).toInt());
|
||||
widthBox->setValue(mSettings->value("width", 300).toInt());
|
||||
}
|
||||
|
||||
void AdvancedSettings::save()
|
||||
{
|
||||
mSettings->setValue("server_decides", serverDecidesBox->value());
|
||||
mSettings->setValue("spacing", spacingBox->value());
|
||||
mSettings->setValue("width", widthBox->value());
|
||||
}
|
54
config/advancedsettings.h
Normal file
54
config/advancedsettings.h
Normal file
@ -0,0 +1,54 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2010-2011 Razor team
|
||||
* Authors:
|
||||
* Petr Vanek <petr@scribus.info>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#ifndef ADVANCEDSETTINGS_H
|
||||
#define ADVANCEDSETTINGS_H
|
||||
|
||||
#include <LXQt/Settings>
|
||||
#include <QWidget>
|
||||
#include "ui_advancedsettings.h"
|
||||
|
||||
class AdvancedSettings : public QWidget, public Ui::AdvancedSettings
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AdvancedSettings(LXQt::Settings* settings, QWidget* parent = 0);
|
||||
~AdvancedSettings();
|
||||
|
||||
public slots:
|
||||
void restoreSettings();
|
||||
|
||||
private:
|
||||
LXQt::Settings* mSettings;
|
||||
|
||||
private slots:
|
||||
void save();
|
||||
|
||||
};
|
||||
|
||||
#endif // MENUCONFIG_H
|
128
config/advancedsettings.ui
Normal file
128
config/advancedsettings.ui
Normal file
@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AdvancedSettings</class>
|
||||
<widget class="QWidget" name="AdvancedSettings">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>350</width>
|
||||
<height>301</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="1" column="0" rowspan="2" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Sizes</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="spacingLabel">
|
||||
<property name="text">
|
||||
<string>Width:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="widthBox">
|
||||
<property name="suffix">
|
||||
<string> px</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>2000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="widthLabel">
|
||||
<property name="text">
|
||||
<string>Spacing:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spacingBox">
|
||||
<property name="suffix">
|
||||
<string> px</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Duration</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<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">
|
||||
<string>Some notifications set their own on-screen duration.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="serverDecidesLabel">
|
||||
<property name="text">
|
||||
<string>Default duration:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="serverDecidesBox">
|
||||
<property name="suffix">
|
||||
<string> sec</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>7200</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
120
config/basicsettings.cpp
Normal file
120
config/basicsettings.cpp
Normal file
@ -0,0 +1,120 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2010-2011 Razor team
|
||||
* Authors:
|
||||
* Petr Vanek <petr@scribus.info>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <LXQt/Notification>
|
||||
|
||||
#include "basicsettings.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
|
||||
BasicSettings::BasicSettings(LXQt::Settings* settings, QWidget *parent) :
|
||||
QWidget(parent),
|
||||
mSettings(settings)
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
restoreSettings();
|
||||
|
||||
connect(topLeftRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||
connect(topCenterRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||
connect(topRightRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||
connect(centerLeftRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||
connect(centerCenterRB, 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;
|
||||
QString serverName = serverTest.serverInfo().name;
|
||||
if (serverName != "lxqt-notificationd")
|
||||
{
|
||||
if (serverName.isEmpty())
|
||||
warningLabel->setText(tr("<b>Warning:</b> No notifications daemon is running.\n"
|
||||
"A fallback will be used."));
|
||||
else
|
||||
warningLabel->setText(tr("<b>Warning:</b> A third-party notifications daemon (%1) is running.\n"
|
||||
"These settings won't have any effect on it!").arg(serverName));
|
||||
}
|
||||
}
|
||||
|
||||
BasicSettings::~BasicSettings()
|
||||
{
|
||||
}
|
||||
|
||||
void BasicSettings::restoreSettings()
|
||||
{
|
||||
QString placement = mSettings->value(QStringLiteral("placement"),
|
||||
QStringLiteral("bottom-right")).toString().toLower();
|
||||
|
||||
if (QStringLiteral("top-left") == placement)
|
||||
topLeftRB->setChecked(true);
|
||||
else if (QStringLiteral("top-center") == placement)
|
||||
topCenterRB->setChecked(true);
|
||||
else if (QStringLiteral("top-right") == placement)
|
||||
topRightRB->setChecked(true);
|
||||
else if (QStringLiteral("center-left") == placement)
|
||||
centerLeftRB->setChecked(true);
|
||||
else if (QStringLiteral("center-center") == placement)
|
||||
centerCenterRB->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()
|
||||
{
|
||||
QString align;
|
||||
if (topLeftRB->isChecked())
|
||||
align = QStringLiteral("top-left");
|
||||
else if (topCenterRB->isChecked())
|
||||
align = QStringLiteral("top-center");
|
||||
else if (topRightRB->isChecked())
|
||||
align = QStringLiteral("top-right");
|
||||
else if (centerLeftRB->isChecked())
|
||||
align = QStringLiteral("center-left");
|
||||
else if (centerCenterRB->isChecked())
|
||||
align = QStringLiteral("center-center");
|
||||
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");
|
||||
|
||||
mSettings->setValue(QStringLiteral("placement"), align);
|
||||
LXQt::Notification::notify(tr("Notification demo ") + align,
|
||||
tr("This is a test notification.\n All notifications will now appear here on LXQt."),
|
||||
QStringLiteral("lxqt-logo.png"));
|
||||
}
|
53
config/basicsettings.h
Normal file
53
config/basicsettings.h
Normal file
@ -0,0 +1,53 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2010-2011 Razor team
|
||||
* Authors:
|
||||
* Petr Vanek <petr@scribus.info>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#ifndef BASICSETTINGS_H
|
||||
#define BASICSETTINGS_H
|
||||
|
||||
#include <LXQt/Settings>
|
||||
#include <QWidget>
|
||||
#include "ui_basicsettings.h"
|
||||
|
||||
|
||||
class BasicSettings : public QWidget, public Ui::BasicSettings
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit BasicSettings(LXQt::Settings* settings, QWidget* parent = 0);
|
||||
~BasicSettings();
|
||||
|
||||
public slots:
|
||||
void restoreSettings();
|
||||
|
||||
private slots:
|
||||
void updateNotification();
|
||||
|
||||
private:
|
||||
LXQt::Settings* mSettings;
|
||||
};
|
||||
|
||||
#endif // BASICSETTINGS_H
|
191
config/basicsettings.ui
Normal file
191
config/basicsettings.ui
Normal file
@ -0,0 +1,191 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>BasicSettings</class>
|
||||
<widget class="QWidget" name="BasicSettings">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>148</width>
|
||||
<height>179</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Basic Settings</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Position on screen</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="4">
|
||||
<widget class="QRadioButton" name="bottomRightRB">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</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>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QRadioButton" name="centerCenterRB">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<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="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>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QRadioButton" name="centerLeftRB">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QRadioButton" name="bottomLeftRB">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</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>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>105</width>
|
||||
<height>51</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="warningLabel">
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<buttongroups>
|
||||
<buttongroup name="buttonGroup"/>
|
||||
</buttongroups>
|
||||
</ui>
|
11
config/lxqt-config-notificationd.desktop.in
Normal file
11
config/lxqt-config-notificationd.desktop.in
Normal file
@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Desktop Notifications
|
||||
GenericName=LXQt Notification Settings
|
||||
Comment=Configure desktop notifications
|
||||
Exec=lxqt-config-notificationd
|
||||
Icon=preferences-desktop-theme
|
||||
Categories=Settings;DesktopSettings;Qt;LXQt;
|
||||
OnlyShowIn=LXQt;
|
||||
|
||||
#TRANSLATIONS_DIR=translations
|
46
config/main.cpp
Normal file
46
config/main.cpp
Normal file
@ -0,0 +1,46 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2010-2011 Razor team
|
||||
* Authors:
|
||||
* Petr Vanek <petr@scribus.info>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <LXQt/SingleApplication>
|
||||
|
||||
#include <XdgIcon>
|
||||
#include <LXQt/Settings>
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
LXQt::SingleApplication a(argc, argv);
|
||||
|
||||
MainWindow w;
|
||||
w.setWindowIcon(QIcon::fromTheme("preferences-desktop-theme"));
|
||||
a.setActivationWindow(&w);
|
||||
w.show();
|
||||
|
||||
return a.exec();
|
||||
}
|
54
config/mainwindow.cpp
Normal file
54
config/mainwindow.cpp
Normal file
@ -0,0 +1,54 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2010-2011 Razor team
|
||||
* Authors:
|
||||
* Petr Vanek <petr@scribus.info>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <QtCore/QProcess>
|
||||
#include <QMessageBox>
|
||||
#include <QtDBus/QDBusConnection>
|
||||
#include <QtDBus/QDBusMessage>
|
||||
#include <LXQt/ConfigDialog>
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "basicsettings.h"
|
||||
#include "advancedsettings.h"
|
||||
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
LXQt::ConfigDialog(tr("Desktop Notifications"), new LXQt::Settings("notifications"), parent)
|
||||
{
|
||||
BasicSettings* basic = new BasicSettings(mSettings, this);
|
||||
addPage(basic, tr("Basic Settings"), "preferences-desktop-notification");
|
||||
connect(this, SIGNAL(reset()), basic, SLOT(restoreSettings()));
|
||||
|
||||
AdvancedSettings* menu = new AdvancedSettings(mSettings, this);
|
||||
addPage(menu, tr("Advanced Settings"), "preferences-desktop-notification-bell");
|
||||
connect(this, SIGNAL(reset()), menu, SLOT(restoreSettings()));
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete mSettings;
|
||||
}
|
44
config/mainwindow.h
Normal file
44
config/mainwindow.h
Normal file
@ -0,0 +1,44 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2010-2011 Razor team
|
||||
* Authors:
|
||||
* Petr Vanek <petr@scribus.info>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <LXQt/ConfigDialog>
|
||||
|
||||
|
||||
class MainWindow : public LXQt::ConfigDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget* parent = 0);
|
||||
~MainWindow();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
102
config/translations/lxqt-config-notificationd.ts
Normal file
102
config/translations/lxqt-config-notificationd.ts
Normal file
@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>AdvancedSettings</name>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="17"/>
|
||||
<source>Sizes</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="25"/>
|
||||
<source>Width:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="32"/>
|
||||
<location filename="../advancedsettings.ui" line="56"/>
|
||||
<source> px</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="49"/>
|
||||
<source>Spacing:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="68"/>
|
||||
<source>Duration</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="80"/>
|
||||
<source>Some notifications set their own on-screen duration.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="92"/>
|
||||
<source>Default duration:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="99"/>
|
||||
<source> sec</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BasicSettings</name>
|
||||
<message>
|
||||
<location filename="../basicsettings.ui" line="23"/>
|
||||
<source>Basic Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.ui" line="30"/>
|
||||
<source>Position on screen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="57"/>
|
||||
<source><b>Warning:</b> No notifications daemon is running.
|
||||
A fallback will be used.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="60"/>
|
||||
<source><b>Warning:</b> A third-party notifications daemon (%1) is running.
|
||||
These settings won't have any effect on it!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="117"/>
|
||||
<source>Notification demo </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="118"/>
|
||||
<source>This is a test notification.
|
||||
All notifications will now appear here on LXQt.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="40"/>
|
||||
<source>Desktop Notifications</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="43"/>
|
||||
<source>Basic Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="47"/>
|
||||
<source>Advanced Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
4
config/translations/lxqt-config-notificationd_ar.desktop
Normal file
4
config/translations/lxqt-config-notificationd_ar.desktop
Normal file
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[ar]=قائمة التطبيقات
|
||||
Name[ar]=أداة تهيئة جلسة ريزر
|
||||
Comment[ar]=إعداد إشعارات سطح المكتب المفتوح في سطح مكتب ريزر
|
4
config/translations/lxqt-config-notificationd_cs.desktop
Normal file
4
config/translations/lxqt-config-notificationd_cs.desktop
Normal file
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[cs]=Nastavení oznamování v LXQtu
|
||||
Name[cs]=Nastavení oznamování v LXQtu
|
||||
Comment[cs]=Nastavit oznamování na ploše LXQt
|
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[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
|
4
config/translations/lxqt-config-notificationd_da.desktop
Normal file
4
config/translations/lxqt-config-notificationd_da.desktop
Normal file
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[da]=Notesblok
|
||||
Name[da]=Strømstyring
|
||||
Comment[da]=Indstil freedesktop meddelelser på LXQt skrivebord
|
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[da_DK]=LXQt freedesktop Meddelelsesindstillinger
|
||||
Name[da_DK]=LXQt freedesktop Meddelelsesindstillinger
|
||||
Comment[da_DK]=Indstil freedesktop meddelelser på LXQt skrivebord
|
4
config/translations/lxqt-config-notificationd_de.desktop
Normal file
4
config/translations/lxqt-config-notificationd_de.desktop
Normal file
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
Name[de]=Mitteilungen der Arbeitsfläche
|
||||
GenericName[de]=LXQt Mitteilungseinstellungen
|
||||
Comment[de]=Konfiguration von Benachrichtigungen
|
105
config/translations/lxqt-config-notificationd_de.ts
Normal file
105
config/translations/lxqt-config-notificationd_de.ts
Normal file
@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="de">
|
||||
<context>
|
||||
<name>AdvancedSettings</name>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="17"/>
|
||||
<source>Sizes</source>
|
||||
<translation>Größen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="25"/>
|
||||
<source>Width:</source>
|
||||
<translation>Breite:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="32"/>
|
||||
<location filename="../advancedsettings.ui" line="56"/>
|
||||
<source> px</source>
|
||||
<translation> px</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="49"/>
|
||||
<source>Spacing:</source>
|
||||
<translation>Abstand:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="68"/>
|
||||
<source>Duration</source>
|
||||
<translation>Dauer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="80"/>
|
||||
<source>Some notifications set their own on-screen duration.</source>
|
||||
<translation>Einige Benachrichtigungen setzen ihre eigene Anzeigedauer.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="92"/>
|
||||
<source>Default duration:</source>
|
||||
<translation>Standarddauer:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="99"/>
|
||||
<source> sec</source>
|
||||
<translation> s</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BasicSettings</name>
|
||||
<message>
|
||||
<location filename="../basicsettings.ui" line="23"/>
|
||||
<source>Basic Settings</source>
|
||||
<translation>Grundeinstellungen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.ui" line="30"/>
|
||||
<source>Position on screen</source>
|
||||
<translation>Position auf dem Bildschirm</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="57"/>
|
||||
<source><b>Warning:</b> No notifications daemon is running.
|
||||
A fallback will be used.</source>
|
||||
<translation><b>Warnung:</b> Es läuft kein Benachrichtigungsdaemon.
|
||||
Ein Ersatz wird verwendet.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="60"/>
|
||||
<source><b>Warning:</b> A third-party notifications daemon (%1) is running.
|
||||
These settings won't have any effect on it!</source>
|
||||
<translation><b>Warnung:</b> Ein anderer Benachrichtigungsdaemon (%1) läuft.
|
||||
Diese Einstellungen wirken sich auf ihn nicht aus!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="117"/>
|
||||
<source>Notification demo </source>
|
||||
<translation>Testbenachrichtigung </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="118"/>
|
||||
<source>This is a test notification.
|
||||
All notifications will now appear here on LXQt.</source>
|
||||
<translation>Dies ist eine Testbenachrichtigung.
|
||||
Alle Benachrichtigungen erscheinen jetzt hier auf LXQt.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="40"/>
|
||||
<source>Desktop Notifications</source>
|
||||
<translation>Arbeitsflächenbenachrichtigungen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="43"/>
|
||||
<source>Basic Settings</source>
|
||||
<translation>Grundeinstellungen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="47"/>
|
||||
<source>Advanced Settings</source>
|
||||
<translation>Erweiterte Einstellungen</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
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
|
105
config/translations/lxqt-config-notificationd_el.ts
Normal file
105
config/translations/lxqt-config-notificationd_el.ts
Normal file
@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="el">
|
||||
<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="80"/>
|
||||
<source>Some notifications set their own on-screen duration.</source>
|
||||
<translation>Μερικές ειδοποιήσεις καθορίζουν τη δική τους διάρκεια εμφάνισης.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="92"/>
|
||||
<source>Default duration:</source>
|
||||
<translation>Διάρκεια εξ ορισμού:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="99"/>
|
||||
<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.cpp" line="57"/>
|
||||
<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="60"/>
|
||||
<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="117"/>
|
||||
<source>Notification demo </source>
|
||||
<translation>Επίδειξη ειδοποιήσεων </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="118"/>
|
||||
<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>
|
4
config/translations/lxqt-config-notificationd_eo.desktop
Normal file
4
config/translations/lxqt-config-notificationd_eo.desktop
Normal file
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[eo]=Agordoj de muso por LXQto
|
||||
Name[eo]=Agordoj de muso por LXQto
|
||||
Comment[eo]=Agordi atentigojn de freedesktop en LXQt-labortablo
|
4
config/translations/lxqt-config-notificationd_es.desktop
Normal file
4
config/translations/lxqt-config-notificationd_es.desktop
Normal file
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[es]=Administrador de tareas
|
||||
Name[es]=Configuración de sesiones LXQt
|
||||
Comment[es]=Configure las notificacionde de freedesktop en el escritorio LXQt
|
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[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
|
4
config/translations/lxqt-config-notificationd_eu.desktop
Normal file
4
config/translations/lxqt-config-notificationd_eu.desktop
Normal file
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[eu]=LXQt Freedesktop jakinarazpenen konfigurazioa
|
||||
Name[eu]=LXQt Freedesktop jakinarazpenen konfigurazioa
|
||||
Comment[eu]=Konfiguratu LXQt mahaigaineko Freedesktop jakinarazpenak
|
4
config/translations/lxqt-config-notificationd_fi.desktop
Normal file
4
config/translations/lxqt-config-notificationd_fi.desktop
Normal file
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[fi]=LXQt-työpöydän ilmoitusasetukset
|
||||
Name[fi]=LXQt-työpöydän ilmoitusasetukset
|
||||
Comment[fi]=Muokkaa LXQt-työpöydän ilmoituksia
|
@ -0,0 +1,3 @@
|
||||
# Translations
|
||||
GenericName[fr_FR]=Paramétrage des notifications du bureau
|
||||
Name[fr_FR]=Paramétrage notifications
|
150
config/translations/lxqt-config-notificationd_hr.ts
Normal file
150
config/translations/lxqt-config-notificationd_hr.ts
Normal file
@ -0,0 +1,150 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="hr_HR">
|
||||
<context>
|
||||
<name>AdvancedSettings</name>
|
||||
<message>
|
||||
<source>Menu Configuration</source>
|
||||
<translation type="obsolete">Konfiguracija izbornika</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Notification Duration</source>
|
||||
<translation type="obsolete">Trajanje obavijesti</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>For some the notification's expiration time is dependent on the notification server's settings.</source>
|
||||
<translation type="obsolete">Za neke obavijesti's vrijeme istjecanja ovisi o postavkama poslužitelja's obavijesti</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="25"/>
|
||||
<source>Width:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="49"/>
|
||||
<source>Spacing:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="68"/>
|
||||
<source>Duration</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="80"/>
|
||||
<source>Some notifications set their own on-screen duration.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="92"/>
|
||||
<source>Default duration:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="99"/>
|
||||
<source> sec</source>
|
||||
<translation type="unfinished">sek</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="17"/>
|
||||
<source>Sizes</source>
|
||||
<translation type="unfinished">Veličine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Notification Spacing:</source>
|
||||
<translation type="obsolete">Razmak obavijesti</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="32"/>
|
||||
<location filename="../advancedsettings.ui" line="56"/>
|
||||
<source> px</source>
|
||||
<translation type="unfinished"> px</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Notification Width:</source>
|
||||
<translation type="obsolete">Širina obavijesti</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BasicSettings</name>
|
||||
<message>
|
||||
<location filename="../basicsettings.ui" line="23"/>
|
||||
<source>Basic Settings</source>
|
||||
<translation type="unfinished">Osnovne postavke</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.ui" line="30"/>
|
||||
<source>Position on screen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Display Notifications</source>
|
||||
<translation type="obsolete">Prikaži obavijesti</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top/Left</source>
|
||||
<translation type="obsolete">Gore/lijevo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top/Right</source>
|
||||
<translation type="obsolete">Gore/desno</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom/Left</source>
|
||||
<translation type="obsolete">Dolje/lijevo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom/Right</source>
|
||||
<translation type="obsolete">Dolje/desno</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Test Notification</source>
|
||||
<translation type="obsolete">Isprobaj obavijesti</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="57"/>
|
||||
<source><b>Warning:</b> No notifications daemon is running.
|
||||
A fallback will be used.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="60"/>
|
||||
<source><b>Warning:</b> A third-party notifications daemon (%1) is running.
|
||||
These settings won't have any effect on it!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="117"/>
|
||||
<source>Notification demo </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="118"/>
|
||||
<source>This is a test notification.
|
||||
All notifications will now appear here on LXQt.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Notification Summary</source>
|
||||
<translation type="obsolete">Sažetak obavijesti</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="40"/>
|
||||
<source>Desktop Notifications</source>
|
||||
<translation type="unfinished">Obavijesti radne površine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="43"/>
|
||||
<source>Basic Settings</source>
|
||||
<translation type="unfinished">Osnovne postavke</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="47"/>
|
||||
<source>Advanced Settings</source>
|
||||
<translation type="unfinished">Napredne postavke</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
4
config/translations/lxqt-config-notificationd_hu.desktop
Normal file
4
config/translations/lxqt-config-notificationd_hu.desktop
Normal file
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[hu]=Az asztali értesítések beállítása
|
||||
Name[hu]=LXQt értesítések beállítása
|
||||
Comment[hu]=A felbukkanó értesítések beállítása
|
130
config/translations/lxqt-config-notificationd_hu.ts
Normal file
130
config/translations/lxqt-config-notificationd_hu.ts
Normal file
@ -0,0 +1,130 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="hu_HU">
|
||||
<context>
|
||||
<name>AdvancedSettings</name>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="17"/>
|
||||
<source>Sizes</source>
|
||||
<translation>Méret</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="25"/>
|
||||
<source>Width:</source>
|
||||
<translation>Szélesség:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="32"/>
|
||||
<location filename="../advancedsettings.ui" line="56"/>
|
||||
<source> px</source>
|
||||
<translation> pixel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="49"/>
|
||||
<source>Spacing:</source>
|
||||
<translation>Térköz:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="68"/>
|
||||
<source>Duration</source>
|
||||
<translation>Tartam</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="80"/>
|
||||
<source>Some notifications set their own on-screen duration.</source>
|
||||
<translation>Egyes értesítések megjelenési ideje</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="92"/>
|
||||
<source>Default duration:</source>
|
||||
<translation>Alapértelmezett tartam:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="99"/>
|
||||
<source> sec</source>
|
||||
<translation> mp</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BasicSettings</name>
|
||||
<message>
|
||||
<location filename="../basicsettings.ui" line="23"/>
|
||||
<source>Basic Settings</source>
|
||||
<translation>Alapbeállítások</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.ui" line="30"/>
|
||||
<source>Position on screen</source>
|
||||
<translation>Hely</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top/Left</source>
|
||||
<translation type="vanished">Balra fenn</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top/Right</source>
|
||||
<translation type="vanished">Jobbra fenn</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom/Left</source>
|
||||
<translation type="vanished">Balra lenn</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom/Right</source>
|
||||
<translation type="vanished">Jobbra lenn</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="57"/>
|
||||
<source><b>Warning:</b> No notifications daemon is running.
|
||||
A fallback will be used.</source>
|
||||
<translation><b>Figyelem:</b> Értesítő démon nem fut.
|
||||
A vésztartalék használatos.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="60"/>
|
||||
<source><b>Warning:</b> A third-party notifications daemon (%1) is running.
|
||||
These settings won't have any effect on it!</source>
|
||||
<translation><b>Figyelem:</b> A (%1) démont már valaki futtatja.
|
||||
Ezek a beállítások arra már hatástalanok!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="117"/>
|
||||
<source>Notification demo </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="118"/>
|
||||
<source>This is a test notification.
|
||||
All notifications will now appear here on LXQt.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Notification demo</source>
|
||||
<translation type="vanished">Értesítési bemutató</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This is a test notification.
|
||||
All notifications will now appear here on LXQt.</source>
|
||||
<translation type="vanished">Az értesítés tesztje
|
||||
Minden értesítést megjelenít az LXQt.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="40"/>
|
||||
<source>Desktop Notifications</source>
|
||||
<translation>Asztali értesítések</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="43"/>
|
||||
<source>Basic Settings</source>
|
||||
<translation>Alapbeállítások</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="47"/>
|
||||
<source>Advanced Settings</source>
|
||||
<translation>Haladó beállítások</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -0,0 +1,3 @@
|
||||
# Translations
|
||||
GenericName[id_ID]=Hell World
|
||||
Name[id_ID]=Konfigurator Desktop LXQt
|
4
config/translations/lxqt-config-notificationd_it.desktop
Normal file
4
config/translations/lxqt-config-notificationd_it.desktop
Normal file
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[it]=Notifiche
|
||||
Name[it]=Configura notifiche
|
||||
Comment[it]=Configura le notifiche Freedesktop del Desktop LXQt
|
166
config/translations/lxqt-config-notificationd_it.ts
Normal file
166
config/translations/lxqt-config-notificationd_it.ts
Normal file
@ -0,0 +1,166 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="it">
|
||||
<context>
|
||||
<name>AdvancedSettings</name>
|
||||
<message>
|
||||
<source>Menu Configuration</source>
|
||||
<translation type="vanished">Configurazione del menu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Notification Duration</source>
|
||||
<translation type="vanished">Durata delle notifiche</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>For some the notification's expiration time is dependent on the notification server's settings.</source>
|
||||
<translation type="vanished">Per alcune notifiche il tempo dipende dalle impostazioni del server delle notifiche.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>"Server Decides" Time:</source>
|
||||
<translation type="vanished">Tempo di decisioni del server:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="25"/>
|
||||
<source>Width:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="49"/>
|
||||
<source>Spacing:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="68"/>
|
||||
<source>Duration</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="80"/>
|
||||
<source>Some notifications set their own on-screen duration.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="92"/>
|
||||
<source>Default duration:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="99"/>
|
||||
<source> sec</source>
|
||||
<translation> sec</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="17"/>
|
||||
<source>Sizes</source>
|
||||
<translation>Dimensione</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Notification Spacing:</source>
|
||||
<translatorcomment>a cosa si riferisce??</translatorcomment>
|
||||
<translation type="obsolete">Spazing:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="32"/>
|
||||
<location filename="../advancedsettings.ui" line="56"/>
|
||||
<source> px</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Notification Width:</source>
|
||||
<translation type="vanished">Larghezza:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BasicSettings</name>
|
||||
<message>
|
||||
<location filename="../basicsettings.ui" line="23"/>
|
||||
<source>Basic Settings</source>
|
||||
<translation>Impostazioni base</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.ui" line="30"/>
|
||||
<source>Position on screen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Display Notifications</source>
|
||||
<translation type="vanished">Mostra notifiche</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top/Left</source>
|
||||
<translation type="vanished">Alto a sinistra</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top/Right</source>
|
||||
<translation type="vanished">Alto a destra</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom/Left</source>
|
||||
<translation type="vanished">Fondo a sinistra</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom/Right</source>
|
||||
<translation type="vanished">Fondo a destra</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Test Notification</source>
|
||||
<translation type="vanished">Notifica di prova</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="57"/>
|
||||
<source><b>Warning:</b> No notifications daemon is running.
|
||||
A fallback will be used.</source>
|
||||
<translation><b>Attenzione:</b> Nessun demone di notifiche è in esecuzione.
|
||||
Sarà usato un sistema di riserva.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="60"/>
|
||||
<source><b>Warning:</b> A third-party notifications daemon (%1) is running.
|
||||
These settings won't have any effect on it!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="117"/>
|
||||
<source>Notification demo </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="118"/>
|
||||
<source>This is a test notification.
|
||||
All notifications will now appear here on LXQt.</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="vanished"><b>Attenzione:</b> Un altro demone di notifiche (%1) è in esecuzione.
|
||||
Queste impostazioni non avranno effetto su quello!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Notification Summary</source>
|
||||
<translation type="vanished">Sommario della notifica</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Notification Body</source>
|
||||
<translation type="vanished">Corpo della notifica</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="40"/>
|
||||
<source>Desktop Notifications</source>
|
||||
<translation type="unfinished">Notificazioni Desktop</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="43"/>
|
||||
<source>Basic Settings</source>
|
||||
<translation>Impostazioni base</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="47"/>
|
||||
<source>Advanced Settings</source>
|
||||
<translation>Impostazioni avanzate</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
4
config/translations/lxqt-config-notificationd_ja.desktop
Normal file
4
config/translations/lxqt-config-notificationd_ja.desktop
Normal file
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[ja]=LXQtフリーデスクトップ通知の設定
|
||||
Name[ja]=LXQtフリーデスクトップ通知の設定
|
||||
Comment[ja]=LXQtデスクトップでフリーデスクトップ通知を設定
|
4
config/translations/lxqt-config-notificationd_lt.desktop
Normal file
4
config/translations/lxqt-config-notificationd_lt.desktop
Normal file
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[lt]=Qlipper
|
||||
Name[lt]=Energijos naudojimo nustatymai
|
||||
Comment[lt]=Konfigūruoti freedesktop pranešimus LXQt darbalaukyje
|
4
config/translations/lxqt-config-notificationd_nl.desktop
Normal file
4
config/translations/lxqt-config-notificationd_nl.desktop
Normal file
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[nl]=Notepad
|
||||
Name[nl]=Energiebeheer
|
||||
Comment[nl]=Configureren freedesktop meldingen in LXQt desktop
|
3
config/translations/lxqt-config-notificationd_pl.desktop
Normal file
3
config/translations/lxqt-config-notificationd_pl.desktop
Normal file
@ -0,0 +1,3 @@
|
||||
# Translations
|
||||
GenericName[pl]=Menu
|
||||
Name[pl]=Panel sterowania LXQt
|
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[pl_PL]=Konfiguracja wyglądu LXQt
|
||||
Name[pl_PL]=Konfiguracja wyglądu LXQt
|
||||
Comment[pl_PL]=Konfiguruj powiadomienia freedesktop w LXQt
|
4
config/translations/lxqt-config-notificationd_pt.desktop
Normal file
4
config/translations/lxqt-config-notificationd_pt.desktop
Normal file
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
Name[pt]=Notificações do ambiente de trabalho
|
||||
GenericName[pt]=Definições das notificações do LXQt
|
||||
Comment[pt]=Configurar notificações do sistema
|
165
config/translations/lxqt-config-notificationd_pt.ts
Normal file
165
config/translations/lxqt-config-notificationd_pt.ts
Normal file
@ -0,0 +1,165 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="pt">
|
||||
<context>
|
||||
<name>AdvancedSettings</name>
|
||||
<message>
|
||||
<source>Menu Configuration</source>
|
||||
<translation type="vanished">Configuração do menu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Notification Duration</source>
|
||||
<translation type="vanished">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 type="vanished">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 type="vanished">Tempo para "Decisão do servidor":</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="25"/>
|
||||
<source>Width:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="49"/>
|
||||
<source>Spacing:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="68"/>
|
||||
<source>Duration</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="80"/>
|
||||
<source>Some notifications set their own on-screen duration.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="92"/>
|
||||
<source>Default duration:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="99"/>
|
||||
<source> sec</source>
|
||||
<translation> seg</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="17"/>
|
||||
<source>Sizes</source>
|
||||
<translation>Tamanhos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Notification Spacing:</source>
|
||||
<translation type="vanished">Espaçamento da notificação:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="32"/>
|
||||
<location filename="../advancedsettings.ui" line="56"/>
|
||||
<source> px</source>
|
||||
<translation> px</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Notification Width:</source>
|
||||
<translation type="vanished">Largura da notificaçao:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BasicSettings</name>
|
||||
<message>
|
||||
<location filename="../basicsettings.ui" line="23"/>
|
||||
<source>Basic Settings</source>
|
||||
<translation>Definições básicas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.ui" line="30"/>
|
||||
<source>Position on screen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Display Notifications</source>
|
||||
<translation type="vanished">Mostrar notificações</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top/Left</source>
|
||||
<translation type="vanished">Cima/Esquerda</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top/Right</source>
|
||||
<translation type="vanished">Cima/Direita</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom/Left</source>
|
||||
<translation type="vanished">Baixo/Esquerda</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom/Right</source>
|
||||
<translation type="vanished">Baixo/Direita</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Test Notification</source>
|
||||
<translation type="vanished">Testar notificação</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="57"/>
|
||||
<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>
|
||||
<location filename="../basicsettings.cpp" line="60"/>
|
||||
<source><b>Warning:</b> A third-party notifications daemon (%1) is running.
|
||||
These settings won't have any effect on it!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="117"/>
|
||||
<source>Notification demo </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="118"/>
|
||||
<source>This is a test notification.
|
||||
All notifications will now appear here on LXQt.</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="vanished"><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 type="vanished">Resumo da notificação</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Notification Body</source>
|
||||
<translation type="vanished">Corpo da notificação</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="40"/>
|
||||
<source>Desktop Notifications</source>
|
||||
<translation>Notificações do ambiente de trabalho</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="43"/>
|
||||
<source>Basic Settings</source>
|
||||
<translation>Definições básicas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="47"/>
|
||||
<source>Advanced Settings</source>
|
||||
<translation>Definições avançadas</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[pt_BR]=Suspender Automaticamente
|
||||
Name[pt_BR]=Gerenciamento de energia
|
||||
Comment[pt_BR]=Configurar as notificações do freedesktop na área de trabalho do LXQt
|
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[ro_RO]=Părăsește
|
||||
Name[ro_RO]=Părăsește sistemul
|
||||
Comment[ro_RO]=Configurează notificările freedesktop în desktop-ul LXQt
|
4
config/translations/lxqt-config-notificationd_ru.desktop
Normal file
4
config/translations/lxqt-config-notificationd_ru.desktop
Normal file
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[ru]=Настройки уведомлений LXQt
|
||||
Name[ru]=Уведомления рабочего стола
|
||||
Comment[ru]=Настроить уведомления рабочего стола
|
130
config/translations/lxqt-config-notificationd_ru.ts
Normal file
130
config/translations/lxqt-config-notificationd_ru.ts
Normal file
@ -0,0 +1,130 @@
|
||||
<?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="80"/>
|
||||
<source>Some notifications set their own on-screen duration.</source>
|
||||
<translation>Некоторые уведомления сами устанавливают свою длительность на экране.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="92"/>
|
||||
<source>Default duration:</source>
|
||||
<translation>Длительность по умолчанию:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="99"/>
|
||||
<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>
|
||||
<source>Top/Left</source>
|
||||
<translation type="vanished">Вверху слева</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top/Right</source>
|
||||
<translation type="vanished">Вверху справа</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom/Left</source>
|
||||
<translation type="vanished">Внизу слева</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom/Right</source>
|
||||
<translation type="vanished">Внизу справа</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="57"/>
|
||||
<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="60"/>
|
||||
<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="117"/>
|
||||
<source>Notification demo </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="118"/>
|
||||
<source>This is a test notification.
|
||||
All notifications will now appear here on LXQt.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Notification demo</source>
|
||||
<translation type="vanished">Демонстрация уведомления</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This is a test notification.
|
||||
All notifications will now appear here on LXQt.</source>
|
||||
<translation type="vanished">Это тестовое уведомление.
|
||||
Все уведомления на 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>
|
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[ru_RU]=Настройки уведомлений LXQt
|
||||
Name[ru_RU]=Уведомления рабочего стола
|
||||
Comment[ru_RU]=Настроить уведомления рабочего стола
|
130
config/translations/lxqt-config-notificationd_ru_RU.ts
Normal file
130
config/translations/lxqt-config-notificationd_ru_RU.ts
Normal file
@ -0,0 +1,130 @@
|
||||
<?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="80"/>
|
||||
<source>Some notifications set their own on-screen duration.</source>
|
||||
<translation>Некоторые уведомления сами устанавливают свою длительность на экране.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="92"/>
|
||||
<source>Default duration:</source>
|
||||
<translation>Длительность по умолчанию:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../advancedsettings.ui" line="99"/>
|
||||
<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>
|
||||
<source>Top/Left</source>
|
||||
<translation type="vanished">Вверху слева</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top/Right</source>
|
||||
<translation type="vanished">Вверху справа</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom/Left</source>
|
||||
<translation type="vanished">Внизу слева</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom/Right</source>
|
||||
<translation type="vanished">Внизу справа</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="57"/>
|
||||
<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="60"/>
|
||||
<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="117"/>
|
||||
<source>Notification demo </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="118"/>
|
||||
<source>This is a test notification.
|
||||
All notifications will now appear here on LXQt.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Notification demo</source>
|
||||
<translation type="vanished">Демонстрация уведомления</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This is a test notification.
|
||||
All notifications will now appear here on LXQt.</source>
|
||||
<translation type="vanished">Это тестовое уведомление.
|
||||
Все уведомления на 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>
|
4
config/translations/lxqt-config-notificationd_sl.desktop
Normal file
4
config/translations/lxqt-config-notificationd_sl.desktop
Normal file
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[sl]=Nastavitve obvestil
|
||||
Name[sl]=Nastavitve obvestil na namizju
|
||||
Comment[sl]=Nastavite obvestila na namizju LXQt
|
@ -0,0 +1,3 @@
|
||||
# Translations
|
||||
GenericName[sr@latin]=Automatsko suspendovanje
|
||||
Name[sr@latin]=Upravljanje napajanjem
|
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[th_TH]=การตั้งค่าการเตือนต่างๆ ของ LXQt Freedesktop
|
||||
Name[th_TH]=การตั้งค่าการเตือนต่างๆ ของ LXQt Freedesktop
|
||||
Comment[th_TH]=ตั้งค่าการเตือนต่างๆ ของ freedesktop ในเดสก์ท็อป LXQt
|
4
config/translations/lxqt-config-notificationd_tr.desktop
Normal file
4
config/translations/lxqt-config-notificationd_tr.desktop
Normal file
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[tr]=Not Defteri
|
||||
Name[tr]=Güç yönetimi
|
||||
Comment[tr]=LXQt masaüstünde freedesktop bildirimlerini ayarla
|
4
config/translations/lxqt-config-notificationd_uk.desktop
Normal file
4
config/translations/lxqt-config-notificationd_uk.desktop
Normal file
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[uk]=Налаштування Freedesktop сповіщень LXQt
|
||||
Name[uk]=Налаштування Freedesktop сповіщень LXQt
|
||||
Comment[uk]=Налаштувати Freedesktop сповіщення в стільниці LXQt
|
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[zh_CN]=qxkb
|
||||
Name[zh_CN]=LXQt 通知配置
|
||||
Comment[zh_CN]=配置 LXQt 桌面的通知
|
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
GenericName[zh_TW]=LXQt通知設定
|
||||
Name[zh_TW]=LXQt通知設定
|
||||
Comment[zh_TW]=LXQt桌面上的FreeDesktop通知設定
|
3
debian/.gitignore
vendored
3
debian/.gitignore
vendored
@ -1,8 +1,7 @@
|
||||
/*.debhelper
|
||||
/*.log
|
||||
/*.substvars
|
||||
/debhelper-build-stamp
|
||||
/files
|
||||
|
||||
/lxqt-notificationd/
|
||||
|
||||
/lxqt-notificationd-dbg/
|
||||
|
269
debian/changelog
vendored
269
debian/changelog
vendored
@ -1,272 +1,3 @@
|
||||
lxqt-notificationd (2.2.0-0ubuntu1) questing; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
- Update build dependencies.
|
||||
* Update copyright file.
|
||||
* Update Standards-Version to 4.7.2, no changes needed.
|
||||
|
||||
-- Aaron Rainbolt <arraybolt3@ubuntu.com> Thu, 31 Jul 2025 16:06:04 -0500
|
||||
|
||||
lxqt-notificationd (2.1.1-0ubuntu3) plucky; urgency=medium
|
||||
|
||||
* Update Standards-Version to 4.7.1, no changes needed.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 21 Feb 2025 16:40:17 -0600
|
||||
|
||||
lxqt-notificationd (2.1.1-0ubuntu2) plucky; urgency=medium
|
||||
|
||||
* No-change rebuild for lxqt-build-tools C++17 -> C++20.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 03 Jan 2025 03:56:58 -0600
|
||||
|
||||
lxqt-notificationd (2.1.1-0ubuntu1) plucky; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Tue, 10 Dec 2024 17:44:52 -0600
|
||||
|
||||
lxqt-notificationd (2.1.0-0ubuntu1) plucky; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
- Bump build dependencies.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 15 Nov 2024 15:32:43 -0600
|
||||
|
||||
lxqt-notificationd (2.0.1-0ubuntu1) oracular; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* Update copyright file.
|
||||
* Bump Standards-Version to 4.7.0, no changes necessary.
|
||||
* Adjust build dependencies.
|
||||
|
||||
-- Aaron Rainbolt <arraybolt3@ubuntu.com> Thu, 15 Aug 2024 16:38:59 -0500
|
||||
|
||||
lxqt-notificationd (1.4.0-0ubuntu1) noble; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* Bump build dependencies.
|
||||
* Fix outdated Lintian override formatting.
|
||||
* Add an upstream metadata file in the packaging.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Sun, 12 Nov 2023 18:28:09 -0600
|
||||
|
||||
lxqt-notificationd (1.3.0-0ubuntu1) mantic; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* Bump build dependencies.
|
||||
* Bump Standards-Version to 4.6.2, no changes needed.
|
||||
* I guess we don't require root to build, do we?
|
||||
* Bad trailing whitespace.
|
||||
* Remove redundant build flags.
|
||||
* Update copyright years.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 11 Aug 2023 09:50:36 -0500
|
||||
|
||||
lxqt-notificationd (1.2.0-0ubuntu1) lunar; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* Fix the watch file, for real this time.
|
||||
* Bump build dependencies in debian/control.
|
||||
* Bump Standards-version to 4.6.1, no changes needed.
|
||||
* Lubuntuify the package slightly, to make debhelper happy.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 18 Nov 2022 17:28:36 -0600
|
||||
|
||||
lxqt-notificationd (1.1.0-0ubuntu1) kinetic; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* Bump build dependencies.
|
||||
* Remove old Breaks/Replaces since we're past the LTS.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Wed, 01 Jun 2022 15:57:42 -0500
|
||||
|
||||
lxqt-notificationd (0.17.0-0ubuntu1) impish; urgency=medium
|
||||
|
||||
* New upstream release 0.17.0
|
||||
* Update debian/control
|
||||
- Bump Standards-Version to 4.5.1
|
||||
- Use liblxqt0-dev 0.17.0
|
||||
* Rename tag for lintian override
|
||||
* Extend lxqt-notificationd-l10n package description
|
||||
* Update debian/copyright
|
||||
|
||||
-- apt-ghetto <apt-ghetto@protonmail.com> Fri, 13 Aug 2021 13:59:14 +0200
|
||||
|
||||
lxqt-notificationd (0.16.0-1ubuntu1) hirsute; urgency=medium
|
||||
|
||||
* New upstream version.
|
||||
* Bump debhelper-compat requirement to 13.
|
||||
|
||||
-- Raman Sarda <theloudspeaker@disroot.org> Mon, 22 Feb 2021 00:45:40 +0530
|
||||
|
||||
lxqt-notificationd (0.16.0-1) unstable; urgency=medium
|
||||
|
||||
[ Alf Gaida ]
|
||||
* Switched to gbp
|
||||
* Bumped Standards-Version to 4.4.0, no changes needed
|
||||
|
||||
[ Andrew Lee (李健秋) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Andrew Lee (李健秋) <ajqlee@debian.org> Wed, 06 Jan 2021 17:26:15 +0800
|
||||
|
||||
lxqt-notificationd (0.15.0-0ubuntu1) groovy; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
- Update upstream signing key.
|
||||
- Update LXQt build depends.
|
||||
* Update Standards-version to 4.5.0, no changes needed.
|
||||
* Migrate to using debhelper-compat.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Thu, 04 Jun 2020 14:03:55 -0500
|
||||
|
||||
lxqt-notificationd (0.14.1-1ubuntu1) focal; urgency=medium
|
||||
|
||||
* Update build depends according to merge from debian.
|
||||
|
||||
-- Raman Sarda <theloudspeaker@lubuntu.me> Thu, 30 Jan 2020 02:45:02 +0530
|
||||
|
||||
lxqt-notificationd (0.14.1-1) unstable; urgency=medium
|
||||
|
||||
* Cherry-picking new upstream version 0.14.1.
|
||||
* Bumped minimum version liblxqt0-dev (>= 0.14.1~)
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Tue, 26 Feb 2019 01:52:36 +0100
|
||||
|
||||
lxqt-notificationd (0.14.1-0ubuntu1) disco; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* Run wrap-and-sort.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Sat, 09 Mar 2019 13:08:37 -0600
|
||||
|
||||
lxqt-notificationd (0.14.0-1) unstable; urgency=medium
|
||||
|
||||
* Cherry-picking new upstream version 0.14.0.
|
||||
* Bumped Standards to 4.3.0, no changes needed
|
||||
* Dropped d/compat, use debhelper-compat = 12, no changes needed
|
||||
* Fixed years in d/copyright
|
||||
* Bumped minimum version liblxqt0-dev (>= 0.14.0~)
|
||||
* Removed obsolete PULL_TRANSLATIONS= OFF from dh_auto_configure
|
||||
* Added l10n-package, moved from lxqt-l10n
|
||||
* Added d/upstream/metadata
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Sun, 27 Jan 2019 12:41:20 +0100
|
||||
|
||||
lxqt-notificationd (0.14.0-0ubuntu1) disco; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
- Bump build dependencies.
|
||||
- Remove reverse-applicable patches.
|
||||
* Bump Standards-version to 4.3.0, no changes needed.
|
||||
* Bump debhelper compat to 12, no changes needed.
|
||||
* Add a lxqt-notificationd-l10n package.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Sat, 26 Jan 2019 00:22:05 -0600
|
||||
|
||||
lxqt-notificationd (0.13.0-1) unstable; urgency=medium
|
||||
|
||||
* Cherry-picking new upstream version 0.13.0.
|
||||
* Bumped build dependency liblxqt0-dev to >= 0.13.0~
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Thu, 24 May 2018 21:45:09 +0200
|
||||
|
||||
lxqt-notificationd (0.13.0-0ubuntu2) cosmic; urgency=medium
|
||||
|
||||
* Bump Standards-version to 4.1.5, no changes needed.
|
||||
* Keep notification height when others are added and/or removed.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Sat, 14 Jul 2018 01:45:12 -0500
|
||||
|
||||
lxqt-notificationd (0.13.0-0ubuntu1) cosmic; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* Update Vcs-* and Maintainer to Lubuntu values.
|
||||
* Update build dependencies.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Tue, 22 May 2018 23:38:43 -0500
|
||||
|
||||
lxqt-notificationd (0.12.0-4) unstable; urgency=medium
|
||||
|
||||
* Bumped compat to 11
|
||||
* Bumped debhelper to >= 11~
|
||||
* Bumped Standards to 4.1.4, no changes needed
|
||||
* Changed VCS fields for salsa
|
||||
* Changed Homepage, Source and watch to lxqt
|
||||
* Bumped years in copyright
|
||||
* Removed trailing whitespaces in changelog
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Sat, 28 Apr 2018 14:57:08 +0200
|
||||
|
||||
lxqt-notificationd (0.12.0-3) unstable; urgency=medium
|
||||
|
||||
* Bumped Standards to 4.1.2, no changes needed
|
||||
* Removed debian/gbp.conf
|
||||
* Removed branch from VCS fields
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Thu, 14 Dec 2017 20:59:59 +0100
|
||||
|
||||
lxqt-notificationd (0.12.0-2) unstable; urgency=medium
|
||||
|
||||
* Transition to unstable
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Mon, 04 Dec 2017 22:41:19 +0100
|
||||
|
||||
lxqt-notificationd (0.12.0-1) experimental; urgency=medium
|
||||
|
||||
* Cherry-picking upstream release 0.11.0.
|
||||
* Bumped Standards to 4.1.1 - no changes needed
|
||||
* Bumped liblxqt dependency to >= 0.12.0
|
||||
* Added Breaks/Replaces for lxqt-common << 0.12.0
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Tue, 24 Oct 2017 18:24:23 +0200
|
||||
|
||||
lxqt-notificationd (0.11.1-2) unstable; urgency=medium
|
||||
|
||||
* Bumped Standards to 4.0.0 - no changes needed
|
||||
* Fixed typo in changelog
|
||||
* Added Recommends: lxqt-qtplugin (Closes: #866253)
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Fri, 30 Jun 2017 20:58:35 +0200
|
||||
|
||||
lxqt-notificationd (0.11.1-1) unstable; urgency=medium
|
||||
|
||||
* Cherry-picking upstream release 0.11.1.
|
||||
* Removed some build dependencies:
|
||||
-cmake
|
||||
-libqt5xdg-dev
|
||||
-libqt5xdgiconloader-dev
|
||||
-pkg-config
|
||||
-qttools5-dev
|
||||
-qttools5-dev-tools
|
||||
* Bumped build dependency liblxqt0-dev (>= 0.11.1)
|
||||
* Bumped years in d/copyright
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Mon, 02 Jan 2017 14:01:39 +0100
|
||||
|
||||
lxqt-notificationd (0.11.0-2) unstable; urgency=medium
|
||||
|
||||
* Cherry-picking upstream release 0.11.0.
|
||||
* Synced debian foo with experimental
|
||||
* Bumped Standards to 3.9.8, no changes needed
|
||||
* Bumped compat to 10
|
||||
* Removed --parallel from rules, compat 10 standard
|
||||
* Bumped minimum version debhelper (>= 10)
|
||||
* Bumped minimum version libqtxdg-dev (>= 2.0.0)
|
||||
* Bumped build dependency liblxqt-dev (>= 0.11.0)
|
||||
* Added build dependency libqt5svg5-dev
|
||||
* Added build dependency libqt5xdgiconloader-dev (>= 2.0)
|
||||
* Added Recommends lxqt-notificationd-l10n
|
||||
* Fixed VCS-Fields, use https and plain /git/
|
||||
* Fixed copyright Format field
|
||||
* Bumped copyright years
|
||||
* Added translation control to rules
|
||||
* Set CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
* Exported LC_ALL=C.UTF-8, make builds reproducible
|
||||
* Added README.md to docs
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Tue, 18 Oct 2016 03:02:33 +0200
|
||||
|
||||
lxqt-notificationd (0.10.0-2) unstable; urgency=medium
|
||||
|
||||
* Remove dbg package in favor of dbgsym.
|
||||
|
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@ -0,0 +1 @@
|
||||
9
|
46
debian/control
vendored
46
debian/control
vendored
@ -1,44 +1,32 @@
|
||||
Source: lxqt-notificationd
|
||||
Maintainer: Lubuntu Developers <lubuntu-devel@lists.ubuntu.com>
|
||||
Original-Maintainer: LXQt Packaging Team <pkg-lxqt-devel@lists.alioth.debian.org>
|
||||
Maintainer: LXQt Packaging Team <pkg-lxqt-devel@lists.alioth.debian.org>
|
||||
Uploaders: Alf Gaida <agaida@siduction.org>,
|
||||
ChangZhuo Chen (陳昌倬) <czchen@debian.org>,
|
||||
Andrew Lee (李健秋) <ajqlee@debian.org>
|
||||
Section: x11
|
||||
Priority: optional
|
||||
Build-Depends: debhelper-compat (= 13),
|
||||
layer-shell-qt,
|
||||
libkf6windowsystem-dev (>= 6.0.0),
|
||||
liblayershellqtinterface-dev (>= 6.0.0),
|
||||
liblxqt2-dev (>= 2.2.0),
|
||||
Build-Depends: cmake (>= 3.0.2),
|
||||
debhelper (>= 9),
|
||||
libkf5windowsystem-dev,
|
||||
liblxqt0-dev (>= 0.10.0),
|
||||
libqt5x11extras5-dev,
|
||||
libqt5xdg-dev (>= 1.3.0),
|
||||
libx11-dev,
|
||||
qt6-base-private-dev (>= 6.6.0),
|
||||
qt6-svg-dev (>= 6.6.0),
|
||||
qt6-wayland-dev (>= 6.6.0)
|
||||
Standards-Version: 4.7.2
|
||||
Vcs-Browser: https://git.lubuntu.me/Lubuntu/lxqt-notificationd-packaging
|
||||
Vcs-Git: https://git.lubuntu.me/Lubuntu/lxqt-notificationd-packaging.git
|
||||
Debian-Vcs-Browser: https://salsa.debian.org/lxqt-team/lxqt-notificationd
|
||||
Debian-Vcs-Git: https://salsa.debian.org/lxqt-team/lxqt-notificationd.git
|
||||
Rules-Requires-Root: no
|
||||
Homepage: https://github.com/lxqt/lxqt-notificationd
|
||||
pkg-config,
|
||||
qtbase5-private-dev,
|
||||
qttools5-dev,
|
||||
qttools5-dev-tools
|
||||
Standards-Version: 3.9.6
|
||||
Vcs-Browser: http://anonscm.debian.org/cgit/pkg-lxqt/lxqt-notificationd.git/?h=debian/sid
|
||||
Vcs-Git: git://anonscm.debian.org/pkg-lxqt/lxqt-notificationd.git -b debian/sid
|
||||
Homepage: https://github.com/lxde/lxqt-notificationd
|
||||
|
||||
Package: lxqt-notificationd
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Recommends: lxqt-notificationd-l10n, lxqt-qtplugin
|
||||
Depends: ${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Provides: notification-daemon
|
||||
Description: LXQt notification daemon
|
||||
The LXQt notification daemon.
|
||||
.
|
||||
This package contain the LXQt notification daemon.
|
||||
|
||||
Package: lxqt-notificationd-l10n
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
Section: localization
|
||||
Depends: qt6-translations-l10n, ${misc:Depends}
|
||||
Description: Language package for lxqt-notificationd
|
||||
The l10n files for lxqt-notificationd.
|
||||
.
|
||||
This package contains the l10n files needed by lxqt-notificationd.
|
||||
|
18
debian/copyright
vendored
18
debian/copyright
vendored
@ -1,23 +1,15 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: lxqt-notificationd
|
||||
Source: https://github.com/lxqt/lxqt-notificationd
|
||||
Source: https://github.com/lxde/lxqt-notificationd
|
||||
|
||||
Files: *
|
||||
Copyright: 2012-2025 LXQt team
|
||||
Copyright: 2012-2015 LXQt team
|
||||
2010-2012 Razor team
|
||||
License: LGPL-2.1+
|
||||
|
||||
Files: test/main.cpp
|
||||
test/mainwindow.cpp
|
||||
test/mainwindow.h
|
||||
Copyright: 2012, Alec Moskvin <alecm@gmx.com>
|
||||
License: LGPL-2.1+
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2021-2025, Lubuntu Developers <lubuntu-devel@lists.ubuntu.com>
|
||||
2014-2018, Alf Gaida <agaida@siduction.org>
|
||||
2015, Andrew Lee (李健秋) <ajqlee@debian.org>
|
||||
2025, Aaron Rainbolt <arraybolt3@ubuntu.com>
|
||||
Copyright: 2014-2015 Alf Gaida <agaida@siduction.org>
|
||||
2015 Andrew Lee (李健秋) <ajqlee@debian.org>
|
||||
License: LGPL-2.1+
|
||||
|
||||
License: LGPL-2.1+
|
||||
|
1
debian/docs
vendored
1
debian/docs
vendored
@ -1,2 +1 @@
|
||||
AUTHORS
|
||||
README.md
|
||||
|
4
debian/gbp.conf
vendored
4
debian/gbp.conf
vendored
@ -2,5 +2,7 @@
|
||||
debian-branch = debian/sid
|
||||
upstream-branch = upstream/latest
|
||||
pristine-tar = True
|
||||
compression = xz
|
||||
|
||||
[import-orig]
|
||||
# Use git cherrypick -n upstream instead.
|
||||
merge = False
|
||||
|
8
debian/lintian-overrides
vendored
8
debian/lintian-overrides
vendored
@ -1,6 +1,6 @@
|
||||
# there will not be manpages in a foreseable future
|
||||
lxqt-notificationd: no-manual-page [usr/bin/lxqt-config-notificationd]
|
||||
lxqt-notificationd: no-manual-page [usr/bin/lxqt-notificationd]
|
||||
# there will not be manpages in a foreseable futore
|
||||
lxqt-notificationd: binary-without-manpage usr/bin/lxqt-config-notificationd
|
||||
lxqt-notificationd: binary-without-manpage usr/bin/lxqt-notificationd
|
||||
|
||||
# LXQt is not in freedesktop specs yet
|
||||
lxqt-notificationd: desktop-entry-invalid-category LXQt [usr/share/applications/lxqt-config-notificationd.desktop]
|
||||
lxqt-notificationd: desktop-entry-invalid-category LXQt usr/share/applications/lxqt-config-notificationd.desktop
|
||||
|
2
debian/lxqt-notificationd-l10n.install
vendored
2
debian/lxqt-notificationd-l10n.install
vendored
@ -1,2 +0,0 @@
|
||||
usr/share/lxqt/translations/lxqt-config-notificationd
|
||||
usr/share/lxqt/translations/lxqt-notificationd
|
4
debian/lxqt-notificationd.install
vendored
4
debian/lxqt-notificationd.install
vendored
@ -1,4 +0,0 @@
|
||||
etc/xdg/autostart/lxqt-notifications.desktop
|
||||
usr/bin/lxqt-config-notificationd
|
||||
usr/bin/lxqt-notificationd
|
||||
usr/share/applications/lxqt-config-notificationd.desktop
|
4
debian/lxqt-notificationd.lintian-overrides
vendored
4
debian/lxqt-notificationd.lintian-overrides
vendored
@ -1,4 +0,0 @@
|
||||
# This is expected
|
||||
lxqt-notificationd: desktop-entry-lacks-keywords-entry [usr/share/applications/*.desktop]
|
||||
lxqt-notificationd: desktop-entry-invalid-category LXQt [usr/share/applications/*.desktop]
|
||||
lxqt-notificationd: no-manual-page [usr/bin/*]
|
14
debian/rules
vendored
14
debian/rules
vendored
@ -1,14 +1,8 @@
|
||||
#!/usr/bin/make -f
|
||||
# export DH_VERBOSE=1
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
export LC_ALL=C.UTF-8
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
|
||||
|
||||
%:
|
||||
dh ${@} --buildsystem cmake
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- \
|
||||
-DPULL_TRANSLATIONS=OFF \
|
||||
-DUPDATE_TRANSLATIONS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
dh ${@} --buildsystem cmake \
|
||||
--parallel
|
||||
|
2
debian/source/lintian-overrides
vendored
2
debian/source/lintian-overrides
vendored
@ -1,2 +0,0 @@
|
||||
# This is expected
|
||||
lxqt-notificationd source: very-long-line-length-in-source-file * > 512 [test/lxqt-notification-test.sh:*]
|
5
debian/upstream/metadata
vendored
5
debian/upstream/metadata
vendored
@ -1,5 +0,0 @@
|
||||
Bug-Database: https://github.com/lxqt/lxqt-notificationd/issues
|
||||
Bug-Submit: https://github.com/lxqt/lxqt-notificationd/issues/new
|
||||
Changelog: https://github.com/lxqt/lxqt-notificationd/blob/master/CHANGELOG
|
||||
Repository: https://github.com/lxqt/lxqt-notificationd.git
|
||||
Repository-Browse: https://github.com/lxqt/lxqt-notificationd
|
109
debian/upstream/signing-key.asc
vendored
109
debian/upstream/signing-key.asc
vendored
@ -1,52 +1,63 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v2.0.22 (GNU/Linux)
|
||||
|
||||
mQINBF6cxrwBEADfl3ydxNfLBbWGPesXty2baQgixZ3D6aCxadI2kX+aikmT8rd0
|
||||
ttDKN18cXV52Ssxnj0qhgf4hwnu/b0be6BzqSEyGM+UQR3X2CYpxrMakfW32Q18K
|
||||
X5ec0RPR2ucBq9G0r9t6FYC8FkJ4uQUU3xxrLW3z302S0Makjgzm8BV9WrFQ7oFF
|
||||
uJQj0BHbHYC4RyaZb2AfxY4Y92BPGTjtGekWqgw6vEXCCnvAbGYVQzvxZt3nw21/
|
||||
1YmV4g7xhGFQPbOf9v3ejFUJeJIGzuJf5NAh7kvfCdUBAGYH0gnj0GpOve4ftnaG
|
||||
sAId2CQwm3oYF4Tu7yBPTOBpkaKkNaT+UdwTyeKERuCZ9ocZWX++/YF9ItRkJ5mM
|
||||
zoP1GluWn2atNWpRh/K97gyAGgr2fSmrAA4d1JrVbMujZAHoHAOKwJKqX9jPziPZ
|
||||
BFHfhcIOzG3ZhXAuumHsd7uwfPBVt20g+G+cOjBghbSSu9EOtMkAZl1g3ybvZixu
|
||||
Jtxa5exZWEmU7vtytEb8eq9Dj5XcGoTDbErE2RpJ/20HPzhyRKg9RN4iGS+0OiHS
|
||||
oRbDi5IEOizvQjp2bsBmfa3rsoDSOqF2pevp+u8I56I6bU1GFpxxNC5IGvgo2Q79
|
||||
quz0oIk5hs3eLlUdEYsLGwR6pWJaJyf36vuDsq7iLrLyvHI5irAowO4r1QARAQAB
|
||||
tCVQZWRyYW0gUG91cmFuZyA8dHN1amFuMjAwMEBnbWFpbC5jb20+iQJOBBMBCAA4
|
||||
FiEEGd/fOleb1QnbtXLYvnkwB60i334FAl6cxrwCGwMFCwkIBwIGFQoJCAsCBBYC
|
||||
AwECHgECF4AACgkQvnkwB60i335f9RAAgRpn8gUa/l10UkVAnpM2Cz0MuNMwwCOq
|
||||
IfVnuZuPBtYYiTU5Su++/aPZe3fF5B4v61F+XjNi7qeVL2t52X3jZ/iIx9Syasb+
|
||||
vDAIfQ5t6lKXvOptWxf6vteOg6CHbXwpGHbPjUkUS2vQwRikjBnR0SnkrMoXtgSX
|
||||
amPFqsitNrOhEJfeDfo0NzKESZuliWrCFt2v8c5q18G8cCZAvPLBlGuwRl58cDep
|
||||
3EIibMI/9MUSJbKoiHlK+LcHtG7BQTNis/e7Pe1PkRmExfhxe1lNajtOx8FO72Tq
|
||||
B6zY6drippM9VaIc1M+zp9BRpsFu8whOmapCqlXHRgAK8xTdQRIGInQFqLWPOxSC
|
||||
f0B6N+EvQvgkyFQ1rW+u91OJBma46uKkhrwf+mDttVRncaIAkgE6e6pqm18yIPFk
|
||||
D42rt/yHcOl+2qkcJS3gPcg5UvlCzqOwg1rKZQIk+TcPuDx3r2UghDEYZN9X6vw3
|
||||
zCBufr7ygZNf4tkbnVARFWTR4GzyCseFkWgOVZL9DccAhs8NeMy1WLkUzB75adeR
|
||||
3LONmEL7xOI8FuknKY4e6EcWhmstNIDgXfRe0hwO0VBdW3unoZC/K2ZM/ZuZyMdK
|
||||
TFjvYJrNewmymKge68wo0054bGZn8oz17i2AosJz7kW+ITsxmxhVcpfl4bav9Neq
|
||||
RpQwhnhK9bC5Ag0EXpzGvAEQANbeRHFbpgQVIqV9WVOVnTj4FIqrTPTPKKa02vJA
|
||||
7tGpgFapgvjdxnMxJfV6wuwOBUUFLR7DrXlV8EVFAYc5qTIeSQXvJsWw6gQ3+f0D
|
||||
z13oGOhZPBIzIKnV/MZI/jhIio8kSPWAuM5hR2X9Hvw3/CLo+H+hZZ6cFYoCxrQS
|
||||
tTzcKMkdQizLLa+WNbqUSxg6I/P5k/smUDY9gKW7RtI5t/PupA3WTnsVD6CYWa3Q
|
||||
c1O/1mUgqT6nQ5N9KCPpjZQRT6D6eIMmePtS85z4PPeYMJxPsKRYWPGRxKhCSdZl
|
||||
/0wsC8aRtmwYT729e0ZgTAmUnj+rQp5hboF/ZPFjIoXR9G+0HnoY0a/nqVO4lUON
|
||||
AV25GnMFGVyiHHlbH/0gboywwnzEg8BZbk+Z/61oOzBIW09sfG8fn8bsbkpL+nHf
|
||||
Mi/Vauge6wSfw7I5AfSiwrSDNHmKVsu39koWV6JGxEeFr2MffF+CuaoJCNOr/ZII
|
||||
SYR5ku3Y/lMKyUH1Oas0RWzFrdRcInqYK90A0x083zP4V445MvCwbRPzQAkm9wOP
|
||||
kILLhE5FW+9/O0/9bpx4joJUDLV4d3hFZy7GSHKiZUs1QW6BV75JQKqoi+cVt+/L
|
||||
+o1S8CMNekjqdC2mWRosM3doo51zT/FWNzQA1QcoZP2hORJDfw66y+4wPq6o8y1W
|
||||
jR35ABEBAAGJAjYEGAEIACAWIQQZ3986V5vVCdu1cti+eTAHrSLffgUCXpzGvAIb
|
||||
DAAKCRC+eTAHrSLffgbJD/4qW5YOo/BayBhaUh2L7VP7JNlECb/2xNNOFKI1NjNr
|
||||
nOmgSJLzf74Uhmt5W+iVjmJBHrDceprIPkizmPrn90kIsPIMtHIDNxzUgKZHbnza
|
||||
j1vZyAeC+JV79X1hOVpprj1TJwy65lpxXNyYnGqeIOgyFokn9fOHXv8aMQwpNuUr
|
||||
bdUJ1C75jYrvwy/NR1DczIFFYgsbkDGDtjVBjyMc5JAgvUBz37/iVPJfWP6dKVnf
|
||||
abRnUVzHgvgK7bnab00SA1TiWvjHURGjo+5rnRtv8X/AgStc2Phjq68TMIgMn0F2
|
||||
kjUVvfQotNqzo9madNshvUDmsGtAzKh4e0dS1ear7u3nRp4Z7fqSrTEtXKNbEPwZ
|
||||
wdWrWmmQLacNQBSe/FtcMzGF6xIVr4lnrL0bFjqBdQpdTC7vns3QSKk8/GFiEfpv
|
||||
kzXrDbGV7jX2OWDjNHKcmXX2+E1CsNaJgS7zOgZw5jvbvlTLJUwyYNlM1VLI2OFW
|
||||
Oa86l8pqli+B7rpTbsAE9Ut8qUaWjm87oUNSJbaKgqNnMaE+b/8VJaEeWHgQJwsD
|
||||
bJSJ/O/vzlRtDjOJ1JDlMRLs7TnOFeUh5pgwyaJoidYbJEiGlMGJbI6BjwhDTBFO
|
||||
NLJtd3SsRjc7ICtGdCvej59IvCDTjxtkhx5okF03APi1aXpHQrE18/arFD7BpoGO
|
||||
sw==
|
||||
=gSIv
|
||||
mQINBFJevCYBEACx+Hvy+Vsuf+V5jeLUnzjAmHoy8DfTeGWr3ts30IapLHrfi0+U
|
||||
WpzNnISO77yTr4VNboVZH+GHM/rnPfieODfB4ZW6CZLlInMSKUXcgQsEqXpyBZhA
|
||||
Ib/SPy2bOfHly1uRJes0uRDsH5+v/hD74sByfnjQlrvI68O6wvGZmDFMNNPVO8+/
|
||||
OWBSBNkBuVrrZOMSPsLwQGJ4UtUQ4whburaPJG4VZJc5DLbzJGbEuACc0IAEYJS3
|
||||
7AfXVXn4j4Gc9F3o1xTUnbOBnwGPquWwUIm3FM7Ec2OdkvMt3EwvnkMAfeVrq3iE
|
||||
FDD/KZTxdL0BZH3QD8gB7Jm4v4f3Nkobg6JCvCbcH3wBdZW4mASbwWzfRaDC2zHb
|
||||
ErTglD7PpShLKZZ0pr9okWZEGw4Ku3q8ALi1JXK/ePTmsBlvkVskOJ3Nnd0avgH4
|
||||
+Q/vZoKfH8EhNY745rI+8CE9iv6V9XiSUt4CKEWAENt4A8hq6U2vV+jZv3B6AgD7
|
||||
ZjiI59yD4YuYubu8rCnNizTgh1voVw3ietknn/x2H5yH8fByWZ5uL87C0ky/uma6
|
||||
ZGbiiAtM4kdkyDMrfRV5nlEG9EKAGPVu5mjeSCrfkETwZ9OFPz1AuDye4ZEXrrcC
|
||||
iRQ7RX6/GtW18aHER0kzGnfwx5KJzkDrRBY8A2PdXLBcrsN4WpK9EX01PQARAQAB
|
||||
tCNKZXJvbWUgTGVjbGFuY2hlIDxqZXJvbWVAbGVjbGFuLmNoPokCPwQTAQIAKQUC
|
||||
Ul68JgIbAwUJAeEzgAcLCQgHAwIBBhUIAgkKCwQWAgMBAh4BAheAAAoJEDfgrx/a
|
||||
SPNzSHIP/1ewXcC0TFBcvDD7MrIP7anyNfiWfW7cxkR8GSamkg6HTa6Ndyr1FFjJ
|
||||
OoDFUP37jWhu59CsHxs2D0zRWJktezfvElscRgqbHcdpIznqsGdI8hXCZafhBGVb
|
||||
sdAB2LRawcXGxnXt7XajPcSVwLWRE62caBqohznU2iWvI780WNjEbZoA0LhZwaFF
|
||||
UUPJm8ea9v0IkZVKUyg9WONZ1U7FEG9SaEiSpI8kJdx1fvCwZVDV/NRO5GqnJaho
|
||||
P1LCne4YdwS6pt1/fRgk32IHxxZfHlLzLHxb6v1JmIg72x28qCmGyK9oFBDbbnYu
|
||||
6Aq8XbHogOrD5vJM2Pfm2IhV0+JHOjfQbddv8tsAH1M+LI+tToXmg5st1AU3wnTn
|
||||
pda3hjA1avKwkfBPW/osHc8782ViyS9iX2e9iDtMv608guij4NjpGExzGCypHOd8
|
||||
+VXRwJDjvgDynkL206MZ+wn0j5wHsIE8F3Y5Bp1thQOrdDli5MYNQoXhjFmH46XT
|
||||
bcr84IgW0+AiXZdoFUqvwtzrWy2Onuw5R3k4OyV4skN4DkWXyAk/V+Y4K39JvTKf
|
||||
H9YuiQ9blNzCu8WiAnjKnh9kNl9E/TyEwI6cHFmIPqF8ST9tJytWHtrKvU9csvXX
|
||||
n8XNJmpcv2R1e6N+VuWWm5zUPTouv3AxCacLbm8Lh3ymGsk7ZEyhiQIcBBABAgAG
|
||||
BQJSsFYyAAoJEBMY76xfu9vO6v0P/3wSj3/kE4nP4HfgcVJSzi+lm1ycpbLDZtgh
|
||||
P1G+zJLVmA+E41vEZimeiYQxBAelatJz+CHzQo3LZ2oVChzVrZcVHn9k4P3pib69
|
||||
qCVif3/y0Wmecn+u2TWbOvJ7mthfO7T3W7rkW1/9ES7bUaXcXWQ2sjUBVqFkFsVt
|
||||
xgJDo8wcxA+K4Yf06GCbxFwrB7X5GraWIkzqGnyse3XAQn8aORAXmE8Yd0FHOjEZ
|
||||
Beb9shChnkYc3lEvNY8ioCaYSF9xr/Iz9cwpfPkpqFiVYWadtb+Gqeh6zC7vPmcT
|
||||
zHxrgkq1WwQlSBm724tPt9xuGQoOglqEa23vlQZfv20nyrYjLeYUy6pMCRq7vn/n
|
||||
nkQOcXF7yQlnqR6xKk0tWsM4e6du0ZvbjBbhHV/kBFVGCLm/upTwoMVm0WJTbr4T
|
||||
5XfIZo7eA0lvGtUhe1PgcOidBikHfAIfYxu0BoMXoL4jbcQdR5+YBDEfsS0jPhCl
|
||||
mew2ScW/R/UhUknJUVFTma0KHXzEmKiqeeUCDtwEi6fxdicAYkbcekgkfFiD/w8N
|
||||
Lk3Uf+0x2MdKA36nUobFkk38oU+GW37kFWJs3f1YRuQFao896eNW/E8ekVMLNxOl
|
||||
nCjnSbabaxDnxPTyW2KlNjf/QUEK4pT6S5QmuCSrle3PQpaSbAZDHzLBIL9gd3m6
|
||||
MH7+SvV4uQINBFJevCYBEADiXDUqstSdhIyuionS2KtE3IeEBIqS7GY8QPRBylIZ
|
||||
ACVHFI/1HxChBqYVGFaDEQn3gj5lUUQPubfWaxzjF6+UNVQW4+cxmTocndAwfDbI
|
||||
+E5BLdieFUzbAA05MV5ZjPhTNbSk1jpy4bNy0FILwNqc89Y6SoCbv1r3tZLCrBas
|
||||
1+AfWknBynx0siGMbLFxtzR6hUkNz9URxt13FrzpUWMpAL8ZQGczOTSaWLrZA5l9
|
||||
xLzJ9ww8uM+C2Xej3/sANxi+kQE2GVMKurPS0TICwVWZxbdW/ytIkO67Rhse0q3t
|
||||
vzjdawfCFRxv7XQB2ZJ6irDxbpHiJoojSWCHJadIyCG03iOiaqsSVvi4KnxtUck+
|
||||
udOEJUV5sxdzgeRrsDpeaN//KCWW9WjfsSkvOqP6S1gmWpNFdzF5XrzcgvqvSNqo
|
||||
XejfakUTJqsIIEHO0zGuJFVzJNh2hQ/9dhjIspUORhtNKaljNvePiBrj2yqmd9PY
|
||||
FlH1KMHe4H+YVIwPiyeNA87Pu+1yNo8gT7mXhGRfibgWjbt146WUJ7+l2StJMApn
|
||||
eNSCartNaUNPnw96i2l5c9AsJ3SWC6XWpWzOLVj+9XceeA11lu/ogqEMHzx81NjH
|
||||
2TePxwKTKxZnAvDmqryp++IgY2/OgIoIk3ZRdYu/dPijTOYWfCet/9/9kAFr9PeJ
|
||||
KwARAQABiQIlBBgBAgAPBQJSXrwmAhsMBQkB4TOAAAoJEDfgrx/aSPNzJv0QAKkx
|
||||
lCKEZ6ahAUuNWslsHnNWaHFHNawEO3NIEtQZGVFk2BYISupizvjZF6MnymO/9UFM
|
||||
pzV6fp3xNdqaKWQBjScOgMgCASRixW2tMAKbJGHZKp3dBixpHgXxy2oOGMS+mQ5m
|
||||
gWy07usq2YesoMD0K/SG6EnoRPHBvrJihArzMFVUY9hD3hk8bhiy8w9bCYFe+gkm
|
||||
zpQl3/KN01kyt5LjzEBcIOw8qIBQe9Pk8PyOK75lPoNME714LatgOsyw2kaSQ9Sv
|
||||
hziRGC5z/fV3PmH7XhSjENPKnCJU51GUMMLaL28t9o7Afh6Q8UV31/JO36vmQXQV
|
||||
+b+0BoGqEmf3AKBASb2Cr2q4pZFjywwSUXHZ9hQyu1tpbE1dS6aI01kM0y270pk7
|
||||
W/ajuzuOxAVL1bJAanL/5+DWM03esZPVdEWhxpWEM40Z6Rhq+Xb2a5xfwCN9PmaQ
|
||||
o9fez0I+yh53s7Ypv0tBj05FPe5L48+pDi6pz5nddN1B0FzF58jVfsBZUjBlY24+
|
||||
VwQeAaWkRXZrSEdtBS5ufsi80x/cNCSTJBWqtborKL1iGgf5MDPYRMSvmZXAeIld
|
||||
pyL/0pbW7iokewyKzpFfo7KEbwLxB+flWaBZ867JpF4yyRj3b4qcvcyV8QnsoB7Z
|
||||
KhxTl3gGwD/t0HUcu85zcfs4GkealYhIWfGaAso2
|
||||
=fF8P
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
|
8
debian/watch
vendored
8
debian/watch
vendored
@ -1,5 +1,3 @@
|
||||
version=4
|
||||
opts="searchmode=plain, \
|
||||
pgpsigurlmangle=s/$/.asc/, \
|
||||
uversionmangle=s/(\d+\.\d+\.\d+).*/$1/" \
|
||||
https://api.github.com/repos/lxqt/@PACKAGE@/releases https:\/\/github.com\/lxqt\/@PACKAGE@\/releases\/download\/@ANY_VERSION@\/@PACKAGE@-@ANY_VERSION@.tar.xz
|
||||
version=3
|
||||
opts="pgpsigurlmangle=s/$/.asc/" \
|
||||
https://github.com/lxde/lxqt-notificationd/releases .*/([\d\.]+).tar.gz
|
||||
|
48
src/CMakeLists.txt
Normal file
48
src/CMakeLists.txt
Normal file
@ -0,0 +1,48 @@
|
||||
set(NOTIFICATIONS_SRC
|
||||
main.cpp
|
||||
notificationarea.cpp
|
||||
notification.cpp
|
||||
notificationlayout.cpp
|
||||
notificationwidgets.cpp
|
||||
notifyd.cpp
|
||||
)
|
||||
|
||||
set(NOTIFICATIONS_UI
|
||||
notification.ui
|
||||
)
|
||||
|
||||
qt5_add_dbus_adaptor(NOTIFICATIONS_SRC
|
||||
org.freedesktop.Notifications.xml
|
||||
notifyd.h Notifyd
|
||||
)
|
||||
|
||||
# Translations **********************************
|
||||
lxqt_translate_ts(NOTIFICATIONS_QM_FILES
|
||||
UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS}
|
||||
SOURCES
|
||||
${NOTIFICATIONS_SRC}
|
||||
${NOTIFICATIONS_UI}
|
||||
INSTALL_DIR "${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}"
|
||||
)
|
||||
|
||||
lxqt_app_translation_loader(QM_LOADER ${PROJECT_NAME})
|
||||
#************************************************
|
||||
|
||||
add_executable(lxqt-notificationd
|
||||
${NOTIFICATIONS_SRC}
|
||||
${NOTIFICATIONS_QM_FILES}
|
||||
${QM_LOADER}
|
||||
)
|
||||
|
||||
target_link_libraries(lxqt-notificationd
|
||||
Qt5::Widgets
|
||||
Qt5::DBus
|
||||
lxqt
|
||||
KF5::WindowSystem
|
||||
)
|
||||
|
||||
install(TARGETS
|
||||
lxqt-notificationd
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||
COMPONENT Runtime
|
||||
)
|
88
src/main.cpp
Normal file
88
src/main.cpp
Normal file
@ -0,0 +1,88 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Petr Vanek <petr@scribus.info>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <QApplication>
|
||||
#include <QtDBus/QDBusConnection>
|
||||
|
||||
#include <LXQt/Application>
|
||||
|
||||
#include "notificationsadaptor.h"
|
||||
#include "notifyd.h"
|
||||
|
||||
|
||||
/*! \mainpage LXQt notification daemon
|
||||
*
|
||||
* Running in user session; implementing standard as described in:
|
||||
* docs/nodification-spec-latest.html
|
||||
*
|
||||
* <b>Implementation notes:</b>
|
||||
*
|
||||
* Class \c Notifyd implements the main "server" part, a DBUS
|
||||
* interface. Displaying of notifications is handled by these
|
||||
* classes:
|
||||
*
|
||||
* - \c NotificationArea: a QScrollArea object with transparency.
|
||||
* It ensures tha no action is unreachable (user can scroll
|
||||
* over notifications)
|
||||
* - \c NotificationLayout: a \c NotificationArea's main widget,
|
||||
* (QWidget instance) holding instances of \c Notification.
|
||||
* Layouting (in real QLayout) is done here.
|
||||
* - \c Notification: a QWidget with one notification. Icon, texts,
|
||||
* user interaction, etc. is handled in it.
|
||||
*
|
||||
* \c Notification can be extended with widgets located in files
|
||||
* notificationwidgets.*. Currently there is only one extension:
|
||||
*
|
||||
* - \c NotificationActionsWidget holding user interface for
|
||||
* interactive actions (buttons or combobox).
|
||||
*
|
||||
* Other extensions for e.g. "x-cannonical-*" can be implemented too.
|
||||
*
|
||||
*/
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
LXQt::Application a(argc, argv);
|
||||
|
||||
a.setQuitOnLastWindowClosed(false);
|
||||
|
||||
// Ensure the helper widgets are hidden
|
||||
a.setStyleSheet(a.styleSheet() +
|
||||
"NotificationArea {background: transparent;}"
|
||||
"NotificationLayout {background: transparent;}"
|
||||
);
|
||||
|
||||
Notifyd* daemon = new Notifyd();
|
||||
new NotificationsAdaptor(daemon);
|
||||
|
||||
QDBusConnection connection = QDBusConnection::sessionBus();
|
||||
if (!connection.registerService("org.freedesktop.Notifications"))
|
||||
qDebug() << "registerService failed: another service with 'org.freedesktop.Notifications' runs already";
|
||||
if (!connection.registerObject("/org/freedesktop/Notifications", daemon))
|
||||
qDebug() << "registerObject failed: another object with '/org/freedesktop/Notifications' runs already";
|
||||
|
||||
return a.exec();
|
||||
}
|
367
src/notification.cpp
Normal file
367
src/notification.cpp
Normal file
@ -0,0 +1,367 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Petr Vanek <petr@scribus.info>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <QPainter>
|
||||
#include <QUrl>
|
||||
#include <QFile>
|
||||
#include <QDateTime>
|
||||
#include <QtDBus/QDBusArgument>
|
||||
#include <QDebug>
|
||||
#include <XdgIcon>
|
||||
#include <KWindowSystem/KWindowSystem>
|
||||
#include <QMouseEvent>
|
||||
#include <QPushButton>
|
||||
|
||||
#include "notification.h"
|
||||
#include "notificationwidgets.h"
|
||||
|
||||
#define ICONSIZE QSize(32, 32)
|
||||
|
||||
|
||||
Notification::Notification(const QString &application,
|
||||
const QString &summary, const QString &body,
|
||||
const QString &icon, int timeout,
|
||||
const QStringList& actions, const QVariantMap& hints,
|
||||
QWidget *parent)
|
||||
: QWidget(parent),
|
||||
m_timer(0),
|
||||
m_linkHovered(false),
|
||||
m_actionWidget(0)
|
||||
{
|
||||
setupUi(this);
|
||||
setObjectName("Notification");
|
||||
setMouseTracking(true);
|
||||
|
||||
setMaximumWidth(parent->width());
|
||||
setMinimumWidth(parent->width());
|
||||
|
||||
setValues(application, summary, body, icon, timeout, actions, hints);
|
||||
|
||||
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,
|
||||
const QString &summary, const QString &body,
|
||||
const QString &icon, int timeout,
|
||||
const QStringList& actions, const QVariantMap& hints)
|
||||
{
|
||||
// Basic properties *********************
|
||||
|
||||
// Notifications spec set real order here:
|
||||
// An implementation which only displays one image or icon must
|
||||
// choose which one to display using the following order:
|
||||
// - "image-data"
|
||||
// - "image-path"
|
||||
// - app_icon parameter
|
||||
// - for compatibility reason, "icon_data"
|
||||
if (!hints["image_data"].isNull())
|
||||
{
|
||||
m_pixmap = getPixmapFromHint(hints["image_data"]);
|
||||
// qDebug() << application << "from image_data" << m_pixmap.isNull();
|
||||
}
|
||||
else if (!hints["image_path"].isNull())
|
||||
{
|
||||
m_pixmap = getPixmapFromString(hints["image_path"].toString());
|
||||
// qDebug() << application << "from image_path" << m_pixmap.isNull();
|
||||
}
|
||||
else if (!icon.isEmpty())
|
||||
{
|
||||
m_pixmap = getPixmapFromString(icon);
|
||||
// qDebug() << application << "from icon" << icon << m_pixmap.isNull();
|
||||
}
|
||||
else if (!hints["icon_data"].isNull())
|
||||
{
|
||||
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...
|
||||
if (m_pixmap.isNull())
|
||||
{
|
||||
iconLabel->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_pixmap.size().width() > ICONSIZE.width()
|
||||
|| m_pixmap.size().height() > ICONSIZE.height())
|
||||
{
|
||||
m_pixmap = m_pixmap.scaled(ICONSIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
}
|
||||
iconLabel->setPixmap(m_pixmap);
|
||||
iconLabel->show();
|
||||
}
|
||||
//XXX: workaround to properly set text labels widths (for correct sizeHints after setText)
|
||||
adjustSize();
|
||||
|
||||
// application
|
||||
appLabel->setVisible(!application.isEmpty());
|
||||
appLabel->setFixedWidth(appLabel->width());
|
||||
appLabel->setText(application);
|
||||
|
||||
// summary
|
||||
summaryLabel->setVisible(!summary.isEmpty() && application != summary);
|
||||
summaryLabel->setFixedWidth(summaryLabel->width());
|
||||
summaryLabel->setText(summary);
|
||||
|
||||
// body
|
||||
bodyLabel->setVisible(!body.isEmpty());
|
||||
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
|
||||
// Special values:
|
||||
// < 0: server decides timeout
|
||||
// 0: infifite
|
||||
if (m_timer)
|
||||
{
|
||||
m_timer->stop();
|
||||
m_timer->deleteLater();
|
||||
}
|
||||
|
||||
// -1 for server decides is handled in notifyd to save QSettings instance
|
||||
if (timeout > 0)
|
||||
{
|
||||
m_timer = new NotificationTimer(this);
|
||||
connect(m_timer, &NotificationTimer::timeout, this, &Notification::timeout);
|
||||
m_timer->start(timeout);
|
||||
}
|
||||
|
||||
// Categories *********************
|
||||
// TODO/FIXME: Categories - how to handle it?
|
||||
if (!hints["category"].isNull())
|
||||
{
|
||||
qDebug() << "Notification" << application << "category" << hints["category"];
|
||||
}
|
||||
|
||||
// Urgency Levels *********************
|
||||
// Type Description
|
||||
// 0 Low
|
||||
// 1 Normal
|
||||
// 2 Critical
|
||||
// TODO/FIXME: Urgencies - how to handle it?
|
||||
if (!hints["urgency"].isNull())
|
||||
{
|
||||
qDebug() << "Notification" << application << "urgency" << hints["urgency"];
|
||||
}
|
||||
|
||||
// Actions
|
||||
if (actions.count() && m_actionWidget == 0)
|
||||
{
|
||||
if (actions.count()/2 < 4)
|
||||
m_actionWidget = new NotificationActionsButtonsWidget(actions, this);
|
||||
else
|
||||
m_actionWidget = new NotificationActionsComboWidget(actions, this);
|
||||
|
||||
connect(m_actionWidget, &NotificationActionsWidget::actionTriggered,
|
||||
this, &Notification::actionTriggered);
|
||||
|
||||
actionsLayout->addWidget(m_actionWidget);
|
||||
m_actionWidget->show();
|
||||
}
|
||||
|
||||
adjustSize();
|
||||
// ensure layout expansion
|
||||
setMinimumHeight(qMax(rect().height(), childrenRect().height()));
|
||||
}
|
||||
|
||||
QString Notification::application() const
|
||||
{
|
||||
return appLabel->text();
|
||||
}
|
||||
|
||||
QString Notification::summary() const
|
||||
{
|
||||
return summaryLabel->text();
|
||||
}
|
||||
|
||||
QString Notification::body() const
|
||||
{
|
||||
return bodyLabel->text();
|
||||
}
|
||||
|
||||
void Notification::closeButton_clicked()
|
||||
{
|
||||
if (m_timer)
|
||||
m_timer->stop();
|
||||
emit userCanceled();
|
||||
}
|
||||
|
||||
void Notification::paintEvent(QPaintEvent *)
|
||||
{
|
||||
QStyleOption opt;
|
||||
opt.init(this);
|
||||
QPainter p(this);
|
||||
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
|
||||
}
|
||||
|
||||
QPixmap Notification::getPixmapFromHint(const QVariant &argument) const
|
||||
{
|
||||
int width, height, rowstride, bitsPerSample, channels;
|
||||
bool hasAlpha;
|
||||
QByteArray data;
|
||||
|
||||
const QDBusArgument arg = argument.value<QDBusArgument>();
|
||||
arg.beginStructure();
|
||||
arg >> width;
|
||||
arg >> height;
|
||||
arg >> rowstride;
|
||||
arg >> hasAlpha;
|
||||
arg >> bitsPerSample;
|
||||
arg >> channels;
|
||||
arg >> data;
|
||||
arg.endStructure();
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
QPixmap Notification::getPixmapFromString(const QString &str) const
|
||||
{
|
||||
QUrl url(str);
|
||||
if (url.isValid() && QFile::exists(url.toLocalFile()))
|
||||
{
|
||||
// qDebug() << " getPixmapFromString by URL" << url;
|
||||
return QPixmap(url.toLocalFile());
|
||||
}
|
||||
else
|
||||
{
|
||||
// qDebug() << " getPixmapFromString by XdgIcon theme" << str << ICONSIZE << XdgIcon::themeName();
|
||||
// qDebug() << " " << XdgIcon::fromTheme(str) << "isnull:" << XdgIcon::fromTheme(str).isNull();
|
||||
// They say: do not display an icon if it;s not found - see #325
|
||||
return XdgIcon::fromTheme(str/*, XdgIcon::defaultApplicationIcon()*/).pixmap(ICONSIZE);
|
||||
}
|
||||
}
|
||||
|
||||
void Notification::enterEvent(QEvent * event)
|
||||
{
|
||||
if (m_timer)
|
||||
m_timer->pause();
|
||||
}
|
||||
|
||||
void Notification::leaveEvent(QEvent * event)
|
||||
{
|
||||
if (m_timer)
|
||||
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)
|
||||
{
|
||||
// qDebug() << "CLICKED" << event;
|
||||
QString appName;
|
||||
QString windowTitle;
|
||||
|
||||
if (m_actionWidget && m_actionWidget->hasDefaultAction())
|
||||
{
|
||||
emit actionTriggered(m_actionWidget->defaultAction());
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (WId i, KWindowSystem::stackingOrder())
|
||||
{
|
||||
KWindowInfo info = KWindowInfo(i, NET::WMName | NET::WMVisibleName);
|
||||
appName = info.name();
|
||||
windowTitle = info.visibleName();
|
||||
// qDebug() << " " << i << "APPNAME" << appName << "TITLE" << windowTitle;
|
||||
if (appName.isEmpty())
|
||||
{
|
||||
QWidget::mouseReleaseEvent(event);
|
||||
return;
|
||||
}
|
||||
if (appName == appLabel->text() || windowTitle == appLabel->text())
|
||||
{
|
||||
KWindowSystem::raiseWindow(i);
|
||||
closeButton_clicked();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NotificationTimer::NotificationTimer(QObject *parent)
|
||||
: QTimer(parent),
|
||||
m_intervalMsec(-1)
|
||||
{
|
||||
}
|
||||
|
||||
void NotificationTimer::start(int msec)
|
||||
{
|
||||
m_startTime = QDateTime::currentDateTime();
|
||||
m_intervalMsec = msec;
|
||||
QTimer::start(msec);
|
||||
}
|
||||
|
||||
void NotificationTimer::pause()
|
||||
{
|
||||
if (!isActive())
|
||||
return;
|
||||
|
||||
stop();
|
||||
m_intervalMsec = m_startTime.msecsTo(QDateTime::currentDateTime());
|
||||
}
|
||||
|
||||
void NotificationTimer::resume()
|
||||
{
|
||||
if (isActive())
|
||||
return;
|
||||
|
||||
start(m_intervalMsec);
|
||||
}
|
137
src/notification.h
Normal file
137
src/notification.h
Normal file
@ -0,0 +1,137 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Petr Vanek <petr@scribus.info>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#ifndef NOTIFICATION_H
|
||||
#define NOTIFICATION_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
#include <QIcon>
|
||||
#include <QDateTime>
|
||||
#include "ui_notification.h"
|
||||
|
||||
|
||||
class NotificationActionsWidget;
|
||||
class NotificationTimer;
|
||||
|
||||
|
||||
/*! Implementation of one notification.
|
||||
*
|
||||
* Notification on-click behavior is defined in mouseReleaseEvent()
|
||||
*/
|
||||
class Notification : public QWidget, public Ui::Notification
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/*! Construct a notification.
|
||||
* Parameters are described in \c Notifyd::Notify()
|
||||
*/
|
||||
explicit Notification(const QString &application,
|
||||
const QString &summary, const QString &body,
|
||||
const QString &icon, int timeout,
|
||||
const QStringList& actions, const QVariantMap& hints,
|
||||
QWidget *parent = 0);
|
||||
|
||||
/*! Set new values (update) for existing notification.
|
||||
* Parameters are described in \c Notifyd::Notify()
|
||||
*/
|
||||
void setValues(const QString &application,
|
||||
const QString &summary, const QString &body,
|
||||
const QString &icon, int timeout,
|
||||
const QStringList& actions, const QVariantMap& hints);
|
||||
|
||||
QString application() const;
|
||||
QString summary() const;
|
||||
QString body() const;
|
||||
|
||||
signals:
|
||||
//! the server set timeout passed. Notification should close itself.
|
||||
void timeout();
|
||||
//! User clicked the "close" button
|
||||
void userCanceled();
|
||||
/*! User selected some of actions provided
|
||||
* \param actionKey an action key
|
||||
*/
|
||||
void actionTriggered(const QString &actionKey);
|
||||
|
||||
protected:
|
||||
void enterEvent(QEvent * event);
|
||||
void leaveEvent(QEvent * event);
|
||||
/*! Define on-click behavior in the notification area.
|
||||
Currently it implements:
|
||||
- if there is one action or at least one default action, this
|
||||
default action is triggered on click.
|
||||
\see NotificationActionsWidget::hasDefaultAction()
|
||||
\see NotificationActionsWidget::defaultAction()
|
||||
- it tries to find caller window by
|
||||
a) application name. \see XfitMan::getApplicationName()
|
||||
b) window title. \see XfitMan::getWindowTitle()
|
||||
if it can be found the window is raised and the notification is closed
|
||||
- leave notification as-is.
|
||||
*/
|
||||
void mouseReleaseEvent(QMouseEvent * event);
|
||||
|
||||
private:
|
||||
NotificationTimer *m_timer;
|
||||
|
||||
QPixmap m_pixmap;
|
||||
bool m_linkHovered;
|
||||
|
||||
NotificationActionsWidget *m_actionWidget;
|
||||
|
||||
// mandatory for stylesheets
|
||||
void paintEvent(QPaintEvent *);
|
||||
QPixmap getPixmapFromHint(const QVariant &argument) const;
|
||||
QPixmap getPixmapFromString(const QString &str) const;
|
||||
bool eventFilter(QObject *obj, QEvent *event);
|
||||
|
||||
private slots:
|
||||
void closeButton_clicked();
|
||||
void linkHovered(QString);
|
||||
};
|
||||
|
||||
|
||||
/*! A timer with pause/resume functionality
|
||||
*
|
||||
*/
|
||||
class NotificationTimer : public QTimer
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
NotificationTimer(QObject *parent=0);
|
||||
|
||||
public slots:
|
||||
void start(int msec);
|
||||
void pause();
|
||||
void resume();
|
||||
|
||||
private:
|
||||
QDateTime m_startTime;
|
||||
qint64 m_intervalMsec;
|
||||
};
|
||||
|
||||
#endif // NOTIFICATION_H
|
163
src/notification.ui
Normal file
163
src/notification.ui
Normal file
@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Notification</class>
|
||||
<widget class="QWidget" name="Notification">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>209</width>
|
||||
<height>77</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="horizontalSpacing">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="iconLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QVBoxLayout" name="actionsLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="appLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="summaryLabel">
|
||||
<property name="text">
|
||||
<string notr="true">TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="bodyLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QToolButton" name="closeButton">
|
||||
<property name="text">
|
||||
<string notr="true">x</string>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
134
src/notificationarea.cpp
Normal file
134
src/notificationarea.cpp
Normal file
@ -0,0 +1,134 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Petr Vanek <petr@scribus.info>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <QDesktopWidget>
|
||||
#include <QApplication>
|
||||
#include <LXQt/Settings>
|
||||
#include "notificationarea.h"
|
||||
|
||||
|
||||
NotificationArea::NotificationArea(QWidget *parent)
|
||||
: QScrollArea(parent),
|
||||
m_spacing(-1)
|
||||
{
|
||||
setObjectName("NotificationArea");
|
||||
|
||||
setWindowFlags(Qt::X11BypassWindowManagerHint
|
||||
| Qt::FramelessWindowHint
|
||||
| Qt::WindowStaysOnTopHint);
|
||||
// Hack to ensure the fully transparent QGraphicsView background
|
||||
QPalette palette;
|
||||
palette.setBrush(QPalette::Base, Qt::NoBrush);
|
||||
setPalette(palette);
|
||||
// Required to display wallpaper
|
||||
setAttribute(Qt::WA_TranslucentBackground);
|
||||
// no border at all finally
|
||||
setFrameShape(QFrame::NoFrame);
|
||||
|
||||
m_layout = new NotificationLayout(this);
|
||||
setWidget(m_layout);
|
||||
|
||||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
|
||||
connect(m_layout, &NotificationLayout::allNotificationsClosed, this, &NotificationArea::close);
|
||||
connect(m_layout, &NotificationLayout::notificationAvailable, this, &NotificationArea::show);
|
||||
connect(m_layout, &NotificationLayout::heightChanged, this, &NotificationArea::setHeight);
|
||||
connect(qApp->desktop(), &QDesktopWidget::workAreaResized, this, &NotificationArea::setHeight);
|
||||
}
|
||||
|
||||
void NotificationArea::setHeight(int contentHeight)
|
||||
{
|
||||
if (contentHeight == 0)
|
||||
{
|
||||
resize(width(), 0);
|
||||
hide();
|
||||
return;
|
||||
}
|
||||
|
||||
if (contentHeight == -1)
|
||||
contentHeight = height();
|
||||
|
||||
// FIXME: Qt does not seem to update QDesktopWidget::primaryScreen().
|
||||
// After we change the primary screen with xrandr, Qt still returns the same value.
|
||||
// I think it's a bug of Qt.
|
||||
QRect workArea = qApp->desktop()->availableGeometry(qApp->desktop()->primaryScreen());
|
||||
|
||||
workArea -= QMargins(m_spacing, m_spacing, m_spacing, m_spacing);
|
||||
QRect notif_rect = workArea.normalized();
|
||||
notif_rect.setWidth(width());
|
||||
if (notif_rect.height() > contentHeight)
|
||||
notif_rect.setHeight(contentHeight);
|
||||
|
||||
// no move needed for "top-left"
|
||||
if ("top-center" == m_placement)
|
||||
{
|
||||
notif_rect.moveCenter(workArea.center());
|
||||
notif_rect.moveTop(workArea.top());
|
||||
} else if ("top-right" == m_placement)
|
||||
{
|
||||
notif_rect.moveRight(workArea.right());
|
||||
} else if ("center-left" == m_placement)
|
||||
{
|
||||
notif_rect.moveCenter(workArea.center());
|
||||
notif_rect.moveLeft(workArea.left());
|
||||
} else if ("center-center" == m_placement)
|
||||
{
|
||||
notif_rect.moveCenter(workArea.center());
|
||||
} else if ("center-right" == m_placement)
|
||||
{
|
||||
notif_rect.moveCenter(workArea.center());
|
||||
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());
|
||||
}
|
||||
|
||||
setGeometry(notif_rect);
|
||||
// always show the latest notification
|
||||
ensureVisible(0, contentHeight, 0, 0);
|
||||
}
|
||||
|
||||
void NotificationArea::setSettings(const QString &placement, int width, int spacing)
|
||||
{
|
||||
m_placement = placement;
|
||||
|
||||
setMaximumWidth(width);
|
||||
setMinimumWidth(width);
|
||||
|
||||
m_spacing = spacing;
|
||||
m_layout->setSizes(m_spacing, width);
|
||||
|
||||
this->setHeight(widget()->height());
|
||||
}
|
70
src/notificationarea.h
Normal file
70
src/notificationarea.h
Normal file
@ -0,0 +1,70 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Petr Vanek <petr@scribus.info>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#ifndef NOTIFICATIONAREA_H
|
||||
#define NOTIFICATIONAREA_H
|
||||
|
||||
#include <QScrollArea>
|
||||
#include "notificationlayout.h"
|
||||
|
||||
|
||||
/*! Top level widget. Scroll area is used to ensure access
|
||||
* of all \c Notification instances (scrollable with mouse).
|
||||
*/
|
||||
class NotificationArea : public QScrollArea
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
explicit NotificationArea(QWidget *parent = 0);
|
||||
|
||||
/*! An access to \c NotificationLayout to connect signals and slots in \c Notifyd
|
||||
*/
|
||||
NotificationLayout* layout() { return m_layout; }
|
||||
|
||||
/*! Set new settings value from \c Notifyd. There are only one settings
|
||||
* used - in \c Notifyd.
|
||||
* \param placement a string name for notification location "top-level" etc.
|
||||
* \param width set with of notifications
|
||||
* \param spacing a spacing in the \NotificationLayout
|
||||
*/
|
||||
void setSettings(const QString &placement, int width, int spacing);
|
||||
|
||||
private:
|
||||
NotificationLayout *m_layout;
|
||||
|
||||
QString m_placement;
|
||||
int m_spacing;
|
||||
|
||||
private slots:
|
||||
/*! Recalculate widget size and visibility. Slot is called from \c Notificationlayout
|
||||
* on demand (notification appear or is closed).
|
||||
*/
|
||||
void setHeight(int contentHeight = -1);
|
||||
};
|
||||
|
||||
#endif // NOTIFICATIONAREA_H
|
200
src/notificationlayout.cpp
Normal file
200
src/notificationlayout.cpp
Normal file
@ -0,0 +1,200 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Petr Vanek <petr@scribus.info>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include "notificationlayout.h"
|
||||
#include <QtDebug>
|
||||
#include <QBrush>
|
||||
|
||||
|
||||
NotificationLayout::NotificationLayout(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
setObjectName("NotificationLayout");
|
||||
|
||||
// Hack to ensure the fully transparent background
|
||||
QPalette palette;
|
||||
palette.setBrush(QPalette::Base, Qt::NoBrush);
|
||||
setPalette(palette);
|
||||
// Required to display wallpaper
|
||||
setAttribute(Qt::WA_TranslucentBackground);
|
||||
|
||||
// Make the window stay on top
|
||||
setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
|
||||
|
||||
m_layout = new QVBoxLayout(this);
|
||||
m_layout->setMargin(0);
|
||||
setLayout(m_layout);
|
||||
}
|
||||
|
||||
void NotificationLayout::setSizes(int space, int width)
|
||||
{
|
||||
m_layout->setSpacing(space);
|
||||
setMaximumWidth(width);
|
||||
setMinimumWidth(width);
|
||||
|
||||
QHashIterator<uint, Notification*> it(m_notifications);
|
||||
while (it.hasNext())
|
||||
{
|
||||
it.next();
|
||||
it.value()->setMinimumWidth(width);
|
||||
it.value()->setMaximumWidth(width);
|
||||
}
|
||||
}
|
||||
|
||||
void NotificationLayout::addNotification(uint id, const QString &application,
|
||||
const QString &summary, const QString &body,
|
||||
const QString &icon, int timeout,
|
||||
const QStringList& actions, const QVariantMap& hints)
|
||||
{
|
||||
// qDebug() << "NotificationLayout::addNotification" << id << application << summary << body << icon << timeout;
|
||||
if (m_notifications.contains(id))
|
||||
{
|
||||
// TODO/FIXME: it can be deleted by timer in this block. Locking?
|
||||
Notification *n = m_notifications[id];
|
||||
n->setValues(application, summary, body, icon, timeout, actions, hints);
|
||||
}
|
||||
else
|
||||
{
|
||||
Notification *n = new Notification(application, summary, body, icon, timeout, actions, hints, this);
|
||||
|
||||
// NOTE: it's hard to use == operator for Notification* in QList...
|
||||
QHashIterator<uint, Notification*> it(m_notifications);
|
||||
while (it.hasNext())
|
||||
{
|
||||
it.next();
|
||||
if (it.value()->application() == application
|
||||
&& it.value()->summary() == summary
|
||||
&& it.value()->body() == body)
|
||||
{
|
||||
qDebug() << "Notification app" << application << "summary" << summary << "is already registered but this request is not an update. Broken app?";
|
||||
delete n;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
connect(n, &Notification::timeout, this, &NotificationLayout::removeNotificationTimeout);
|
||||
connect(n, &Notification::userCanceled, this, &NotificationLayout::removeNotificationUser);
|
||||
connect(n, &Notification::actionTriggered,
|
||||
this, &NotificationLayout::notificationActionCalled);
|
||||
m_notifications[id] = n;
|
||||
m_layout->addWidget(n);
|
||||
n->show();
|
||||
}
|
||||
|
||||
checkHeight();
|
||||
emit notificationAvailable();
|
||||
|
||||
// NOTE by pcman:
|
||||
// This dirty hack is used to workaround a weird and annoying repainting bug caused by Qt.
|
||||
// See https://github.com/Razor-qt/razor-qt/issues/536
|
||||
// razot-qt bug #536 - Notifications do not repaint under certain conditions
|
||||
// When we create the first notification and are about to show the widget, force repaint() here.
|
||||
// FIXME: there should be better ways to do this, or it should be fixed in Qt instead.
|
||||
if(m_notifications.count() == 1)
|
||||
repaint();
|
||||
}
|
||||
|
||||
void NotificationLayout::removeNotificationTimeout()
|
||||
{
|
||||
Notification *n = qobject_cast<Notification*>(sender());
|
||||
if (!n)
|
||||
{
|
||||
qDebug() << "Oooook! TIMEOUT Expecting instance of notification, got:" << sender();
|
||||
return;
|
||||
}
|
||||
|
||||
removeNotification(m_notifications.key(n), 1);
|
||||
}
|
||||
|
||||
void NotificationLayout::removeNotificationUser()
|
||||
{
|
||||
Notification *n = qobject_cast<Notification*>(sender());
|
||||
if (!n)
|
||||
{
|
||||
qDebug() << "Oooook! USERCANCEL Expecting instance of notification, got:" << sender();
|
||||
return;
|
||||
}
|
||||
|
||||
removeNotification(m_notifications.key(n), 2);
|
||||
}
|
||||
|
||||
void NotificationLayout::removeNotification(uint key, uint reason)
|
||||
{
|
||||
Notification *n = m_notifications.take(key);
|
||||
if (!n)
|
||||
{
|
||||
qDebug() << "Oooook! Expecting instance of notification, got:" << key;
|
||||
return;
|
||||
}
|
||||
|
||||
int ix = m_layout->indexOf(n);
|
||||
if (ix == -1)
|
||||
{
|
||||
qDebug() << "Qooook! Widget not in layout. Impossible!" << n;
|
||||
return;
|
||||
}
|
||||
|
||||
delete m_layout->takeAt(ix);
|
||||
n->deleteLater();
|
||||
emit notificationClosed(key, reason);
|
||||
|
||||
if (m_notifications.count() == 0)
|
||||
emit allNotificationsClosed();
|
||||
|
||||
checkHeight();
|
||||
}
|
||||
|
||||
void NotificationLayout::notificationActionCalled(const QString &actionKey)
|
||||
{
|
||||
Notification *n = qobject_cast<Notification*>(sender());
|
||||
if (!n)
|
||||
{
|
||||
qDebug() << "Oooook! USERACTION Expecting instance of notification, got:" << sender();
|
||||
return;
|
||||
}
|
||||
|
||||
emit actionInvoked(m_notifications.key(n), actionKey);
|
||||
}
|
||||
|
||||
void NotificationLayout::checkHeight()
|
||||
{
|
||||
int h = 0;
|
||||
QHashIterator<uint, Notification*> it(m_notifications);
|
||||
while (it.hasNext())
|
||||
{
|
||||
it.next();
|
||||
// *2 is mandatory here to prevent cropping of widgets
|
||||
// with enforced small height
|
||||
h += it.value()->height() + m_layout->spacing() * 2;
|
||||
}
|
||||
|
||||
setMinimumSize(width(), h);
|
||||
setMaximumSize(width(), h);
|
||||
|
||||
emit heightChanged(h);
|
||||
}
|
||||
|
104
src/notificationlayout.h
Normal file
104
src/notificationlayout.h
Normal file
@ -0,0 +1,104 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Petr Vanek <petr@scribus.info>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#ifndef NotificationLayout_H
|
||||
#define NotificationLayout_H
|
||||
|
||||
#include "notification.h"
|
||||
|
||||
|
||||
class NotificationLayout : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit NotificationLayout(QWidget *parent);
|
||||
|
||||
/*! Set various properties for self and child \c Notification instances.
|
||||
* \param space a layout spacing
|
||||
* \param width new width for notifications
|
||||
*/
|
||||
void setSizes(int space, int width);
|
||||
|
||||
signals:
|
||||
//! All \c Notification instances are closed
|
||||
void allNotificationsClosed();
|
||||
//! At least one \c Notification instance is available and needs to be shown
|
||||
void notificationAvailable();
|
||||
//! Height of this widget changed so parent's \c NotificationArea needs to change its size too.
|
||||
void heightChanged(int);
|
||||
|
||||
/*! Promote the internal change of notification closing into the \c Notifyd
|
||||
* \param id an notification ID (obtained from \c Notify)
|
||||
* \param reason a reason for closing code. See specification for more info.
|
||||
*/
|
||||
void notificationClosed(uint id, uint reason);
|
||||
|
||||
/*! Inform the external application that user chose one of provided action via the \c Notifyd
|
||||
* \param in0 a notification ID (obtained from \c Notify)
|
||||
* \param in1 a selected action key from the (key - display value) pair
|
||||
*/
|
||||
void actionInvoked(uint id, const QString &actionKey);
|
||||
|
||||
public slots:
|
||||
/*! Add new notification
|
||||
* See \c Notifyd::Notify() for params meanings.
|
||||
*/
|
||||
void addNotification(uint id, const QString &application,
|
||||
const QString &summary, const QString &body,
|
||||
const QString &icon, int timeout,
|
||||
const QStringList& actions, const QVariantMap& hints);
|
||||
|
||||
/*! Notification id should be removed because of reason
|
||||
*/
|
||||
void removeNotification(uint id, uint reason);
|
||||
|
||||
private:
|
||||
QHash<uint, Notification*> m_notifications;
|
||||
QVBoxLayout *m_layout;
|
||||
|
||||
/*! Calculate required height based on height of each \c Notification
|
||||
* in the m_notifications map.
|
||||
* Also heightChanged() is emitted here.
|
||||
*/
|
||||
void checkHeight();
|
||||
|
||||
private slots:
|
||||
/*! \c Notification's timer timeouted, so closing the notifiaction
|
||||
*/
|
||||
void removeNotificationTimeout();
|
||||
|
||||
/*! \c User cancelled the notifiation manually
|
||||
*/
|
||||
void removeNotificationUser();
|
||||
|
||||
/*! User clicked on one of actions (if provioded).
|
||||
* \param actionKey an action's key (not the display value)
|
||||
*/
|
||||
void notificationActionCalled(const QString &actionKey);
|
||||
};
|
||||
|
||||
#endif // NotificationLayout_H
|
134
src/notificationwidgets.cpp
Normal file
134
src/notificationwidgets.cpp
Normal file
@ -0,0 +1,134 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Petr Vanek <petr@scribus.info>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QHBoxLayout>
|
||||
#include <QButtonGroup>
|
||||
#include <QPushButton>
|
||||
#include <QLabel>
|
||||
|
||||
#include "notificationwidgets.h"
|
||||
|
||||
#include <QtDebug>
|
||||
|
||||
|
||||
NotificationActionsWidget::NotificationActionsWidget(const QStringList& actions, QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
for (int i = 0; i < actions.count(); i += 2)
|
||||
{
|
||||
QString key = actions[i];
|
||||
QString value;
|
||||
|
||||
if (i == actions.count() - 1)
|
||||
{
|
||||
value = key;
|
||||
qWarning() << "Odd number of elements in action list. Last action will use key as text (" << key << ")";
|
||||
} else {
|
||||
value = actions[i + 1];
|
||||
}
|
||||
|
||||
if (key == "default")
|
||||
m_defaultAction = key;
|
||||
|
||||
m_actions.append({key, value});
|
||||
}
|
||||
|
||||
// if there is only one action let's use it as the default one
|
||||
if (m_actions.count() == 1)
|
||||
m_defaultAction = m_actions[0].first;
|
||||
}
|
||||
|
||||
|
||||
NotificationActionsButtonsWidget::NotificationActionsButtonsWidget(const QStringList& actions, QWidget *parent)
|
||||
: NotificationActionsWidget(actions, parent)
|
||||
{
|
||||
QHBoxLayout *l = new QHBoxLayout();
|
||||
setLayout(l);
|
||||
|
||||
QButtonGroup *group = new QButtonGroup(this);
|
||||
|
||||
for (auto const & action : m_actions)
|
||||
{
|
||||
QPushButton *b = new QPushButton(action.second, this);
|
||||
b->setObjectName(action.first);
|
||||
l->addWidget(b);
|
||||
group->addButton(b);
|
||||
|
||||
if (action.first == m_defaultAction)
|
||||
b->setFocus(Qt::OtherFocusReason);
|
||||
}
|
||||
connect(group, static_cast<void (QButtonGroup::*)(QAbstractButton*)>(&QButtonGroup::buttonClicked),
|
||||
this, &NotificationActionsButtonsWidget::actionButtonActivated);
|
||||
}
|
||||
|
||||
void NotificationActionsButtonsWidget::actionButtonActivated(QAbstractButton* button)
|
||||
{
|
||||
emit actionTriggered(button->objectName());
|
||||
}
|
||||
|
||||
|
||||
NotificationActionsComboWidget::NotificationActionsComboWidget(const QStringList& actions, QWidget *parent)
|
||||
: NotificationActionsWidget(actions, parent)
|
||||
{
|
||||
QHBoxLayout *l = new QHBoxLayout();
|
||||
setLayout(l);
|
||||
|
||||
l->addWidget(new QLabel(tr("Actions:"), this));
|
||||
m_comboBox = new QComboBox(this);
|
||||
int currentIndex = -1;
|
||||
|
||||
for (int i = 0; i < m_actions.count(); ++i)
|
||||
{
|
||||
auto const & action = m_actions[i];
|
||||
|
||||
m_comboBox->addItem(action.second, action.first);
|
||||
if (action.first == m_defaultAction)
|
||||
{
|
||||
currentIndex = i;
|
||||
}
|
||||
}
|
||||
l->addWidget(m_comboBox);
|
||||
|
||||
if (currentIndex != -1)
|
||||
m_comboBox->setCurrentIndex(currentIndex);
|
||||
|
||||
QPushButton *b = new QPushButton(tr("OK"), this);
|
||||
l->addWidget(b);
|
||||
connect(b, &QPushButton::clicked,
|
||||
this, &NotificationActionsComboWidget::actionComboBoxActivated);
|
||||
}
|
||||
|
||||
void NotificationActionsComboWidget::actionComboBoxActivated()
|
||||
{
|
||||
if (!m_comboBox)
|
||||
return;
|
||||
int ix = m_comboBox->currentIndex();
|
||||
if (ix == -1)
|
||||
return;
|
||||
emit actionTriggered(m_actions[ix].first);
|
||||
}
|
102
src/notificationwidgets.h
Normal file
102
src/notificationwidgets.h
Normal file
@ -0,0 +1,102 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Petr Vanek <petr@scribus.info>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#ifndef NOTIFICATIONWIDGETS_H
|
||||
#define NOTIFICATIONWIDGETS_H
|
||||
|
||||
#include <QHash>
|
||||
#include <QWidget>
|
||||
#include <QAbstractButton>
|
||||
|
||||
class QComboBox;
|
||||
|
||||
|
||||
/*! A helper widgets for actions handling.
|
||||
* See specification for information what actions are.
|
||||
*
|
||||
* Let's be a little bit tricky here. Let's allow only few
|
||||
* buttons in the layout. We will use a combobox if there
|
||||
* are more actions. I think it's more user friendly.
|
||||
*
|
||||
* If there are only few actions the layout with buttons is used.
|
||||
* If there are more actions the combo box with confirm button is created.
|
||||
*/
|
||||
class NotificationActionsWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
NotificationActionsWidget(const QStringList& actions, QWidget *parent);
|
||||
|
||||
//! Notification holds exactly one action or at least one action is marked as "default"
|
||||
bool hasDefaultAction() { return !m_defaultAction.isEmpty(); }
|
||||
//! The key for default action
|
||||
QString defaultAction() { return m_defaultAction; }
|
||||
|
||||
signals:
|
||||
/*! User clicks/chose an actio
|
||||
* \param actionKey a key of selected action
|
||||
*/
|
||||
void actionTriggered(const QString &actionKey);
|
||||
|
||||
protected:
|
||||
QString m_defaultAction;
|
||||
QList<QPair<QString/*action key*/, QString/*action value*/>> m_actions;
|
||||
};
|
||||
|
||||
class NotificationActionsButtonsWidget : public NotificationActionsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/*! Create new widget.
|
||||
* \param actions a list of actions in form: (key1, display1, key2, display2, ..., keyN, displayN)
|
||||
*/
|
||||
NotificationActionsButtonsWidget(const QStringList& actions, QWidget *parent);
|
||||
private slots:
|
||||
void actionButtonActivated(QAbstractButton* button);
|
||||
};
|
||||
|
||||
class NotificationActionsComboWidget : public NotificationActionsWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/*! Create new widget.
|
||||
* \param actions a list of actions in form: (key1, display1, key2, display2, ..., keyN, displayN)
|
||||
*/
|
||||
NotificationActionsComboWidget(const QStringList& actions, QWidget *parent);
|
||||
|
||||
private:
|
||||
QComboBox *m_comboBox;
|
||||
|
||||
private slots:
|
||||
void actionComboBoxActivated();
|
||||
};
|
||||
|
||||
|
||||
#endif
|
148
src/notifyd.cpp
Normal file
148
src/notifyd.cpp
Normal file
@ -0,0 +1,148 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXQt - a lightweight, Qt based, desktop toolset
|
||||
* http://lxqt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Alec Moskvin <alecm@gmx.com>
|
||||
* Petr Vanek <petr@scribus.info>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include "notifyd.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
/*
|
||||
* Implementation of class Notifyd
|
||||
*/
|
||||
|
||||
Notifyd::Notifyd(QObject* parent)
|
||||
: QObject(parent),
|
||||
mId(0)
|
||||
{
|
||||
m_area = new NotificationArea();
|
||||
m_settings = new LXQt::Settings("notifications");
|
||||
reloadSettings();
|
||||
|
||||
connect(this, &Notifyd::notificationAdded,
|
||||
m_area->layout(), &NotificationLayout::addNotification);
|
||||
connect(this, &Notifyd::notificationClosed,
|
||||
m_area->layout(), &NotificationLayout::removeNotification);
|
||||
// feedback for original caller
|
||||
connect(m_area->layout(), &NotificationLayout::notificationClosed,
|
||||
this, &Notifyd::NotificationClosed);
|
||||
connect(m_area->layout(), &NotificationLayout::actionInvoked,
|
||||
this, &Notifyd::ActionInvoked);
|
||||
|
||||
connect(m_settings, &LXQt::Settings::settingsChanged,
|
||||
this, &Notifyd::reloadSettings);
|
||||
|
||||
}
|
||||
|
||||
Notifyd::~Notifyd()
|
||||
{
|
||||
m_area->deleteLater();
|
||||
}
|
||||
|
||||
void Notifyd::CloseNotification(uint id)
|
||||
{
|
||||
emit notificationClosed(id, 3);
|
||||
}
|
||||
|
||||
QStringList Notifyd::GetCapabilities()
|
||||
{
|
||||
QStringList caps;
|
||||
caps
|
||||
<< "actions"
|
||||
// << "action-icons"
|
||||
<< "body"
|
||||
<< "body-hyperlinks"
|
||||
<< "body-images"
|
||||
<< "body-markup"
|
||||
// << "icon-multi"
|
||||
// << "icon-static"
|
||||
<< "persistence"
|
||||
// << "sound"
|
||||
;
|
||||
return caps;
|
||||
}
|
||||
|
||||
QString Notifyd::GetServerInformation(QString& vendor,
|
||||
QString& version,
|
||||
QString& spec_version)
|
||||
{
|
||||
spec_version = QString("1.2");
|
||||
version = QString(LXQT_VERSION);
|
||||
vendor = QString("lxqt.org");
|
||||
return QString("lxqt-notificationd");
|
||||
}
|
||||
|
||||
uint Notifyd::Notify(const QString& app_name,
|
||||
uint replaces_id,
|
||||
const QString& app_icon,
|
||||
const QString& summary,
|
||||
const QString& body,
|
||||
const QStringList& actions,
|
||||
const QVariantMap& hints,
|
||||
int expire_timeout
|
||||
)
|
||||
{
|
||||
uint ret;
|
||||
if (replaces_id == 0)
|
||||
{
|
||||
mId++;
|
||||
ret = mId;
|
||||
}
|
||||
else
|
||||
ret = replaces_id;
|
||||
#if 0
|
||||
qDebug() << QString("Notify(\n"
|
||||
" app_name = %1\n"
|
||||
" replaces_id = %2\n"
|
||||
" app_icon = %3\n"
|
||||
" summary = %4\n"
|
||||
" body = %5\n"
|
||||
).arg(app_name, QString::number(replaces_id), app_icon, summary, body)
|
||||
<< " actions =" << actions << endl
|
||||
<< " hints =" << hints << endl
|
||||
<< QString(" expire_timeout = %1\n) => %2").arg(QString::number(expire_timeout), QString::number(mId));
|
||||
#endif
|
||||
|
||||
// handling the "server decides" timeout
|
||||
if (expire_timeout == -1) {
|
||||
expire_timeout = m_serverTimeout;
|
||||
expire_timeout *= 1000;
|
||||
}
|
||||
|
||||
emit notificationAdded(ret, app_name, summary, body, app_icon, expire_timeout, actions, hints);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void Notifyd::reloadSettings()
|
||||
{
|
||||
m_serverTimeout = m_settings->value("server_decides", 10).toInt();
|
||||
m_area->setSettings(
|
||||
m_settings->value("placement", "bottom-right").toString().toLower(),
|
||||
m_settings->value("width", 300).toInt(),
|
||||
m_settings->value("spacing", 6).toInt());
|
||||
}
|
138
src/notifyd.h
Normal file
138
src/notifyd.h
Normal file
@ -0,0 +1,138 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Alec Moskvin <alecm@gmx.com>
|
||||
* Petr Vanek <petr@scribus.info>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#ifndef NOTIFYD_H
|
||||
#define NOTIFYD_H
|
||||
|
||||
#include <QString>
|
||||
#include <QObject>
|
||||
#include <QVariantMap>
|
||||
#include <QStringList>
|
||||
|
||||
#include "notificationarea.h"
|
||||
#include <LXQt/Settings>
|
||||
|
||||
/*
|
||||
* Class for interface org.freedesktop.Notifications
|
||||
*/
|
||||
class Notifyd: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Notifyd(QObject* parent = 0);
|
||||
virtual ~Notifyd();
|
||||
|
||||
public slots:
|
||||
|
||||
/*! External application requested to close one notification
|
||||
* \param id an id obtained by previous \c Notify() call
|
||||
*/
|
||||
void CloseNotification(uint id);
|
||||
|
||||
/*! List supported features as required by specification
|
||||
* \retval QStringList with features.
|
||||
*/
|
||||
QStringList GetCapabilities();
|
||||
|
||||
/*! Provide a server/deamon info about version etc.
|
||||
* \param vendor outbound string. It's filled with lxde-qt credits
|
||||
* \param version outbound string. lxde-qt DE version is used (from CMakeLists.txt)
|
||||
* \param spec_version outbound string. Currently used specification version.
|
||||
* \retval QString daemon binary name
|
||||
*/
|
||||
QString GetServerInformation(QString& vendor, QString& version, QString& spec_version);
|
||||
|
||||
/*! Daemon is requested to display the notification.
|
||||
* \retval uint an unique notification ID. It should be used for tracking action feedback.
|
||||
* \param app_name name of the calling application
|
||||
* \param replaces_id if it's provided (!= 0) the already posted notification is "replaced"
|
||||
* or updated with new content.
|
||||
* \param app_icon an icon to show. See specification for more info.
|
||||
* \param summary an overview text
|
||||
* \param body a notification body
|
||||
* \param actions User selectable action list. See specification for more info.
|
||||
* \param hints Notification hints. See specification for more info.
|
||||
* \param expire_timeout how long should be this notification displayed (-1 = server decides; 0 forever; >0timeout in milliseconds)
|
||||
*/
|
||||
uint Notify(const QString& app_name,
|
||||
uint replaces_id,
|
||||
const QString& app_icon,
|
||||
const QString& summary,
|
||||
const QString& body,
|
||||
const QStringList& actions,
|
||||
const QVariantMap& hints,
|
||||
int expire_timeout);
|
||||
|
||||
signals:
|
||||
// signals for DBUS API specs - going outside
|
||||
|
||||
/*! Inform the external application that user chose one of provided action
|
||||
* \param in0 a notification ID (obtained from \c Notify)
|
||||
* \param in1 a selected action key from the (key - display value) pair
|
||||
*/
|
||||
void ActionInvoked(uint in0, const QString& in1);
|
||||
/*! Inform the external application that notification has been closed.
|
||||
* \param in0 a notification ID (obtained from \c Notify)
|
||||
* \param in1 a closing reason. See specification for more info.
|
||||
*
|
||||
*
|
||||
1 - The notification expired.
|
||||
2 - The notification was dismissed by the user.
|
||||
3 - The notification was closed by a call to CloseNotification.
|
||||
4 - Undefined/reserved reasons.
|
||||
*/
|
||||
void NotificationClosed(uint in0, uint in1);
|
||||
|
||||
// singals for our implementation - internal usage
|
||||
|
||||
/*! Promote the external request for notification closing into the display engine.
|
||||
* \param id an notification ID (obtained from \c Notify)
|
||||
* \param reason a reason for closing code. See specification for more info.
|
||||
*/
|
||||
void notificationClosed(uint id, uint reason);
|
||||
|
||||
/*! Promote the external request for notification displaying into the engine.
|
||||
* Parameters are the same as in \c Notify() slot.
|
||||
*/
|
||||
void notificationAdded(uint id, const QString &application, const QString &title,
|
||||
const QString &description, const QString &icon,
|
||||
int timeout, const QStringList& actions, const QVariantMap& hints);
|
||||
|
||||
private:
|
||||
uint mId;
|
||||
NotificationArea *m_area;
|
||||
int m_serverTimeout;
|
||||
|
||||
LXQt::Settings *m_settings;
|
||||
|
||||
private slots:
|
||||
void reloadSettings();
|
||||
};
|
||||
|
||||
#endif // NOTIFYD_H
|
69
src/org.freedesktop.Notifications.xml
Normal file
69
src/org.freedesktop.Notifications.xml
Normal file
@ -0,0 +1,69 @@
|
||||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||
<!--
|
||||
Based on the output of command:
|
||||
qdbus org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.DBus.Introspectable.Introspect
|
||||
against xfce4-notifyd
|
||||
-->
|
||||
<node>
|
||||
<!--interface name="org.freedesktop.DBus.Introspectable">
|
||||
<method name="Introspect">
|
||||
<arg name="data" direction="out" type="s"/>
|
||||
</method>
|
||||
</interface>
|
||||
<interface name="org.freedesktop.DBus.Properties">
|
||||
<method name="Get">
|
||||
<arg name="interface" direction="in" type="s"/>
|
||||
<arg name="propname" direction="in" type="s"/>
|
||||
<arg name="value" direction="out" type="v"/>
|
||||
</method>
|
||||
<method name="Set">
|
||||
<arg name="interface" direction="in" type="s"/>
|
||||
<arg name="propname" direction="in" type="s"/>
|
||||
<arg name="value" direction="in" type="v"/>
|
||||
</method>
|
||||
<method name="GetAll">
|
||||
<arg name="interface" direction="in" type="s"/>
|
||||
<arg name="props" direction="out" type="a{sv}"/>
|
||||
</method>
|
||||
</interface>
|
||||
<interface name="org.xfce.Notifyd">
|
||||
<method name="Quit">
|
||||
</method>
|
||||
</interface-->
|
||||
<interface name="org.freedesktop.Notifications">
|
||||
<method name="GetServerInformation">
|
||||
<arg name="name" type="s" direction="out"/>
|
||||
<arg name="vendor" type="s" direction="out"/>
|
||||
<arg name="version" type="s" direction="out"/>
|
||||
<arg name="spec_version" type="s" direction="out"/>
|
||||
</method>
|
||||
<method name="CloseNotification">
|
||||
<arg name="id" type="u" direction="in"/>
|
||||
</method>
|
||||
<method name="Notify">
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In6" value="QVariantMap"/>
|
||||
<arg name="app_name" type="s" direction="in"/>
|
||||
<arg name="replaces_id" type="u" direction="in"/>
|
||||
<arg name="app_icon" type="s" direction="in"/>
|
||||
<arg name="summary" type="s" direction="in"/>
|
||||
<arg name="body" type="s" direction="in"/>
|
||||
<arg name="actions" type="as" direction="in"/>
|
||||
<arg name="hints" type="a{sv}" direction="in"/>
|
||||
<arg name="expire_timeout" type="i" direction="in"/>
|
||||
<arg name="id" type="u" direction="out"/>
|
||||
</method>
|
||||
<method name="GetCapabilities">
|
||||
<arg name="capabilities" type="as" direction="out"/>
|
||||
</method>
|
||||
<signal name="ActionInvoked">
|
||||
<arg type="u"/>
|
||||
<arg type="s"/>
|
||||
</signal>
|
||||
<signal name="NotificationClosed">
|
||||
<arg type="u"/>
|
||||
<arg type="u"/>
|
||||
</signal>
|
||||
</interface>
|
||||
</node>
|
||||
|
17
src/translations/lxqt-notificationd.ts
Normal file
17
src/translations/lxqt-notificationd.ts
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="en_US">
|
||||
<context>
|
||||
<name>NotificationActionsComboWidget</name>
|
||||
<message>
|
||||
<location filename="../notificationwidgets.cpp" line="101"/>
|
||||
<source>Actions:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../notificationwidgets.cpp" line="120"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
17
src/translations/lxqt-notificationd_de.ts
Normal file
17
src/translations/lxqt-notificationd_de.ts
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="de">
|
||||
<context>
|
||||
<name>NotificationActionsComboWidget</name>
|
||||
<message>
|
||||
<location filename="../notificationwidgets.cpp" line="101"/>
|
||||
<source>Actions:</source>
|
||||
<translation>Aktionen:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../notificationwidgets.cpp" line="120"/>
|
||||
<source>OK</source>
|
||||
<translation>OK</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
17
src/translations/lxqt-notificationd_el.ts
Normal file
17
src/translations/lxqt-notificationd_el.ts
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="el">
|
||||
<context>
|
||||
<name>NotificationActionsComboWidget</name>
|
||||
<message>
|
||||
<location filename="../notificationwidgets.cpp" line="101"/>
|
||||
<source>Actions:</source>
|
||||
<translation>Ενέργειες:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../notificationwidgets.cpp" line="120"/>
|
||||
<source>OK</source>
|
||||
<translation>Εντάξει</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
17
src/translations/lxqt-notificationd_hu.ts
Normal file
17
src/translations/lxqt-notificationd_hu.ts
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="hu">
|
||||
<context>
|
||||
<name>NotificationActionsComboWidget</name>
|
||||
<message>
|
||||
<location filename="../notificationwidgets.cpp" line="101"/>
|
||||
<source>Actions:</source>
|
||||
<translation>Akciók:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../notificationwidgets.cpp" line="120"/>
|
||||
<source>OK</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
17
src/translations/lxqt-notificationd_pt.ts
Normal file
17
src/translations/lxqt-notificationd_pt.ts
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="pt">
|
||||
<context>
|
||||
<name>NotificationActionsComboWidget</name>
|
||||
<message>
|
||||
<location filename="../notificationwidgets.cpp" line="101"/>
|
||||
<source>Actions:</source>
|
||||
<translation>Ações:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../notificationwidgets.cpp" line="120"/>
|
||||
<source>OK</source>
|
||||
<translation>OK</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
17
src/translations/lxqt-notificationd_ru.ts
Normal file
17
src/translations/lxqt-notificationd_ru.ts
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="ru">
|
||||
<context>
|
||||
<name>NotificationActionsComboWidget</name>
|
||||
<message>
|
||||
<location filename="../notificationwidgets.cpp" line="101"/>
|
||||
<source>Actions:</source>
|
||||
<translation>Действия:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../notificationwidgets.cpp" line="120"/>
|
||||
<source>OK</source>
|
||||
<translation>OK</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
17
src/translations/lxqt-notificationd_ru_RU.ts
Normal file
17
src/translations/lxqt-notificationd_ru_RU.ts
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="ru_RU">
|
||||
<context>
|
||||
<name>NotificationActionsComboWidget</name>
|
||||
<message>
|
||||
<location filename="../notificationwidgets.cpp" line="101"/>
|
||||
<source>Actions:</source>
|
||||
<translation>Действия:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../notificationwidgets.cpp" line="120"/>
|
||||
<source>OK</source>
|
||||
<translation>OK</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
20
test/NotifyTest.pro
Normal file
20
test/NotifyTest.pro
Normal file
@ -0,0 +1,20 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2012-06-05T22:26:57
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui dbus
|
||||
|
||||
TARGET = NotifyTest
|
||||
TEMPLATE = app
|
||||
INCLUDEPATH += ../../libraries/
|
||||
|
||||
SOURCES += main.cpp \
|
||||
mainwindow.cpp
|
||||
|
||||
HEADERS += mainwindow.h
|
||||
|
||||
FORMS += mainwindow.ui
|
||||
|
||||
LIBS += -llxqt
|
12
test/lxqt-notification-test-multiples.sh
Executable file
12
test/lxqt-notification-test-multiples.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# required: notify-send app installed (part of libnotify, or libnotify-tools)
|
||||
#
|
||||
|
||||
|
||||
# basic notifications
|
||||
notify-send -u low -t 3000 --icon="document-open" "simple notification" "expires in 3s. No action there" &
|
||||
notify-send -u normal -t 4000 --icon="document-close" "simple notification" "expires in 4s. No action there" &
|
||||
notify-send -u low -t 3000 --icon="document-open" "simple notification" "expires in 3s. No action there" &
|
||||
notify-send -u low -t 3000 --icon="document-open" "simple notification" "expires in 3s. No action there" &
|
||||
|
15
test/lxqt-notification-test.sh
Executable file
15
test/lxqt-notification-test.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# required: notify-send app installed (part of libnotify, or libnotify-tools)
|
||||
#
|
||||
|
||||
|
||||
# basic notifications
|
||||
notify-send -u low -t 3000 --icon="document-open" "simple notification" "expires in 3s. No action there" &
|
||||
notify-send -u normal -t 4000 --icon="document-close" "simple notification" "expires in 4s. No action there" &
|
||||
notify-send -u critical -t 5000 --icon="application-exit" "simple notification" "expires in 5s. No action there" &
|
||||
notify-send -u normal -t -1 --icon="go-next" "simple notification" "expires when server decies. No action there" &
|
||||
notify-send -u normal -t 0 --icon="go-up" "simple notification" "never expires. No action there" &
|
||||
|
||||
notify-send -u low -t 3000 --icon="document-open" "<b>simple notification</b> with a very long text inside it" "<i>expires in 3s</i>. No action there. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vel leo quam. Morbi sit amet lorem vel dui commodo porttitor nec ut libero. Maecenas risus mauris, faucibus id tempus eu, auctor id purus. Vestibulum eget sapien non sem fermentum fermentum id sed turpis. Morbi pretium sem at turpis faucibus facilisis vel lacinia ante. Quisque a turpis lectus, quis posuere magna. Etiam magna velit, sagittis sed tincidunt et, adipiscing rutrum est. Aliquam aliquam aliquet tortor non varius. Quisque sollicitudin, ligula ac pulvinar laoreet, lacus metus sagittis nulla, ac sodales felis diam sed urna. In hac habitasse platea dictumst. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas." &
|
||||
|
35
test/main.cpp
Normal file
35
test/main.cpp
Normal file
@ -0,0 +1,35 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright (C) 2012 Alec Moskvin <alecm@gmx.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <QApplication>
|
||||
#include <LXQt/Notification>
|
||||
#include "mainwindow.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
MainWindow w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
}
|
73
test/mainwindow.cpp
Normal file
73
test/mainwindow.cpp
Normal file
@ -0,0 +1,73 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright (C) 2012 Alec Moskvin <alecm@gmx.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include <LXQt/Notification>
|
||||
#include <QDebug>
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::MainWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
connect(ui->pushButton, SIGNAL(clicked()), SLOT(createNotification()));
|
||||
LXQtNotification::notify("1");
|
||||
LXQtNotification::notify("2");
|
||||
LXQtNotification::notify("3");
|
||||
}
|
||||
|
||||
void MainWindow::createNotification()
|
||||
{
|
||||
LXQtNotification* n = new LXQtNotification("Notification!");
|
||||
nlist.append(n);
|
||||
connect(n, SIGNAL(actionActivated(int)), this, SLOT(clickEvent(int)));
|
||||
n->setActions(QStringList() << "Hi" << "Bye" << "foo" << "bar" << "lorem" << "ipsum", 1);
|
||||
n->setIcon("preferences-desktop-launch-feedback");
|
||||
n->update();
|
||||
}
|
||||
|
||||
void MainWindow::clickEvent(int button)
|
||||
{
|
||||
LXQtNotification* n = qobject_cast<LXQtNotification*>(sender());
|
||||
if (n)
|
||||
{
|
||||
if (button == 0)
|
||||
{
|
||||
n->setBody("Hello!");
|
||||
}
|
||||
else
|
||||
{
|
||||
n->setBody("Closing...");
|
||||
n->setTimeout(1000);
|
||||
}
|
||||
n->update();
|
||||
}
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
qDeleteAll(nlist);
|
||||
}
|
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