diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2010-02-05 08:06:13 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-02-08 19:37:44 +0800 |
commit | 4ee728df4875d0f62e1953851a1eb01627eb9e9e (patch) | |
tree | f89c63aa87be3b69d988c32a19cf8cbbf8f75c82 /libempathy-gtk/empathy-contact-dialogs.c | |
parent | 39a0c45a2d7cc77809e6a6e8e34ccd27fef325f3 (diff) | |
download | gsoc2013-empathy-4ee728df4875d0f62e1953851a1eb01627eb9e9e.tar gsoc2013-empathy-4ee728df4875d0f62e1953851a1eb01627eb9e9e.tar.gz gsoc2013-empathy-4ee728df4875d0f62e1953851a1eb01627eb9e9e.tar.bz2 gsoc2013-empathy-4ee728df4875d0f62e1953851a1eb01627eb9e9e.tar.lz gsoc2013-empathy-4ee728df4875d0f62e1953851a1eb01627eb9e9e.tar.xz gsoc2013-empathy-4ee728df4875d0f62e1953851a1eb01627eb9e9e.tar.zst gsoc2013-empathy-4ee728df4875d0f62e1953851a1eb01627eb9e9e.zip |
Don't call SetAlias for subscription requests until the request has been acked (#608975)
Diffstat (limited to 'libempathy-gtk/empathy-contact-dialogs.c')
-rw-r--r-- | libempathy-gtk/empathy-contact-dialogs.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-contact-dialogs.c b/libempathy-gtk/empathy-contact-dialogs.c index 390caa2fb..52e43e163 100644 --- a/libempathy-gtk/empathy-contact-dialogs.c +++ b/libempathy-gtk/empathy-contact-dialogs.c @@ -31,6 +31,7 @@ #include <libempathy/empathy-contact-manager.h> #include <libempathy/empathy-contact-list.h> +#include <libempathy/empathy-tp-contact-factory.h> #include <libempathy/empathy-utils.h> #include "empathy-contact-dialogs.h" @@ -72,8 +73,17 @@ subscription_dialog_response_cb (GtkDialog *dialog, contact = empathy_contact_widget_get_contact (contact_widget); if (response == GTK_RESPONSE_YES) { + EmpathyTpContactFactory *factory; + + factory = empathy_tp_contact_factory_dup_singleton ( + empathy_contact_get_connection (contact)); + empathy_contact_list_add (EMPATHY_CONTACT_LIST (manager), contact, ""); + empathy_tp_contact_factory_set_alias (factory, contact, + empathy_contact_widget_get_alias (contact_widget)); + + g_object_unref (factory); } else if (response == GTK_RESPONSE_NO) { empathy_contact_list_remove (EMPATHY_CONTACT_LIST (manager), @@ -117,6 +127,7 @@ empathy_subscription_dialog_show (EmpathyContact *contact, /* Contact info widget */ contact_widget = empathy_contact_widget_new (contact, + EMPATHY_CONTACT_WIDGET_NO_SET_ALIAS | EMPATHY_CONTACT_WIDGET_EDIT_ALIAS | EMPATHY_CONTACT_WIDGET_EDIT_GROUPS); gtk_box_pack_end (GTK_BOX (hbox_subscription), |