aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-05-20 23:17:58 +0200
committerJon Lund Steffensen <jonlst@gmail.com>2014-08-16 22:34:57 -0400
commit7027488b032734eda664e43e6f4a1a9d9c813776 (patch)
tree29793e88baa39ae1062bc9064f302ed5cba2f547
parentMerge pull request #92 from jonls/fix-91-makerule (diff)
downloadredshift-ng-7027488b032734eda664e43e6f4a1a9d9c813776.tar.gz
redshift-ng-7027488b032734eda664e43e6f4a1a9d9c813776.tar.bz2
redshift-ng-7027488b032734eda664e43e6f4a1a9d9c813776.tar.xz
Fix #90: Print N/S and E/W in the location
-rw-r--r--src/redshift-gtk/statusicon.py2
-rw-r--r--src/redshift.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/redshift-gtk/statusicon.py b/src/redshift-gtk/statusicon.py
index 2efbc07..3e66649 100644
--- a/src/redshift-gtk/statusicon.py
+++ b/src/redshift-gtk/statusicon.py
@@ -296,7 +296,7 @@ class RedshiftStatusIcon(object):
elif key == 'Period':
self.change_period(value)
elif key == 'Location':
- self.change_location(tuple(float(x) for x in value.split(', ')))
+ self.change_location(value.split(', '))
def child_stdout_line_cb(self, line):
if line:
diff --git a/src/redshift.c b/src/redshift.c
index 6fc2895..e39caa3 100644
--- a/src/redshift.c
+++ b/src/redshift.c
@@ -1000,8 +1000,10 @@ main(int argc, char *argv[])
provider->free(&location_state);
if (verbose) {
- /* TRANSLATORS: Append degree symbols if possible. */
- printf(_("Location: %f, %f\n"), lat, lon);
+ /* TRANSLATORS: Append degree symbols after %f if possible. */
+ printf(_("Location: %f %s, %f %s\n"),
+ fabs(lat), lat >= 0.f ? _("N") : _("S"),
+ fabs(lon), lon >= 0.f ? _("E") : _("W"));
printf(_("Temperatures: %dK at day, %dK at night\n"),
temp_day, temp_night);
/* TRANSLATORS: Append degree symbols if possible. */