[gnome-online-accounts] Remove Telepathy support



commit d44f89f8b9891593ff0fe1b428e1a1253a4667af
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Apr 17 10:27:52 2018 +0200

    Remove Telepathy support
    
    The Empathy / Telepathy stack is no longer as strongly maintained as
    it used to be, and the consensus in GNOME is to deprecate it.
    Moreover, the Telepathy integration in GOA doesn't actually buy the
    user any benefits. The original plan was to disable Empathy's own
    account management UI (ie. empathy-accounts), but that never happened.
    So, we ended up with two UIs, which at times had slightly divergent
    behaviour - Microsoft account added via OAuth2 / XMPP versus raw
    passwords / legacy pre-XMPP protocol.
    
    These days we have Polari, which also has its own accounts UI, which
    is in keeping with its status as a non-core application.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=795322

 .gitmodules                             |    3 -
 Makefile.am                             |   12 +-
 autogen.sh                              |    6 -
 configure.ac                            |   40 --
 po/POTFILES.in                          |    1 -
 po/POTFILES.skip                        |    2 -
 src/goabackend/Makefile.am              |    8 -
 src/goabackend/goagoogleprovider.c      |   19 -
 src/goabackend/goaobjectskeletonutils.c |   28 -
 src/goabackend/goaobjectskeletonutils.h |    3 -
 src/goabackend/goaprovider.c            |    4 -
 src/goabackend/goatelepathyfactory.c    |  151 ----
 src/goabackend/goatelepathyfactory.h    |   55 --
 src/goabackend/goatelepathyprovider.c   | 1137 -------------------------------
 src/goabackend/goatelepathyprovider.h   |   45 --
 src/goabackend/goatpaccountlinker.c     |  669 ------------------
 src/goabackend/goatpaccountlinker.h     |   64 --
 src/goabackend/goautils.c               |   40 --
 src/goabackend/goautils.h               |    2 -
 telepathy-account-widgets               |    1 -
 20 files changed, 2 insertions(+), 2288 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 6e3abc9..fad8631 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,15 +1,7 @@
 
 NULL =
 
-SUBDIRS = data
-
-if BUILD_BACKEND
-if BUILD_TELEPATHY
-SUBDIRS += telepathy-account-widgets
-endif
-endif
-
-SUBDIRS += src
+SUBDIRS = data src
 
 if BUILD_BACKEND
 SUBDIRS += doc
@@ -19,7 +11,7 @@ SUBDIRS += po
 
 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 
