[tracker/tracker-0.10] tracker-control: Remove --detailed option, always enabled
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.10] tracker-control: Remove --detailed option, always enabled
- Date: Wed, 23 Mar 2011 11:05:59 +0000 (UTC)
commit d09f4fd986e883d52241b5867e7ca87f158b3384
Author: Aleksander Morgado <aleksander lanedo com>
Date: Mon Mar 21 11:35:25 2011 +0100
tracker-control: Remove --detailed option, always enabled
Timestamps will now always be shown in when getting status of the Tracker
components.
Fixes GB#644998
docs/manpages/tracker-control.1 | 9 +---
src/tracker-control/tracker-control-status.c | 60 ++++++++------------------
2 files changed, 19 insertions(+), 50 deletions(-)
---
diff --git a/docs/manpages/tracker-control.1 b/docs/manpages/tracker-control.1
index 4e2fbfe..978e1c1 100644
--- a/docs/manpages/tracker-control.1
+++ b/docs/manpages/tracker-control.1
@@ -93,14 +93,7 @@ miners).
.TP
.B \-F, \-\-follow
Follow status changes as they happen. This requires Ctrl+C to stop and
-return to the command line. Each new status is put on a new line. To
-get more information, you can use
-.B \-\-detailed
-with this.
-.TP
-.B \-D, \-\-detailed
-For the most part, this purely provides a timestamp with each status
-update to follow WHEN changes happened.
+return to the command line. Each new status is put on a new line.
.TP
.B \-C, \-\-list-common-statuses
This will list statuses most commonly produced by miners and the
diff --git a/src/tracker-control/tracker-control-status.c b/src/tracker-control/tracker-control-status.c
index d391fa0..9fca609 100644
--- a/src/tracker-control/tracker-control-status.c
+++ b/src/tracker-control/tracker-control-status.c
@@ -40,15 +40,9 @@ static gint paused_length = 0;
*/
static gboolean status;
static gboolean follow;
-static gboolean detailed;
static gboolean list_common_statuses;
-#define ENABLED() \
- (status || \
- follow || \
- detailed || \
- list_common_statuses)
-
+#define ENABLED() (status || follow || list_common_statuses)
/* Make sure our statuses are translated (all from libtracker-miner except one) */
static const gchar *statuses[7] = {
@@ -70,10 +64,6 @@ static GOptionEntry entries[] = {
N_("Follow status changes as they happen"),
NULL
},
- { "detailed", 'D', 0, G_OPTION_ARG_NONE, &detailed,
- N_("Include details with state updates (only applies to --follow)"),
- NULL
- },
{ "list-common-statuses", 'C', 0, G_OPTION_ARG_NONE, &list_common_statuses,
N_("List common statuses for miners and the store"),
NULL
@@ -168,17 +158,13 @@ miner_print_state (TrackerMinerManager *manager,
struct tm *local_time;
gchar *progress_str;
- if (detailed) {
- now = time ((time_t *) NULL);
- local_time = localtime (&now);
- len = strftime (time_str,
- sizeof (time_str) - 1,
- "%d %b %Y, %H:%M:%S:",
- local_time);
- time_str[len] = '\0';
- } else {
- time_str[0] = '\0';
- }
+ now = time ((time_t *) NULL);
+ local_time = localtime (&now);
+ len = strftime (time_str,
+ sizeof (time_str) - 1,
+ "%d %b %Y, %H:%M:%S:",
+ local_time);
+ time_str[len] = '\0';
name = tracker_miner_manager_get_display_name (manager, miner_name);
@@ -228,6 +214,9 @@ store_print_state (const gchar *status,
gchar *operation_status = NULL;
gchar time_str[64];
gchar *progress_str;
+ struct tm *local_time;
+ time_t now;
+ size_t len;
if (status && strstr (status, "-")) {
gchar **status_split;
@@ -244,21 +233,13 @@ store_print_state (const gchar *status,
}
}
- if (detailed) {
- struct tm *local_time;
- time_t now;
- size_t len;
-
- now = time ((time_t *) NULL);
- local_time = localtime (&now);
- len = strftime (time_str,
- sizeof (time_str) - 1,
- "%d %b %Y, %H:%M:%S:",
- local_time);
- time_str[len] = '\0';
- } else {
- time_str[0] = '\0';
- }
+ now = time ((time_t *) NULL);
+ local_time = localtime (&now);
+ len = strftime (time_str,
+ sizeof (time_str) - 1,
+ "%d %b %Y, %H:%M:%S:",
+ local_time);
+ time_str[len] = '\0';
if (progress > 0.0 && progress < 1.0) {
progress_str = g_strdup_printf ("%-3.0f%%", progress * 100);
@@ -466,11 +447,6 @@ tracker_control_status_run (void)
GSList *miners_running;
GSList *l;
- /* --detailed implies --follow */
- if (detailed) {
- follow = TRUE;
- }
-
/* --follow implies --status */
if (follow) {
status = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]