[tracker/miner-fs-remaining-time: 1/2] tracker-control: Simplify getting pause status when showing pause details



commit 73d47fec9911d84e0820ea7a5d308fd7b2787abb
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Thu Mar 24 10:54:30 2011 +0100

    tracker-control: Simplify getting pause status when showing pause details

 src/tracker-control/tracker-control-miners.c |   37 +++-----------------------
 1 files changed, 4 insertions(+), 33 deletions(-)
---
diff --git a/src/tracker-control/tracker-control-miners.c b/src/tracker-control/tracker-control-miners.c
index f3a5f1c..cba21f2 100644
--- a/src/tracker-control/tracker-control-miners.c
+++ b/src/tracker-control/tracker-control-miners.c
@@ -253,31 +253,6 @@ miner_list (gboolean available,
 }
 
 static gboolean
-miner_get_details (TrackerMinerManager  *manager,
-                   const gchar          *miner,
-                   gchar               **status,
-                   gdouble              *progress,
-                   GStrv                *pause_applications,
-                   GStrv                *pause_reasons)
-{
-	if ((status || progress) &&
-	    !tracker_miner_manager_get_status (manager,
-	                                       miner,
-	                                       status,
-	                                       progress)) {
-		g_printerr (_("Could not get status from miner: %s"), miner);
-		return FALSE;
-	}
-
-	tracker_miner_manager_is_paused (manager,
-	                                 miner,
-	                                 pause_applications,
-	                                 pause_reasons);
-
-	return TRUE;
-}
-
-static gboolean
 miner_pause_details (void)
 {
 	TrackerMinerManager *manager;
@@ -313,14 +288,10 @@ miner_pause_details (void)
 			continue;
 		}
 
-		if (!miner_get_details (manager,
-		                        l->data,
-		                        NULL,
-		                        NULL,
-		                        &pause_applications,
-		                        &pause_reasons)) {
-			continue;
-		}
+		tracker_miner_manager_is_paused (manager,
+		                                 l->data,
+		                                 &pause_applications,
+		                                 &pause_reasons);
 
 		if (!(*pause_applications) || !(*pause_reasons)) {
 			g_strfreev (pause_applications);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]