From a5b9ff65c421de27d81f9317a17467592fab3552 Mon Sep 17 00:00:00 2001 From: Francesco Marella Date: Fri, 4 Jun 2010 12:42:31 +0200 Subject: Add the autofoo needed to choose GTK+ status icon or app-indicator Passing 'enable-appindicator=yes' to the configure script the GTK+ status icon will be disabled. --- src/gtk-redshift/Makefile.am | 24 ++++++++++++++++++++++-- src/gtk-redshift/gtk-redshift | 23 ----------------------- src/gtk-redshift/gtk-redshift.in | 23 +++++++++++++++++++++++ src/gtk-redshift/statusicon.py | 2 +- 4 files changed, 46 insertions(+), 26 deletions(-) delete mode 100644 src/gtk-redshift/gtk-redshift create mode 100644 src/gtk-redshift/gtk-redshift.in (limited to 'src') diff --git a/src/gtk-redshift/Makefile.am b/src/gtk-redshift/Makefile.am index d0d8695..9c8479f 100644 --- a/src/gtk-redshift/Makefile.am +++ b/src/gtk-redshift/Makefile.am @@ -1,5 +1,6 @@ if ENABLE_GTK +module=statusicon gtk_redshift_PYTHON = \ __init__.py \ statusicon.py @@ -8,12 +9,31 @@ nodist_gtk_redshift_PYTHON = \ gtk_redshiftdir = $(pythondir)/gtk_redshift dist_bin_SCRIPTS = gtk-redshift -EXTRA_DIST = defs.py.in +EXTRA_DIST = gtk-redshift.in \ + defs.py.in endif -CLEANFILES = defs.py +if ENABLE_APPINDICATOR +module=rsappindicator +gtk_redshift_PYTHON = \ + __init__.py \ + rsappindicator.py +nodist_gtk_redshift_PYTHON = \ + defs.py +gtk_redshiftdir = $(pythondir)/gtk_redshift + +dist_bin_SCRIPTS = gtk-redshift +EXTRA_DIST = gtk-redshift.in \ + defs.py.in +endif + +CLEANFILES = defs.py \ + gtk-redshift # Local python definitions +gtk-redshift: gtk-redshift.in + sed -e "s|\@module\@|$(module)|g" $< > $@ + defs.py: defs.py.in sed -e "s|\@bindir\@|$(bindir)|g" \ -e "s|\@localedir\@|$(localedir)|g" $< > $@ diff --git a/src/gtk-redshift/gtk-redshift b/src/gtk-redshift/gtk-redshift deleted file mode 100644 index f62c6f1..0000000 --- a/src/gtk-redshift/gtk-redshift +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python -# gtk-redshift -- GTK+ Redshift launcher script -# This file is part of Redshift. - -# Redshift 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. - -# Redshift 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 Redshift. If not, see . - -# Copyright (c) 2010 Jon Lund Steffensen - - -if __name__ == '__main__': - from gtk_redshift.statusicon import run_statusicon - run_statusicon() diff --git a/src/gtk-redshift/gtk-redshift.in b/src/gtk-redshift/gtk-redshift.in new file mode 100644 index 0000000..18ee145 --- /dev/null +++ b/src/gtk-redshift/gtk-redshift.in @@ -0,0 +1,23 @@ +#!/usr/bin/env python +# gtk-redshift -- GTK+ Redshift launcher script +# This file is part of Redshift. + +# Redshift 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. + +# Redshift 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 Redshift. If not, see . + +# Copyright (c) 2010 Jon Lund Steffensen + + +if __name__ == '__main__': + from gtk_redshift.@module@ import run + run() diff --git a/src/gtk-redshift/statusicon.py b/src/gtk-redshift/statusicon.py index 9925c35..2295963 100644 --- a/src/gtk-redshift/statusicon.py +++ b/src/gtk-redshift/statusicon.py @@ -30,7 +30,7 @@ import gtk, glib import defs -def run_statusicon(): +def run(): # Internationalisation gettext.bindtextdomain('redshift', defs.LOCALEDIR) gettext.textdomain('redshift') -- cgit v1.2.3-70-g09d2