import redshift-plasmoid v1.0

This commit is contained in:
Ivailo Monev 2015-05-03 18:24:38 +00:00
parent bd14a455d7
commit f53f8dbad5
47 changed files with 7929 additions and 0 deletions

View file

@ -0,0 +1,9 @@
project(redshift-plasmoid)
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
add_subdirectory(src)
add_subdirectory(icons)
add_subdirectory(po)

621
redshift-plasmoid/COPYING Normal file
View file

@ -0,0 +1,621 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, 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
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "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 PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS

2331
redshift-plasmoid/Doxyfile Normal file

File diff suppressed because it is too large Load diff

105
redshift-plasmoid/README.md Normal file
View file

@ -0,0 +1,105 @@
Redshift Plasmoid
=================
Redshift Plasmoid provide a graphical configuration interface to redshift and it allows to
start/stop the redshift daemon. The program automatically retrieves the user coordinates
from the KDE settings, permitting redshift to determine the current position of the sun,
needed to perform the color regulation.
The program extends the original redshift with the following extra features:
* **KDE activities support** A different behavior of redshift can be set for different activities.
The possible behaviors are: Always On, Always Off or Auto. As an example redshift can be
automatically turned off when the user switches to the movie activity, so that the movie can
be seen without altering the original colors.
* **Manual color adjustment** Sometimes the color temperature set does not match the current
environmental light. It can happen when we are in a different location, where there are different
types of light, or when there is a gloomy day and the sunlight is not very bright. In these cases
it is possible to manually adjust the color temperature by spinning the mouse wheel over the widget.
The program will then switch to Manual Mode and wont adjust the temperature automatically, but
will keep the current. To exit Manual Mode you just click on the widget.
Installation instructions
=========================
From redshift root directory execute:
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$(kde4-config --prefix) ..
make
sudo make install
To start using the plasmoid reboot you machine or run the following command:
redshiftautostart
Dependencies
------------
* KDE SC 4.x
* Redshift
Build dependecies
-----------------
* Essential build tools (gcc, cmake, and so on)
Required packages for Debian like distributions:
------------------------------------------------
* build-essentials
* cmake
* kde-workspace-dev
* redshift
Installation troubleshoots:
---------------------------
If make fails to build because it try to build it against Qt5, try:
cmake -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4 -DCMAKE_INSTALL_PREFIX=$(kde4-config --prefix) ..)
If your distribution doesn't use bash as default shell, try:
su -c 'make install'
How to use
==========
Basic commands
--------------
* Click on the redshift widget to toggle the screen color regulation on/off. When in Manual mode
clicking brings redshift back in Auto mode.
* Scroll the mouse wheel over the redshift widget to switch to Manual Mode and keep the screen
color temperature constant throughout the day.
Configuration pages
-------------------
* **General configuration page**
The general redshift parameters can be set from this page. A tooltip explains each parameter.
* **Activities configuration page**
In this page a different behavior of redshift can be set for each kde activity. The possible behaviors are:
- **Auto** Redshift can be turned on/off
- **Always on** Redshift is active and can't be turned off
- **Always off** Redshift is inactive and can't be turned on
* **Shortcut configuration page**
In this page it's possible to set a global keyboard shortcut to toggle redshift on/off.
Author
======
Simone Gaiarin \<simgunz AT gmail DOT com\>
License
=======
Software distributed under the GNU General Public License version 3 (GNU GPL v3).
http://www.gnu.org/copyleft/gpl.html
References
=============
* Redshift plasmoid:
- [Official project page] (http://simgunz.org/projects/redshift-plasmoid/)
- [Kde-apps page] (http://kde-apps.org/content/show.php/Redshift+Plasmoid?content=148737)
- [Github page] (https://github.com/simgunz/redshift-plasmoid)
* Redshift:
- [Official project page] (http://jonls.dk/redshift/)

5
redshift-plasmoid/TODO Normal file
View file

@ -0,0 +1,5 @@
TODO:
Add test button
Add slide to select color
Fix osd glitch after changing desktop theme

View file

@ -0,0 +1,2 @@
kde4_install_icons(${ICON_INSTALL_DIR})
kde4_update_iconcache()

Binary file not shown.

View file

@ -0,0 +1,33 @@
FIND_PROGRAM(GETTEXT_MSGFMT_EXECUTABLE msgfmt)
IF(NOT GETTEXT_MSGFMT_EXECUTABLE)
MESSAGE(
"------
NOTE: msgfmt not found. Translations will *not* be installed
------")
ELSE(NOT GETTEXT_MSGFMT_EXECUTABLE)
SET(catalogname plasma_applet_redshift)
ADD_CUSTOM_TARGET(translations ALL)
FILE(GLOB PO_FILES *.po)
FOREACH(_poFile ${PO_FILES})
GET_FILENAME_COMPONENT(_poFileName ${_poFile} NAME)
STRING(REGEX REPLACE "^${catalogname}_?" "" _langCode ${_poFileName} )
STRING(REGEX REPLACE "\\.po$" "" _langCode ${_langCode} )
IF( _langCode )
GET_FILENAME_COMPONENT(_lang ${_poFile} NAME_WE)
SET(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo)
ADD_CUSTOM_COMMAND(TARGET translations
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} --check -o ${_gmoFile} ${_poFile}
DEPENDS ${_poFile})
INSTALL(FILES ${_gmoFile} DESTINATION ${LOCALE_INSTALL_DIR}/${_langCode}/LC_MESSAGES/ RENAME ${catalogname}.mo)
ENDIF( _langCode )
ENDFOREACH(_poFile ${PO_FILES})
ENDIF(NOT GETTEXT_MSGFMT_EXECUTABLE)

View file

@ -0,0 +1,14 @@
-To translate redshift use the KDE translation software "lokalize", if you can.
-Strictly translate the original sentence without altering it. (Example: do not substitute a comma with a conjunction,
do not add quotes where they are not present).
If you think the sentence can be improved, write me and I will update it in the source.
-Do not add leading or trailing spaces except where explicitly required in the comments.
-Respect the capitalization style (Title Capitalization or Sentence capitalization). The comment
usually should give an hint of the type of capitalization, otherwise look at the original English sentence.
-If a sentence is ambiguous and the comment can't clarify it, write me.
-Read the KDE Human Interface Guideline (HIG). In particular the label and capitalization section.
Links:
http://techbase.kde.org/Projects/Usability/HIG/
http://techbase.kde.org/Projects/Usability/HIG/Labels
http://techbase.kde.org/Projects/Usability/HIG/Capitalization

422
redshift-plasmoid/po/cs.po Normal file
View file

@ -0,0 +1,422 @@
# Copyright (C) 2013 Matthias Mailänder
# This file is distributed under the same license as the redshift-plasmoid package.
#
# Pavel Fric <pavelfric@seznam.cz>, 2014.
# Simone Gaiarin <simgunz@gmail.com>, 2014.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-07-06 00:07+0200\n"
"PO-Revision-Date: 2014-07-06 00:08+0200\n"
"Last-Translator: Simone Gaiarin <simgunz@gmail.com>\n"
"Language-Team: German <>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Lokalize 1.5\n"
#. i18n: file: src/applet/activities.ui:33
#. i18n: ectx: property (text), widget (QTreeWidget, activities)
#: po/rc.cpp:3 rc.cpp:3
msgctxt "KDE Plasma activity. Title Capitalization."
msgid "Activity"
msgstr "Činnost"
#. i18n: file: src/applet/activities.ui:38
#. i18n: ectx: property (text), widget (QTreeWidget, activities)
#: po/rc.cpp:6 rc.cpp:6
msgctxt "Redshift operation mode. Title Capitalization."
msgid "Mode"
msgstr "Režim"
#. i18n: file: src/applet/redshift.ui:26
#. i18n: ectx: property (text), widget (QLabel, lbLatitude)
#: po/rc.cpp:9 rc.cpp:9
msgctxt "Sentence capitalization."
msgid "Latitude:"
msgstr "Zeměpisná šířka:"
#. i18n: file: src/applet/redshift.ui:57
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_latitude)
#. i18n: file: src/applet/redshift.ui:104
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_longitude)
#. i18n: file: src/applet/redshift.ui:57
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_latitude)
#. i18n: file: src/applet/redshift.ui:104
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_longitude)
#: po/rc.cpp:12 po/rc.cpp:18 rc.cpp:12 rc.cpp:18
msgctxt "Degrees"
msgid "º"
msgstr "°"
#. i18n: file: src/applet/redshift.ui:79
#. i18n: ectx: property (text), widget (QLabel, lbLongitude)
#: po/rc.cpp:15 rc.cpp:15
msgctxt "Sentence capitalization."
msgid "Longitude:"
msgstr "Zeměpisná délka:"
#. i18n: file: src/applet/redshift.ui:142
#. i18n: ectx: property (text), widget (QLabel, lbDayTemp)
#: po/rc.cpp:21 rc.cpp:21
msgctxt ""
"The desired color temperature during the day. Sentence capitalization."
msgid "Day color temperature:"
msgstr "Teplota barvy přes den:"
#. i18n: file: src/applet/redshift.ui:164
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_dayTemp)
#. i18n: file: src/applet/redshift.ui:199
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_nightTemp)
#. i18n: file: src/applet/redshift.ui:164
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_dayTemp)
#. i18n: file: src/applet/redshift.ui:199
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_nightTemp)
#: po/rc.cpp:24 po/rc.cpp:30 rc.cpp:24 rc.cpp:30
msgctxt ""
"Kelvin SI unit of measurement for temperature. (There's a space before the "
"K)."
msgid " K"
msgstr " K"
#. i18n: file: src/applet/redshift.ui:177
#. i18n: ectx: property (text), widget (QLabel, lbNightTemp)
#: po/rc.cpp:27 rc.cpp:27
msgctxt ""
"The desired color temperature during the night. Sentence capitalization."
msgid "Night color temperature:"
msgstr "Teplota barvy v noci:"
#. i18n: file: src/applet/redshift.ui:225
#. i18n: ectx: property (toolTip), widget (QLabel, lbGamma)
#: po/rc.cpp:33 rc.cpp:33
msgid "Additional gamma correction (Default is 1:1:1)."
msgstr "Dodatečná oprava gamy (Výchozí je 1:1:1)."
#. i18n: file: src/applet/redshift.ui:228
#. i18n: ectx: property (text), widget (QLabel, lbGamma)
#: po/rc.cpp:36 rc.cpp:36
msgctxt "The screen gamma channels, red, green, blue. Sentence capitalization."
msgid "Gamma (RGB):"
msgstr "Gama (RGB):"
#. i18n: file: src/applet/redshift.ui:309
#. i18n: ectx: property (text), widget (QLabel, lbSmooth)
#: po/rc.cpp:39 rc.cpp:39
msgctxt ""
"Enable smooth transition when the program start and stop. Sentence "
"capitalization."
msgid "Smooth transition:"
msgstr "Plynulý přechod:"
#. i18n: file: src/applet/redshift.ui:322
#. i18n: ectx: property (text), widget (QLabel, lbAutostart)
#: po/rc.cpp:42 rc.cpp:42
msgctxt "Launch the program on startup. Sentence capitalization."
msgid "Autostart:"
msgstr "Automaticky spustit:"
#. i18n: file: src/applet/redshift.ui:335
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_autolaunch)
#. i18n: file: src/applet/redshift.ui:358
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_smooth)
#. i18n: file: src/applet/redshift.ui:335
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_autolaunch)
#. i18n: file: src/applet/redshift.ui:358
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_smooth)
#: po/rc.cpp:45 po/rc.cpp:51 rc.cpp:45 rc.cpp:51
msgctxt "Sentence capitalization."
msgid "Enabled"
msgstr "Povoleno"
#. i18n: file: src/applet/redshift.ui:345
#. i18n: ectx: property (text), widget (QLabel, lbMethod)
#: po/rc.cpp:48 rc.cpp:48
msgctxt ""
"The method used to set the color temperature. Sentence capitalization."
msgid "Adjust method:"
msgstr "Způsob úpravy:"
#. i18n: file: src/applet/redshift.ui:372
#. i18n: ectx: property (text), item, widget (KComboBox, kcfg_method)
#: po/rc.cpp:54 rc.cpp:54
msgctxt "Automatic adjust method. Title Capitalization."
msgid "Auto"
msgstr "Automaticky"
#. i18n: file: src/applet/redshift.ui:390
#. i18n: ectx: property (text), widget (QLabel, lbBrightness)
#: po/rc.cpp:57 rc.cpp:57
msgctxt "Sentence capitalization."
msgid "Brightness:"
msgstr "Jas:"
#. i18n: file: src/redshift.kcfg:10
#. i18n: ectx: label, entry (latitude), group (General)
#: po/rc.cpp:60 rc.cpp:60
msgctxt "@label - KCFG entry name"
msgid "Latitude"
msgstr "Zeměpisná šířka"
#. i18n: file: src/redshift.kcfg:14
#. i18n: ectx: label, entry (longitude), group (General)
#: po/rc.cpp:63 rc.cpp:63
msgctxt "@label- KCFG entry name"
msgid "Longitude"
msgstr "Zeměpisná délka"
#. i18n: file: src/redshift.kcfg:18
#. i18n: ectx: label, entry (dayTemp), group (General)
#: po/rc.cpp:66 rc.cpp:66
msgctxt "@label - KCFG entry name"
msgid "Day color temperature"
msgstr "Teplota barvy přes den"
#. i18n: file: src/redshift.kcfg:19
#. i18n: ectx: tooltip, entry (dayTemp), group (General)
#: po/rc.cpp:69 rc.cpp:69
msgctxt "@info:tooltip"
msgid "A neutral color temperature is 6500 K."
msgstr "Neutrální teplota barvy je 6500 K."
#. i18n: file: src/redshift.kcfg:23
#. i18n: ectx: label, entry (nightTemp), group (General)
#: po/rc.cpp:72 rc.cpp:72
msgctxt "@label - KCFG entry name"
msgid "Night color temperature"
msgstr "Teplota barvy v noci"
#. i18n: file: src/redshift.kcfg:24
#. i18n: ectx: tooltip, entry (nightTemp), group (General)
#: po/rc.cpp:75 rc.cpp:75
msgctxt "@info:tooltip"
msgid "The recommended night color temperature is 4500 K."
msgstr "Doporučená teplota barvy v noci je 4500 K."
#. i18n: file: src/redshift.kcfg:28
#. i18n: ectx: label, entry (gammaR), group (General)
#: po/rc.cpp:78 rc.cpp:78
msgctxt "@label - KCFG entry name"
msgid "Red gamma correction"
msgstr "Oprava gamy červené"
#. i18n: file: src/redshift.kcfg:29
#. i18n: ectx: tooltip, entry (gammaR), group (General)
#: po/rc.cpp:81 rc.cpp:81
msgctxt "@info:tooltip"
msgid "Gamma correction (Red)"
msgstr "Oprava gamy (Červená)"
#. i18n: file: src/redshift.kcfg:33
#. i18n: ectx: label, entry (gammaG), group (General)
#: po/rc.cpp:84 rc.cpp:84
msgctxt "@label - KCFG entry name"
msgid "Green gamma correction"
msgstr "Oprava gamy zelené"
#. i18n: file: src/redshift.kcfg:34
#. i18n: ectx: tooltip, entry (gammaG), group (General)
#: po/rc.cpp:87 rc.cpp:87
msgctxt "@info:tooltip"
msgid "Gamma correction (Green)"
msgstr "Oprava gamy (Zelená)"
#. i18n: file: src/redshift.kcfg:38
#. i18n: ectx: label, entry (gammaB), group (General)
#: po/rc.cpp:90 rc.cpp:90
msgctxt "@label - KCFG entry name"
msgid "Blue gamma correction"
msgstr "Oprava gamy modré"
#. i18n: file: src/redshift.kcfg:39
#. i18n: ectx: tooltip, entry (gammaB), group (General)
#: po/rc.cpp:93 rc.cpp:93
msgctxt "@info:tooltip"
msgid "Gamma correction (Blue)"
msgstr "Oprava gamy (Modrá)"
#. i18n: file: src/redshift.kcfg:43
#. i18n: ectx: label, entry (brightness), group (General)
#: po/rc.cpp:96 rc.cpp:96
msgctxt "@label - KCFG entry name"
msgid "Brightness"
msgstr "Jas"
#. i18n: file: src/redshift.kcfg:47
#. i18n: ectx: label, entry (smooth), group (General)
#: po/rc.cpp:99 rc.cpp:99
msgctxt "@label - KCFG entry name"
msgid "Smooth transition flag"
msgstr "Spínač bitů pro plynulý přechod"
#. i18n: file: src/redshift.kcfg:51
#. i18n: ectx: label, entry (autolaunch), group (General)
#: po/rc.cpp:102 rc.cpp:102
msgctxt "@label - KCFG entry name"
msgid "Autostart flag"
msgstr "Automaticky spustit spínač bitů"
#. i18n: file: src/redshift.kcfg:55
#. i18n: ectx: label, entry (method), group (General)
#: po/rc.cpp:105 rc.cpp:105
msgctxt "@label - KCFG entry name"
msgid "Color adjustment method"
msgstr "Metoda upravení barev"
#. i18n: file: src/redshift.kcfg:56
#. i18n: ectx: tooltip, entry (method), group (General)
#: po/rc.cpp:108 rc.cpp:108
msgctxt "@info:tooltip"
msgid ""
"Redshift color adjustment method. If «Auto» («randr») doesn't work, try "
"«vidmode»."
msgstr ""
"Metoda upravení barev pro rudý posuv. Pokud «Automatika» («randr») "
"nepracuje, zkuste «vidmode»."
#. i18n: file: src/redshift.kcfg:62
#. i18n: ectx: label, entry (alwaysOnActivities), group (Activities)
#: po/rc.cpp:111 rc.cpp:111
msgctxt ""
"@label - KCFG entry name (not visible to the user) - List of the activities "
"where redshift is always on"
msgid "Always on activities"
msgstr "Činnosti vždy zapnuty"
#. i18n: file: src/redshift.kcfg:65
#. i18n: ectx: label, entry (alwaysOffActivities), group (Activities)
#: po/rc.cpp:114 rc.cpp:114
msgctxt ""
"@label - KCFG entry name (not visible to the user) - List of the activities "
"where redshift is always off"
msgid "Always off activities"
msgstr "Činnosti vždy vypnuty"
#: po/rc.cpp:117 rc.cpp:117
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "Pavel Fric"
#: po/rc.cpp:118 rc.cpp:118
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "fripohled.blogspot.com"
#: src/applet/redshiftapplet.cpp:65
msgid "Redshift"
msgstr "Rudý posuv"
#: src/applet/redshiftapplet.cpp:66 src/applet/redshiftapplet.cpp:90
msgctxt "Action the user can perform"
msgid ""
"Click to toggle on. Scroll the mouse wheel to set the color temperature "
"manually."
msgstr ""
"Klepněte pro zapnutí. Otáčejte kolečkem myši pro ruční nastavení teploty "
"barvy."
#: src/applet/redshiftapplet.cpp:84
msgctxt "Action the user can perform"
msgid ""
"Click to toggle off. Scroll the mouse wheel to set the color temperature "
"manually."
msgstr ""
"Klepněte pro zapnutí. Otáčejte kolečkem myši pro ruční nastavení teploty "
"barvy."
#: src/applet/redshiftapplet.cpp:96
msgctxt "Action the user can perform"
msgid ""
"Click to switch to auto mode. Scroll the mouse wheel to change the color "
"temperature."
msgstr ""
"Klepněte pro přepnutí do automatického režimu. Otáčejte kolečkem myši pro "
"ruční nastavení teploty barvy."
#: src/applet/redshiftapplet.cpp:135
msgctxt "Redshift main configuration page. Title Capitalization."
msgid "General"
msgstr "Obecné"
#: src/applet/redshiftapplet.cpp:161
msgctxt ""
"Redshift state is set to «Auto» mode in this activity. Title Capitalization."
msgid "Auto"
msgstr "Automaticky"
#: src/applet/redshiftapplet.cpp:162
msgctxt ""
"Redshift is forced to be enabled in this activity. Title Capitalization."
msgid "Always Enabled"
msgstr "Vždy Zapnuto"
#: src/applet/redshiftapplet.cpp:163
msgctxt ""
"Redshift is forced to be disabled in this activity. Title Capitalization."
msgid "Always Disabled"
msgstr "Vždy Vypnuto"
#: src/applet/redshiftapplet.cpp:177
msgctxt ""
"Redshift activities behaviour configuration page. Title Capitalization."
msgid "Activities"
msgstr "Činnosti"
#~ msgctxt "Action the user can perform"
#~ msgid ""
#~ "Click to toggle on. Scroll the mouse wheel to set the color temperature "
#~ "manually"
#~ msgstr ""
#~ "Klepněte pro zapnutí. Otáčejte kolečkem myši pro ruční nastavení teploty "
#~ "barvy."
#~ msgctxt "Automatic adjust method"
#~ msgid "Auto"
#~ msgstr "Automaticky"
#, fuzzy
#~ msgctxt "Action the user can perform"
#~ msgid ""
#~ "Click to toggle on. Scroll the mouse "
#~ "wheel to set the color temperature manually."
#~ msgstr ""
#~ "Klepněte pro zapnutí. Otáčejte kolečkem myši pro ruční nastavení teploty "
#~ "barvy."
#, fuzzy
#~ msgctxt "Action the user can perform"
#~ msgid ""
#~ "Click to toggle off. Scroll the "
#~ "mouse wheel to set the color temperature manually"
#~ msgstr ""
#~ "Klepněte pro vypnutí. Otáčejte kolečkem myši pro ruční nastavení teploty "
#~ "barvy."
#, fuzzy
#~ msgctxt "Action the user can perform"
#~ msgid ""
#~ "Click to toggle on. Scroll the "
#~ "mouse wheel to set the color temperature manually"
#~ msgstr ""
#~ "Klepněte pro zapnutí. Otáčejte kolečkem myši pro ruční nastavení teploty "
#~ "barvy."
#, fuzzy
#~ msgctxt "Action the user can perform"
#~ msgid ""
#~ "Click to switch to auto mode. "
#~ "Scroll the mouse wheel to change the color temperature"
#~ msgstr ""
#~ "Klepněte pro zapnutí. Otáčejte kolečkem myši pro ruční nastavení teploty "
#~ "barvy."
#~ msgctxt "Kelvin degrees (There's a space before the K)"
#~ msgid " K"
#~ msgstr " K"
#~ msgctxt "Kelvin SI unit of measurement for temperature "
#~ msgid "K"
#~ msgstr "K"

