[tracker/miner-fs-remaining-time: 4/4] tracker-control: Use tracker_seconds_to_string() for nicer output
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-fs-remaining-time: 4/4] tracker-control: Use tracker_seconds_to_string() for nicer output
- Date: Wed, 30 Mar 2011 16:50:18 +0000 (UTC)
commit a5716fafd014b7cf9d3cbe7d9cb00624c323884f
Author: Martyn Russell <martyn lanedo com>
Date: Wed Mar 30 17:49:02 2011 +0100
tracker-control: Use tracker_seconds_to_string() for nicer output
Displays not just seconds, but hours and days remaining too.
src/tracker-control/tracker-control-status.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/src/tracker-control/tracker-control-status.c b/src/tracker-control/tracker-control-status.c
index 4b5bf4d..37582cf 100644
--- a/src/tracker-control/tracker-control-status.c
+++ b/src/tracker-control/tracker-control-status.c
@@ -190,10 +190,17 @@ miner_print_state (TrackerMinerManager *manager,
remaining_time >= 0) {
/* 0 means that we couldn't properly compute the remaining
* time. */
- remaining_time_str = (remaining_time > 0 ?
- g_strdup_printf (_("estimated %ds left"),
- remaining_time) :
- g_strdup (_("unknown time left")));
+ if (remaining_time > 0) {
+ gchar *seconds_str = tracker_seconds_to_string (remaining_time, TRUE);
+
+ remaining_time_str = g_strconcat (seconds_str,
+ " ",
+ _("remaining"),
+ NULL);
+ g_free (seconds_str);
+ } else {
+ remaining_time_str = g_strdup (_("unknown time left"));
+ }
}
g_print ("%s %s %-*.*s %s%-*.*s%s %s %s %s\n",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]