[gnome-online-miners] Use Files GOA feature for document miners



commit 1524fa1867d72ff974ba06a80ecfa60f10598d43
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Aug 6 12:29:18 2019 +0200

    Use Files GOA feature for document miners
    
    GOA disabled the Documents provider feature, so use the Files one
    when a documents miner is requested, instead.
    
    https://gitlab.gnome.org/GNOME/gnome-documents/issues/34

 src/gom-gdata-miner.c |  2 +-
 src/gom-miner.c       | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/gom-gdata-miner.c b/src/gom-gdata-miner.c
index 1236741..7872431 100644
--- a/src/gom-gdata-miner.c
+++ b/src/gom-gdata-miner.c
@@ -1091,7 +1091,7 @@ create_services (GomMiner *self,
 
   authorizer = gdata_goa_authorizer_new (object);
 
-  if (gom_miner_supports_type (self, "documents") && goa_object_peek_documents (object) != NULL)
+  if (gom_miner_supports_type (self, "documents") && goa_object_peek_files (object) != NULL)
     {
       GDataDocumentsService *service;
 
diff --git a/src/gom-miner.c b/src/gom-miner.c
index 9fb81a6..7147b33 100644
--- a/src/gom-miner.c
+++ b/src/gom-miner.c
@@ -701,7 +701,7 @@ gom_miner_cleanup_old_accounts (GomMiner *self,
 static void
 gom_miner_refresh_db_real (GomMiner *self, GTask *task)
 {
-  GoaDocuments *documents;
+  GoaFiles *files;
   GoaPhotos *photos;
   GoaAccount *account;
   GoaObject *object;
@@ -729,13 +729,13 @@ gom_miner_refresh_db_real (GomMiner *self, GTask *task)
       acc_objects = g_list_append (acc_objects, g_object_ref (object));
       skip_photos = skip_documents = TRUE;
 
-      documents = goa_object_peek_documents (object);
+      files = goa_object_peek_files (object);
       photos = goa_object_peek_photos (object);
 
       if (gom_miner_supports_type (self, "photos") && photos != NULL)
         skip_photos = FALSE;
 
-      if (gom_miner_supports_type (self, "documents") && documents != NULL)
+      if (gom_miner_supports_type (self, "documents") && files != NULL)
         skip_documents = FALSE;
 
       if (skip_photos && skip_documents)
@@ -812,7 +812,7 @@ gom_miner_insert_shared_content_async (GomMiner *self,
                                        gpointer user_data)
 {
   GTask *task = NULL;
-  GoaDocuments *documents;
+  GoaFiles *files;
   GoaObject *object = NULL;
   GoaPhotos *photos;
   InsertSharedContentData *data;
@@ -840,10 +840,10 @@ gom_miner_insert_shared_content_async (GomMiner *self,
       goto out;
     }
 
-  documents = goa_object_peek_documents (object);
+  files = goa_object_peek_files (object);
   photos = goa_object_peek_photos (object);
 
-  if (g_strcmp0 (shared_type, "documents") == 0 && documents == NULL)
+  if (g_strcmp0 (shared_type, "documents") == 0 && files == NULL)
     {
       /* throw error */
       goto out;


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