379
redshift-plasmoid/po/de.po Normal file
View file

@ -0,0 +1,379 @@
# Copyright (C) 2013 Matthias Mailänder
# This file is distributed under the same license as the redshift-plasmoid package.
#
# Matthias Mailänder <mailaender@opensuse.org>, 2013.
# Simone Gaiarin <simgunz@gmail.com>, 2013, 2014.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-07-06 00:07+0200\n"
"PO-Revision-Date: 2014-07-06 00:08+0200\n"
"Last-Translator: Simone Gaiarin <simgunz@gmail.com>\n"
"Language-Team: German <>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Lokalize 1.5\n"
#. i18n: file: src/applet/activities.ui:33
#. i18n: ectx: property (text), widget (QTreeWidget, activities)
#: po/rc.cpp:3 rc.cpp:3
msgctxt "KDE Plasma activity. Title Capitalization."
msgid "Activity"
msgstr "Aktivität"
#. i18n: file: src/applet/activities.ui:38
#. i18n: ectx: property (text), widget (QTreeWidget, activities)
#: po/rc.cpp:6 rc.cpp:6
msgctxt "Redshift operation mode. Title Capitalization."
msgid "Mode"
msgstr "Modus"
#. i18n: file: src/applet/redshift.ui:26
#. i18n: ectx: property (text), widget (QLabel, lbLatitude)
#: po/rc.cpp:9 rc.cpp:9
msgctxt "Sentence capitalization."
msgid "Latitude:"
msgstr "Breitengrad:"
#. i18n: file: src/applet/redshift.ui:57
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_latitude)
#. i18n: file: src/applet/redshift.ui:104
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_longitude)
#. i18n: file: src/applet/redshift.ui:57
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_latitude)
#. i18n: file: src/applet/redshift.ui:104
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_longitude)
#: po/rc.cpp:12 po/rc.cpp:18 rc.cpp:12 rc.cpp:18
msgctxt "Degrees"
msgid "º"
msgstr "°"
#. i18n: file: src/applet/redshift.ui:79
#. i18n: ectx: property (text), widget (QLabel, lbLongitude)
#: po/rc.cpp:15 rc.cpp:15
msgctxt "Sentence capitalization."
msgid "Longitude:"
msgstr "Längengrad:"
#. i18n: file: src/applet/redshift.ui:142
#. i18n: ectx: property (text), widget (QLabel, lbDayTemp)
#: po/rc.cpp:21 rc.cpp:21
msgctxt ""
"The desired color temperature during the day. Sentence capitalization."
msgid "Day color temperature:"
msgstr "Farbtemperatur tagsüber:"
#. i18n: file: src/applet/redshift.ui:164
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_dayTemp)
#. i18n: file: src/applet/redshift.ui:199
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_nightTemp)
#. i18n: file: src/applet/redshift.ui:164
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_dayTemp)
#. i18n: file: src/applet/redshift.ui:199
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_nightTemp)
#: po/rc.cpp:24 po/rc.cpp:30 rc.cpp:24 rc.cpp:30
msgctxt ""
"Kelvin SI unit of measurement for temperature. (There's a space before the "
"K)."
msgid " K"
msgstr " K"
#. i18n: file: src/applet/redshift.ui:177
#. i18n: ectx: property (text), widget (QLabel, lbNightTemp)
#: po/rc.cpp:27 rc.cpp:27
msgctxt ""
"The desired color temperature during the night. Sentence capitalization."
msgid "Night color temperature:"
msgstr "Farbtemperatur nachts:"
#. i18n: file: src/applet/redshift.ui:225
#. i18n: ectx: property (toolTip), widget (QLabel, lbGamma)
#: po/rc.cpp:33 rc.cpp:33
msgid "Additional gamma correction (Default is 1:1:1)."
msgstr "Zusätzlich Gammakorrektur (Standard ist 1:1:1)."
#. i18n: file: src/applet/redshift.ui:228
#. i18n: ectx: property (text), widget (QLabel, lbGamma)
#: po/rc.cpp:36 rc.cpp:36
msgctxt "The screen gamma channels, red, green, blue. Sentence capitalization."
msgid "Gamma (RGB):"
msgstr "Gamma (RGB):"
#. i18n: file: src/applet/redshift.ui:309
#. i18n: ectx: property (text), widget (QLabel, lbSmooth)
#: po/rc.cpp:39 rc.cpp:39
msgctxt ""
"Enable smooth transition when the program start and stop. Sentence "
"capitalization."
msgid "Smooth transition:"
msgstr "Weicher Übergang:"
#. i18n: file: src/applet/redshift.ui:322
#. i18n: ectx: property (text), widget (QLabel, lbAutostart)
#: po/rc.cpp:42 rc.cpp:42
msgctxt "Launch the program on startup. Sentence capitalization."
msgid "Autostart:"
msgstr "Autostart:"
#. i18n: file: src/applet/redshift.ui:335
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_autolaunch)
#. i18n: file: src/applet/redshift.ui:358
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_smooth)
#. i18n: file: src/applet/redshift.ui:335
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_autolaunch)
#. i18n: file: src/applet/redshift.ui:358
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_smooth)
#: po/rc.cpp:45 po/rc.cpp:51 rc.cpp:45 rc.cpp:51
msgctxt "Sentence capitalization."
msgid "Enabled"
msgstr "Aktiviert"
#. i18n: file: src/applet/redshift.ui:345
#. i18n: ectx: property (text), widget (QLabel, lbMethod)
#: po/rc.cpp:48 rc.cpp:48
msgctxt ""
"The method used to set the color temperature. Sentence capitalization."
msgid "Adjust method:"
msgstr "Änderungsmethode:"
#. i18n: file: src/applet/redshift.ui:372
#. i18n: ectx: property (text), item, widget (KComboBox, kcfg_method)
#: po/rc.cpp:54 rc.cpp:54
msgctxt "Automatic adjust method. Title Capitalization."
msgid "Auto"
msgstr "Auto"
#. i18n: file: src/applet/redshift.ui:390
#. i18n: ectx: property (text), widget (QLabel, lbBrightness)
#: po/rc.cpp:57 rc.cpp:57
msgctxt "Sentence capitalization."
msgid "Brightness:"
msgstr "Helligkeit:"
#. i18n: file: src/redshift.kcfg:10
#. i18n: ectx: label, entry (latitude), group (General)
#: po/rc.cpp:60 rc.cpp:60
msgctxt "@label - KCFG entry name"
msgid "Latitude"
msgstr "Breitengrad"
#. i18n: file: src/redshift.kcfg:14
#. i18n: ectx: label, entry (longitude), group (General)
#: po/rc.cpp:63 rc.cpp:63
msgctxt "@label- KCFG entry name"
msgid "Longitude"
msgstr "Längengrad"
#. i18n: file: src/redshift.kcfg:18
#. i18n: ectx: label, entry (dayTemp), group (General)
#: po/rc.cpp:66 rc.cpp:66
msgctxt "@label - KCFG entry name"
msgid "Day color temperature"
msgstr "Farbtemperatur tagsüber"
#. i18n: file: src/redshift.kcfg:19
#. i18n: ectx: tooltip, entry (dayTemp), group (General)
#: po/rc.cpp:69 rc.cpp:69
msgctxt "@info:tooltip"
msgid "A neutral color temperature is 6500 K."
msgstr "Eine neutrale Farbtemperatur ist 6500 K."
#. i18n: file: src/redshift.kcfg:23
#. i18n: ectx: label, entry (nightTemp), group (General)
#: po/rc.cpp:72 rc.cpp:72
msgctxt "@label - KCFG entry name"
msgid "Night color temperature"
msgstr "Farbtemperatur nachts"
#. i18n: file: src/redshift.kcfg:24
#. i18n: ectx: tooltip, entry (nightTemp), group (General)
#: po/rc.cpp:75 rc.cpp:75
msgctxt "@info:tooltip"
msgid "The recommended night color temperature is 4500 K."
msgstr "Die empfohlene Farbtemperatur beträgt nachts 4500 K."
#. i18n: file: src/redshift.kcfg:28
#. i18n: ectx: label, entry (gammaR), group (General)
#: po/rc.cpp:78 rc.cpp:78
msgctxt "@label - KCFG entry name"
msgid "Red gamma correction"
msgstr "Rote Gammakorrektur"
#. i18n: file: src/redshift.kcfg:29
#. i18n: ectx: tooltip, entry (gammaR), group (General)
#: po/rc.cpp:81 rc.cpp:81
msgctxt "@info:tooltip"
msgid "Gamma correction (Red)"
msgstr "Gammakorrektur (Rot)"
#. i18n: file: src/redshift.kcfg:33
#. i18n: ectx: label, entry (gammaG), group (General)
#: po/rc.cpp:84 rc.cpp:84
msgctxt "@label - KCFG entry name"
msgid "Green gamma correction"
msgstr "Grüne Gammakorrektur"
#. i18n: file: src/redshift.kcfg:34
#. i18n: ectx: tooltip, entry (gammaG), group (General)
#: po/rc.cpp:87 rc.cpp:87
msgctxt "@info:tooltip"
msgid "Gamma correction (Green)"
msgstr "Gammakorrektur (Grün)"
#. i18n: file: src/redshift.kcfg:38
#. i18n: ectx: label, entry (gammaB), group (General)
#: po/rc.cpp:90 rc.cpp:90
msgctxt "@label - KCFG entry name"
msgid "Blue gamma correction"
msgstr "Blaue Gammakorrektur"
#. i18n: file: src/redshift.kcfg:39
#. i18n: ectx: tooltip, entry (gammaB), group (General)
#: po/rc.cpp:93 rc.cpp:93
msgctxt "@info:tooltip"
msgid "Gamma correction (Blue)"
msgstr "Gammakorrektur (Blau)"
#. i18n: file: src/redshift.kcfg:43
#. i18n: ectx: label, entry (brightness), group (General)
#: po/rc.cpp:96 rc.cpp:96
msgctxt "@label - KCFG entry name"
msgid "Brightness"
msgstr "Helligkeit"
#. i18n: file: src/redshift.kcfg:47
#. i18n: ectx: label, entry (smooth), group (General)
#: po/rc.cpp:99 rc.cpp:99
msgctxt "@label - KCFG entry name"
msgid "Smooth transition flag"
msgstr "Weicher Übergang Bitschalter"
#. i18n: file: src/redshift.kcfg:51
#. i18n: ectx: label, entry (autolaunch), group (General)
#: po/rc.cpp:102 rc.cpp:102
msgctxt "@label - KCFG entry name"
msgid "Autostart flag"
msgstr "Autostart Bitschalter"
#. i18n: file: src/redshift.kcfg:55
#. i18n: ectx: label, entry (method), group (General)
#: po/rc.cpp:105 rc.cpp:105
msgctxt "@label - KCFG entry name"
msgid "Color adjustment method"
msgstr "Farbanpassungsmethode"
#. i18n: file: src/redshift.kcfg:56
#. i18n: ectx: tooltip, entry (method), group (General)
#: po/rc.cpp:108 rc.cpp:108
msgctxt "@info:tooltip"
msgid ""
"Redshift color adjustment method. If «Auto» («randr») doesn't work, try "
"«vidmode»."
msgstr ""
"Rotverschiebungsfarbanpassungsmethode. Falls Auto (randr) nicht "
"funktioniert, vidmode versuchen."
#. i18n: file: src/redshift.kcfg:62
#. i18n: ectx: label, entry (alwaysOnActivities), group (Activities)
#: po/rc.cpp:111 rc.cpp:111
msgctxt ""
"@label - KCFG entry name (not visible to the user) - List of the activities "
"where redshift is always on"
msgid "Always on activities"
msgstr "Immer An Aktivitäten"
#. i18n: file: src/redshift.kcfg:65
#. i18n: ectx: label, entry (alwaysOffActivities), group (Activities)
#: po/rc.cpp:114 rc.cpp:114
msgctxt ""
"@label - KCFG entry name (not visible to the user) - List of the activities "
"where redshift is always off"
msgid "Always off activities"
msgstr "Immer Aus Aktivitäten"
#: po/rc.cpp:117 rc.cpp:117
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "Matthias Mailänder"
#: po/rc.cpp:118 rc.cpp:118
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "mailaender@opensuse.org"
#: src/applet/redshiftapplet.cpp:65
msgid "Redshift"
msgstr "Rotverschiebung"
#: src/applet/redshiftapplet.cpp:66 src/applet/redshiftapplet.cpp:90
msgctxt "Action the user can perform"
msgid ""
"Click to toggle on. Scroll the mouse wheel to set the color temperature "
"manually."
msgstr ""
"Zum Anschalten klicken. Mit dem Mausrad die Farbtemperatur manuell wählen."
#: src/applet/redshiftapplet.cpp:84
msgctxt "Action the user can perform"
msgid ""
"Click to toggle off. Scroll the mouse wheel to set the color temperature "
"manually."
msgstr ""
"Zum Ausschalten klicken. Mit dem Mausrad die Farbtemperatur manuell wählen."
#: src/applet/redshiftapplet.cpp:96
msgctxt "Action the user can perform"
msgid ""
"Click to switch to auto mode. Scroll the mouse wheel to change the color "
"temperature."
msgstr ""
"Für den Auto-Modus klicken. Mit dem Mausrad die Farbtemperatur manuell "
"wählen."
#: src/applet/redshiftapplet.cpp:135
msgctxt "Redshift main configuration page. Title Capitalization."
msgid "General"
msgstr "Allgemein"
#: src/applet/redshiftapplet.cpp:161
msgctxt ""
"Redshift state is set to «Auto» mode in this activity. Title Capitalization."
msgid "Auto"
msgstr "Auto"
#: src/applet/redshiftapplet.cpp:162
msgctxt ""
"Redshift is forced to be enabled in this activity. Title Capitalization."
msgid "Always Enabled"
msgstr "Immer angeschaltet"
#: src/applet/redshiftapplet.cpp:163
msgctxt ""
"Redshift is forced to be disabled in this activity. Title Capitalization."
msgid "Always Disabled"
msgstr "Immer abgeschaltet"
#: src/applet/redshiftapplet.cpp:177
msgctxt ""
"Redshift activities behaviour configuration page. Title Capitalization."
msgid "Activities"
msgstr "Aktivitäten"
#~ msgctxt "Action the user can perform"
#~ msgid ""
#~ "Click to toggle on. Scroll the mouse wheel to set the color temperature "
#~ "manually"
#~ msgstr ""
#~ "Zum Anschalten klicken. Mit dem Mausrad die Farbtemperatur manuell wählen."
#~ msgctxt "Kelvin degrees (There's a space before the K)"
#~ msgid " K"
#~ msgstr " K"
#~ msgctxt "Kelvin SI unit of measurement for temperature "
#~ msgid "K"
#~ msgstr "K"

378
redshift-plasmoid/po/es.po Normal file
View file

