Fix missing include of windows.h on windows platform. Change check
for _POSIX_TIMERS to check that it is greater than 0. On OS X, the
POSIX timers are not available and _POSIX_TIMERS is -1.
The static string array period_names contains strings that are printed
but these were not marked for translation. This is fixed now by adding
the _N() macro and calling gettext() when the strings are used.
This keeps a copy of the previous color_setting_t in the loop so
that we can avoid printing the color temperature and brightness if
they did not change.
Changes all set_temperature function in gamma adjustment methods
to take a color_setting_t pointer with the color settings.
Colorramp functions are similarly changed to take a color settings
struct.
Move color settings (temperature, gamma and brightness) into a
struct for each period (day, night). Change the interpolation
function to interpolate all values between these structs.
This splits the user interface into, RedshiftController, a GObject
subclass that takes care of starting and interacting with the child
process, and RedshiftStatusIcon providing the actual user interface.
The termwait method is used to wait until the child process has
quit. Previously this would fail with an exception if the child
has already quit. This is now ignored.
This dialog is shown whenever the child process exits with a
non-zero status. The error output from stderr of the child
process is buffered in redshift-gtk in case the child exits
unexpectedly.
This simply runs a GLib main loop when the location is requested
and tries to get the location from GeoClue2. We need to run a
main loop since the location is not immediately available, instead
it becomes available through a signal.
The RPM spec needs to be maintained manually anyway so it does not make
sense to autogenerate the file with the latest version number. This should
be done manually while updating dependencies and changelog.
README was accidentally omitted from distribution, and the link from
README to README.md was missing since the file was renamed with the
Markdown extension.
This requires that the stderr (and stdout) are emptied when the
child process exits, otherwise redshift-gtk will exit before the
error output is forwarded. Also, the '-v' parameter is moved to
the beginning of the command line to avoid error output including
this (e.g. `redshift-gtk -l` would complain about the missing
location provided `-v`).