diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gtk-redshift/Makefile.am | 25 | ||||
-rw-r--r-- | src/gtk-redshift/gtk-redshift.in | 2 | ||||
-rw-r--r-- | src/redshift.c | 6 |
3 files changed, 18 insertions, 15 deletions
diff --git a/src/gtk-redshift/Makefile.am b/src/gtk-redshift/Makefile.am index 9c8479f..ddeafd6 100644 --- a/src/gtk-redshift/Makefile.am +++ b/src/gtk-redshift/Makefile.am @@ -1,6 +1,6 @@ -if ENABLE_GTK -module=statusicon +if ENABLE_STATUSICON +gui_module=statusicon gtk_redshift_PYTHON = \ __init__.py \ statusicon.py @@ -8,13 +8,11 @@ nodist_gtk_redshift_PYTHON = \ defs.py gtk_redshiftdir = $(pythondir)/gtk_redshift -dist_bin_SCRIPTS = gtk-redshift -EXTRA_DIST = gtk-redshift.in \ - defs.py.in +bin_SCRIPTS = gtk-redshift endif if ENABLE_APPINDICATOR -module=rsappindicator +gui_module=rsappindicator gtk_redshift_PYTHON = \ __init__.py \ rsappindicator.py @@ -22,18 +20,21 @@ nodist_gtk_redshift_PYTHON = \ defs.py gtk_redshiftdir = $(pythondir)/gtk_redshift -dist_bin_SCRIPTS = gtk-redshift -EXTRA_DIST = gtk-redshift.in \ - defs.py.in +bin_SCRIPTS = gtk-redshift endif +EXTRA_DIST = gtk-redshift.in \ + defs.py.in + CLEANFILES = defs.py \ - gtk-redshift + gtk-redshift -# Local python definitions + +# Main GUI script gtk-redshift: gtk-redshift.in - sed -e "s|\@module\@|$(module)|g" $< > $@ + sed -e "s|\@gui_module\@|$(gui_module)|g" $< > $@ +# Local python definitions defs.py: defs.py.in sed -e "s|\@bindir\@|$(bindir)|g" \ -e "s|\@localedir\@|$(localedir)|g" $< > $@ diff --git a/src/gtk-redshift/gtk-redshift.in b/src/gtk-redshift/gtk-redshift.in index 18ee145..120e05c 100644 --- a/src/gtk-redshift/gtk-redshift.in +++ b/src/gtk-redshift/gtk-redshift.in @@ -19,5 +19,5 @@ if __name__ == '__main__': - from gtk_redshift.@module@ import run + from gtk_redshift.@gui_module@ import run run() diff --git a/src/redshift.c b/src/redshift.c index 6483cf0..a8f2966 100644 --- a/src/redshift.c +++ b/src/redshift.c @@ -273,6 +273,7 @@ print_help(const char *program_name) fputs("\n", stdout); /* TRANSLATORS: help output 4 + `list' must not be translated no-wrap */ fputs(_(" -g R:G:B\tAdditional gamma correction to apply\n" " -l LAT:LON\tYour current location\n" @@ -507,10 +508,11 @@ main(int argc, char *argv[]) char *provider_name = NULL; - /* Try to parse provider name as float */ + /* Don't save the result of strtof(); we simply want + to know if optarg can be parsed as a float. */ errno = 0; char *end; - float v = strtof(optarg, &end); + strtof(optarg, &end); if (errno == 0 && *end == ':') { /* Use instead as arguments to `manual'. */ provider_name = "manual"; |