aboutsummaryrefslogtreecommitdiffstats
path: root/src/gtk-redshift
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtk-redshift')
-rw-r--r--src/gtk-redshift/Makefile.am2
-rw-r--r--src/gtk-redshift/statusicon.py15
2 files changed, 11 insertions, 6 deletions
diff --git a/src/gtk-redshift/Makefile.am b/src/gtk-redshift/Makefile.am
index 5101cef..bb69459 100644
--- a/src/gtk-redshift/Makefile.am
+++ b/src/gtk-redshift/Makefile.am
@@ -12,9 +12,9 @@ dist_bin_SCRIPTS = gtk-redshift
endif
EXTRA_DIST = defs.py.in
-
CLEANFILES = defs.py
+
# Local python definitions
defs.py: defs.py.in
sed -e "s|\@bindir\@|$(bindir)|g" \
diff --git a/src/gtk-redshift/statusicon.py b/src/gtk-redshift/statusicon.py
index 8c084a8..859a1b9 100644
--- a/src/gtk-redshift/statusicon.py
+++ b/src/gtk-redshift/statusicon.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# statusicon.py -- Application panel indicator / GTK+ status icon source
+# statusicon.py -- GUI status icon source
# This file is part of Redshift.
# Redshift is free software: you can redistribute it and/or modify
@@ -18,6 +18,12 @@
# Copyright (c) 2010 Jon Lund Steffensen <jonlst@gmail.com>
+'''GUI status icon for Redshift.
+
+The run method will try to start an appindicator for Redshift. If the
+appindicator module isn't present it will fall back to a GTK status icon.
+'''
+
import sys, os
import subprocess, signal
import gettext
@@ -49,10 +55,9 @@ def run():
try:
if appindicator:
# Create indicator
- indicator = appindicator.Indicator ("redshift",
- "redshift",
- appindicator.CATEGORY_APPLICATION_STATUS)
- indicator.set_status (appindicator.STATUS_ACTIVE)
+ indicator = appindicator.Indicator('redshift', 'redshift',
+ appindicator.CATEGORY_APPLICATION_STATUS)
+ indicator.set_status(appindicator.STATUS_ACTIVE)
else:
# Create status icon
status_icon = gtk.StatusIcon()