[grilo-plugins/wip/carlosg/tracker3: 10/48] tracker3: Drop dead nie:dataSource tracking code




commit fbf7e700f8275c241c13bb67dc39df5c95c12079
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue May 19 18:30:32 2020 +0200

    tracker3: Drop dead nie:dataSource tracking code
    
    This got unused long ago, it seems these functions can just go.

 src/tracker3/grl-tracker-utils.c | 66 ----------------------------------------
 src/tracker3/grl-tracker-utils.h |  5 ---
 2 files changed, 71 deletions(-)
---
diff --git a/src/tracker3/grl-tracker-utils.c b/src/tracker3/grl-tracker-utils.c
index 79bbb39c..6b5c7980 100644
--- a/src/tracker3/grl-tracker-utils.c
+++ b/src/tracker3/grl-tracker-utils.c
@@ -800,72 +800,6 @@ grl_tracker_build_grilo_media (const gchar   *rdf_type,
 
 /**/
 
-static gchar *
-get_tracker_volume_name (const gchar *uri,
-                        const gchar *datasource)
-{
-  gchar *source_name = NULL;
-  GVolumeMonitor *volume_monitor;
-  GList *mounts, *mount;
-  GFile *file;
-
-  if (uri != NULL && *uri != '\0') {
-    volume_monitor = g_volume_monitor_get ();
-    mounts = g_volume_monitor_get_mounts (volume_monitor);
-    file = g_file_new_for_uri (uri);
-
-    mount = mounts;
-    while (mount != NULL) {
-      GFile *m_file = g_mount_get_root (G_MOUNT (mount->data));
-
-      if (g_file_equal (m_file, file)) {
-        gchar *m_name = g_mount_get_name (G_MOUNT (mount->data));
-        g_object_unref (G_OBJECT (m_file));
-        source_name = g_strdup_printf (_("Removable — %s"), m_name);
-        g_free (m_name);
-        break;
-      }
-      g_object_unref (G_OBJECT (m_file));
-
-      mount = mount->next;
-    }
-    g_list_free_full (mounts, g_object_unref);
-    g_object_unref (G_OBJECT (file));
-    g_object_unref (G_OBJECT (volume_monitor));
-  } else {
-    source_name = g_strdup (_("Local files"));
-  }
-
-  return source_name;
-}
-
-gchar *
-grl_tracker_get_source_name (const gchar *rdf_type,
-                             const gchar *uri,
-                             const gchar *datasource,
-                             const gchar *datasource_name)
-{
-  gchar *source_name = NULL;
-  gchar **rdf_single_type;
-  gint i;
-
-  /* As rdf_type can be formed by several types, split them */
-  rdf_single_type = g_strsplit (rdf_type, ",", -1);
-  i = g_strv_length (rdf_single_type) - 1;
-
-  while (i >= 0) {
-    if (g_str_has_suffix (rdf_single_type[i], RDF_TYPE_VOLUME)) {
-      source_name = get_tracker_volume_name (uri, datasource);
-      break;
-    }
-    i--;
-  }
-
-  g_strfreev (rdf_single_type);
-
-  return source_name;
-}
-
 const GList *
 grl_tracker_supported_keys (GrlSource *source)
 {
diff --git a/src/tracker3/grl-tracker-utils.h b/src/tracker3/grl-tracker-utils.h
index bf6c0ef5..35ef0939 100644
--- a/src/tracker3/grl-tracker-utils.h
+++ b/src/tracker3/grl-tracker-utils.h
@@ -87,9 +87,4 @@ gchar *grl_tracker_get_delete_string (const GList *keys);
 gchar *grl_tracker_get_delete_conditional_string (const gchar *urn,
                                                   const GList *keys);
 
-gchar *grl_tracker_get_source_name (const gchar *rdf_type,
-                                    const gchar *uri,
-                                    const gchar *datasource,
-                                    const gchar *datasource_name);
-
 #endif /* _GRL_TRACKER_UTILS_H_ */


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