[nautilus] search-directory-file: use API to access file directory objects
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] search-directory-file: use API to access file directory objects
- Date: Fri, 1 Dec 2017 11:59:28 +0000 (UTC)
commit 7ba0a40d67593af1d9b0b40d7948ef56dd0f19cc
Author: Ernestas Kulik <ernestask gnome org>
Date: Fri Aug 25 17:39:23 2017 +0300
search-directory-file: use API to access file directory objects
https://bugzilla.gnome.org/show_bug.cgi?id=786760
src/nautilus-search-directory-file.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/src/nautilus-search-directory-file.c b/src/nautilus-search-directory-file.c
index ffeffe08a..7f517843c 100644
--- a/src/nautilus-search-directory-file.c
+++ b/src/nautilus-search-directory-file.c
@@ -99,7 +99,10 @@ search_directory_file_get_item_count (NautilusFile *file,
if (count)
{
- file_list = nautilus_directory_get_file_list (file->details->directory);
+ NautilusDirectory *directory;
+
+ directory = nautilus_file_get_directory (file);
+ file_list = nautilus_directory_get_file_list (directory);
*count = g_list_length (file_list);
@@ -116,12 +119,14 @@ search_directory_file_get_deep_counts (NautilusFile *file,
guint *unreadable_directory_count,
goffset *total_size)
{
+ NautilusDirectory *directory;
NautilusFile *dir_file;
GList *file_list, *l;
guint dirs, files;
GFileType type;
- file_list = nautilus_directory_get_file_list (file->details->directory);
+ directory = nautilus_file_get_directory (file);
+ file_list = nautilus_directory_get_file_list (directory);
dirs = files = 0;
for (l = file_list; l != NULL; l = l->next)
@@ -197,6 +202,7 @@ void
nautilus_search_directory_file_update_display_name (NautilusSearchDirectoryFile *search_file)
{
NautilusFile *file;
+ NautilusDirectory *directory;
NautilusSearchDirectory *search_dir;
NautilusQuery *query;
char *display_name;
@@ -205,9 +211,10 @@ nautilus_search_directory_file_update_display_name (NautilusSearchDirectoryFile
display_name = NULL;
file = NAUTILUS_FILE (search_file);
- if (file->details->directory)
+ directory = nautilus_file_get_directory (file);
+ if (directory != NULL)
{
- search_dir = NAUTILUS_SEARCH_DIRECTORY (file->details->directory);
+ search_dir = NAUTILUS_SEARCH_DIRECTORY (directory);
query = nautilus_search_directory_get_query (search_dir);
if (query != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]