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-widget.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-widget.c')
-rw-r--r-- | libempathy-gtk/empathy-contact-widget.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c index 773aa6130..3e8ed8430 100644 --- a/libempathy-gtk/empathy-contact-widget.c +++ b/libempathy-gtk/empathy-contact-widget.c @@ -1271,9 +1271,12 @@ contact_widget_contact_setup (EmpathyContactWidget *information) if (information->flags & EMPATHY_CONTACT_WIDGET_EDIT_ALIAS) { information->widget_alias = gtk_entry_new (); - g_signal_connect (information->widget_alias, "focus-out-event", - G_CALLBACK (contact_widget_entry_alias_focus_event_cb), - information); + + if (!(information->flags & EMPATHY_CONTACT_WIDGET_NO_SET_ALIAS)) + g_signal_connect (information->widget_alias, "focus-out-event", + G_CALLBACK (contact_widget_entry_alias_focus_event_cb), + information); + /* Make return activate the window default (the Close button) */ gtk_entry_set_activates_default (GTK_ENTRY (information->widget_alias), TRUE); @@ -1414,6 +1417,20 @@ empathy_contact_widget_get_contact (GtkWidget *widget) return information->contact; } +const gchar * +empathy_contact_widget_get_alias (GtkWidget *widget) +{ + EmpathyContactWidget *information; + + g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); + + information = g_object_get_data (G_OBJECT (widget), "EmpathyContactWidget"); + if (!information) + return NULL; + + return gtk_entry_get_text (GTK_ENTRY (information->widget_alias)); +} + /** * empathy_contact_widget_set_contact: * @widget: an #EmpathyContactWidget |