[tracker/miner-fs-refactor: 22/74] libtracker-miner: Rename tracker_indexing_tree_get_effective_parent to get_root()
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-fs-refactor: 22/74] libtracker-miner: Rename tracker_indexing_tree_get_effective_parent to get_root()
- Date: Tue, 4 Oct 2011 10:52:18 +0000 (UTC)
commit 11f9a6068d3c5e46709f74423ce3a5202e4e47b3
Author: Carlos Garnacho <carlos lanedo com>
Date: Thu Sep 8 16:35:57 2011 +0200
libtracker-miner: Rename tracker_indexing_tree_get_effective_parent to get_root()
"Effective parent" is misleading since the same file could be returned, so talking
about "configured root directories" makes somewhat more sense.
.../libtracker-miner/libtracker-miner-sections.txt | 2 +-
src/libtracker-miner/tracker-indexing-tree.c | 12 +++++++-----
src/libtracker-miner/tracker-indexing-tree.h | 2 +-
3 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/docs/reference/libtracker-miner/libtracker-miner-sections.txt b/docs/reference/libtracker-miner/libtracker-miner-sections.txt
index 83fe4b1..619b949 100644
--- a/docs/reference/libtracker-miner/libtracker-miner-sections.txt
+++ b/docs/reference/libtracker-miner/libtracker-miner-sections.txt
@@ -213,7 +213,7 @@ tracker_indexing_tree_clear_filters
tracker_indexing_tree_file_matches_filter
tracker_indexing_tree_file_is_indexable
tracker_indexing_tree_parent_is_indexable
-tracker_indexing_tree_get_effective_parent
+tracker_indexing_tree_get_root
<SUBSECTION Standard>
TRACKER_INDEXING_TREE
TRACKER_IS_INDEXING_TREE
diff --git a/src/libtracker-miner/tracker-indexing-tree.c b/src/libtracker-miner/tracker-indexing-tree.c
index df62e2c..5f24fbc 100644
--- a/src/libtracker-miner/tracker-indexing-tree.c
+++ b/src/libtracker-miner/tracker-indexing-tree.c
@@ -681,7 +681,7 @@ tracker_indexing_tree_set_filter_hidden (TrackerIndexingTree *tree,
}
/**
- * tracker_indexing_tree_get_effective_parent:
+ * tracker_indexing_tree_get_root:
* @tree: a #TrackerIndexingtree
* @file: a #GFile
* @directory_flags: (out): return location for the applying #TrackerDirectoryFlags
@@ -695,9 +695,9 @@ tracker_indexing_tree_set_filter_hidden (TrackerIndexingTree *tree,
* Returns: (transfer none): the effective parent in @tree, or %NULL
**/
GFile *
-tracker_indexing_tree_get_effective_parent (TrackerIndexingTree *tree,
- GFile *file,
- TrackerDirectoryFlags *directory_flags)
+tracker_indexing_tree_get_root (TrackerIndexingTree *tree,
+ GFile *file,
+ TrackerDirectoryFlags *directory_flags)
{
TrackerIndexingTreePrivate *priv;
NodeData *data;
@@ -716,7 +716,9 @@ tracker_indexing_tree_get_effective_parent (TrackerIndexingTree *tree,
data = parent->data;
if (!data->shallow &&
- g_file_has_prefix (file, data->file)) {
+ (file == data->file ||
+ g_file_equal (file, data->file) ||
+ g_file_has_prefix (file, data->file))) {
if (directory_flags) {
*directory_flags = data->flags;
}
diff --git a/src/libtracker-miner/tracker-indexing-tree.h b/src/libtracker-miner/tracker-indexing-tree.h
index 9a90cee..9465a75 100644
--- a/src/libtracker-miner/tracker-indexing-tree.h
+++ b/src/libtracker-miner/tracker-indexing-tree.h
@@ -87,7 +87,7 @@ gboolean tracker_indexing_tree_get_filter_hidden (TrackerIndexingTree *tree
void tracker_indexing_tree_set_filter_hidden (TrackerIndexingTree *tree,
gboolean filter_hidden);
-GFile * tracker_indexing_tree_get_effective_parent (TrackerIndexingTree *tree,
+GFile * tracker_indexing_tree_get_root (TrackerIndexingTree *tree,
GFile *file,
TrackerDirectoryFlags *directory_flags);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]