aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <dbphillipsnz@gmail.com>2015-09-02 17:59:30 +1200
committerDavid Phillips <dbphillipsnz@gmail.com>2015-09-02 17:59:30 +1200
commitfe3f479d74406ec21cc52aaf900ea3741e035f33 (patch)
tree7d6c38928a99ec5cc944970e8e5a9a2b41a5ddcb
parentbdc3da0b7c0084aca0569eaab716b62a0a02e81a (diff)
downloadparamano-fe3f479d74406ec21cc52aaf900ea3741e035f33.tar.xz
Minor bugfix to report status as unknown when negative (not just -1) charging time remains
-rw-r--r--bat_tray.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bat_tray.c b/bat_tray.c
index 446dcf4..f9e1328 100644
--- a/bat_tray.c
+++ b/bat_tray.c
@@ -115,7 +115,7 @@ static void update_tooltip_cache()
char time_left[64];
int seconds_left = get_bat_seconds_left();
- if (seconds_left == -1)
+ if (seconds_left < 0)
snprintf(time_left, sizeof(time_left), _("Unknown time left"));
else
snprintf(time_left, sizeof(time_left), _("%02d:%02d left"), (int)(seconds_left/3600), (int)((seconds_left%3600)/60));