@ -0,0 +1,378 @@
# Spanish translations for redshift-plasmoid 0.6.2
# Copyright (C) 2014 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the redshift-plasmoid package.
#
# ThecaTTony <thecattony@gmx.com>, 2014.
# Simone Gaiarin <simgunz@gmail.com>, 2014.
msgid ""
msgstr ""
"Project-Id-Version: redshift-plasmoid-0.6.2 Español\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-07-06 00:07+0200\n"
"PO-Revision-Date: 2014-07-06 00:08+0200\n"
"Last-Translator: Simone Gaiarin <simgunz@gmail.com>\n"
"Language-Team: Italian <>\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Lokalize 1.5\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. i18n: file: src/applet/activities.ui:33
#. i18n: ectx: property (text), widget (QTreeWidget, activities)
#: po/rc.cpp:3 rc.cpp:3
msgctxt "KDE Plasma activity. Title Capitalization."
msgid "Activity"
msgstr "Actividad"
#. i18n: file: src/applet/activities.ui:38
#. i18n: ectx: property (text), widget (QTreeWidget, activities)
#: po/rc.cpp:6 rc.cpp:6
msgctxt "Redshift operation mode. Title Capitalization."
msgid "Mode"
msgstr "Modo"
#. i18n: file: src/applet/redshift.ui:26
#. i18n: ectx: property (text), widget (QLabel, lbLatitude)
#: po/rc.cpp:9 rc.cpp:9
msgctxt "Sentence capitalization."
msgid "Latitude:"
msgstr "Latitud:"
#. i18n: file: src/applet/redshift.ui:57
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_latitude)
#. i18n: file: src/applet/redshift.ui:104
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_longitude)
#. i18n: file: src/applet/redshift.ui:57
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_latitude)
#. i18n: file: src/applet/redshift.ui:104
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_longitude)
#: po/rc.cpp:12 po/rc.cpp:18 rc.cpp:12 rc.cpp:18
msgctxt "Degrees"
msgid "º"
msgstr "º"
#. i18n: file: src/applet/redshift.ui:79
#. i18n: ectx: property (text), widget (QLabel, lbLongitude)
#: po/rc.cpp:15 rc.cpp:15
msgctxt "Sentence capitalization."
msgid "Longitude:"
msgstr "Longitud:"
#. i18n: file: src/applet/redshift.ui:142
#. i18n: ectx: property (text), widget (QLabel, lbDayTemp)
#: po/rc.cpp:21 rc.cpp:21
msgctxt ""
"The desired color temperature during the day. Sentence capitalization."
msgid "Day color temperature:"
msgstr "Temperatura de color diurna:"
#. i18n: file: src/applet/redshift.ui:164
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_dayTemp)
#. i18n: file: src/applet/redshift.ui:199
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_nightTemp)
#. i18n: file: src/applet/redshift.ui:164
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_dayTemp)
#. i18n: file: src/applet/redshift.ui:199
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_nightTemp)
#: po/rc.cpp:24 po/rc.cpp:30 rc.cpp:24 rc.cpp:30
msgctxt ""
"Kelvin SI unit of measurement for temperature. (There's a space before the "
"K)."
msgid " K"
msgstr " K"
#. i18n: file: src/applet/redshift.ui:177
#. i18n: ectx: property (text), widget (QLabel, lbNightTemp)
#: po/rc.cpp:27 rc.cpp:27
msgctxt ""
"The desired color temperature during the night. Sentence capitalization."
msgid "Night color temperature:"
msgstr "Temperatura de color nocturna:"
#. i18n: file: src/applet/redshift.ui:225
#. i18n: ectx: property (toolTip), widget (QLabel, lbGamma)
#: po/rc.cpp:33 rc.cpp:33
msgid "Additional gamma correction (Default is 1:1:1)."
msgstr "Corrección de gama adicional (por omisión 1:1:1)."
#. i18n: file: src/applet/redshift.ui:228
#. i18n: ectx: property (text), widget (QLabel, lbGamma)
#: po/rc.cpp:36 rc.cpp:36
msgctxt "The screen gamma channels, red, green, blue. Sentence capitalization."
msgid "Gamma (RGB):"
msgstr "Gama (RGB):"
#. i18n: file: src/applet/redshift.ui:309
#. i18n: ectx: property (text), widget (QLabel, lbSmooth)
#: po/rc.cpp:39 rc.cpp:39
msgctxt ""
"Enable smooth transition when the program start and stop. Sentence "
"capitalization."
msgid "Smooth transition:"
msgstr "Transición suave:"
#. i18n: file: src/applet/redshift.ui:322
#. i18n: ectx: property (text), widget (QLabel, lbAutostart)
#: po/rc.cpp:42 rc.cpp:42
msgctxt "Launch the program on startup. Sentence capitalization."
msgid "Autostart:"
msgstr "Autoinicio:"
#. i18n: file: src/applet/redshift.ui:335
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_autolaunch)
#. i18n: file: src/applet/redshift.ui:358
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_smooth)
#. i18n: file: src/applet/redshift.ui:335
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_autolaunch)
#. i18n: file: src/applet/redshift.ui:358
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_smooth)
#: po/rc.cpp:45 po/rc.cpp:51 rc.cpp:45 rc.cpp:51
msgctxt "Sentence capitalization."
msgid "Enabled"
msgstr "Habilitado"
#. i18n: file: src/applet/redshift.ui:345
#. i18n: ectx: property (text), widget (QLabel, lbMethod)
#: po/rc.cpp:48 rc.cpp:48
msgctxt ""
"The method used to set the color temperature. Sentence capitalization."
msgid "Adjust method:"
msgstr "Método de ajuste:"
#. i18n: file: src/applet/redshift.ui:372
#. i18n: ectx: property (text), item, widget (KComboBox, kcfg_method)
#: po/rc.cpp:54 rc.cpp:54
msgctxt "Automatic adjust method. Title Capitalization."
msgid "Auto"
msgstr "Auto"
#. i18n: file: src/applet/redshift.ui:390
#. i18n: ectx: property (text), widget (QLabel, lbBrightness)
#: po/rc.cpp:57 rc.cpp:57
msgctxt "Sentence capitalization."
msgid "Brightness:"
msgstr "Brillo:"
#. i18n: file: src/redshift.kcfg:10
#. i18n: ectx: label, entry (latitude), group (General)
#: po/rc.cpp:60 rc.cpp:60
msgctxt "@label - KCFG entry name"
msgid "Latitude"
msgstr "Latitud"
#. i18n: file: src/redshift.kcfg:14
#. i18n: ectx: label, entry (longitude), group (General)
#: po/rc.cpp:63 rc.cpp:63
msgctxt "@label- KCFG entry name"
msgid "Longitude"
msgstr "Longitud"
#. i18n: file: src/redshift.kcfg:18
#. i18n: ectx: label, entry (dayTemp), group (General)
#: po/rc.cpp:66 rc.cpp:66
msgctxt "@label - KCFG entry name"
msgid "Day color temperature"
msgstr "Temperatura de color diurna"
#. i18n: file: src/redshift.kcfg:19
#. i18n: ectx: tooltip, entry (dayTemp), group (General)
#: po/rc.cpp:69 rc.cpp:69
msgctxt "@info:tooltip"
msgid "A neutral color temperature is 6500 K."
msgstr "6500 K es una temperatura de color neutral."
#. i18n: file: src/redshift.kcfg:23
#. i18n: ectx: label, entry (nightTemp), group (General)
#: po/rc.cpp:72 rc.cpp:72
msgctxt "@label - KCFG entry name"
msgid "Night color temperature"
msgstr "Temperatura de color nocturna"
#. i18n: file: src/redshift.kcfg:24
#. i18n: ectx: tooltip, entry (nightTemp), group (General)
#: po/rc.cpp:75 rc.cpp:75
msgctxt "@info:tooltip"
msgid "The recommended night color temperature is 4500 K."
msgstr "4500 K es la temperatura de color nocturna recomendada."
#. i18n: file: src/redshift.kcfg:28
#. i18n: ectx: label, entry (gammaR), group (General)
#: po/rc.cpp:78 rc.cpp:78
msgctxt "@label - KCFG entry name"
msgid "Red gamma correction"
msgstr "Corrección de gama rojo"
#. i18n: file: src/redshift.kcfg:29
#. i18n: ectx: tooltip, entry (gammaR), group (General)
#: po/rc.cpp:81 rc.cpp:81
msgctxt "@info:tooltip"
msgid "Gamma correction (Red)"
msgstr "Corrección gama (Rojo)"
#. i18n: file: src/redshift.kcfg:33
#. i18n: ectx: label, entry (gammaG), group (General)
#: po/rc.cpp:84 rc.cpp:84
msgctxt "@label - KCFG entry name"
msgid "Green gamma correction"
msgstr "Corrección de gama verde"
#. i18n: file: src/redshift.kcfg:34
#. i18n: ectx: tooltip, entry (gammaG), group (General)
#: po/rc.cpp:87 rc.cpp:87
msgctxt "@info:tooltip"
msgid "Gamma correction (Green)"
msgstr "Corrección gama (Verde)"
#. i18n: file: src/redshift.kcfg:38
#. i18n: ectx: label, entry (gammaB), group (General)
#: po/rc.cpp:90 rc.cpp:90
msgctxt "@label - KCFG entry name"
msgid "Blue gamma correction"
msgstr "Corrección de gama azul"
#. i18n: file: src/redshift.kcfg:39
#. i18n: ectx: tooltip, entry (gammaB), group (General)
#: po/rc.cpp:93 rc.cpp:93
msgctxt "@info:tooltip"
msgid "Gamma correction (Blue)"
msgstr "Corrección gama (Azul)"
#. i18n: file: src/redshift.kcfg:43
#. i18n: ectx: label, entry (brightness), group (General)
#: po/rc.cpp:96 rc.cpp:96
msgctxt "@label - KCFG entry name"
msgid "Brightness"
msgstr "Brillo"
#. i18n: file: src/redshift.kcfg:47
#. i18n: ectx: label, entry (smooth), group (General)
#: po/rc.cpp:99 rc.cpp:99
msgctxt "@label - KCFG entry name"
msgid "Smooth transition flag"
msgstr "Marca de transición suave"
#. i18n: file: src/redshift.kcfg:51
#. i18n: ectx: label, entry (autolaunch), group (General)
#: po/rc.cpp:102 rc.cpp:102
msgctxt "@label - KCFG entry name"
msgid "Autostart flag"
msgstr "Marca de autoinicio"
#. i18n: file: src/redshift.kcfg:55
#. i18n: ectx: label, entry (method), group (General)
#: po/rc.cpp:105 rc.cpp:105
msgctxt "@label - KCFG entry name"
msgid "Color adjustment method"
msgstr "Método de ajuste de color"
#. i18n: file: src/redshift.kcfg:56
#. i18n: ectx: tooltip, entry (method), group (General)
#: po/rc.cpp:108 rc.cpp:108
msgctxt "@info:tooltip"
msgid ""
"Redshift color adjustment method. If «Auto» («randr») doesn't work, try "
"«vidmode»."
msgstr ""
"Método de ajuste de color. Si «Auto» («randr») no funciona, tratar «vidmode»."
#. i18n: file: src/redshift.kcfg:62
#. i18n: ectx: label, entry (alwaysOnActivities), group (Activities)
#: po/rc.cpp:111 rc.cpp:111
msgctxt ""
"@label - KCFG entry name (not visible to the user) - List of the activities "
"where redshift is always on"
msgid "Always on activities"
msgstr "Siempre habilitado en actividades"
#. i18n: file: src/redshift.kcfg:65
#. i18n: ectx: label, entry (alwaysOffActivities), group (Activities)
#: po/rc.cpp:114 rc.cpp:114
msgctxt ""
"@label - KCFG entry name (not visible to the user) - List of the activities "
"where redshift is always off"
msgid "Always off activities"
msgstr "Siempre deshabilitado en actividades"
#: po/rc.cpp:117 rc.cpp:117
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "ThecaTTony"
#: po/rc.cpp:118 rc.cpp:118
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "thecattony@gmx.com"
#: src/applet/redshiftapplet.cpp:65
msgid "Redshift"
msgstr "Redshift"
#: src/applet/redshiftapplet.cpp:66 src/applet/redshiftapplet.cpp:90
msgctxt "Action the user can perform"
msgid ""
"Click to toggle on. Scroll the mouse wheel to set the color temperature "
"manually."
msgstr ""
"Click para habilitar. Girar la rueda del mouse para establecer la "
"temperatura de color manualmente."
#: src/applet/redshiftapplet.cpp:84
msgctxt "Action the user can perform"
msgid ""
"Click to toggle off. Scroll the mouse wheel to set the color temperature "
"manually."
msgstr ""
"Click para deshabilitar. Girar la rueda del mouse para establecer la "
"temperatura de color manualmente."
#: src/applet/redshiftapplet.cpp:96
msgctxt "Action the user can perform"
msgid ""
"Click to switch to auto mode. Scroll the mouse wheel to change the color "
"temperature."
msgstr ""
"Click pasar cambiar a modo Auto. Girar la rueda del mouse para establecer la "
"temperatura de color manualmente."
#: src/applet/redshiftapplet.cpp:135
msgctxt "Redshift main configuration page. Title Capitalization."
msgid "General"
msgstr "General"
#: src/applet/redshiftapplet.cpp:161
msgctxt ""
"Redshift state is set to «Auto» mode in this activity. Title Capitalization."
msgid "Auto"
msgstr "Auto"
#: src/applet/redshiftapplet.cpp:162
msgctxt ""
"Redshift is forced to be enabled in this activity. Title Capitalization."
msgid "Always Enabled"
msgstr "Siempre Habilitado"
#: src/applet/redshiftapplet.cpp:163
msgctxt ""
"Redshift is forced to be disabled in this activity. Title Capitalization."
msgid "Always Disabled"
msgstr "Siempre Deshabilitado"
#: src/applet/redshiftapplet.cpp:177
msgctxt ""
"Redshift activities behaviour configuration page. Title Capitalization."
msgid "Activities"
msgstr "Actividades"
#~ msgctxt "Action the user can perform"
#~ msgid ""
#~ "Click to toggle on. Scroll the mouse wheel to set the color temperature "
#~ "manually"
#~ msgstr ""
#~ "Click para habilitar. Girar la rueda del mouse para establecer la "
#~ "temperatura de color manualmente."
#~ msgctxt "Automatic adjust method"
#~ msgid "Auto"
#~ msgstr "Auto"

388
redshift-plasmoid/po/fr.po Normal file
View file

