[tracker-miners/sam/umockdev: 664/665] libtracker-miner: Report status as 'Paused' when miner is paused




commit 66888ad6368cdb6761fd5021f6bd2d8101200080
Author: Sam Thursfield <sam afuera me uk>
Date:   Fri May 22 22:07:54 2020 +0200

    libtracker-miner: Report status as 'Paused' when miner is paused
    
    This is useful for testing, but also makes sense for the CLI.

 src/libtracker-miner/tracker-miner-object.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/libtracker-miner/tracker-miner-object.c b/src/libtracker-miner/tracker-miner-object.c
index 733b54f2a..bd99273e5 100644
--- a/src/libtracker-miner/tracker-miner-object.c
+++ b/src/libtracker-miner/tracker-miner-object.c
@@ -468,7 +468,11 @@ miner_get_property (GObject    *object,
 
        switch (prop_id) {
        case PROP_STATUS:
-               g_value_set_string (value, miner->priv->status);
+               if (tracker_miner_is_paused (miner)) {
+                       g_value_set_string (value, "Paused");
+               } else {
+                       g_value_set_string (value, miner->priv->status);
+               }
                break;
        case PROP_PROGRESS:
                g_value_set_double (value, miner->priv->progress);


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