[gnome-online-accounts/gnome-3-14] facebook: Remove chat support
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/gnome-3-14] facebook: Remove chat support
- Date: Mon, 23 Mar 2015 12:44:22 +0000 (UTC)
commit 54e34a956f1f8d4c84212a693a1c2ca08a1ec56c
Author: Debarshi Ray <debarshir gnome org>
Date: Mon Feb 23 12:18:32 2015 +0100
facebook: Remove chat support
Facebook has dropped support for XMPP in version 2.0 of the Graph API.
There is no known alternative for this.
https://bugzilla.gnome.org/show_bug.cgi?id=745004
src/goabackend/goafacebookprovider.c | 41 +---------------------------------
src/goabackend/goatelepathyfactory.c | 15 +++++-------
2 files changed, 7 insertions(+), 49 deletions(-)
---
diff --git a/src/goabackend/goafacebookprovider.c b/src/goabackend/goafacebookprovider.c
index 9aad262..5ecdae1 100644
--- a/src/goabackend/goafacebookprovider.c
+++ b/src/goabackend/goafacebookprovider.c
@@ -86,7 +86,6 @@ static GoaProviderFeatures
get_provider_features (GoaProvider *_provider)
{
return GOA_PROVIDER_FEATURE_BRANDED |
- GOA_PROVIDER_FEATURE_CHAT |
GOA_PROVIDER_FEATURE_PHOTOS |
GOA_PROVIDER_FEATURE_MAPS;
}
@@ -135,7 +134,6 @@ get_scope (GoaOAuth2Provider *provider)
return
"user_events,"
"read_mailbox,"
- "xmpp_login,"
"email,"
"user_photos,"
"user_status,"
@@ -145,7 +143,7 @@ get_scope (GoaOAuth2Provider *provider)
static guint
get_credentials_generation (GoaProvider *provider)
{
- return 2;
+ return 3;
}
static const gchar *
@@ -330,10 +328,8 @@ build_object (GoaProvider *provider,
GError **error)
{
GoaAccount *account;
- GoaChat *chat = NULL;
GoaPhotos *photos = NULL;
GoaMaps *maps = NULL;
- gboolean chat_enabled;
gboolean photos_enabled;
gboolean maps_enabled;
gboolean ret = FALSE;
@@ -352,32 +348,6 @@ build_object (GoaProvider *provider,
account = goa_object_get_account (GOA_OBJECT (object));
- /* Chat */
- chat = goa_object_get_chat (GOA_OBJECT (object));
- chat_enabled = g_key_file_get_boolean (key_file, group, "ChatEnabled", NULL);
- if (chat_enabled)
- {
- if (chat == NULL)
- {
- chat = goa_chat_skeleton_new ();
- goa_object_skeleton_set_chat (object, chat);
- }
- }
- else
- {
- if (chat != NULL)
- goa_object_skeleton_set_chat (object, NULL);
- }
-
- if (just_added)
- {
- goa_account_set_chat_disabled (account, !chat_enabled);
- g_signal_connect (account,
- "notify::chat-disabled",
- G_CALLBACK (goa_util_account_notify_property_cb),
- "ChatEnabled");
- }
-
/* Photos */
photos = goa_object_get_photos (GOA_OBJECT (object));
photos_enabled = g_key_file_get_boolean (key_file, group, "PhotosEnabled", NULL);
@@ -436,7 +406,6 @@ build_object (GoaProvider *provider,
ret = TRUE;
out:
- g_clear_object (&chat);
g_clear_object (&account);
g_clear_object (&photos);
g_clear_object (&maps);
@@ -460,13 +429,6 @@ show_account (GoaProvider *provider,
goa_util_add_account_info (grid, row++, object);
goa_util_add_row_switch_from_keyfile_with_blurb (grid, row++, object,
- /* Translators: This is a label for a series of
- * options switches. For example: “Use for Mail”. */
- _("Use for"),
- "chat-disabled",
- _("C_hat"));
-
- goa_util_add_row_switch_from_keyfile_with_blurb (grid, row++, object,
NULL,
"photos-disabled",
_("_Photos"));
@@ -478,7 +440,6 @@ static void
add_account_key_values (GoaOAuth2Provider *provider,
GVariantBuilder *builder)
{
- g_variant_builder_add (builder, "{ss}", "ChatEnabled", "true");
g_variant_builder_add (builder, "{ss}", "PhotosEnabled", "true");
g_variant_builder_add (builder, "{ss}", "MapsEnabled", "true");
}
diff --git a/src/goabackend/goatelepathyfactory.c b/src/goabackend/goatelepathyfactory.c
index d59fd53..ef5f92c 100644
--- a/src/goabackend/goatelepathyfactory.c
+++ b/src/goabackend/goatelepathyfactory.c
@@ -72,10 +72,8 @@ get_protocols_cb (GObject *source,
GList *ret;
GList *l;
GError *error = NULL;
-
-#if GOA_FACEBOOK_ENABLED
GQuark facebook_quark;
-#endif
+
#if GOA_GOOGLE_ENABLED
GQuark google_talk_quark;
#endif
@@ -88,9 +86,8 @@ get_protocols_cb (GObject *source,
return;
}
-#if GOA_FACEBOOK_ENABLED
facebook_quark = g_quark_from_static_string ("facebook");
-#endif
+
#if GOA_GOOGLE_ENABLED
google_talk_quark = g_quark_from_static_string ("google-talk");
#endif
@@ -103,12 +100,12 @@ get_protocols_cb (GObject *source,
GQuark service_quark = g_quark_try_string (service_name);
GoaTelepathyProvider *provider;
- /* If the service is handled natively by GOA, so we don't allow
- * the creation of a Telepathy-only account. */
-#if GOA_FACEBOOK_ENABLED
+ /* This service does not exist anymore, so skip it. */
if (service_quark == facebook_quark)
continue;
-#endif
+
+ /* If the service is handled natively by GOA, so we don't allow
+ * the creation of a Telepathy-only account. */
#if GOA_GOOGLE_ENABLED
if (service_quark == google_talk_quark)
continue;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]