@ -0,0 +1,388 @@
# French translations for PACKAGE package
# Traductions françaises du paquet PACKAGE.
# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Automatically generated, 2012.
# Pierre Buard <pierre.buard@gmail.com>, 2012.
# Simone Gaiarin <simgunz@gmail.com>, 2012, 2013, 2014.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-07-06 00:07+0200\n"
"PO-Revision-Date: 2014-07-06 00:08+0200\n"
"Last-Translator: Simone Gaiarin <simgunz@gmail.com>\n"
"Language-Team: French <>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Lokalize 1.5\n"
#. i18n: file: src/applet/activities.ui:33
#. i18n: ectx: property (text), widget (QTreeWidget, activities)
#: po/rc.cpp:3 rc.cpp:3
msgctxt "KDE Plasma activity. Title Capitalization."
msgid "Activity"
msgstr "Activité"
#. i18n: file: src/applet/activities.ui:38
#. i18n: ectx: property (text), widget (QTreeWidget, activities)
#: po/rc.cpp:6 rc.cpp:6
msgctxt "Redshift operation mode. Title Capitalization."
msgid "Mode"
msgstr "Mode"
#. i18n: file: src/applet/redshift.ui:26
#. i18n: ectx: property (text), widget (QLabel, lbLatitude)
#: po/rc.cpp:9 rc.cpp:9
msgctxt "Sentence capitalization."
msgid "Latitude:"
msgstr "Latitude:"
#. i18n: file: src/applet/redshift.ui:57
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_latitude)
#. i18n: file: src/applet/redshift.ui:104
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_longitude)
#. i18n: file: src/applet/redshift.ui:57
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_latitude)
#. i18n: file: src/applet/redshift.ui:104
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_longitude)
#: po/rc.cpp:12 po/rc.cpp:18 rc.cpp:12 rc.cpp:18
msgctxt "Degrees"
msgid "º"
msgstr "°"
#. i18n: file: src/applet/redshift.ui:79
#. i18n: ectx: property (text), widget (QLabel, lbLongitude)
#: po/rc.cpp:15 rc.cpp:15
msgctxt "Sentence capitalization."
msgid "Longitude:"
msgstr "Longitude:"
#. i18n: file: src/applet/redshift.ui:142
#. i18n: ectx: property (text), widget (QLabel, lbDayTemp)
#: po/rc.cpp:21 rc.cpp:21
msgctxt ""
"The desired color temperature during the day. Sentence capitalization."
msgid "Day color temperature:"
msgstr "Température des couleurs diurnes:"
#. i18n: file: src/applet/redshift.ui:164
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_dayTemp)
#. i18n: file: src/applet/redshift.ui:199
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_nightTemp)
#. i18n: file: src/applet/redshift.ui:164
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_dayTemp)
#. i18n: file: src/applet/redshift.ui:199
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_nightTemp)
#: po/rc.cpp:24 po/rc.cpp:30 rc.cpp:24 rc.cpp:30
msgctxt ""
"Kelvin SI unit of measurement for temperature. (There's a space before the "
"K)."
msgid " K"
msgstr " K"
#. i18n: file: src/applet/redshift.ui:177
#. i18n: ectx: property (text), widget (QLabel, lbNightTemp)
#: po/rc.cpp:27 rc.cpp:27
msgctxt ""
"The desired color temperature during the night. Sentence capitalization."
msgid "Night color temperature:"
msgstr "Température des couleurs nocturnes:"
#. i18n: file: src/applet/redshift.ui:225
#. i18n: ectx: property (toolTip), widget (QLabel, lbGamma)
#: po/rc.cpp:33 rc.cpp:33
msgid "Additional gamma correction (Default is 1:1:1)."
msgstr "Correction gamma additionnelle (1:1:1 par défaut)."
#. i18n: file: src/applet/redshift.ui:228
#. i18n: ectx: property (text), widget (QLabel, lbGamma)
#: po/rc.cpp:36 rc.cpp:36
msgctxt "The screen gamma channels, red, green, blue. Sentence capitalization."
msgid "Gamma (RGB):"
msgstr "Gamma (RGB):"
#. i18n: file: src/applet/redshift.ui:309
#. i18n: ectx: property (text), widget (QLabel, lbSmooth)
#: po/rc.cpp:39 rc.cpp:39
msgctxt ""
"Enable smooth transition when the program start and stop. Sentence "
"capitalization."
msgid "Smooth transition:"
msgstr "Transition douce:"
#. i18n: file: src/applet/redshift.ui:322
#. i18n: ectx: property (text), widget (QLabel, lbAutostart)
#: po/rc.cpp:42 rc.cpp:42
msgctxt "Launch the program on startup. Sentence capitalization."
msgid "Autostart:"
msgstr "Démarrage automatique:"
#. i18n: file: src/applet/redshift.ui:335
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_autolaunch)
#. i18n: file: src/applet/redshift.ui:358
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_smooth)
#. i18n: file: src/applet/redshift.ui:335
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_autolaunch)
#. i18n: file: src/applet/redshift.ui:358
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_smooth)
#: po/rc.cpp:45 po/rc.cpp:51 rc.cpp:45 rc.cpp:51
msgctxt "Sentence capitalization."
msgid "Enabled"
msgstr "Activé"
#. i18n: file: src/applet/redshift.ui:345
#. i18n: ectx: property (text), widget (QLabel, lbMethod)
#: po/rc.cpp:48 rc.cpp:48
msgctxt ""
"The method used to set the color temperature. Sentence capitalization."
msgid "Adjust method:"
msgstr "Méthode d'ajustement:"
#. i18n: file: src/applet/redshift.ui:372
#. i18n: ectx: property (text), item, widget (KComboBox, kcfg_method)
#: po/rc.cpp:54 rc.cpp:54
msgctxt "Automatic adjust method. Title Capitalization."
msgid "Auto"
msgstr "Auto"
#. i18n: file: src/applet/redshift.ui:390
#. i18n: ectx: property (text), widget (QLabel, lbBrightness)
#: po/rc.cpp:57 rc.cpp:57
msgctxt "Sentence capitalization."
msgid "Brightness:"
msgstr "Luminosité:"
#. i18n: file: src/redshift.kcfg:10
#. i18n: ectx: label, entry (latitude), group (General)
#: po/rc.cpp:60 rc.cpp:60
msgctxt "@label - KCFG entry name"
msgid "Latitude"
msgstr "Latitude"
#. i18n: file: src/redshift.kcfg:14
#. i18n: ectx: label, entry (longitude), group (General)
#: po/rc.cpp:63 rc.cpp:63
msgctxt "@label- KCFG entry name"
msgid "Longitude"
msgstr "Longitude"
#. i18n: file: src/redshift.kcfg:18
#. i18n: ectx: label, entry (dayTemp), group (General)
#: po/rc.cpp:66 rc.cpp:66
msgctxt "@label - KCFG entry name"
msgid "Day color temperature"
msgstr "Température des couleurs diurnes"
#. i18n: file: src/redshift.kcfg:19
#. i18n: ectx: tooltip, entry (dayTemp), group (General)
#: po/rc.cpp:69 rc.cpp:69
msgctxt "@info:tooltip"
msgid "A neutral color temperature is 6500 K."
msgstr "6500 K correspond à une température de couleur neutre."
#. i18n: file: src/redshift.kcfg:23
#. i18n: ectx: label, entry (nightTemp), group (General)
#: po/rc.cpp:72 rc.cpp:72
msgctxt "@label - KCFG entry name"
msgid "Night color temperature"
msgstr "Température des couleurs nocturnes"
#. i18n: file: src/redshift.kcfg:24
#. i18n: ectx: tooltip, entry (nightTemp), group (General)
#: po/rc.cpp:75 rc.cpp:75
msgctxt "@info:tooltip"
msgid "The recommended night color temperature is 4500 K."
msgstr "La température recommandée pour les couleurs nocturnes est de 4500 K."
#. i18n: file: src/redshift.kcfg:28
#. i18n: ectx: label, entry (gammaR), group (General)
#: po/rc.cpp:78 rc.cpp:78
msgctxt "@label - KCFG entry name"
msgid "Red gamma correction"
msgstr "Correction gamma du rouge"
#. i18n: file: src/redshift.kcfg:29
#. i18n: ectx: tooltip, entry (gammaR), group (General)
#: po/rc.cpp:81 rc.cpp:81
msgctxt "@info:tooltip"
msgid "Gamma correction (Red)"
msgstr "Correction gamma (rouge)"
#. i18n: file: src/redshift.kcfg:33
#. i18n: ectx: label, entry (gammaG), group (General)
#: po/rc.cpp:84 rc.cpp:84
msgctxt "@label - KCFG entry name"
msgid "Green gamma correction"
msgstr "Correction gamma du vert"
#. i18n: file: src/redshift.kcfg:34
#. i18n: ectx: tooltip, entry (gammaG), group (General)
#: po/rc.cpp:87 rc.cpp:87
msgctxt "@info:tooltip"
msgid "Gamma correction (Green)"
msgstr "Correction gamma (vert)"
#. i18n: file: src/redshift.kcfg:38
#. i18n: ectx: label, entry (gammaB), group (General)
#: po/rc.cpp:90 rc.cpp:90
msgctxt "@label - KCFG entry name"
msgid "Blue gamma correction"
msgstr "Correction gamma du bleu"
#. i18n: file: src/redshift.kcfg:39
#. i18n: ectx: tooltip, entry (gammaB), group (General)
#: po/rc.cpp:93 rc.cpp:93
msgctxt "@info:tooltip"
msgid "Gamma correction (Blue)"
msgstr "Correction gamma (bleu)"
#. i18n: file: src/redshift.kcfg:43
#. i18n: ectx: label, entry (brightness), group (General)
#: po/rc.cpp:96 rc.cpp:96
msgctxt "@label - KCFG entry name"
msgid "Brightness"
msgstr "Luminosité"
#. i18n: file: src/redshift.kcfg:47
#. i18n: ectx: label, entry (smooth), group (General)
#: po/rc.cpp:99 rc.cpp:99
msgctxt "@label - KCFG entry name"
msgid "Smooth transition flag"
msgstr "Drapeau pour la transition douce"
#. i18n: file: src/redshift.kcfg:51
#. i18n: ectx: label, entry (autolaunch), group (General)
#: po/rc.cpp:102 rc.cpp:102
msgctxt "@label - KCFG entry name"
msgid "Autostart flag"
msgstr "Drapeau pour le démarrage automatique"
#. i18n: file: src/redshift.kcfg:55
#. i18n: ectx: label, entry (method), group (General)
#: po/rc.cpp:105 rc.cpp:105
msgctxt "@label - KCFG entry name"
msgid "Color adjustment method"
msgstr "Méthode d'ajustement des couleurs"
#. i18n: file: src/redshift.kcfg:56
#. i18n: ectx: tooltip, entry (method), group (General)
#: po/rc.cpp:108 rc.cpp:108
msgctxt "@info:tooltip"
msgid ""
"Redshift color adjustment method. If «Auto» («randr») doesn't work, try "
"«vidmode»."
msgstr ""
"Méthode d'ajustement des couleurs de Redshift. Si « Auto » (randr) ne "
"fonctionne pas, essayez « vidmode »."
#. i18n: file: src/redshift.kcfg:62
#. i18n: ectx: label, entry (alwaysOnActivities), group (Activities)
#: po/rc.cpp:111 rc.cpp:111
msgctxt ""
"@label - KCFG entry name (not visible to the user) - List of the activities "
"where redshift is always on"
msgid "Always on activities"
msgstr "Activités toujours actives"
#. i18n: file: src/redshift.kcfg:65
#. i18n: ectx: label, entry (alwaysOffActivities), group (Activities)
#: po/rc.cpp:114 rc.cpp:114
msgctxt ""
"@label - KCFG entry name (not visible to the user) - List of the activities "
"where redshift is always off"
msgid "Always off activities"
msgstr "Activités toujours désactivées"
#: po/rc.cpp:117 rc.cpp:117
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "Pierre Buard"
#: po/rc.cpp:118 rc.cpp:118
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "pierre.buard@gmail.com"
#: src/applet/redshiftapplet.cpp:65
msgid "Redshift"
msgstr "Redshift"
#: src/applet/redshiftapplet.cpp:66 src/applet/redshiftapplet.cpp:90
msgctxt "Action the user can perform"
msgid ""
"Click to toggle on. Scroll the mouse wheel to set the color temperature "
"manually."
msgstr ""
"Cliquez pour activer et utilisez la molette de la souris pour définir "
"manuellement une température de couleur."
#: src/applet/redshiftapplet.cpp:84
msgctxt "Action the user can perform"
msgid ""
"Click to toggle off. Scroll the mouse wheel to set the color temperature "
"manually."
msgstr ""
"Cliquez pour désactiver et utilisez la molette de la souris pour définir "
"manuellement une température de couleur."
#: src/applet/redshiftapplet.cpp:96
msgctxt "Action the user can perform"
msgid ""
"Click to switch to auto mode. Scroll the mouse wheel to change the color "
"temperature."
msgstr ""
"Cliquez pour passer au mode automatique et utilisez la molette de la souris "
"pour choisir une température de couleur."
#: src/applet/redshiftapplet.cpp:135
msgctxt "Redshift main configuration page. Title Capitalization."
msgid "General"
msgstr "Général"
#: src/applet/redshiftapplet.cpp:161
msgctxt ""
"Redshift state is set to «Auto» mode in this activity. Title Capitalization."
msgid "Auto"
msgstr "Auto"
#: src/applet/redshiftapplet.cpp:162
msgctxt ""
"Redshift is forced to be enabled in this activity. Title Capitalization."
msgid "Always Enabled"
msgstr "Toujours activé"
#: src/applet/redshiftapplet.cpp:163
msgctxt ""
"Redshift is forced to be disabled in this activity. Title Capitalization."
msgid "Always Disabled"
msgstr "Toujours désactivé"
#: src/applet/redshiftapplet.cpp:177
msgctxt ""
"Redshift activities behaviour configuration page. Title Capitalization."
msgid "Activities"
msgstr "Activités"
#~ msgctxt "Action the user can perform"
#~ msgid ""
#~ "Click to toggle on. Scroll the mouse wheel to set the color temperature "
#~ "manually"
#~ msgstr ""
#~ "Cliquez pour activer et utilisez la molette de la souris pour définir "
#~ "manuellement une température de couleur."
#~ msgctxt "Kelvin degrees (There's a space before the K)"
#~ msgid " K"
#~ msgstr " K"
#~ msgctxt "Kelvin degrees"
#~ msgid "ºK"
#~ msgstr "°K"
#~ msgid "Restart Redshift"
#~ msgstr "Redémarrer Redshift"

392
redshift-plasmoid/po/it.po Normal file
View file

@ -0,0 +1,392 @@
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Simone Gaiarin <simgunz@gmail.com>, 2012, 2013, 2014.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-07-06 00:07+0200\n"
"PO-Revision-Date: 2014-07-06 00:07+0200\n"
"Last-Translator: Simone Gaiarin <simgunz@gmail.com>\n"
"Language-Team: Italian <>\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Lokalize 1.5\n"
#. i18n: file: src/applet/activities.ui:33
#. i18n: ectx: property (text), widget (QTreeWidget, activities)
#: po/rc.cpp:3 rc.cpp:3
msgctxt "KDE Plasma activity. Title Capitalization."
msgid "Activity"
msgstr "Attività"
#. i18n: file: src/applet/activities.ui:38
#. i18n: ectx: property (text), widget (QTreeWidget, activities)
#: po/rc.cpp:6 rc.cpp:6
msgctxt "Redshift operation mode. Title Capitalization."
msgid "Mode"
msgstr "Modalità"
#. i18n: file: src/applet/redshift.ui:26
#. i18n: ectx: property (text), widget (QLabel, lbLatitude)
#: po/rc.cpp:9 rc.cpp:9
msgctxt "Sentence capitalization."
msgid "Latitude:"
msgstr "Latitudine:"
#. i18n: file: src/applet/redshift.ui:57
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_latitude)
#. i18n: file: src/applet/redshift.ui:104
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_longitude)
#. i18n: file: src/applet/redshift.ui:57
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_latitude)
#. i18n: file: src/applet/redshift.ui:104
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_longitude)
#: po/rc.cpp:12 po/rc.cpp:18 rc.cpp:12 rc.cpp:18
msgctxt "Degrees"
msgid "º"
msgstr "°"
#. i18n: file: src/applet/redshift.ui:79
#. i18n: ectx: property (text), widget (QLabel, lbLongitude)
#: po/rc.cpp:15 rc.cpp:15
msgctxt "Sentence capitalization."
msgid "Longitude:"
msgstr "Longitudine:"
#. i18n: file: src/applet/redshift.ui:142
#. i18n: ectx: property (text), widget (QLabel, lbDayTemp)
#: po/rc.cpp:21 rc.cpp:21
msgctxt ""
"The desired color temperature during the day. Sentence capitalization."
msgid "Day color temperature:"
msgstr "Temperatura di colore diurna:"
#. i18n: file: src/applet/redshift.ui:164
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_dayTemp)
#. i18n: file: src/applet/redshift.ui:199
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_nightTemp)
#. i18n: file: src/applet/redshift.ui:164
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_dayTemp)
#. i18n: file: src/applet/redshift.ui:199
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_nightTemp)
#: po/rc.cpp:24 po/rc.cpp:30 rc.cpp:24 rc.cpp:30
msgctxt ""
"Kelvin SI unit of measurement for temperature. (There's a space before the "
"K)."
msgid " K"
msgstr " K"
#. i18n: file: src/applet/redshift.ui:177
#. i18n: ectx: property (text), widget (QLabel, lbNightTemp)
#: po/rc.cpp:27 rc.cpp:27
msgctxt ""
"The desired color temperature during the night. Sentence capitalization."
msgid "Night color temperature:"
msgstr "Temperatura di colore notturna:"
#. i18n: file: src/applet/redshift.ui:225
#. i18n: ectx: property (toolTip), widget (QLabel, lbGamma)
#: po/rc.cpp:33 rc.cpp:33
msgid "Additional gamma correction (Default is 1:1:1)."
msgstr "Ulteriori correzioni della gamma (Default 1:1:1)."
#. i18n: file: src/applet/redshift.ui:228
#. i18n: ectx: property (text), widget (QLabel, lbGamma)
#: po/rc.cpp:36 rc.cpp:36
msgctxt "The screen gamma channels, red, green, blue. Sentence capitalization."
msgid "Gamma (RGB):"
msgstr "Gamma (RGB):"
#. i18n: file: src/applet/redshift.ui:309
#. i18n: ectx: property (text), widget (QLabel, lbSmooth)
#: po/rc.cpp:39 rc.cpp:39
msgctxt ""
"Enable smooth transition when the program start and stop. Sentence "
"capitalization."
msgid "Smooth transition:"
msgstr "Transizione smooth:"
#. i18n: file: src/applet/redshift.ui:322
#. i18n: ectx: property (text), widget (QLabel, lbAutostart)
#: po/rc.cpp:42 rc.cpp:42
msgctxt "Launch the program on startup. Sentence capitalization."
msgid "Autostart:"
msgstr "Avvio automatico:"
#. i18n: file: src/applet/redshift.ui:335
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_autolaunch)
#. i18n: file: src/applet/redshift.ui:358
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_smooth)
#. i18n: file: src/applet/redshift.ui:335
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_autolaunch)
#. i18n: file: src/applet/redshift.ui:358
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_smooth)
#: po/rc.cpp:45 po/rc.cpp:51 rc.cpp:45 rc.cpp:51
msgctxt "Sentence capitalization."
msgid "Enabled"
msgstr "Abilitato"
#. i18n: file: src/applet/redshift.ui:345
#. i18n: ectx: property (text), widget (QLabel, lbMethod)
#: po/rc.cpp:48 rc.cpp:48
msgctxt ""
"The method used to set the color temperature. Sentence capitalization."
msgid "Adjust method:"
msgstr "Metodo di regolazione:"
#. i18n: file: src/applet/redshift.ui:372
#. i18n: ectx: property (text), item, widget (KComboBox, kcfg_method)
#: po/rc.cpp:54 rc.cpp:54
msgctxt "Automatic adjust method. Title Capitalization."
msgid "Auto"
msgstr "Auto"
#. i18n: file: src/applet/redshift.ui:390
#. i18n: ectx: property (text), widget (QLabel, lbBrightness)
#: po/rc.cpp:57 rc.cpp:57
msgctxt "Sentence capitalization."
msgid "Brightness:"
msgstr "Luminosità:"
#. i18n: file: src/redshift.kcfg:10
#. i18n: ectx: label, entry (latitude), group (General)
#: po/rc.cpp:60 rc.cpp:60
msgctxt "@label - KCFG entry name"
msgid "Latitude"
msgstr "Latitudine"
#. i18n: file: src/redshift.kcfg:14
#. i18n: ectx: label, entry (longitude), group (General)
#: po/rc.cpp:63 rc.cpp:63
msgctxt "@label- KCFG entry name"
msgid "Longitude"
msgstr "Longitudine"
#. i18n: file: src/redshift.kcfg:18
#. i18n: ectx: label, entry (dayTemp), group (General)
#: po/rc.cpp:66 rc.cpp:66
msgctxt "@label - KCFG entry name"
msgid "Day color temperature"
msgstr "Temperatura di colore diurna"
#. i18n: file: src/redshift.kcfg:19
#. i18n: ectx: tooltip, entry (dayTemp), group (General)
#: po/rc.cpp:69 rc.cpp:69
msgctxt "@info:tooltip"
msgid "A neutral color temperature is 6500 K."
msgstr "Una temperatura di colore neutrale è 6500 K."
#. i18n: file: src/redshift.kcfg:23
#. i18n: ectx: label, entry (nightTemp), group (General)
#: po/rc.cpp:72 rc.cpp:72
msgctxt "@label - KCFG entry name"
msgid "Night color temperature"
msgstr "Temperatura di colore notturna "
#. i18n: file: src/redshift.kcfg:24
#. i18n: ectx: tooltip, entry (nightTemp), group (General)
#: po/rc.cpp:75 rc.cpp:75
msgctxt "@info:tooltip"
msgid "The recommended night color temperature is 4500 K."
msgstr "La temperatura di colore notturna raccomandata è 4500 K."
#. i18n: file: src/redshift.kcfg:28
#. i18n: ectx: label, entry (gammaR), group (General)
#: po/rc.cpp:78 rc.cpp:78
msgctxt "@label - KCFG entry name"
msgid "Red gamma correction"
msgstr "Correzione gamma (Rosso)"
#. i18n: file: src/redshift.kcfg:29
#. i18n: ectx: tooltip, entry (gammaR), group (General)
#: po/rc.cpp:81 rc.cpp:81
msgctxt "@info:tooltip"
msgid "Gamma correction (Red)"
msgstr "Correzione gamma (Rosso)"
#. i18n: file: src/redshift.kcfg:33
#. i18n: ectx: label, entry (gammaG), group (General)
#: po/rc.cpp:84 rc.cpp:84
msgctxt "@label - KCFG entry name"
msgid "Green gamma correction"
msgstr "Correzione gamma (Verde)"
#. i18n: file: src/redshift.kcfg:34
#. i18n: ectx: tooltip, entry (gammaG), group (General)
#: po/rc.cpp:87 rc.cpp:87
msgctxt "@info:tooltip"
msgid "Gamma correction (Green)"
msgstr "Correzione gamma (Verde)"
#. i18n: file: src/redshift.kcfg:38
#. i18n: ectx: label, entry (gammaB), group (General)
#: po/rc.cpp:90 rc.cpp:90
msgctxt "@label - KCFG entry name"
msgid "Blue gamma correction"
msgstr "Correzione gamma (Blu)"
#. i18n: file: src/redshift.kcfg:39
#. i18n: ectx: tooltip, entry (gammaB), group (General)
#: po/rc.cpp:93 rc.cpp:93
msgctxt "@info:tooltip"
msgid "Gamma correction (Blue)"
msgstr "Correzione gamma (Blu)"
#. i18n: file: src/redshift.kcfg:43
#. i18n: ectx: label, entry (brightness), group (General)
#: po/rc.cpp:96 rc.cpp:96
msgctxt "@label - KCFG entry name"
msgid "Brightness"
msgstr "Luminosità"
#. i18n: file: src/redshift.kcfg:47
#. i18n: ectx: label, entry (smooth), group (General)
#: po/rc.cpp:99 rc.cpp:99
msgctxt "@label - KCFG entry name"
msgid "Smooth transition flag"
msgstr "Flag transizione smooth"
#. i18n: file: src/redshift.kcfg:51
#. i18n: ectx: label, entry (autolaunch), group (General)
#: po/rc.cpp:102 rc.cpp:102
msgctxt "@label - KCFG entry name"
msgid "Autostart flag"
msgstr "Flag avvio automatico"
#. i18n: file: src/redshift.kcfg:55
#. i18n: ectx: label, entry (method), group (General)
#: po/rc.cpp:105 rc.cpp:105
msgctxt "@label - KCFG entry name"
msgid "Color adjustment method"
msgstr "Metodo di regolazione del colore"
#. i18n: file: src/redshift.kcfg:56
#. i18n: ectx: tooltip, entry (method), group (General)
#: po/rc.cpp:108 rc.cpp:108
msgctxt "@info:tooltip"
msgid ""
"Redshift color adjustment method. If «Auto» («randr») doesn't work, try "
"«vidmode»."
msgstr ""
"Metodo di regolazione del colore. Se «Auto» («randr») non funziona, provare "
"«vidmode»."
#. i18n: file: src/redshift.kcfg:62
#. i18n: ectx: label, entry (alwaysOnActivities), group (Activities)
#: po/rc.cpp:111 rc.cpp:111
msgctxt ""
"@label - KCFG entry name (not visible to the user) - List of the activities "
"where redshift is always on"
msgid "Always on activities"
msgstr "Attività sempre abilitato"
#. i18n: file: src/redshift.kcfg:65
#. i18n: ectx: label, entry (alwaysOffActivities), group (Activities)
#: po/rc.cpp:114 rc.cpp:114
msgctxt ""
"@label - KCFG entry name (not visible to the user) - List of the activities "
"where redshift is always off"
msgid "Always off activities"
msgstr "Attività sempre disabilitato"
#: po/rc.cpp:117 rc.cpp:117
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "Simone Gaiarin"
#: po/rc.cpp:118 rc.cpp:118
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "simgunz@gmail.com"
#: src/applet/redshiftapplet.cpp:65
msgid "Redshift"
msgstr "Redshift"
#: src/applet/redshiftapplet.cpp:66 src/applet/redshiftapplet.cpp:90
msgctxt "Action the user can perform"
msgid ""
"Click to toggle on. Scroll the mouse wheel to set the color temperature "
"manually."
msgstr ""
"Cliccare per attivare. Scorrere rotellina del mouse per impostare "
"manualmente la temperatura di colore."
#: src/applet/redshiftapplet.cpp:84
msgctxt "Action the user can perform"
msgid ""
"Click to toggle off. Scroll the mouse wheel to set the color temperature "
"manually."
msgstr ""
"Cliccare per disattivare. Scorrere rotellina del mouse per impostare "
"manualmente la temperatura di colore."
#: src/applet/redshiftapplet.cpp:96
msgctxt "Action the user can perform"
msgid ""
"Click to switch to auto mode. Scroll the mouse wheel to change the color "
"temperature."
msgstr ""
"Cliccare per passare in modalità automatica. Scorrere la rotellina del mouse "
"per cambiare la temperatura di colore."
#: src/applet/redshiftapplet.cpp:135
msgctxt "Redshift main configuration page. Title Capitalization."
msgid "General"
msgstr "Generale"
#: src/applet/redshiftapplet.cpp:161
msgctxt ""
"Redshift state is set to «Auto» mode in this activity. Title Capitalization."
msgid "Auto"
msgstr "Auto"
#: src/applet/redshiftapplet.cpp:162
msgctxt ""
"Redshift is forced to be enabled in this activity. Title Capitalization."
msgid "Always Enabled"
msgstr "Sempre Abilitato"
#: src/applet/redshiftapplet.cpp:163
msgctxt ""
"Redshift is forced to be disabled in this activity. Title Capitalization."
msgid "Always Disabled"
msgstr "Sempre Disabilitato"
#: src/applet/redshiftapplet.cpp:177
msgctxt ""
"Redshift activities behaviour configuration page. Title Capitalization."
msgid "Activities"
msgstr "Attività"
#~ msgctxt "Action the user can perform"
#~ msgid ""
#~ "Click to toggle on. Scroll the mouse wheel to set the color temperature "
#~ "manually"
#~ msgstr ""
#~ "Cliccare per attivare. Scorrere rotellina del mouse per impostare "
#~ "manualmente la temperatura di colore."
#~ msgctxt "Kelvin degrees (There's a space before the K)"
#~ msgid " K"
#~ msgstr " K"
#~ msgctxt "Kelvin degrees"
#~ msgid "ºK"
#~ msgstr "°K"
#~ msgid "Restart Redshift"
#~ msgstr "Riavvia Redshift"
#~ msgctxt "Action the user can perform"
#~ msgid "Click to toggle on"
#~ msgstr "Clicca per attivare"
#~ msgctxt "Action the user can perform"
#~ msgid "Click to toggle off"
#~ msgstr "Clicca per disattivare"

