[gnome-online-accounts/gnome-3-10] live: Remove chat support



commit 980fa6e0397119d5f57c5f8e307c4705cdb5da2e
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Apr 23 14:39:47 2014 +0200

    live: Remove chat support
    
    Microsoft has been planning to drop Windows Live Messenger in favour of
    Skype for quite some time now. The XMPP gateway that this provider used
    does not work anymore. However, you can continue using the proprietary
    MSN protocol by selecting "Others -> Windows Live (MSN)".
    
    Fixes: https://bugzilla.gnome.org/728787

 src/goabackend/goatelepathyfactory.c    |    7 +-----
 src/goabackend/goawindowsliveprovider.c |   38 +-----------------------------
 2 files changed, 3 insertions(+), 42 deletions(-)
---
diff --git a/src/goabackend/goatelepathyfactory.c b/src/goabackend/goatelepathyfactory.c
index 5f58800..9d2796d 100644
--- a/src/goabackend/goatelepathyfactory.c
+++ b/src/goabackend/goatelepathyfactory.c
@@ -69,7 +69,7 @@ get_protocols_cb (GObject      *source,
                   gpointer      user_data)
 {
   GSimpleAsyncResult *outer_result = user_data;
-  GQuark facebook_quark, google_talk_quark, msn_quark;
+  GQuark facebook_quark, google_talk_quark;
   GList *protocols = NULL;
   GList *ret;
   GList *l;
@@ -85,7 +85,6 @@ get_protocols_cb (GObject      *source,
 
   facebook_quark = g_quark_from_static_string ("facebook");
   google_talk_quark = g_quark_from_static_string ("google-talk");
-  msn_quark = g_quark_from_static_string ("msn");
 
   ret = NULL;
   for (l = protocols; l != NULL; l = l->next)
@@ -107,10 +106,6 @@ get_protocols_cb (GObject      *source,
       if (service_quark == google_talk_quark)
         continue;
 #endif
-#if GOA_WINDOWS_LIVE_ENABLED
-      if (protocol_quark == msn_quark)
-        continue;
-#endif
 
       provider = goa_telepathy_provider_new_from_protocol (protocol);
       ret = g_list_prepend (ret, provider);
diff --git a/src/goabackend/goawindowsliveprovider.c b/src/goabackend/goawindowsliveprovider.c
index 298af62..fe33078 100644
--- a/src/goabackend/goawindowsliveprovider.c
+++ b/src/goabackend/goawindowsliveprovider.c
@@ -95,7 +95,6 @@ get_provider_features (GoaProvider *_provider)
 {
   return GOA_PROVIDER_FEATURE_BRANDED |
          GOA_PROVIDER_FEATURE_MAIL |
-         GOA_PROVIDER_FEATURE_CHAT |
          GOA_PROVIDER_FEATURE_DOCUMENTS;
 }
 
@@ -122,8 +121,7 @@ get_redirect_uri (GoaOAuth2Provider *provider)
 static const gchar *
 get_scope (GoaOAuth2Provider *provider)
 {
-  return "wl.messenger,"
-         "wl.imap,"
+  return "wl.imap,"
          "wl.offline_access,"
          "wl.skydrive_update,"
          "wl.emails";
@@ -132,7 +130,7 @@ get_scope (GoaOAuth2Provider *provider)
 static guint
 get_credentials_generation (GoaProvider *provider)
 {
-  return 2;
+  return 3;
 }
 
 static const gchar *
@@ -314,10 +312,8 @@ build_object (GoaProvider         *provider,
 {
   GoaAccount *account;
   GoaMail *mail;
-  GoaChat *chat = NULL;
   GoaDocuments *documents;
   gboolean mail_enabled;
-  gboolean chat_enabled;
   gboolean documents_enabled;
   gboolean ret = FALSE;
   const gchar *email_address;
@@ -367,23 +363,6 @@ build_object (GoaProvider         *provider,
         goa_object_skeleton_set_mail (object, NULL);
     }
 
-  /* 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);
-    }
-
   /* Documents */
   documents = goa_object_get_documents (GOA_OBJECT (object));
   documents_enabled = g_key_file_get_boolean (key_file, group, "DocumentsEnabled", NULL);
@@ -405,7 +384,6 @@ build_object (GoaProvider         *provider,
   if (just_added)
     {
       goa_account_set_mail_disabled (account, !mail_enabled);
-      goa_account_set_chat_disabled (account, !chat_enabled);
       goa_account_set_documents_disabled (account, !documents_enabled);
 
       g_signal_connect (account,
@@ -413,10 +391,6 @@ build_object (GoaProvider         *provider,
                         G_CALLBACK (goa_util_account_notify_property_cb),
                         "MailEnabled");
       g_signal_connect (account,
-                        "notify::chat-disabled",
-                        G_CALLBACK (goa_util_account_notify_property_cb),
-                        "ChatEnabled");
-      g_signal_connect (account,
                         "notify::documents-disabled",
                         G_CALLBACK (goa_util_account_notify_property_cb),
                         "DocumentsEnabled");
@@ -425,8 +399,6 @@ build_object (GoaProvider         *provider,
   ret = TRUE;
 
  out:
-  if (chat != NULL)
-    g_object_unref (chat);
   g_clear_object (&mail);
   if (account != NULL)
     g_object_unref (account);
@@ -456,11 +428,6 @@ show_account (GoaProvider         *provider,
 
   goa_util_add_row_switch_from_keyfile_with_blurb (grid, row++, object,
                                                    NULL,
-                                                   "chat-disabled",
-                                                   _("C_hat"));
-
-  goa_util_add_row_switch_from_keyfile_with_blurb (grid, row++, object,
-                                                   NULL,
                                                    "documents-disabled",
                                                    _("_Documents"));
 }
@@ -472,7 +439,6 @@ add_account_key_values (GoaOAuth2Provider *provider,
                         GVariantBuilder   *builder)
 {
   g_variant_builder_add (builder, "{ss}", "MailEnabled", "true");
-  g_variant_builder_add (builder, "{ss}", "ChatEnabled", "true");
   g_variant_builder_add (builder, "{ss}", "DocumentsEnabled", "true");
 }
 


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