[tracker/wip/carlosg/domain-ontologies: 72/76] libtracker-control: Skip miners not meant to be loaded.



commit a9ea0bc93630008c62ee1360487900642d625e86
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Jun 22 13:15:57 2017 +0200

    libtracker-control: Skip miners not meant to be loaded.
    
    This will make the miners not specified in the domain ontology
    description file invisible from the API user perspective.

 src/libtracker-control/tracker-miner-manager.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-control/tracker-miner-manager.c b/src/libtracker-control/tracker-miner-manager.c
index aaee3d0..d588985 100644
--- a/src/libtracker-control/tracker-miner-manager.c
+++ b/src/libtracker-control/tracker-miner-manager.c
@@ -754,6 +754,15 @@ check_file (GFile    *file,
                return;
        }
 
+       if (!tracker_domain_ontology_uses_miner (priv->domain_ontology, name_suffix)) {
+               /* Silently ignore, this domain ontology is not meant to use this miner */
+               g_key_file_free (key_file);
+               g_free (dbus_path);
+               g_free (display_name);
+               g_free (name_suffix);
+               return;
+       }
+
        description = g_key_file_get_locale_string (key_file, DESKTOP_ENTRY_GROUP, DESCRIPTION_KEY, NULL, 
NULL);
 
        data = g_slice_new0 (MinerData);


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