View file

@ -0,0 +1,357 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-07-06 00:07+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#. i18n: file: src/applet/activities.ui:33
#. i18n: ectx: property (text), widget (QTreeWidget, activities)
#: po/rc.cpp:3 rc.cpp:3
msgctxt "KDE Plasma activity. Title Capitalization."
msgid "Activity"
msgstr ""
#. i18n: file: src/applet/activities.ui:38
#. i18n: ectx: property (text), widget (QTreeWidget, activities)
#: po/rc.cpp:6 rc.cpp:6
msgctxt "Redshift operation mode. Title Capitalization."
msgid "Mode"
msgstr ""
#. i18n: file: src/applet/redshift.ui:26
#. i18n: ectx: property (text), widget (QLabel, lbLatitude)
#: po/rc.cpp:9 rc.cpp:9
msgctxt "Sentence capitalization."
msgid "Latitude:"
msgstr ""
#. i18n: file: src/applet/redshift.ui:57
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_latitude)
#. i18n: file: src/applet/redshift.ui:104
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_longitude)
#. i18n: file: src/applet/redshift.ui:57
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_latitude)
#. i18n: file: src/applet/redshift.ui:104
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, kcfg_longitude)
#: po/rc.cpp:12 po/rc.cpp:18 rc.cpp:12 rc.cpp:18
msgctxt "Degrees"
msgid "º"
msgstr ""
#. i18n: file: src/applet/redshift.ui:79
#. i18n: ectx: property (text), widget (QLabel, lbLongitude)
#: po/rc.cpp:15 rc.cpp:15
msgctxt "Sentence capitalization."
msgid "Longitude:"
msgstr ""
#. i18n: file: src/applet/redshift.ui:142
#. i18n: ectx: property (text), widget (QLabel, lbDayTemp)
#: po/rc.cpp:21 rc.cpp:21
msgctxt ""
"The desired color temperature during the day. Sentence capitalization."
msgid "Day color temperature:"
msgstr ""
#. i18n: file: src/applet/redshift.ui:164
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_dayTemp)
#. i18n: file: src/applet/redshift.ui:199
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_nightTemp)
#. i18n: file: src/applet/redshift.ui:164
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_dayTemp)
#. i18n: file: src/applet/redshift.ui:199
#. i18n: ectx: property (suffix), widget (QSpinBox, kcfg_nightTemp)
#: po/rc.cpp:24 po/rc.cpp:30 rc.cpp:24 rc.cpp:30
msgctxt ""
"Kelvin SI unit of measurement for temperature. (There's a space before the "
"K)."
msgid " K"
msgstr ""
#. i18n: file: src/applet/redshift.ui:177
#. i18n: ectx: property (text), widget (QLabel, lbNightTemp)
#: po/rc.cpp:27 rc.cpp:27
msgctxt ""
"The desired color temperature during the night. Sentence capitalization."
msgid "Night color temperature:"
msgstr ""
#. i18n: file: src/applet/redshift.ui:225
#. i18n: ectx: property (toolTip), widget (QLabel, lbGamma)
#: po/rc.cpp:33 rc.cpp:33
msgid "Additional gamma correction (Default is 1:1:1)."
msgstr ""
#. i18n: file: src/applet/redshift.ui:228
#. i18n: ectx: property (text), widget (QLabel, lbGamma)
#: po/rc.cpp:36 rc.cpp:36
msgctxt "The screen gamma channels, red, green, blue. Sentence capitalization."
msgid "Gamma (RGB):"
msgstr ""
#. i18n: file: src/applet/redshift.ui:309
#. i18n: ectx: property (text), widget (QLabel, lbSmooth)
#: po/rc.cpp:39 rc.cpp:39
msgctxt ""
"Enable smooth transition when the program start and stop. Sentence "
"capitalization."
msgid "Smooth transition:"
msgstr ""
#. i18n: file: src/applet/redshift.ui:322
#. i18n: ectx: property (text), widget (QLabel, lbAutostart)
#: po/rc.cpp:42 rc.cpp:42
msgctxt "Launch the program on startup. Sentence capitalization."
msgid "Autostart:"
msgstr ""
#. i18n: file: src/applet/redshift.ui:335
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_autolaunch)
#. i18n: file: src/applet/redshift.ui:358
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_smooth)
#. i18n: file: src/applet/redshift.ui:335
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_autolaunch)
#. i18n: file: src/applet/redshift.ui:358
#. i18n: ectx: property (text), widget (QCheckBox, kcfg_smooth)
#: po/rc.cpp:45 po/rc.cpp:51 rc.cpp:45 rc.cpp:51
msgctxt "Sentence capitalization."
msgid "Enabled"
msgstr ""
#. i18n: file: src/applet/redshift.ui:345
#. i18n: ectx: property (text), widget (QLabel, lbMethod)
#: po/rc.cpp:48 rc.cpp:48
msgctxt ""
"The method used to set the color temperature. Sentence capitalization."
msgid "Adjust method:"
msgstr ""
#. i18n: file: src/applet/redshift.ui:372
#. i18n: ectx: property (text), item, widget (KComboBox, kcfg_method)
#: po/rc.cpp:54 rc.cpp:54
msgctxt "Automatic adjust method. Title Capitalization."
msgid "Auto"
msgstr ""
#. i18n: file: src/applet/redshift.ui:390
#. i18n: ectx: property (text), widget (QLabel, lbBrightness)
#: po/rc.cpp:57 rc.cpp:57
msgctxt "Sentence capitalization."
msgid "Brightness:"
msgstr ""
#. i18n: file: src/redshift.kcfg:10
#. i18n: ectx: label, entry (latitude), group (General)
#: po/rc.cpp:60 rc.cpp:60
msgctxt "@label - KCFG entry name"
msgid "Latitude"
msgstr ""
#. i18n: file: src/redshift.kcfg:14
#. i18n: ectx: label, entry (longitude), group (General)
#: po/rc.cpp:63 rc.cpp:63
msgctxt "@label- KCFG entry name"
msgid "Longitude"
msgstr ""
#. i18n: file: src/redshift.kcfg:18
#. i18n: ectx: label, entry (dayTemp), group (General)
#: po/rc.cpp:66 rc.cpp:66
msgctxt "@label - KCFG entry name"
msgid "Day color temperature"
msgstr ""
#. i18n: file: src/redshift.kcfg:19
#. i18n: ectx: tooltip, entry (dayTemp), group (General)
#: po/rc.cpp:69 rc.cpp:69
msgctxt "@info:tooltip"
msgid "A neutral color temperature is 6500 K."
msgstr ""
#. i18n: file: src/redshift.kcfg:23
#. i18n: ectx: label, entry (nightTemp), group (General)
#: po/rc.cpp:72 rc.cpp:72
msgctxt "@label - KCFG entry name"
msgid "Night color temperature"
msgstr ""
#. i18n: file: src/redshift.kcfg:24
#. i18n: ectx: tooltip, entry (nightTemp), group (General)
#: po/rc.cpp:75 rc.cpp:75
msgctxt "@info:tooltip"
msgid "The recommended night color temperature is 4500 K."
msgstr ""
#. i18n: file: src/redshift.kcfg:28
#. i18n: ectx: label, entry (gammaR), group (General)
#: po/rc.cpp:78 rc.cpp:78
msgctxt "@label - KCFG entry name"
msgid "Red gamma correction"
msgstr ""
#. i18n: file: src/redshift.kcfg:29
#. i18n: ectx: tooltip, entry (gammaR), group (General)
#: po/rc.cpp:81 rc.cpp:81
msgctxt "@info:tooltip"
msgid "Gamma correction (Red)"
msgstr ""
#. i18n: file: src/redshift.kcfg:33
#. i18n: ectx: label, entry (gammaG), group (General)
#: po/rc.cpp:84 rc.cpp:84
msgctxt "@label - KCFG entry name"
msgid "Green gamma correction"
msgstr ""
#. i18n: file: src/redshift.kcfg:34
#. i18n: ectx: tooltip, entry (gammaG), group (General)
#: po/rc.cpp:87 rc.cpp:87
msgctxt "@info:tooltip"
msgid "Gamma correction (Green)"
msgstr ""
#. i18n: file: src/redshift.kcfg:38
#. i18n: ectx: label, entry (gammaB), group (General)
#: po/rc.cpp:90 rc.cpp:90
msgctxt "@label - KCFG entry name"
msgid "Blue gamma correction"
msgstr ""
#. i18n: file: src/redshift.kcfg:39
#. i18n: ectx: tooltip, entry (gammaB), group (General)
#: po/rc.cpp:93 rc.cpp:93
msgctxt "@info:tooltip"
msgid "Gamma correction (Blue)"
msgstr ""
#. i18n: file: src/redshift.kcfg:43
#. i18n: ectx: label, entry (brightness), group (General)
#: po/rc.cpp:96 rc.cpp:96
msgctxt "@label - KCFG entry name"
msgid "Brightness"
msgstr ""
#. i18n: file: src/redshift.kcfg:47
#. i18n: ectx: label, entry (smooth), group (General)
#: po/rc.cpp:99 rc.cpp:99
msgctxt "@label - KCFG entry name"
msgid "Smooth transition flag"
msgstr ""
#. i18n: file: src/redshift.kcfg:51
#. i18n: ectx: label, entry (autolaunch), group (General)
#: po/rc.cpp:102 rc.cpp:102
msgctxt "@label - KCFG entry name"
msgid "Autostart flag"
msgstr ""
#. i18n: file: src/redshift.kcfg:55
#. i18n: ectx: label, entry (method), group (General)
#: po/rc.cpp:105 rc.cpp:105
msgctxt "@label - KCFG entry name"
msgid "Color adjustment method"
msgstr ""
#. i18n: file: src/redshift.kcfg:56
#. i18n: ectx: tooltip, entry (method), group (General)
#: po/rc.cpp:108 rc.cpp:108
msgctxt "@info:tooltip"
msgid ""
"Redshift color adjustment method. If «Auto» («randr») doesn't work, try "
"«vidmode»."
msgstr ""
#. i18n: file: src/redshift.kcfg:62
#. i18n: ectx: label, entry (alwaysOnActivities), group (Activities)
#: po/rc.cpp:111 rc.cpp:111
msgctxt ""
"@label - KCFG entry name (not visible to the user) - List of the activities "
"where redshift is always on"
msgid "Always on activities"
msgstr ""
#. i18n: file: src/redshift.kcfg:65
#. i18n: ectx: label, entry (alwaysOffActivities), group (Activities)
#: po/rc.cpp:114 rc.cpp:114
msgctxt ""
"@label - KCFG entry name (not visible to the user) - List of the activities "
"where redshift is always off"
msgid "Always off activities"
msgstr ""
#: po/rc.cpp:117 rc.cpp:117
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr ""
#: po/rc.cpp:118 rc.cpp:118
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr ""
#: src/applet/redshiftapplet.cpp:65
msgid "Redshift"
msgstr ""
#: src/applet/redshiftapplet.cpp:66 src/applet/redshiftapplet.cpp:90
msgctxt "Action the user can perform"
msgid ""
"Click to toggle on. Scroll the mouse wheel to set the color temperature "
"manually."
msgstr ""
#: src/applet/redshiftapplet.cpp:84
msgctxt "Action the user can perform"
msgid ""
"Click to toggle off. Scroll the mouse wheel to set the color temperature "
"manually."
msgstr ""
#: src/applet/redshiftapplet.cpp:96
msgctxt "Action the user can perform"
msgid ""
"Click to switch to auto mode. Scroll the mouse wheel to change the color "
"temperature."
msgstr ""
#: src/applet/redshiftapplet.cpp:135
msgctxt "Redshift main configuration page. Title Capitalization."
msgid "General"
msgstr ""
#: src/applet/redshiftapplet.cpp:161
msgctxt ""
"Redshift state is set to «Auto» mode in this activity. Title Capitalization."
msgid "Auto"
msgstr ""
#: src/applet/redshiftapplet.cpp:162
msgctxt ""
"Redshift is forced to be enabled in this activity. Title Capitalization."
msgid "Always Enabled"
msgstr ""
#: src/applet/redshiftapplet.cpp:163
msgctxt ""
"Redshift is forced to be disabled in this activity. Title Capitalization."
msgid "Always Disabled"
msgstr ""
#: src/applet/redshiftapplet.cpp:177
msgctxt ""
"Redshift activities behaviour configuration page. Title Capitalization."
msgid "Activities"
msgstr ""

View file

@ -0,0 +1,5 @@
add_subdirectory(dataengine)
add_subdirectory(applet)
add_subdirectory(redshiftAutostartEnabler)
install(FILES redshift.kcfg DESTINATION ${KCFG_INSTALL_DIR})

View file

@ -0,0 +1,14 @@
set(redshiftapplet_SRCS
redshiftapplet.cpp
redshiftosdwidget.cpp
)
kde4_add_ui_files(redshiftapplet_SRCS redshift.ui)
kde4_add_ui_files(redshiftapplet_SRCS activities.ui)
kde4_add_kcfg_files(redshiftapplet_SRCS ../redshiftsettings.kcfgc)
kde4_add_plugin(plasma_applet_redshift ${redshiftapplet_SRCS})
target_link_libraries(plasma_applet_redshift ${KDE4_PLASMA_LIBS})
install(TARGETS plasma_applet_redshift DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES plasma-applet-redshift.desktop DESTINATION ${SERVICES_INSTALL_DIR})

View file

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ActivitiesConfig</class>
<widget class="QWidget" name="ActivitiesConfig">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>422</width>
<height>253</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QTreeWidget" name="activities">
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="columnCount">
<number>2</number>
</property>
<attribute name="headerVisible">
<bool>true</bool>
</attribute>
<attribute name="headerDefaultSectionSize">
<number>100</number>
</attribute>
<column>
<property name="text">
<string comment="KDE Plasma activity. Title Capitalization.">Activity</string>
</property>
</column>
<column>
<property name="text">
<string comment="Redshift operation mode. Title Capitalization.">Mode</string>
</property>
</column>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View file

@ -0,0 +1,16 @@
[Desktop Entry]
Icon=redshift
Name=Redshift
Type=Service
X-KDE-Library=plasma_applet_redshift
X-KDE-PluginInfo-Author=Simone Gaiarin
X-KDE-PluginInfo-Category=
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-Email=simgunz@gmail.com
X-KDE-PluginInfo-EnabledByDefault=true
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-Name=redshift
X-KDE-PluginInfo-Version=1.0
X-KDE-PluginInfo-Website=http://plasma.kde.org/
X-KDE-ServiceTypes=Plasma/Applet
X-Plasma-NotificationArea=true

View file

