Commit Graph
435 Commits
Author SHA1 Message Date
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 fc9a0cb59d contrib: Add appdata file to RPM package 2014-12-28 01:46:15 -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 e781575643 Merge branch 'less-verbose' 2014-12-27 21:29:27 -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 87cec6b366 Merge branch 'color-settings-struct' 2014-12-27 20:35:00 -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 003025f5a3 Merge pull request #140 from jonls/osx-support
OSX support. Adds gamma adjustment method `quartz` and location provider `corelocation`.
2014-12-16 06:41:22 +01: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 3fdffb2ffc Merge pull request #145 from jonls/appdata-xml
Fix #95: Add AppData file for package managers
2014-12-16 01:20:24 +01:00
Jon Lund Steffensen cd5c59186c appdata: Add screenshot 2014-12-15 03:17:00 -05:00
Jon Lund Steffensen 1975e92bc8 Fix #95: Add AppData file for package managers 2014-12-15 02:40:14 -05:00
Jon Lund Steffensen dc78015f32 Merge branch 'geoclue2-provider'
Add GeoClue2 location provider
2014-12-15 01:53:59 -05:00
Jon Lund Steffensen 8b95878c37 contrib: Update RPM spec to use GeoClue2 2014-12-15 01:47:49 -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 3fc0c8cdbc contrib: Do not generate RPM spec
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.
2014-12-15 01:38:44 -05:00
Jon Lund Steffensen 795d33aa18 Makefile: Add README to distributed files
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.
2014-12-15 01:37:17 -05:00
Jon Lund Steffensen 9cf553687f Merge pull request #141 from jonls/relay-usr1-signal
redshift-gtk: Relay USR1 signal to redshift process
2014-12-06 21:28:30 -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 2ec84c1ebb Merge pull request #139 from khink/master
Add pointer to .travis.yml for Ubuntu dependency packages
2014-12-06 20:37:47 -05:00
Kees Hink 06b2a1b12b Add a note about Ubuntu dependency packages
...which can be found in .travis.yml
2014-12-05 21:01:02 +01:00
Jon Lund Steffensen 9271e94522 Update Travis CI script to run make distcheck 2014-11-23 18:35:27 -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 1abed2c264 README: Fix markdown syntax 2014-10-13 00:52:17 -04:00
Jon Lund Steffensen 4545efdeae README: Add build status image 2014-10-13 00:44:29 -04:00
Jon Lund Steffensen 4adc2d0970 README: Rename to README.md 2014-10-13 00:44:06 -04:00
Jon Lund Steffensen d077014f22 Add Travis CI configuration file 2014-10-13 00:26:44 -04:00
Jon Lund Steffensen 44782ec882 Merge pull request #116 from emilf/master
Added intltool to dependencies, as I got errors on ./bootstrap without it
2014-09-22 12:58:16 -04:00
emilf 811513bb1e Added intltool to dependencies, as I got errors on ./bootstrap without it 2014-09-17 05:44:33 +00:00
Peter 490b149b20 Fix #114: Update nl translation 2014-09-14 20:06:06 -04:00
Jon Lund Steffensen cf779a7c17 configure.ac: Fix undefined GETTEXT_PACKAGE on install 2014-08-16 23:23:42 -04:00
Jon Lund Steffensen dd92c5b4a0 Add gamma-dummy.c to POTFILES.in 2014-08-16 23:14:15 -04:00
Jon Lund Steffensen 4cb28ca2fe Fix: desktop files missing in EXTRA_DIST and CLEANFILES 2014-08-16 23:12:58 -04:00