[gnome-documents] books: Disable online accounts for now



commit 0c68c18c85957fd3409829a211f37cd35a19c1e7
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Dec 16 12:45:23 2014 +0100

    books: Disable online accounts for now
    
    Until we can figure out which of the providers could be populating
    our view with ePubs or comics, just disable online accounts.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=740974

 src/application.js |   12 +++++++-----
 src/search.js      |   11 +++++++----
 2 files changed, 14 insertions(+), 9 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index 58ea20d..2ca4cc1 100644
--- a/src/application.js
+++ b/src/application.js
@@ -466,11 +466,13 @@ const Application = new Lang.Class({
             return;
         }
 
-        try {
-            goaClient = Goa.Client.new_sync(null);
-        } catch (e) {
-            log('Unable to create the GOA client: ' + e.toString());
-            return;
+        if (!application.isBooks) {
+            try {
+                goaClient = Goa.Client.new_sync(null);
+            } catch (e) {
+                log('Unable to create the GOA client: ' + e.toString());
+                return;
+            }
         }
 
         connectionQueue = new TrackerController.TrackerConnectionQueue();
diff --git a/src/search.js b/src/search.js
index bb93efc..1462ca9 100644
--- a/src/search.js
+++ b/src/search.js
@@ -453,11 +453,14 @@ const SourceManager = new Lang.Class({
                               builtin: true });
         this.addItem(source);
 
-        Application.goaClient.connect('account-added', Lang.bind(this, this._refreshGoaAccounts));
-        Application.goaClient.connect('account-changed', Lang.bind(this, this._refreshGoaAccounts));
-        Application.goaClient.connect('account-removed', Lang.bind(this, this._refreshGoaAccounts));
+        if (!Application.application.isBooks) {
+            Application.goaClient.connect('account-added', Lang.bind(this, this._refreshGoaAccounts));
+            Application.goaClient.connect('account-changed', Lang.bind(this, this._refreshGoaAccounts));
+            Application.goaClient.connect('account-removed', Lang.bind(this, this._refreshGoaAccounts));
+
+            this._refreshGoaAccounts();
+        }
 
-        this._refreshGoaAccounts();
         this.setActiveItemById(SearchSourceStock.ALL);
     },
 


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