@ -0,0 +1,427 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>RedshiftConfig</class>
<widget class="QWidget" name="RedshiftConfig">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>344</width>
<height>282</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="lbLatitude">
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="text">
<string comment="Sentence capitalization.">Latitude:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="kcfg_latitude">
<property name="minimumSize">
<size>
<width>69</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>1000</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string/>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::UpDownArrows</enum>
</property>
<property name="prefix">
<string/>
</property>
<property name="suffix">
<string comment="Degrees">º</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>-90.000000000000000</double>
</property>
<property name="maximum">
<double>90.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lbLongitude">
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="text">
<string comment="Sentence capitalization.">Longitude:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="kcfg_longitude">
<property name="minimumSize">
<size>
<width>69</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>1000</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string/>
</property>
<property name="suffix">
<string comment="Degrees">º</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>-180.000000000000000</double>
</property>
<property name="maximum">
<double>180.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="2" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>8</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="0">
<widget class="QLabel" name="lbDayTemp">
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="text">
<string comment="The desired color temperature during the day. Sentence capitalization.">Day color temperature:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="kcfg_dayTemp">
<property name="minimumSize">
<size>
<width>69</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string/>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::PlusMinus</enum>
</property>
<property name="suffix">
<string comment="Kelvin SI unit of measurement for temperature. (There's a space before the K)."> K</string>
</property>
<property name="maximum">
<number>9999</number>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="lbNightTemp">
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="text">
<string comment="The desired color temperature during the night. Sentence capitalization.">Night color temperature:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="kcfg_nightTemp">
<property name="minimumSize">
<size>
<width>69</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string/>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::PlusMinus</enum>
</property>
<property name="suffix">
<string comment="Kelvin SI unit of measurement for temperature. (There's a space before the K)."> K</string>
</property>
<property name="maximum">
<number>9999</number>
</property>
</widget>
</item>
<item row="5" column="1">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>8</height>
</size>
</property>
</spacer>
</item>
<item row="7" column="0">
<widget class="QLabel" name="lbGamma">
<property name="toolTip">
<string>Additional gamma correction (Default is 1:1:1).</string>
</property>
<property name="text">
<string comment="The screen gamma channels, red, green, blue. Sentence capitalization.">Gamma (RGB):</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="7" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QDoubleSpinBox" name="kcfg_gammaR">
<property name="toolTip">
<string/>
</property>
<property name="minimum">
<double>0.100000000000000</double>
</property>
<property name="maximum">
<double>10.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="kcfg_gammaG">
<property name="toolTip">
<string/>
</property>
<property name="minimum">
<double>0.100000000000000</double>
</property>
<property name="maximum">
<double>10.090000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="kcfg_gammaB">
<property name="toolTip">
<string/>
</property>
<property name="minimum">
<double>0.100000000000000</double>
</property>
<property name="maximum">
<double>10.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
</layout>
</item>
<item row="8" column="1">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>8</height>
</size>
</property>
</spacer>
</item>
<item row="9" column="0">
<widget class="QLabel" name="lbSmooth">
<property name="toolTip">
<string/>
</property>
<property name="text">
<string comment="Enable smooth transition when the program start and stop. Sentence capitalization.">Smooth transition:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="lbAutostart">
<property name="toolTip">
<string/>
</property>
<property name="text">
<string comment="Launch the program on startup. Sentence capitalization.">Autostart:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QCheckBox" name="kcfg_autolaunch">
<property name="toolTip">
<string/>
</property>
<property name="text">
<string comment="Sentence capitalization.">Enabled</string>
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="QLabel" name="lbMethod">
<property name="toolTip">
<string/>
</property>
<property name="text">
<string comment="The method used to set the color temperature. Sentence capitalization.">Adjust method:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QCheckBox" name="kcfg_smooth">
<property name="toolTip">
<string/>
</property>
<property name="text">
<string comment="Sentence capitalization.">Enabled</string>
</property>
</widget>
</item>
<item row="11" column="1">
<widget class="KComboBox" name="kcfg_method">
<property name="toolTip">
<string/>
</property>
<property name="minimumContentsLength">
<number>0</number>
</property>
<item>
<property name="text">
<string comment="Automatic adjust method. Title Capitalization.">Auto</string>
</property>
</item>
<item>
<property name="text">
<string notr="true" comment="Title Capitalization.">Randr</string>
</property>
</item>
<item>
<property name="text">
<string notr="true" comment="Title Capitalization.">Vidmode</string>
</property>
</item>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="lbBrightness">
<property name="text">
<string comment="Sentence capitalization.">Brightness:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QDoubleSpinBox" name="kcfg_brightness">
<property name="minimumSize">
<size>
<width>69</width>
<height>0</height>
</size>
</property>
<property name="minimum">
<double>0.100000000000000</double>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.050000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<header>kcombobox.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View file

@ -0,0 +1,239 @@
/************************************************************************
* Copyright (C) 2012 by Simone Gaiarin <simgunz@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
************************************************************************/
/*!
* \file redshiftapplet.cpp
*
* Contains the implementation of the RedshiftApplet class.
*/
#include "redshiftapplet.h"
#include "redshiftsettings.h"
#include "redshiftosdwidget.h"
#include <QtGui/QDesktopWidget>
#include <KConfigDialog>
#include <KComboBox>
#include <KApplication>
#include <Plasma/DataEngine>
#include <Plasma/ToolTipManager>
RedshiftApplet::RedshiftApplet(QObject *parent, const QVariantList &args)
: Plasma::Applet(parent, args),
m_redshiftOSD(new RedshiftOSDWidget())
{
setBackgroundHints(StandardBackground);
setAspectRatioMode(Plasma::ConstrainedSquare);
setHasConfigurationInterface(true);
}
RedshiftApplet::~RedshiftApplet()
{
delete m_redshiftOSD;
}
void RedshiftApplet::init()
{
//Initialize the plasmoid using an IconWidget
m_button = new Plasma::IconWidget(this);
m_button->setIcon(KIcon("redshift-status-off"));
m_layout = new QGraphicsGridLayout(this);
m_layout->setContentsMargins(0, 0, 0, 0);
m_layout->addItem(m_button, 0, 0);
//Initialize to 3 seconds the wait timer used to wait before changing the applet status
m_setStatusTimer = new QTimer();
m_setStatusTimer->setInterval(3000);
m_setStatusTimer->setSingleShot(true);
//Set the default applet status
setStatus(Plasma::PassiveStatus);
//Connect to the data engine
m_engine = dataEngine("redshift");
m_engine->connectSource("Controller", this);
//Connect signals and slots
connect(m_button, SIGNAL(clicked()), this, SLOT(toggle()));
connect(m_setStatusTimer, SIGNAL(timeout()), this, SLOT(setAppletStatus()));
//The activate signal is emitted whenever the plasmoid get the focus,
// i.e, when the user trigger the global shortcut
connect(this, SIGNAL(activate()), this, SLOT(toggle()));
}
void RedshiftApplet::dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data)
{
if (sourceName == "Controller") {
Plasma::ToolTipContent tooltip;
if (data["Status"].toString().indexOf("Running") == 0) {
m_button->setIcon(KIcon("redshift-status-on"));
tooltip.setSubText(i18nc("Action the user can perform","Click to toggle off. "
"Scroll the mouse wheel to set the color temperature manually."));
tooltip.setImage(KIcon("redshift-status-on"));
m_appletStatus = Plasma::PassiveStatus;
} else {
m_button->setIcon(KIcon("redshift-status-off"));
tooltip.setSubText(i18nc("Action the user can perform","Click to toggle on. "
"Scroll the mouse wheel to set the color temperature manually."));
tooltip.setImage(KIcon("redshift-status-off"));
m_appletStatus = Plasma::PassiveStatus;
}
if (data["Status"].toString() == "RunningManual") {
tooltip.setSubText(i18nc("Action the user can perform","Click to switch to auto mode. "
"Scroll the mouse wheel to change the color temperature."));
m_button->setIcon(KIcon("redshift-status-manual"));
m_appletStatus = Plasma::ActiveStatus;
}
//Start the timer to change the status, if the timer is already active this will restart it
m_setStatusTimer->start();
Plasma::ToolTipManager::self()->setContent(this, tooltip);
}
int temperature = data["Temperature"].toInt();
//Show the OSD only if the temperature is non-zero, i.e., only when redshift is inn "Manual" mode
if(temperature) {
showRedshiftOSD(temperature);
}
}
void RedshiftApplet::toggle()
{
m_redshiftOSD->hide();
Plasma::Service *service = m_engine->serviceForSource("Controller");
service->startOperationCall(service->operationDescription("toggle"));
}
void RedshiftApplet::showRedshiftOSD(int temperature)
{
m_redshiftOSD->setCurrentTemperature(temperature);
m_redshiftOSD->activateOSD(); //Show the OSD and enable the hide timer
//Center the OSD
QRect rect = KApplication::kApplication()->desktop()->screenGeometry(QCursor::pos());
QSize size = m_redshiftOSD->sizeHint();
int posX = rect.x() + (rect.width() - size.width()) / 2;
int posY = rect.y() + 4 * rect.height() / 5;
m_redshiftOSD->setGeometry(posX, posY, size.width(), size.height());
}
void RedshiftApplet::createConfigurationInterface(KConfigDialog *parent)
{
//Create the redshift parameters configuration page
QWidget *redshiftInterface = new QWidget(parent);
m_redshiftUi = new Ui::RedshiftConfig();
m_redshiftUi->setupUi(redshiftInterface);
parent->addPage(redshiftInterface, RedshiftSettings::self(),
i18nc("Redshift main configuration page. Title Capitalization.","General"), "redshift");
//Create the activities configuration page
QWidget *activitiesInterface = new QWidget(parent);
m_activitiesUi = new Ui::ActivitiesConfig();
m_activitiesUi->setupUi(activitiesInterface);
//Get the list of KDE activities
Plasma::DataEngine *activities_engine = dataEngine("org.kde.activities");
QStringList activities = activities_engine->sources();
//The last source is not an activity, but is the Status source
activities.removeLast();
//Get the redshift-plasmoid activities configuration
RedshiftSettings::self()->readConfig();
const QStringList alwaysOnActivities = RedshiftSettings::alwaysOnActivities();
const QStringList alwaysOffActivities = RedshiftSettings::alwaysOffActivities();
QString act;
foreach(act, activities) {
Plasma::DataEngine::Data data = activities_engine->query(act);
QTreeWidgetItem *listItem = new QTreeWidgetItem(m_activitiesUi->activities);
KComboBox *itemCombo = new KComboBox(m_activitiesUi->activities);
listItem->setText(0, data["Name"].toString());
listItem->setIcon(0, KIcon(data["Icon"].toString()));
listItem->setFlags(Qt::ItemIsEnabled);
listItem->setData(0, Qt::UserRole, act);
itemCombo->addItem(i18nc("Redshift state is set to «Auto» mode in this activity. Title Capitalization.", "Auto"));
itemCombo->addItem(i18nc("Redshift is forced to be enabled in this activity. Title Capitalization.", "Always Enabled"));
itemCombo->addItem(i18nc("Redshift is forced to be disabled in this activity. Title Capitalization.", "Always Disabled"));
if (alwaysOnActivities.contains(act)) {
itemCombo->setCurrentIndex(1);
} else if (alwaysOffActivities.contains(act)) {
itemCombo->setCurrentIndex(2);
} else {
itemCombo->setCurrentIndex(0);
}
m_activitiesUi->activities->setItemWidget(listItem, 1, itemCombo);
connect(itemCombo, SIGNAL(currentIndexChanged(int)), parent, SLOT(settingsModified()));
}
m_activitiesUi->activities->resizeColumnToContents(0);
parent->addPage(activitiesInterface, i18nc("Redshift activities behaviour configuration page. Title Capitalization.", "Activities"),
"preferences-activities");
connect(parent, SIGNAL(applyClicked()), this, SLOT(configAccepted()));
connect(parent, SIGNAL(okClicked()), this, SLOT(configAccepted()));
}
void RedshiftApplet::configChanged()
{
Plasma::Service *service = m_engine->serviceForSource("Controller");
service->startOperationCall(service->operationDescription("restart"));
}
void RedshiftApplet::wheelEvent(QGraphicsSceneWheelEvent *e)
{
Plasma::ToolTipManager::self()->hide(this);
Plasma::Service *service = m_engine->serviceForSource("Controller");
if(e->delta() < 0) {
service->startOperationCall(service->operationDescription("decrease"));
} else {
service->startOperationCall(service->operationDescription("increase"));
}
}
void RedshiftApplet::configAccepted()
{
QStringList alwaysOnActivities;
QStringList alwaysOffActivities;
QTreeWidget *activitiesList = m_activitiesUi->activities;
for (int i = 0; i < activitiesList->topLevelItemCount(); ++i) {
QTreeWidgetItem *item = activitiesList->topLevelItem(i);
KComboBox *itemCombo = static_cast<KComboBox *>(activitiesList->itemWidget(item, 1));
const QString act = item->data(0, Qt::UserRole).toString();
if (itemCombo->currentIndex() == 1) {
alwaysOnActivities << act;
} else if (itemCombo->currentIndex() == 2) {
alwaysOffActivities << act;
}
}
RedshiftSettings::setAlwaysOnActivities(alwaysOnActivities);
RedshiftSettings::setAlwaysOffActivities(alwaysOffActivities);
RedshiftSettings::self()->writeConfig();
}
void RedshiftApplet::setAppletStatus()
{
setStatus(m_appletStatus);
}
K_EXPORT_PLASMA_APPLET(redshift, RedshiftApplet)
#include "redshiftapplet.moc"

View file

@ -0,0 +1,197 @@
/************************************************************************
* Copyright (C) 2012 by Simone Gaiarin <simgunz@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
************************************************************************/
/*!
* \file redshiftapplet.h
*
* Contains the interface of the RedshiftApplet class.
*/
#ifndef REDSHIFTAPPLET_H
#define REDSHIFTAPPLET_H
#include "ui_redshift.h"
#include "ui_activities.h"
#include <QGraphicsGridLayout>
#include <QGraphicsSceneWheelEvent>
#include <QTimer>
#include <KIcon>
#include <Plasma/Applet>
#include <Plasma/DataEngine>
#include <Plasma/IconWidget>
#include <Plasma/ToolTipContent>
class RedshiftOSDWidget;
/*!
* The RedshiftApplet class provides a native KDE interface to redshift.
*
* RedshiftApplet is a plasma widget that allows the user to interact with the redshift daemon.
* By clicking on the icon of the widget it's possible to start and stop redshift.
* By scrolling the mouse wheel over the icon it is possible to set a fixed color temperature, bringing
* redshift in "Manual" mode, i.e, the temperature won't be adjusted automatically anymore.
* To get back to the auto-adjustment mode the user have to click on the widget icon.
* When the temperature is adjusted manually an OSD that display the current color temperature is shown.
* By clicking with the right mouse button the user can access the settings dialog.
* When the mouse passes over the widget icon a tooltip is shown to display the current redshift status
* and a simple help.
*/
class RedshiftApplet : public Plasma::Applet
{
Q_OBJECT
public:
/*!
* Default constructor.
*
* \param parent The QObject this applet is parented to
* \param args Extra arguments
*/
RedshiftApplet(QObject *parent, const QVariantList &args);
/*!
* Deconstructor.
*/
~RedshiftApplet();
/*!
* Applet initialization.
*
* This method is called once the applet is loaded. It loads the main icon of the
* widget, sets the tooltip, connects the widget to the redshift dataEnginge
* and connects all the signals and slots.
*/
void init();
public slots:
/*!
* Called when the dataEngine reports some changes in its state.
*
* The icon and the tooltip are updated corresponding to the dataEngine status.
* The widget status is set to passive (icon hidden in the tray menu) when
* redshift is in "Auto" mode, while is set to active when redshift is
* in "Manual" mode.
*
* \param sourceName The name of the source that has called the method.
* \param data A QVariantMap containing the data the source passed to the method.
*/
void dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data);
/*!
* Makes a call to the redshift dataEnginge service to toggle redshift on/off.
*/
void toggle();
/*!
* Show an OSD showing the current color temperature.
*
* \param temperature The color temperature in Kelvin.
*/
void showRedshiftOSD(int temperature);
protected:
/*!
* Create a settings dialog for the widget.
*
* The settings dialog can be accessed from the right click menu.
*
* \param parent The KConfigDialog this config page is parented to.
*/
void createConfigurationInterface(KConfigDialog *parent);
/*!
* Called when applet configuration values have been changed.
*
* Makes a call to the redshift dataEnginge service to restart redshift in
* order to apply the new settings. The screen color will undergo
* an out-in color transition.
*
* \warning This is not the desired behavior, but is the only possible solution
* since redshift won't allow to change the settings once running.
*/
void configChanged();
protected slots:
/*!
* Called when the mouse wheel is scrolled over the widget icon.
*
* Makes a call to the redshift dataEnginge service to increase/decrease the
* color temperature of the screen. This action will bring redshift in "Manual"
* mode, so that it won't adjust the color temperature during the day
* but it will keep it fixed.
*/
virtual void wheelEvent(QGraphicsSceneWheelEvent *event);
private slots:
/*!
* Saves the redshift behavior for each activities in the configuration file
* when the user finishes editing the settings.
*
* For each activity redshift can be set in the state "Always On", "Always Off"
* or "Manual".
*/
void configAccepted();
/*!
* Set the redshift applet status to change the its visibility in the system tray.
*
* When the applet is docked in the system tray if the applet status is Active
* (redshift in manual mode) the applet is visible in the tray, while when the
* status is Passive (redshift in Auto mode) the applet is hidden in the extra
* elements menu of the system tray. The status is changed after 3 seconds from
* the last user interaction, so that if the user needs to perform a more operations
* after the first (like keep scrolling the mouse wheel to change color temperature)
* the applet won't move away too soon.
*/
void setAppletStatus();
private:
//! The button that constitute the body of the widget.
Plasma::IconWidget *m_button;
//! The main layout of the widget.
QGraphicsGridLayout *m_layout;
//! Redshift parameters configuration ui page.
Ui::RedshiftConfig *m_redshiftUi;
//! Redshift activities configuration ui page.
Ui::ActivitiesConfig *m_activitiesUi;
//! Pointer to the Redshift dataengine.
Plasma::DataEngine *m_engine;
//! Pointer to the Redshift OSD object.
RedshiftOSDWidget *m_redshiftOSD;
//! The redshift applet status.
Plasma::ItemStatus m_appletStatus;
//! Wait timer that triggers the apple status change.
QTimer *m_setStatusTimer;
};
#endif

View file

