From a97016255a79a5b26af59411eab907d2881bc63e Mon Sep 17 00:00:00 2001 From: Justin Forest Date: Mon, 2 Nov 2009 17:54:01 +0300 Subject: Autocomplete for offline contacts. Closes bug #583919. --- libempathy-gtk/empathy-new-message-dialog.c | 32 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'libempathy-gtk/empathy-new-message-dialog.c') diff --git a/libempathy-gtk/empathy-new-message-dialog.c b/libempathy-gtk/empathy-new-message-dialog.c index d39f71bcc..c1069f879 100644 --- a/libempathy-gtk/empathy-new-message-dialog.c +++ b/libempathy-gtk/empathy-new-message-dialog.c @@ -99,23 +99,21 @@ new_message_dialog_account_changed_cb (GtkWidget *widget, while (members) { EmpathyContact *contact = members->data; - if (empathy_contact_is_online (contact)) { - DEBUG ("Adding contact ID %s, Name %s", - empathy_contact_get_id (contact), - empathy_contact_get_name (contact)); - - tmpstr = g_strdup_printf ("%s (%s)", - empathy_contact_get_name (contact), - empathy_contact_get_id (contact)); - - gtk_list_store_insert_with_values (store, &iter, -1, - COMPLETION_COL_TEXT, tmpstr, - COMPLETION_COL_ID, empathy_contact_get_id (contact), - COMPLETION_COL_NAME, empathy_contact_get_name (contact), - -1); - - g_free (tmpstr); - } + DEBUG ("Adding contact ID %s, Name %s", + empathy_contact_get_id (contact), + empathy_contact_get_name (contact)); + + tmpstr = g_strdup_printf ("%s (%s)", + empathy_contact_get_name (contact), + empathy_contact_get_id (contact)); + + gtk_list_store_insert_with_values (store, &iter, -1, + COMPLETION_COL_TEXT, tmpstr, + COMPLETION_COL_ID, empathy_contact_get_id (contact), + COMPLETION_COL_NAME, empathy_contact_get_name (contact), + -1); + + g_free (tmpstr); g_object_unref (contact); members = g_list_delete_link (members, members); -- cgit v1.2.3