-DISTCHECK_CONFIGURE_FLAGS=--enable-introspection --enable-gtk-doc --enable-telepathy
+DISTCHECK_CONFIGURE_FLAGS=--enable-introspection --enable-gtk-doc
 
 MAINTAINERCLEANFILES = \
        $(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
diff --git a/autogen.sh b/autogen.sh
index 55bd198..e209906 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -22,12 +22,6 @@ if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
        echo "" >&2
 fi
 
-git submodule update --init --recursive || exit 1
-
-cd $srcdir/telepathy-account-widgets
-NOCONFIGURE=1 sh autogen.sh
-cd ..
-
 aclocal --install || exit 1
 gtkdocize --copy || exit 1
 autoreconf --verbose --force --install || exit 1
diff --git a/configure.ac b/configure.ac
index 2574c27..456ab67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,18 +98,6 @@ GOBJECT_INTROSPECTION_CHECK([0.6.2])
 
 VAPIGEN_CHECK()
 
-# Telepathy
-AC_DEFINE(GOA_TELEPATHY_NAME, ["telepathy"], [ProviderType and extension point name])
-AC_ARG_ENABLE([telepathy],
-              [AS_HELP_STRING([--enable-telepathy],
-              [Enable Telepathy IM provider])],
-              [],
-              [enable_telepathy=no])
-if test "$enable_telepathy" != "no"; then
-  AC_DEFINE(GOA_TELEPATHY_ENABLED, 1, [Enable Telepathy data provider])
-fi
-AM_CONDITIONAL(BUILD_TELEPATHY, [test x$enable_telepathy != xno])
-
 AC_ARG_ENABLE([backend],
               [AS_HELP_STRING([--enable-backend],
               [Enable goabackend library])],
@@ -147,33 +135,6 @@ if test "$enable_backend" != "no"; then
   PKG_CHECK_MODULES(LIBXML, [libxml-2.0])
   AC_SUBST(LIBXML_CFLAGS)
   AC_SUBST(LIBXML_LIBS)
-
-  if test "$enable_telepathy" != "no"; then
-    PKG_CHECK_MODULES(TP, [telepathy-glib])
-    AC_SUBST(TP_CFLAGS)
-    AC_SUBST(TP_LIBS)
-
-    # telepathy-account-widgets
-    prev_top_build_prefix=$ac_top_build_prefix
-    prev_ac_configure_args=$ac_configure_args
-    ac_configure_args="$ac_configure_args --with-cheese=no --disable-gudev 
--enable-ubuntu-online-accounts=no"
-    # install the data together with the rest of GOA's data
-    ac_configure_args="$ac_configure_args --with-pkgdatadir=${datadir}/gnome-online-accounts"
-    # GOA ships its icons directly in ${datadir}/icons (usually /usr/share/icons/) and not
-    # in its own data directory
-    ac_configure_args="$ac_configure_args --with-icondir=${datadir}/icons"
-    # Change the name of tpaw's .mo files to avoid conflicts with other packages using tp-aw
-    ac_configure_args="$ac_configure_args --with-gettext-package=gnome-online-accounts-tpaw"
-    # Disable the installation of the GSettings schema to avoid multiple components shipping
-    # the same file. See https://bugzilla.gnome.org/show_bug.cgi?id=706803
-    ac_configure_args="$ac_configure_args --disable-schemas-compile --disable-settings"
-    AX_CONFIG_DIR([telepathy-account-widgets])
-    ac_top_build_prefix=$prev_top_build_prefix
-    ac_configure_args=$prev_ac_configure_args
-
-    export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"$ac_top_build_prefix"telepathy-account-widgets/
-    PKG_CHECK_MODULES(TPAW, telepathy-account-widgets)
-  fi
 fi
 
 AC_ARG_ENABLE([inspector],
@@ -612,7 +573,6 @@ echo "
        Facebook provider:              ${enable_facebook} (OAuth 2.0, id:${with_facebook_client_id})
        Todoist provider:               ${enable_todoist} (OAuth 2.0, id:${with_todoist_client_id} 
secret:${with_todoist_client_secret})
        Windows Live provider:          ${enable_windows_live} (OAuth 2.0, id:${with_windows_live_client_id})
-        Telepathy provider:             ${enable_telepathy}
         Pocket provider:                ${enable_pocket} (id:${with_pocket_client_id})
        Last.fm provider:               ${enable_lastfm} (id:${with_lastfm_client_id} 
secret:${with_lastfm_client_secret})
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index b65650c..8139479 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -19,7 +19,6 @@ src/goabackend/goaowncloudprovider.c
 src/goabackend/goapocketprovider.c
 src/goabackend/goaprovider.c
 src/goabackend/goasmtpauth.c
-src/goabackend/goatelepathyprovider.c
 src/goabackend/goatodoistprovider.c
 src/goabackend/goautils.c
 src/goabackend/goawebview.c
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 2638b4d..2053be6 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,5 +1,3 @@
 # List of files where to skip translations.
 # Please keep this file sorted alphabetically.
 data/goa-daemon.desktop.in
-
-telepathy-account-widgets
diff --git a/src/goabackend/Makefile.am b/src/goabackend/Makefile.am
index c254594..2c9e5cc 100644
--- a/src/goabackend/Makefile.am
+++ b/src/goabackend/Makefile.am
@@ -110,14 +110,6 @@ libgoa_backend_1_0_la_SOURCES +=                                   \
        goakerberosprovider.h           goakerberosprovider.c
 endif
 
-if BUILD_TELEPATHY
-libgoa_backend_1_0_la_SOURCES +=                                       \
-       goatelepathyfactory.h           goatelepathyfactory.c           \
-       goatelepathyprovider.h          goatelepathyprovider.c          \
-       goatpaccountlinker.h            goatpaccountlinker.c            \
-       $(NULL)
-endif
-
 libgoa_backend_1_0_la_CFLAGS =                                 \
        $(WEBKIT_GTK_CFLAGS)                                    \
        $(JSON_GLIB_CFLAGS)                                     \
diff --git a/src/goabackend/goagoogleprovider.c b/src/goabackend/goagoogleprovider.c
index e27c6d2..cc9a8f8 100644
--- a/src/goabackend/goagoogleprovider.c
+++ b/src/goabackend/goagoogleprovider.c
@@ -69,9 +69,6 @@ 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 |
@@ -130,11 +127,6 @@ 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";;
 }
@@ -288,7 +280,6 @@ build_object (GoaProvider         *provider,
   gboolean mail_enabled;
   gboolean calendar_enabled;
   gboolean contacts_enabled;
-  gboolean chat_enabled;
   gboolean documents_enabled;
   gboolean files_enabled;
   gboolean photos_enabled;
@@ -352,10 +343,6 @@ build_object (GoaProvider         *provider,
                                        contacts_enabled,
                                        FALSE);
 
-  /* Chat */
-  chat_enabled = g_key_file_get_boolean (key_file, group, "ChatEnabled", NULL);
-  goa_object_skeleton_attach_chat (object, chat_enabled);
-
   /* Documents */
   documents_enabled = g_key_file_get_boolean (key_file, group, "DocumentsEnabled", NULL);
   goa_object_skeleton_attach_documents (object, documents_enabled);
@@ -379,7 +366,6 @@ build_object (GoaProvider         *provider,
       goa_account_set_mail_disabled (account, !mail_enabled);
       goa_account_set_calendar_disabled (account, !calendar_enabled);
       goa_account_set_contacts_disabled (account, !contacts_enabled);
-      goa_account_set_chat_disabled (account, !chat_enabled);
       goa_account_set_documents_disabled (account, !documents_enabled);
       goa_account_set_photos_disabled (account, !photos_enabled);
       goa_account_set_files_disabled (account, !files_enabled);
@@ -398,10 +384,6 @@ build_object (GoaProvider         *provider,
                         G_CALLBACK (goa_util_account_notify_property_cb),
                         (gpointer) "ContactsEnabled");
       g_signal_connect (account,
-                        "notify::chat-disabled",
-                        G_CALLBACK (goa_util_account_notify_property_cb),
-                        (gpointer) "ChatEnabled");
-      g_signal_connect (account,
                         "notify::documents-disabled",
                         G_CALLBACK (goa_util_account_notify_property_cb),
                         (gpointer) "DocumentsEnabled");
@@ -436,7 +418,6 @@ add_account_key_values (GoaOAuth2Provider  *oauth2_provider,
   g_variant_builder_add (builder, "{ss}", "MailEnabled", "true");
   g_variant_builder_add (builder, "{ss}", "CalendarEnabled", "true");
   g_variant_builder_add (builder, "{ss}", "ContactsEnabled", "true");
-  g_variant_builder_add (builder, "{ss}", "ChatEnabled", "true");
   g_variant_builder_add (builder, "{ss}", "DocumentsEnabled", "true");
   g_variant_builder_add (builder, "{ss}", "PhotosEnabled", "true");
   g_variant_builder_add (builder, "{ss}", "FilesEnabled", "true");
diff --git a/src/goabackend/goaobjectskeletonutils.c b/src/goabackend/goaobjectskeletonutils.c
index 6004441..8737be2 100644
--- a/src/goabackend/goaobjectskeletonutils.c
+++ b/src/goabackend/goaobjectskeletonutils.c
@@ -133,34 +133,6 @@ goa_object_skeleton_attach_documents (GoaObjectSkeleton *object,
 }
 
 void
-goa_object_skeleton_attach_chat (GoaObjectSkeleton *object,
-                                 gboolean           chat_enabled)
-{
-#ifdef GOA_TELEPATHY_ENABLED
-  GoaChat *chat;
-
-  chat = goa_object_get_chat (GOA_OBJECT (object));
-  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);
-    }
-  g_clear_object (&chat);
-#else
-  g_debug("Compiled without Telepathy support, chat is disabled");
-  goa_object_skeleton_set_chat (object, NULL);
-#endif
-}
-
-void
 goa_object_skeleton_attach_photos (GoaObjectSkeleton *object,
                                    gboolean           photos_enabled)
 {
diff --git a/src/goabackend/goaobjectskeletonutils.h b/src/goabackend/goaobjectskeletonutils.h
index 2ea2ce9..124d12b 100644
--- a/src/goabackend/goaobjectskeletonutils.h
+++ b/src/goabackend/goaobjectskeletonutils.h
@@ -33,9 +33,6 @@ void             goa_object_skeleton_attach_calendar       (GoaObjectSkeleton *o
                                                             gboolean           calendar_enabled,
                                                             gboolean           accept_ssl_errors);
 
-void             goa_object_skeleton_attach_chat           (GoaObjectSkeleton *object,
-                                                            gboolean           chat_enabled);
-
 void             goa_object_skeleton_attach_contacts       (GoaObjectSkeleton *object,
                                                             const gchar       *uri,
                                                             gboolean           contacts_enabled,
diff --git a/src/goabackend/goaprovider.c b/src/goabackend/goaprovider.c
index c8f7f0d..4a79c28 100644
--- a/src/goabackend/goaprovider.c
+++ b/src/goabackend/goaprovider.c
@@ -31,7 +31,6 @@
 #include "goaflickrprovider.h"
 #include "goafoursquareprovider.h"
 #include "goawindowsliveprovider.h"
-#include "goatelepathyfactory.h"
 #include "goapocketprovider.h"
 #include "goamediaserverprovider.h"
 #include "goalastfmprovider.h"
@@ -995,9 +994,6 @@ static struct
 #ifdef GOA_MEDIA_SERVER_ENABLED
   { GOA_MEDIA_SERVER_NAME, goa_media_server_provider_get_type },
 #endif
-#ifdef GOA_TELEPATHY_ENABLED
-  { GOA_TELEPATHY_NAME, goa_telepathy_factory_get_type },
-#endif
   { NULL, NULL }
 };
 
diff --git a/src/goabackend/goautils.c b/src/goabackend/goautils.c
index 9b00449..8c01d10 100644
--- a/src/goabackend/goautils.c
+++ b/src/goabackend/goautils.c
@@ -21,10 +21,6 @@
 #include <glib/gi18n-lib.h>
 #include <libsecret/secret.h>
 
-#ifdef GOA_TELEPATHY_ENABLED
-#include <telepathy-glib/telepathy-glib.h>
-#endif
-
 #include "goautils.h"
 
 static const SecretSchema secret_password_schema =
@@ -199,42 +195,6 @@ goa_utils_account_add_header (GoaObject *object, GtkGrid *grid, gint row)
   gtk_grid_attach (grid, label, 1, row, 3, 1);
 }
 
-void
-goa_utils_initialize_client_factory (void)
-{
-  static gsize once_init_value = 0;
-
-  if (g_once_init_enter (&once_init_value))
-    {
-#ifdef GOA_TELEPATHY_ENABLED
-      TpSimpleClientFactory *factory;
-      TpAccountManager *account_manager;
-      GQuark account_features[] = {TP_ACCOUNT_FEATURE_ADDRESSING,
-                                   TP_ACCOUNT_FEATURE_STORAGE,
-                                   TP_ACCOUNT_FEATURE_CONNECTION,
-                                   0};
-      GQuark connection_features[] = {TP_CONNECTION_FEATURE_AVATAR_REQUIREMENTS,
-                                      TP_CONNECTION_FEATURE_CONTACT_INFO,
-                                      0};
-
-      /* We make sure that new instances of Telepathy objects will have all
-       * the features we need.
-       */
-      factory = tp_simple_client_factory_new (NULL);
-      tp_simple_client_factory_add_account_features (factory, account_features);
-      tp_simple_client_factory_add_connection_features (factory, connection_features);
-
-      account_manager = tp_account_manager_new_with_factory (factory);
-      tp_account_manager_set_default (account_manager);
-
-      g_object_unref (account_manager);
-      g_object_unref (factory);
-#endif
-
-      g_once_init_leave (&once_init_value, 1);
-    }
-}
-
 gboolean
 goa_utils_check_duplicate (GoaClient              *client,
                            const gchar            *identity,
diff --git a/src/goabackend/goautils.h b/src/goabackend/goautils.h
index 757318d..8b1a455 100644
--- a/src/goabackend/goautils.h
+++ b/src/goabackend/goautils.h
@@ -46,8 +46,6 @@ void             goa_utils_account_add_attention_needed (GoaClient    *client,
 
 void             goa_utils_account_add_header (GoaObject *object, GtkGrid *grid, gint row);
 
-void             goa_utils_initialize_client_factory (void);
-
 gboolean         goa_utils_check_duplicate (GoaClient              *client,
                                             const gchar            *identity,
                                             const gchar            *presentation_identity,


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