@ -0,0 +1,99 @@
/************************************************************************
* Copyright (C) 2012 by Simone Gaiarin <simgunz@gmail.com> *
* Adapted from kdemultimedia/kmix/osdwidget.cpp *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
************************************************************************/
/*!
* \file redshiftosdwidget.cpp
*
* Contains the implementations of the RedshiftOSDWidget class.
*/
#include "redshiftosdwidget.h"
#include <QFont>
#include <QGraphicsLinearLayout>
#include <QLabel>
#include <QTimer>
#include <KIcon>
#include <KIconLoader>
#include <KWindowSystem>
#include <Plasma/Label>
#include <Plasma/Theme>
RedshiftOSDWidget::RedshiftOSDWidget(QWidget * parent)
: Plasma::Dialog(parent, Qt::ToolTip),
m_iconLabel(new Plasma::Label),
m_temperatureLabel(new Plasma::Label),
m_autoHideTimer(new QTimer(this))
{
//Setup the window properties
KWindowSystem::setState(winId(), NET::KeepAbove);
KWindowSystem::setType(winId(), NET::Tooltip);
setAttribute(Qt::WA_X11NetWmWindowTypeToolTip, true);
//Setup the auto-hide timer
m_autoHideTimer->setInterval(2000);
m_autoHideTimer->setSingleShot(true);
connect(m_autoHideTimer, SIGNAL(timeout()), this, SLOT(hide()));
//Cache the icon pixmaps
QSize iconSize = QSize(KIconLoader::SizeLarge, KIconLoader::SizeLarge);
m_redshiftPixmap = KIcon("redshift").pixmap(iconSize);
//Setup the widgets
m_iconLabel->nativeWidget()->setPixmap(m_redshiftPixmap);
m_iconLabel->nativeWidget()->setFixedSize(iconSize);
QFont font = Plasma::Theme::defaultTheme()->font(Plasma::Theme::DefaultFont);
font.setPixelSize(iconSize.height()-iconSize.height()*0.15);
m_temperatureLabel->setFont(font);
m_temperatureLabel->setText(QString::fromUtf8("9999 K"));
m_temperatureLabel->setWordWrap(false);
//Setup the OSD layout
QGraphicsWidget *widget = new QGraphicsWidget();
QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(widget);
layout->addItem(m_iconLabel);
layout->addItem(m_temperatureLabel);
QGraphicsScene *scene = new QGraphicsScene(this);
scene->addItem(widget);
setGraphicsWidget(widget);
}
QSize RedshiftOSDWidget::sizeHint() const
{
int iconSize = m_iconLabel->nativeWidget()->pixmap()->height();
return QSize(iconSize + m_temperatureLabel->nativeWidget()->sizeHint().width(), iconSize);
}
void RedshiftOSDWidget::activateOSD()
{
show();
m_autoHideTimer->start();
}
void RedshiftOSDWidget::setCurrentTemperature(int temperature)
{
m_temperatureLabel->setText(QString::fromUtf8("%1 K").arg(temperature));
}
#include "redshiftosdwidget.moc"

View file

@ -0,0 +1,91 @@
/************************************************************************
* Copyright (C) 2012 by Simone Gaiarin <simgunz@gmail.com> *
* Adapted from kdemultimedia/kmix/osdwidget.h *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
************************************************************************/
/*!
* \file redshiftosdwidget.h
*
* Contains the interface of the RedshiftOSDWidget class.
*/
#ifndef REDSHIFTOSDWIDGET_H
#define REDSHIFTOSDWIDGET_H
#include <Plasma/Dialog>
class QPixmap;
class QTimer;
namespace Plasma
{
class Label;
}
/*!
* \class RedshiftOSDWidget
*
* The RedshiftOSDWidget class provides an On Screen Display (OSD)
* dialog showing the screen color temperature.
*/
class RedshiftOSDWidget : public Plasma::Dialog
{
Q_OBJECT
public:
/*!
* Default constructor.
*
* \param parent The QWidget this OSD is parented to.
*/
RedshiftOSDWidget(QWidget *parent = 0);
/*!
* Recommended widget size as a function of the icon size.
*
* \returns Recommended widget size.
*/
virtual QSize sizeHint() const;
/*!
* Shows the OSD and automatically hides it after 2 seconds.
*/
void activateOSD();
/*!
* Sets the color temperature to display.
*
* \param temperature The color temperature in Kelvin.
*/
void setCurrentTemperature(int temperature);
private:
//! The icon displayed in the OSD.
Plasma::Label *m_iconLabel;
//! Displays the current color temperature in Kelvin.
Plasma::Label *m_temperatureLabel;
//! OSD auto-hide timer.
QTimer *m_autoHideTimer;
//! Redshift pixmap icon.
QPixmap m_redshiftPixmap;
};
#endif

View file

@ -0,0 +1,17 @@
set(redshift_engine_SRCS
redshiftengine.cpp
redshiftservice.cpp
redshiftjob.cpp
redshiftcontroller.cpp
redshiftcontainer.cpp
)
kde4_add_kcfg_files(redshift_engine_SRCS ../redshiftsettings.kcfgc)
kde4_add_plugin(plasma_engine_redshift ${redshift_engine_SRCS})
target_link_libraries(plasma_engine_redshift ${KDE4_PLASMA_LIBS})
install(TARGETS plasma_engine_redshift DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES plasma-dataengine-redshift.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install(FILES redshift.operations DESTINATION ${DATA_INSTALL_DIR}/plasma/services)

View file

@ -0,0 +1,16 @@
[Desktop Entry]
# ctxt: plasma data engine
Name=Redshift
Comment=Redshift information
X-KDE-ServiceTypes=Plasma/DataEngine
Type=Service
Icon=redshift
X-KDE-Library=plasma_engine_redshift
X-KDE-PluginInfo-Author=Simone Gaiarin
X-KDE-PluginInfo-Email=simgunz@gmail.com
X-KDE-PluginInfo-Name=redshift
X-KDE-PluginInfo-Version=
X-KDE-PluginInfo-Website=
X-KDE-PluginInfo-Category=
X-KDE-PluginInfo-Depends=

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kcfg SYSTEM
"http://www.kde.org/standards/kcfg/1.0/kcfg.xsd">
<kcfg>
<group name="toggle"> </group>
<group name="restart"> </group>
<group name="increase"> </group>
<group name="decrease"> </group>
</kcfg>

View file

@ -0,0 +1,59 @@
/************************************************************************
* Copyright (C) 2012 by Simone Gaiarin <simgunz@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
************************************************************************/
/*!
* \file redshiftcontainer.cpp
*
* Contains the implementation of the RedshiftContainer class.
*/
#include "redshiftcontainer.h"
#include "redshiftservice.h"
RedshiftContainer::RedshiftContainer(QObject* parent)
: DataContainer(parent)
{
setObjectName("Controller");
m_controller = new RedshiftController();
QObject::connect(m_controller, SIGNAL(stateChanged(RedshiftController::RedshiftState, int)), this, SLOT(updateStatus(RedshiftController::RedshiftState, int)));
//Manually set the container data for the first time only
updateStatus(m_controller->state(), m_controller->currentTemperature());
}
RedshiftContainer::~RedshiftContainer()
{
delete m_controller;
}
Plasma::Service* RedshiftContainer::service(QObject* parent)
{
return new RedshiftService(parent, m_controller);
}
void RedshiftContainer::updateStatus(RedshiftController::RedshiftState state, int temperature)
{
switch (state) {
case RedshiftController::Stopped: setData("Status", "Stopped"); break;
case RedshiftController::Running: setData("Status", "Running"); break;
case RedshiftController::RunningManual: setData("Status", "RunningManual"); break;
default: setData("Status", "Stopped");
}
setData("Temperature", temperature);
//Check if any data is actually changed, and, if so, the dataUpdated signal is automatically emitted
//in order to inform the connected plasmoids of the change.
checkForUpdate();
}

View file

@ -0,0 +1,86 @@
/************************************************************************
* Copyright (C) 2012 by Simone Gaiarin <simgunz@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
************************************************************************/
/*!
* \file redshiftcontainer.h
*
* Contains the interface of the RedshiftContainer class.
*/
#ifndef REDSHIFTCONTAINER_H
#define REDSHIFTCONTAINER_H
#include "redshiftcontroller.h"
#include <Plasma/DataContainer>
/*!
* The RedshiftContainer class is a Plasma::DataContainer that wraps a system wide redshift process
* and provides information on its state and on the screen color temperature in manual mode.
*
* This DataContainer provides the following data:
* - Status, the redshift status, which can be either Stopped, Running, RunningManual
* - Temperature, the current color temperature when redshift is in manual mode
*
* It also holds a RedshiftController that manages the system wide redshift process.
*/
class RedshiftContainer : public Plasma::DataContainer
{
Q_OBJECT
public:
/*!
* Default constructor.
*
* \param parent The QObject this applet is parented to.
*/
explicit RedshiftContainer(QObject* parent = 0);
/*!
* Deconstructor.
*/
~RedshiftContainer();
/*!
* Returns a RedshiftService object.
*
* \param parent The QObject this applet is parented to.
* \returns A Plasma::Service to interact with the source, i.e., with the redshift process.
*/
Plasma::Service* service(QObject* parent = 0);
public slots:
/*!
* Update the data according to the status communicated by RedshiftController.
*
* This slot must be connected to the RedshiftController stateChanged signal in order to constantly
* reflect the redshift process state.
*
* \param state The RedshiftController state.
* \param temperature The screen color temperature in Kelvin, when redshift is in manual mode.
*/
void updateStatus(RedshiftController::RedshiftState state, int temperature);
private:
//! The controller object of the redshift process.
RedshiftController *m_controller;
};
#endif // REDSHIFTCONTAINER_H

View file

@ -0,0 +1,259 @@
/************************************************************************
* Copyright (C) 2012 by Simone Gaiarin <simgunz@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
************************************************************************/
/*!
* \file redshiftcontroller.cpp
*
* Contains the implementation of the RedshiftController class.
*/
#include "redshiftcontroller.h"
#include "redshiftsettings.h"
#include <signal.h>
#include <QDBusConnection>
#include <QDBusMessage>
#include <Plasma/DataEngineManager>
RedshiftController::RedshiftController()
: m_readyForStart(false),
m_state(Stopped),
m_autoState(Undefined),
m_runMode(Auto),
m_manualMode(false),
m_manualTemp(RedshiftController::DefaultManualTemperature)
{
m_process = new KProcess();
//Connects to dbus to receive the enabler signal readyForStart
QDBusConnection dbus = QDBusConnection::sessionBus();
dbus.connect("", "/", "org.kde.redshift", "readyForStart", this, SLOT(setReadyForStart()));
//Connects to the plasma activities dataEngine to monitor if the current activity is changed
m_activitiesEngine = Plasma::DataEngineManager::self()->engine("org.kde.activities");
m_activitiesEngine->connectSource("Status", this);
//Calls dataUpdated manually to initialize the controller. The controller reads the configuration file,
//gets the current activity, and run the redshift process.
dataUpdated("Status", m_activitiesEngine->query("Status"));
}
RedshiftController::~RedshiftController()
{
if (m_manualMode) {
KProcess::execute("redshift",QStringList("-x"));
} else {
m_process->terminate();
}
}
RedshiftController::RedshiftState RedshiftController::state()
{
if(m_manualMode) {
return RunningManual;
}
return m_state;
}
int RedshiftController::currentTemperature()
{
if(m_manualMode) {
return m_manualTemp;
} else {
return 0;
}
}
void RedshiftController::setTemperature(bool increase)
{
if (m_readyForStart && (m_runMode != AlwaysOff)) {
m_manualMode = true;
if (increase) {
m_manualTemp += RedshiftController::TemperatureStep;
} else {
m_manualTemp -= RedshiftController::TemperatureStep;
}
//Bounds the possible temperatures
m_manualTemp = qMin(qMax(m_manualTemp,RedshiftController::MinTemperature),RedshiftController::MaxTemperature);
readConfig();
m_state = Stopped;
//Instantly kills the process without waiting the color transition
if (m_process->state()) {
m_process->kill();
}
m_process->waitForFinished();
//Since the state is Stopped, calling applyChanges with the toggle flag set will run the redshift
//process thus setting the fixed color temperature.
applyChanges(true);
//The start method has previously set the state to Running, but when redshift is ran with the -x flag
//it exits immediately, so the state should be set to Stopped manually.
m_state = Stopped;
}
}
void RedshiftController::toggle()
{
if (m_manualMode) {
m_manualMode = false;
readConfig();
KProcess::execute("redshift",QStringList("-x"));
}
applyChanges(true);
}
void RedshiftController::restart()
{
readConfig();
m_state = Stopped;
//If the process is running it needs to be stopped and launched again with the new parameters
if (m_process->state()) {
m_process->terminate();
}
//Waits the end of the color out transition before launching the process again
m_process->waitForFinished();
applyChanges();
}
void RedshiftController::setReadyForStart()
{
if (!m_readyForStart) {
m_readyForStart = true;
applyChanges();
}
}
void RedshiftController::dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data)
{
if(sourceName == "Status") {
m_currentActivity = data["Current"].toString();
readConfig();
applyChanges();
}
}
void RedshiftController::applyChanges(bool toggle)
{
//If m_readyForStart is false the application sends a probe signal to check
//if it can be enabled. This prevents to run redshift too early in the login phase.
if (m_readyForStart) {
if (m_runMode == AlwaysOn) {
start();
} else if (m_runMode == AlwaysOff) {
stop();
//If toggle is true the next section performs a toggle of the state whereas
//if toggle is false it realigns the real state with the auto state
} else if (toggle || (m_autoState != m_state)) {
if (m_state == Running) {
stop();
} else {
start();
}
m_autoState = m_state;
}
if (m_manualMode) {
emit stateChanged(RunningManual, currentTemperature());
} else {
if (m_state == Running) {
emit stateChanged(Running, currentTemperature());
} else {
emit stateChanged(Stopped, currentTemperature());
}
}
} else {
QDBusMessage message = QDBusMessage::createSignal("/", "org.kde.redshift", "readyCheck");
QDBusConnection::sessionBus().send(message);
}
}
void RedshiftController::start()
{
if (m_state == Stopped) {
m_state = Running;
if (!m_process->state()) {
m_process->start();
} else {
kill(m_process->pid(), SIGUSR1);
}
}
}
void RedshiftController::stop()
{
if (m_state == Running) {
m_state = Stopped;
if (m_process->state()) {
kill(m_process->pid(), SIGUSR1);
}
}
m_manualTemp = RedshiftController::DefaultManualTemperature;
}
void RedshiftController::readConfig()
{
RedshiftSettings::self()->readConfig();
m_latitude = RedshiftSettings::latitude();
m_longitude = RedshiftSettings::longitude();
m_dayTemp = RedshiftSettings::dayTemp();
m_nightTemp = RedshiftSettings::nightTemp();
m_gammaR = RedshiftSettings::gammaR();
m_gammaG = RedshiftSettings::gammaG();
m_gammaB = RedshiftSettings::gammaB();
m_brightness = RedshiftSettings::brightness();
m_smooth = RedshiftSettings::smooth();
m_autolaunch = RedshiftSettings::autolaunch();
m_method = RedshiftSettings::method();
QString command = QString("redshift -c /dev/null -l %1:%2 -t %3:%4 -g %5:%6:%7 -b %8")
.arg(m_latitude, 0, 'f', 1)
.arg(m_longitude, 0, 'f', 1)
.arg(m_dayTemp).arg(m_nightTemp)
.arg(m_gammaR, 0, 'f', 2)
.arg(m_gammaG, 0, 'f', 2)
.arg(m_gammaB, 0, 'f', 2)
.arg(m_brightness, 0, 'f', 2);
if (!m_smooth) {
command.append(" -r");
}
if (m_method == 1) {
command.append(" -m randr");
} else if (m_method == 2) {
command.append(" -m vidmode");
}
if (m_manualMode) {
command.append(" -O ");
command.append(QString("%1").arg(m_manualTemp));
}
m_process->setShellCommand(command);
m_runMode = Auto;
const QStringList alwaysOnActivities = RedshiftSettings::alwaysOnActivities();
const QStringList alwaysOffActivities = RedshiftSettings::alwaysOffActivities();
if (alwaysOnActivities.contains(m_currentActivity)) {
m_runMode = AlwaysOn;
} else if (alwaysOffActivities.contains(m_currentActivity)) {
m_runMode = AlwaysOff;
}
if (m_autoState == Undefined) {
if (m_autolaunch) {
m_autoState = Running;
} else {
m_autoState = Stopped;
}
}
}

View file

