Commit Graph
200 Commits
Author SHA1 Message Date
Jon Lund Steffensen f154aaa7c1 redshift: Add translation comment on period name None 2014-12-28 14:34:43 -05:00
Jon Lund Steffensen 0b94ec26fe redshift: Add translation of Daytime/Night in new gamma string 2014-12-28 14:34:21 -05:00
Jon Lund Steffensen d281e0c1ed redshift: Add translation comment to N,S,W,E strings 2014-12-28 14:33:11 -05:00
Jon Lund Steffensen 501d308495 location: Make translated string about recheck shared between all providers 2014-12-28 14:14:28 -05:00
Jon Lund Steffensen 7cb1af0773 corelocation: Fix missing space character in string 2014-12-28 14:13:42 -05:00
Jon Lund Steffensen ba422bd78e systemtime: Add function wrapping platform sleep function
Adds systemtime_msleep() which sleeps for a number of milliseconds.
This wraps Sleep() on windows and usleep() on other platforms.
2014-12-28 13:13:21 -05:00
Jon Lund Steffensen 4adf25952f systemtime: Fix includes and check for _POSIX_TIMERS
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.
2014-12-28 13:10:31 -05:00
Jon Lund Steffensen d58de55645 redshift: Add enum member for unknown period_t (PERIOD_NONE) 2014-12-28 01:25:10 -05:00
Jon Lund Steffensen 4e7717cf14 redshift: Properly handle errors in sigaction 2014-12-28 01:23:30 -05:00
Jon Lund Steffensen cfe90ccf70 redshift: Fix translation of period names
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.
2014-12-27 23:12:47 -05:00
Jon Lund Steffensen 396ecd69a8 redshift: Only print period information when it changes
This change adds functions to determine what the current period is
so we can keep track and only print the period when it changes.
2014-12-27 21:27:36 -05:00
Jon Lund Steffensen 431780b851 redshift: Be less verbose when color values did not change
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.
2014-12-27 21:26:37 -05:00
Jon Lund Steffensen 6ecbfe324f redshift: Change duration of sleep to macro 2014-12-27 20:46:59 -05:00
Jon Lund Steffensen ec5aa19acf redshift: Simplify set_temperature by passing color_setting_t
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.
2014-12-27 20:22:11 -05:00
Jon Lund Steffensen a4052e2a7b redshift: Add config setting to set gamma separately for day/night
These settings are gamma-day and gamma-night. The setting gamma
will still override both the daytime and nighttime gamma setting.
2014-12-27 19:43:05 -05:00
Jon Lund Steffensen 4ac4d9ee2d redshift: Move color settings into struct for period
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.
2014-12-27 19:43:05 -05:00
Jon Lund Steffensen c00bcff953 redshift: Use double for interpolation function 2014-12-27 19:30:16 -05:00
Jon Lund Steffensen 46fa3566de redshift-gtk: Split status icon into controller and interface
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.
2014-12-21 20:41:59 -05:00
Jon Lund Steffensen fee0a87a54 redshift-gtk: Add docstrings in statusicon module 2014-12-18 22:03:20 -05:00
Jon Lund Steffensen a34f948d53 redshift-gtk: Ignore exception in termwait when child is gone
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.
2014-12-18 21:36:55 -05:00
Jon Lund Steffensen 86e15af8b1 redshift-gtk: Remove unnecessary semi-colons at end-of-line 2014-12-18 21:36:15 -05:00
Jon Lund Steffensen c1524cad84 redshift-gtk: Show errors from child process in a dialog
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.
2014-12-18 21:31:52 -05:00
Jon Lund Steffensen 8839dcd530 Add CoreLocation (OSX) location provider
Similarly to the Geoclue provider, the CoreLocation provider only
requests the location on startup.
2014-12-15 20:36:35 -05:00
Jon Lund Steffensen 980a993c98 Add Quartz (OSX) gamma adjustment method 2014-12-15 20:31:51 -05:00
Jon Lund Steffensen b2fb992757 colorramp: Add float-typed colorramp_fill() equivalent 2014-12-15 20:31:03 -05:00
Jon Lund Steffensen ee7e91dd86 Fix #80: Add Geoclue2 location provider
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.
2014-12-15 01:47:49 -05:00
Jon Lund Steffensen 0af9072793 systemtime: Use gettimeofday if POSIX timers not available 2014-12-15 01:40:37 -05:00
Jon Lund Steffensen 50aeb4a3f7 redshift-gtk: Relay USR1 signal to redshift process
This also adds SIGINT to the signals handled by redshift-gtk.
2014-12-06 20:56:37 -05:00
Jon Lund Steffensen c0940492ed redshift-gtk: Forward errors from child to stderr
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`).
2014-11-04 00:36:19 -05:00
Jon Lund Steffensen c42f935118 Fix #112: Do not buffer lines from child indefinitely 2014-11-03 20:37:48 -05:00
Jon Lund Steffensen 970e9dc624 Fix #105: Limit decimals in displayed location to two 2014-08-16 22:49:41 -04:00
Mattias Andrée 7027488b03 Fix #90: Print N/S and E/W in the location 2014-08-16 22:34:57 -04:00
Mattias Andrée b933b617af Check for strdup failure in location-geoclue
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-05-13 02:48:17 +02:00
Jon Lund Steffensen 241eff8fe7 redshift-gtk: Notify desktop about startup completion 2014-05-08 14:44:54 -04:00
Mattias Andrée 7d74a6a48c Add support for custom transition start and end elevation
Implemented through config options transition-high and transition-low (there
is no command line switch at this point). Determines at what solar elevation
Redshift will change from night to transition period to day.

Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-05-07 20:18:00 -04:00
Mattias Andrée ed9186814d Fix #41: Do not jump to 0 % or 100 % when changing direction of transition
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-05-07 17:16:13 -04:00
Maks Verver 76f8130f12 Fix line splitting logic. 2014-04-19 18:03:54 +02:00
Jon Lund Steffensen f436cf69bf Fix #64: Fix Geoclue support when run outside of X
Fix check of error value returned.
Geoclue requires DISPLAY to be set, so try DISPLAY=:0 if not already set.
2014-04-13 22:41:26 +02:00
Jon Lund Steffensen 0cf506e9cb Fix #66: Do not distribute redshift-gtk, only redshift-gtk.in 2014-04-13 22:18:44 +02:00
Jon Lund Steffensen 07c8ee9e76 Fix #67: Geoclue should pull in Glib as dependency
Add checks in configure.ac for Glib and pull in through Makefile.am when
Geoclue support is enabled.
2014-04-13 22:10:34 +02:00
Mattias Andrée 5ad49f9e49 Try to use DISPLAY=:0 if not in X
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-04-11 07:28:14 +02:00
Mattias Andrée 4202e1d6f4 Do not segfault just because an error has not been given
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-04-11 07:24:57 +02:00
Jon Lund Steffensen 9426e9fba0 redshift-gtk: Fix crash when toggling state using the status icon 2014-04-11 00:26:57 +02:00
Jon Lund Steffensen 7685169385 Fix #22: remove initial underscore from include guards 2014-03-23 01:34:05 +01:00
Philipp Hagemeister ae5c6f5d83 [redshift-gtk] Add BSD support to proc title setting 2014-03-23 01:16:44 +01:00
Mattias Andrée 3eac70572d Fix #40: redshift-gtk: toggle_item is checkbox that follows the icon
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-03-23 00:52:32 +01:00
Jon Lund Steffensen ee7252e6fd Merge pull request #46 from maandree/gamma
Apply gamma after brightness and temperature
2014-03-23 00:00:54 +01:00
Jon Lund Steffensen 09efaddd23 Merge pull request #42 from maandree/gamma-drm
Support for running Redshift outside X using libdrm
2014-03-22 20:13:00 +01:00
Mattias Andrée 67f479d057 Support for running Redshift without a graphical environment in Linux by using Direct Rendering Manager
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-03-22 19:46:11 +01:00
Jon Lund Steffensen 8e0c6dd3ac Makefile.am: Substitute AM_CPPFLAGS for deprecated INCLUDES 2014-03-22 18:23:32 +01:00