[gnome-online-accounts] google: Do not support chat when telepathy is disabled



commit a0d5f61eeab5ea63608c18612ecf20e58d835dc7
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Wed Dec 23 20:03:38 2015 -0600

    google: Do not support chat when telepathy is disabled
    
    Since only Empathy uses this feature, and if the Telepathy provider is
    disabled, that means we really don't want to support Empathy. This is
    useful for downstreams that don't want to ship Empathy, and therefore
    don't want any chat configuration in the Online Accounts panel, or for
    Google contacts to show up when running Empathy.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759828

 src/goabackend/goagoogleprovider.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/goabackend/goagoogleprovider.c b/src/goabackend/goagoogleprovider.c
index f1cc078..81bdaab 100644
--- a/src/goabackend/goagoogleprovider.c
+++ b/src/goabackend/goagoogleprovider.c
@@ -89,7 +89,9 @@ get_provider_features (GoaProvider *provider)
          GOA_PROVIDER_FEATURE_MAIL |
          GOA_PROVIDER_FEATURE_CALENDAR |
          GOA_PROVIDER_FEATURE_CONTACTS |
+#ifdef GOA_TELEPATHY_ENABLED
          GOA_PROVIDER_FEATURE_CHAT |
+#endif
          GOA_PROVIDER_FEATURE_DOCUMENTS |
          GOA_PROVIDER_FEATURE_PHOTOS |
          GOA_PROVIDER_FEATURE_FILES |
@@ -148,8 +150,10 @@ get_scope (GoaOAuth2Provider *oauth2_provider)
          /* Google Cloud Print */
          "https://www.googleapis.com/auth/cloudprint "
 
+#ifdef GOA_TELEPATHY_ENABLED
          /* Google Talk */
          "https://www.googleapis.com/auth/googletalk "
+#endif
 
          /* Google Tasks - undocumented */
          "https://www.googleapis.com/auth/tasks";;
@@ -438,6 +442,7 @@ build_object (GoaProvider         *provider,
         goa_object_skeleton_set_contacts (object, NULL);
     }
 
+#ifdef GOA_TELEPATHY_ENABLED
   /* Chat */
   chat = goa_object_get_chat (GOA_OBJECT (object));
   chat_enabled = g_key_file_get_boolean (key_file, group, "ChatEnabled", NULL);
@@ -454,6 +459,9 @@ build_object (GoaProvider         *provider,
       if (chat != NULL)
         goa_object_skeleton_set_chat (object, NULL);
     }
+#else
+  goa_object_skeleton_set_chat (object, NULL);
+#endif
 
   /* Documents */
   documents = goa_object_get_documents (GOA_OBJECT (object));


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