@ -0,0 +1,308 @@
/************************************************************************
* Copyright (C) 2012 by Simone Gaiarin <simgunz@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
************************************************************************/
/*!
* \file redshiftcontroller.h
*
* Contains the interface of the RedshiftController class.
*/
#ifndef REDSHIFTCONTROLLER_H
#define REDSHIFTCONTROLLER_H
#include <KProcess>
#include <Plasma/DataEngine>
/*!
* The RedshiftController class is a wrapper around a redshift KProcess that allows to change all
* the redshift parameters while it's running, and makes redshift plasma activity aware.
*
* RedshiftController is a wrapper around a redshift daemon. The redshift daemon can only be paused/resumed
* by sending the SIGUSR1 but doesn't allow to change its parameters once launched. This wrapper adds this
* kind of functionality. Redshift is launched through a KProcess and every time a parameter needs to be changed,
* the KProcess is stopped and relaunched with the new parameters.
*
* Moreover it provides some wrapper methods to start/stop/pause redshift by sending the SIGUSR1 in a proper way.
*
* Finally RedshiftController adds a Plasma Activity aware functionality to redshift. In particular every time the user
* changes activity the controller checks the user preferences and sets redshift to the state corresponding to
* the current activity.
* The allowed states are:
* - Auto, redshift can be toggled on/off. The default state at login depends on the Autostart flag.
* - Always enabled, redshift is forced to be enabled and can't be turned off (not very useful)
* - Always disabled, redshift is forced to be disabled and can't be turned on (useful for activities where redshift
* is undesirable, like an activity to watch movie or to do graphic editing)
*/
class RedshiftController : public QObject
{
Q_OBJECT
public:
/*!
* Enumerates the possible states of RedshiftController.
*
* The possible values of the state are:
* - Undefined
* - Running, the redshift process is running and is adjusting the screen color temperature continuously
* - RunningManual, the redshift process is not running, and the screen color temperature
* has been set to a fixed value
* - Stopped, the redshift process is not running, and the screen color temperature is the system default one
*/
enum RedshiftState {
Undefined,
Stopped,
Running,
RunningManual
};
/*!
* Enumerates the modes RedshiftController can operate.
*/
enum RunMode {
Auto,
AlwaysOn,
AlwaysOff
};
/*!
* Default constructor.
*
* The constructor connects the controller to the dbus object dbus org.kde.redshift in order to receive
* the readyForStart signal emitted by redshiftAutostartEnabler, which triggers the setReadyForStart method that
* enables all the controller functionality.
* Moreover the controller is connected to the Plasma Activities dataengine 'Status' source so that every time
* the user changes activity the dataUpdated method is invoked and the state of redshift can be
* changed accordingly to the current activity settings.
*/
RedshiftController();
/*!
* Default deconstructor.
*
* If redshift is in Manual mode (so the process isn't running), resets the screen color temperature
* to the default value by invoking redshift with the -x parameter. Otherwise terminates the redshift
* running process with the method terminate, so that a smooth transition is performed (if enabled in the settings).
*/
~RedshiftController();
/*!
* Access method to the current redshift state.
*
* \returns The current redshift state.
*/
RedshiftState state();
/*!
* Access method to the Manual mode screen color temperature.
*
* If redshift is in Manual mode the temperature (manually set) is returned otherwise the method returns 0.
*
* \todo Let return the current color temperature also when redshift is in Auto mode.
* Since redshift 1.7 it was not possible to retrieve the current temperature from the redshift daemon.
* From redshift 1.8 it's possible to retrieve the current temperature from the shell by calling redshift with the
* -v parameter.
*
* \returns The current screen color temperature if in Manual mode, zero otherwise.
*/
int currentTemperature();
/*!
* Switches to Manual mode and increases/decreases the screen color temperature by 100 Kelvin.
*
* If the controller is in Auto mode first brings it in Manual mode and sets the screen color temperature to the
* DefaultManualTemperature value, then increases/decreases the screen color temperature. If the controller
* is already in Manual mode it just increases/decreases the temperature.
*
* The redshift process is instantly killed if it's running, then the color temperature is set to a fixed value
* by launching redshift with the -x parameter. After the temperature has been set the redshift process exits.
*
* \param increase If true the screen color temperature is increased otherwise it's decreaseds.
*/
void setTemperature(bool increase);
/*!
* Toggles the state of redshift.
*
* If redshift is in Auto mode this method toggles the state from Running to NotRunning and vice versa, whilst
* if it's in Manual mode (the state is RunningManual) it resets the screen color temperature,
* sets the mode to Auto, and executes redshift so that the final state is Running.
*/
void toggle();
/*!
* Restarts the redshift process to apply the new settings.
*
* Since the parameters cannot be changed once the redshift process is running, it needs to be
* stopped and launched again with the new parameters.
*/
void restart();
//! Constant defining the minimum allowed screen color temperature.
static const int MinTemperature = 1000;
//! Constant defining the maximum allowed screen color temperature.
static const int MaxTemperature = 9900;
//! Constant defining the default screen color temperature used when redshift switch to Manual mode.
static const int DefaultManualTemperature = 5000;
//! Constant defining the temperature step used when increasing/decreasing the screen color temperature in Manual mode.
static const int TemperatureStep = 100;
signals:
/*!
* Emitted every time the state changes or, if in Manual mode, the temperature changes.
*
* This signal is caught by the RedshiftContainer in order to set the source data values.
* The state can change if the user brings redshift in Manual mode, if he manually toggles redshift on/off,
* and if he switches activity. The temperature changes every time the user scroll the wheel over the icon widget.
*
* \param state The current state.
* \param temperature The screen color temperature in Kelvin, when redshift is in manual mode.
*/
void stateChanged(RedshiftController::RedshiftState state, int temperature);
private slots:
/*!
* Sets a flag that enables the controller to execute the redshift process.
*
* Triggered when the dbus readyForStart is received.
*/
void setReadyForStart();
/*!
* Invoked when the user changes plasma activity, changes the state of redshift accordingly to
* the activities settings.
*
* As an example if the user switches to a plasma activity where the redshift activity setting is AlwaysOff,
* the redshift process is suspended.
*
* \param sourceName The name of the source that has called the method.
* \param data A QVariantMap containing the data the source passed to the method.
*/
void dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data);
private:
/*!
* Core method that switches redshift on/off.
*
* If toggle is true the next section performs a toggle of the state whereas
* if toggle is false it realigns the real state with the auto state. This last option is used to:
* - autostart redshift
* - restores the Auto mode redshift state, after switching from Manual mode
*
* \param toggle If toggle is true the next section performs a toggle of the state,
* whereas if toggle is false it realigns the real state with the auto state.
*/
void applyChanges(bool toggle = false);
/*!
* Enables redshift screen color management (the screen becomes red).
*
* If the redshift process is not already running it executes it,
* otherwise it sends the SIGUSR1 signal to the process to resume it
*/
void start();
/*!
* Disables redshift screen color management (the screen becomes neutral).
*
* If the redshift process is running it sends the SIGUSR1 signal to the process to suspend it.
* It also resets the manual screen color temperature to the default value when redshift switch from
* Manual mode to Auto mode.
*/
void stop();
/*!
* Reads the redshift specific parameters and the activities parameters from a KconfigXT configuration.
*
* If redshift should be auto started on login, m_autoState is set to Running so that once applyChanges is
* invoked it executes the redshift process (m_state is aligned to m_autoState).
*/
void readConfig();
//! Plasma activities dataengine.
Plasma::DataEngine *m_activitiesEngine;
//! The activity the user is on.
QString m_currentActivity;
//! The redshift process object.
KProcess *m_process;
//! Redshift enable flag, if true the redshift process can be executed.
bool m_readyForStart;
//! Actual redshift state.
RedshiftState m_state;
//! Stores the redshift Auto mode state, in order to restore it after switching from Manual mode.
RedshiftState m_autoState;
//! Current redshift operation mode.
int m_runMode;
//! Manual mode flag. If true redshift set a fixed color temperature and won't adjust it anymore.
bool m_manualMode;
//! Manual mode temperature to be set.
int m_manualTemp;
//! Autostart flag, if true redshift is acivated on login.
bool m_autolaunch;
// The parameters here below are the ones that should be passed to the redshift process when launched.
// They are read from the KConfig configuration file.
//! User latitude.
float m_latitude;
//! User longitude.
float m_longitude;
//! Daytime screen color temperature.
int m_dayTemp;
//! Nighttime screen color temperature.
int m_nightTemp;
//! Red gamma value.
float m_gammaR;
//! Green gamma value.
float m_gammaG;
//! Blue gamma value.
float m_gammaB;
//! Screen brightness value.
float m_brightness;
//! Smooth color transition flag, if true the color transition is performed smoothly.
bool m_smooth;
//! Color adjstment method, can be randr or vidmode.
int m_method;
};
#endif // REDSHIFTCONTROLLER_H

View file

@ -0,0 +1,57 @@
/************************************************************************
* Copyright (C) 2012 by Simone Gaiarin <simgunz@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
************************************************************************/
/*!
* \file redshiftengine.cpp
*
* Contains the implementation of the RedshiftEngine class.
*/
#include "redshiftengine.h"
#include "redshiftcontainer.h"
RedshiftEngine::RedshiftEngine(QObject* parent, const QVariantList& args)
: Plasma::DataEngine(parent, args)
{
Q_UNUSED(args)
}
Plasma::Service *RedshiftEngine::serviceForSource(const QString &source)
{
RedshiftContainer* container = qobject_cast<RedshiftContainer*>(containerForSource(source));
if (container) {
return container->service();
} else {
return DataEngine::serviceForSource(source);
}
}
bool RedshiftEngine::sourceRequestEvent(const QString &source)
{
if (source == "Controller") {
Plasma::DataContainer *container = containerForSource("Controller");
if (!container) {
addSource(new RedshiftContainer(this));
}
return true;
}
return false;
}
K_EXPORT_PLASMA_DATAENGINE(timekpr, RedshiftEngine)
#include "redshiftengine.moc"

View file

@ -0,0 +1,85 @@
/************************************************************************
* Copyright (C) 2012 by Simone Gaiarin <simgunz@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
************************************************************************/
/*!
* \file redshiftengine.h
*
* Contains the interface of the RedshiftEngine class.
*/
#ifndef REDSHIFTENGINE_H
#define REDSHIFTENGINE_H
#include <Plasma/DataEngine>
/*!
* The RedshiftEngine class is a Plasma::DataEngine that manages the redshift process, provides
* info on its status and allows to interact with it.
*
* This Plasma::DataEngine can have a single source called "Controller". The data of this source is wrapped
* in a Plasma::DataContainer which also holds a single system wide redshift process. In this way multiple plasmoids
* can exist simultaneously (in the desktop, in the panel, in different activities, etc.) and they do not interfere with
* each others since all of them interact with a single redshift process.
*
* This source holds the following data:
* - Status, the redshift status, which can be either Stopped, Running, RunningManual
* - Temperature, the current color temperature when redshift is in manual mode
*
* The DataEngine provides a way to interact with the redshift process by using a Plasma::Service.
* In particular the following actions are possible:
* - toggle, toggles redshift on/off
* - restart, restarts the redshift process (needed to apply configuration changes)
* - increase, increases the screen color temperature when redshift is in manual mode
* - decrease, decreases the screen color temperature when redshift is in manual mode
*/
class RedshiftEngine : public Plasma::DataEngine
{
Q_OBJECT
public:
/*!
* Default constructor.
*/
RedshiftEngine(QObject* parent, const QVariantList& args);
/*!
* Returns a service targeted to a source when a plasmoid requests it.
*
* \param source The source to target the Service at.
*
* \returns A Plasma::Service that has the source as a destination.
*/
Plasma::Service *serviceForSource(const QString &source);
protected:
/*!
* Returns a source when a plasmoid connects to the dataengine.
*
* If the requested source is "Controller" and it doesn't already exists, it is created by instantiating
* a new RedshiftContainer otherwise the method just confirms that the requested source exists.
* If the requested source is not "Controller" the method returns false.
*
* \param source The name of the source that has been requested.
*
* \returns True if a Plasma::DataContainer was set up, false otherwise.
*/
bool sourceRequestEvent(const QString& source);
};
#endif //REDSHIFTENGINE_H

View file

@ -0,0 +1,55 @@
/************************************************************************
* Copyright (C) 2012 by Simone Gaiarin <simgunz@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
************************************************************************/
/*!
* \file redshiftjob.cpp
*
* Contains the implementation of the RedshiftJob class.
*/
#include "redshiftjob.h"
RedshiftJob::RedshiftJob(RedshiftController *controller, const QString &operation,
QMap<QString, QVariant> &parameters, QObject *parent)
: ServiceJob(parent->objectName(), operation, parameters, parent),
m_redshiftController(controller)
{
}
void RedshiftJob::start()
{
const QString operation = operationName();
if (operation == "toggle") {
m_redshiftController->toggle();
setResult(true);
return;
} else if (operation == "restart") {
m_redshiftController->restart();
setResult(true);
return;
} else if (operation == "increase") {
m_redshiftController->setTemperature(true);
setResult(true);
return;
} else if (operation == "decrease") {
m_redshiftController->setTemperature(false);
setResult(true);
return;
}
setResult(false);
}

View file

@ -0,0 +1,64 @@
/************************************************************************
* Copyright (C) 2012 by Simone Gaiarin <simgunz@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
************************************************************************/
/*!
* \file redshiftjob.h
*
* Contains the interface of the RedshiftJob class.
*/
#ifndef REDSHIFTJOB_H
#define REDSHIFTJOB_H
#include "redshiftcontroller.h"
#include <Plasma/ServiceJob>
/*!
* The RedshiftJob class performs the operation requested by the service in an asynchronous way.
*/
class RedshiftJob : public Plasma::ServiceJob
{
Q_OBJECT
public:
/*!
* Constructor.
*
* \param controller The redshift controller that allows to interact with the redshift process.
* \param operation The operation to be performed.
* \param parameters The parameters set by the user for the operation.
* \param parent The QObject this job is parented to.
*/
RedshiftJob(RedshiftController *controller, const QString &operation, QMap<QString,
QVariant> &parameters, QObject *parent = 0);
protected:
/*!
* Execute the operation by using the public methods of RedshiftController.
*/
void start();
private:
//! The redshift controller that allows to interact with the redshift process.
RedshiftController *m_redshiftController;
};
#endif // REDSHIFTJOB_H

View file

@ -0,0 +1,39 @@
/************************************************************************
* Copyright (C) 2012 by Simone Gaiarin <simgunz@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
************************************************************************/
/*!
* \file redshiftservice.cpp
*
* Contains the implementation of the RedshiftService class.
*/
#include "redshiftservice.h"
#include "redshiftjob.h"
RedshiftService::RedshiftService(QObject *parent, RedshiftController *controller)
: m_redshiftController(controller)
{
Q_UNUSED(parent);
setName("redshift");
}
ServiceJob *RedshiftService::createJob(const QString &operation, QMap<QString, QVariant> &parameters)
{
return new RedshiftJob(m_redshiftController, operation, parameters, this);
}
#include "redshiftservice.moc"

View file

@ -0,0 +1,79 @@
/************************************************************************
* Copyright (C) 2012 by Simone Gaiarin <simgunz@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
************************************************************************/
/*!
* \file redshiftservice.h
*
* Contains the interface of the RedshiftService class.
*/
#ifndef REDSHIFTSERVICE_H
#define REDSHIFTSERVICE_H
#include "redshiftcontroller.h"
#include <Plasma/Service>
#include <Plasma/ServiceJob>
using namespace Plasma;
/*!
* The RedshiftService class provides a system to interact with the system wide redshift process.
*
* The following actions are possible:
* - toggle, toggle redshift on/off
* - restart, restarts the redshift process (needed to apply configuration changes)
* - increase, increases the screen color temperature when redshift is in manual mode
* - decrease, decreases the screen color temperature when redshift is in manual mode
*
* To run an operation from a plasmoid:
*
* Plasma::Service *service = dataEngine("redshift")->serviceForSource("Controller");
* service->startOperationCall(service->operationDescription("toggle"));
*/
class RedshiftService : public Plasma::Service
{
Q_OBJECT
public:
/*!
* Default constructor.
*
* \param parent The QObject this applet is parented to.
* \param controller The RedshiftController on which the operation should be executed.
*/
RedshiftService(QObject *parent, RedshiftController *controller);
/*!
* Called when a job should be created by the Service.
*
* This method is invoked automatically when startOperationCall is executed.
*
* \param operation Which operation to work on.
* \param parameters The parameters set by the user for the operation.
* \returns A ServiceJob that can be started and monitored by the consumer.
*/
ServiceJob *createJob(const QString &operation,
QMap<QString, QVariant> &parameters);
private:
//! The redshift controller that allows to interact with the redshift process.
RedshiftController *m_redshiftController;
};
#endif // REDSHIFTSERVICE_H

View file

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
<kcfgfile name="redshiftrc"/>
<include>KSystemTimeZones</include>
<group name="General">
<entry name="latitude" type="Double">
<label context="@label - KCFG entry name">Latitude</label>
<default code="true">KSystemTimeZones::local().latitude()</default>
</entry>
<entry name="longitude" type="Double">
<label context="@label- KCFG entry name">Longitude</label>
<default code="true">KSystemTimeZones::local().longitude()</default>
</entry>
<entry name="dayTemp" type="Int">
<label context="@label - KCFG entry name">Day color temperature</label>
<tooltip context="@info:tooltip">A neutral color temperature is 6500 K.</tooltip>
<default>5500</default>
</entry>
<entry name="nightTemp" type="Int">
<label context="@label - KCFG entry name">Night color temperature</label>
<tooltip context="@info:tooltip">The recommended night color temperature is 4500 K.</tooltip>
<default>3700</default>
</entry>
<entry name="gammaR" type="Double">
<label context="@label - KCFG entry name">Red gamma correction</label>
<tooltip context="@info:tooltip">Gamma correction (Red)</tooltip>
<default>1.00</default>
</entry>
<entry name="gammaG" type="Double">
<label context="@label - KCFG entry name">Green gamma correction</label>
<tooltip context="@info:tooltip">Gamma correction (Green)</tooltip>
<default>1.00</default>
</entry>
<entry name="gammaB" type="Double">
<label context="@label - KCFG entry name">Blue gamma correction</label>
<tooltip context="@info:tooltip">Gamma correction (Blue)</tooltip>
<default>1.00</default>
</entry>
<entry name="brightness" type="Double">
<label context="@label - KCFG entry name">Brightness</label>
<default>1.00</default>
</entry>
<entry name="smooth" type="Bool">
<label context="@label - KCFG entry name">Smooth transition flag</label>
<default>true</default>
</entry>
<entry name="autolaunch" type="Bool">
<label context="@label - KCFG entry name">Autostart flag</label>
<default>false</default>
</entry>
<entry name="method" type="Int">
<label context="@label - KCFG entry name">Color adjustment method</label>
<tooltip context="@info:tooltip">Redshift color adjustment method. If «Auto» («randr») doesn't work, try «vidmode».</tooltip>
<default>0</default>
</entry>
</group>
<group name="Activities">
<entry name="alwaysOnActivities" type="StringList">
<label context="@label - KCFG entry name (not visible to the user) - List of the activities where redshift is always on">Always on activities</label>
</entry>
<entry name="alwaysOffActivities" type="StringList">
<label context="@label - KCFG entry name (not visible to the user) - List of the activities where redshift is always off">Always off activities</label>
</entry>
</group>
</kcfg>

View file

@ -0,0 +1,11 @@
set(redshiftautostart_SRCS
redshiftautostart.cpp
redshiftenabler.cpp
)
kde4_add_executable(redshiftautostart ${redshiftautostart_SRCS})
target_link_libraries(redshiftautostart ${KDE4_KDECORE_LIBS} )
install(TARGETS redshiftautostart DESTINATION ${BIN_INSTALL_DIR})
install(FILES RedshiftAutostart.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/autostart)

View file

@ -0,0 +1,10 @@
[Desktop Entry]
Name=RedshiftAutostartNotifier
Exec=redshiftautostart
Icon=redshift
Type=Application
Terminal=false
X-KDE-autostart-after=panel
OnlyShowIn=KDE;

View file

@ -0,0 +1,53 @@
/************************************************************************
* Copyright (C) 2012 by Simone Gaiarin <simgunz@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
************************************************************************/
/*! \file redshiftautostart.cpp
* Auxiliary program needed to autostart the redshift process at the right time during kde login phase.
*
* This application is launched during the desktop environment applications autostart phase,
* after the login, and it sends a signal to the redshift data engine to enable it to start
* the redshift process. This prevents the data engine to launch redshift too early during the
* login phase, driving to an error state, i.e, the screen color isn't adjusted.
* If the data engine is launched after the login (e.g. when a plasmoid is placed
* on the desktop for the first time), the data engine probes this application that
* will respond with the enable signal.
*/
#include <QtCore/QCoreApplication>
#include <QDBusConnection>
#include <redshiftenabler.h>
/*!
* Main function.
*
* Creates a RedshiftEnabler object and connects it to the readyCheck dbus signal, so that if a new redshift plasmoid
* is created (this sends the readyCheck signal) this is enabled by this program. Moreover this program sends the
* readyForStart signal once launched to enable already existent redshift plasmoids during the login phase.
*/
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
RedshiftEnabler *enabler = new RedshiftEnabler();
//Responds to the readyCheck signal with a readyForStart signal
QDBusConnection dbus = QDBusConnection::sessionBus();
dbus.connect("", "/", "org.kde.redshift", "readyCheck",
enabler, SLOT(sendSignal()));
//Sends the signal once started to enable already possibly running instances of redshift data engine
enabler->sendSignal();
return app.exec();
}

View file

@ -0,0 +1,33 @@
/************************************************************************
* Copyright (C) 2012 by Simone Gaiarin <simgunz@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
************************************************************************/
/*!
* \file redshiftenabler.cpp
*
* Contains the implementation of the RedshiftEnabler class.
*/
#include <redshiftenabler.h>
#include <QDBusMessage>
#include <QDBusConnection>
void RedshiftEnabler::sendSignal()
{
QDBusMessage message = QDBusMessage::createSignal("/", "org.kde.redshift", "readyForStart");
QDBusConnection::sessionBus().send(message);
}

View file

@ -0,0 +1,45 @@
/************************************************************************
* Copyright (C) 2012 by Simone Gaiarin <simgunz@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
************************************************************************/
/*!
* \file redshiftenabler.h
*
* Contains the interface of the RedshiftEnabler class.
*/
#ifndef REDSHIFTENABLER_H
#define REDSHIFTENABLER_H
#include <QObject>
/*!
* The RedshiftEnabler class provides a system to send a custom signal over dbus (readyForStart)
* to inform the redshift dateEngine that it is allowed to start the redshift process.
*/
class RedshiftEnabler : public QObject
{
Q_OBJECT
public slots:
/*!
* Sends a dbus signal called readyForStart.
*/
void sendSignal();
};
#endif // REDSHIFTENABLER_H

View file

@ -0,0 +1,5 @@
File=redshift.kcfg
ClassName=RedshiftSettings
Singleton=true
Mutators=alwaysOnActivities,alwaysOffActivities
SetUserTexts=true