diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-06-07 20:34:22 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-06-07 20:35:07 +0800 |
commit | 2c6d8d25592d553254f7a110b53f59bbde5b916b (patch) | |
tree | ce912ddd4c298a5067cad581d47f465c30e23e0c /libempathy-gtk/empathy-local-xmpp-assistant-widget.c | |
parent | 0c54e7a181b440ef53509aa84c92e586c3d04499 (diff) | |
download | gsoc2013-empathy-2c6d8d25592d553254f7a110b53f59bbde5b916b.tar.gz gsoc2013-empathy-2c6d8d25592d553254f7a110b53f59bbde5b916b.tar.zst gsoc2013-empathy-2c6d8d25592d553254f7a110b53f59bbde5b916b.zip |
remove libebook support
It's API just changed and it's not really useful anymore as gnome-about-me has
been removed.
https://bugzilla.gnome.org/show_bug.cgi?id=677533
Diffstat (limited to 'libempathy-gtk/empathy-local-xmpp-assistant-widget.c')
-rw-r--r-- | libempathy-gtk/empathy-local-xmpp-assistant-widget.c | 73 |
1 files changed, 2 insertions, 71 deletions
diff --git a/libempathy-gtk/empathy-local-xmpp-assistant-widget.c b/libempathy-gtk/empathy-local-xmpp-assistant-widget.c index 1ac8fff59..f7b18863a 100644 --- a/libempathy-gtk/empathy-local-xmpp-assistant-widget.c +++ b/libempathy-gtk/empathy-local-xmpp-assistant-widget.c @@ -23,10 +23,6 @@ #include <glib/gi18n-lib.h> -#if HAVE_EDS -#include <libebook/e-book.h> -#endif - #include <libempathy/empathy-utils.h> #include <libempathy-gtk/empathy-account-widget.h> @@ -58,72 +54,6 @@ empathy_local_xmpp_assistant_widget_init (EmpathyLocalXmppAssistantWidget *self) EmpathyLocalXmppAssistantWidgetPrivate); } -static EmpathyAccountSettings * -create_salut_account_settings (void) -{ - EmpathyAccountSettings *settings; -#if HAVE_EDS - EBook *book; - EContact *contact; - gchar *nickname = NULL; - gchar *first_name = NULL; - gchar *last_name = NULL; - gchar *email = NULL; - gchar *jid = NULL; - GError *error = NULL; -#endif - - settings = empathy_account_settings_new ("salut", "local-xmpp", NULL, - _("People nearby")); - -#if HAVE_EDS - /* Get self EContact from EDS */ - if (!e_book_get_self (&contact, &book, &error)) - { - DEBUG ("Failed to get self econtact: %s", error->message); - g_error_free (error); - return settings; - } - - nickname = e_contact_get (contact, E_CONTACT_NICKNAME); - first_name = e_contact_get (contact, E_CONTACT_GIVEN_NAME); - last_name = e_contact_get (contact, E_CONTACT_FAMILY_NAME); - email = e_contact_get (contact, E_CONTACT_EMAIL_1); - jid = e_contact_get (contact, E_CONTACT_IM_JABBER_HOME_1); - - if (!tp_strdiff (nickname, "nickname")) - { - g_free (nickname); - nickname = NULL; - } - - DEBUG ("Salut account created:\nnickname=%s\nfirst-name=%s\n" - "last-name=%s\nemail=%s\njid=%s\n", - nickname, first_name, last_name, email, jid); - - empathy_account_settings_set_string (settings, - "nickname", g_variant_new_string (nickname ? nickname : "")); - empathy_account_settings_set_ (settings, - "first-name", g_variant_new_string (first_name ? first_name : "")); - empathy_account_settings_set (settings, - "last-name", g_variant_new_string (last_name ? last_name : "")); - empathy_account_settings_set (settings, "email", - g_variant_new_string (email ? email : "")); - empathy_account_settings_set (settings, "jid", - g_variant_new_string (jid ? jid : "")); - - g_free (nickname); - g_free (first_name); - g_free (last_name); - g_free (email); - g_free (jid); - g_object_unref (contact); - g_object_unref (book); -#endif - - return settings; -} - static void handle_apply_cb (EmpathyAccountWidget *widget_object, gboolean is_valid, @@ -164,7 +94,8 @@ empathy_local_xmpp_assistant_widget_constructed (GObject *object) g_object_unref (pix); - self->priv->settings = create_salut_account_settings (); + self->priv->settings = empathy_account_settings_new ("salut", "local-xmpp", + NULL, _("People nearby")); account_widget = empathy_account_widget_new_for_protocol ( self->priv->settings, TRUE); |