aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Meire <blackskad@gmail.com>2010-01-06 19:47:29 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-01-06 19:47:29 +0800
commitf65faee618844e60b0910107b683f7e74f4523bb (patch)
treecac6824aa4ec585f1deedda438092a711d1cb462
parent35c99e3a75272c03b71e04c3e1bf1944167295ee (diff)
downloadgsoc2013-empathy-f65faee618844e60b0910107b683f7e74f4523bb.tar
gsoc2013-empathy-f65faee618844e60b0910107b683f7e74f4523bb.tar.gz
gsoc2013-empathy-f65faee618844e60b0910107b683f7e74f4523bb.tar.bz2
gsoc2013-empathy-f65faee618844e60b0910107b683f7e74f4523bb.tar.lz
gsoc2013-empathy-f65faee618844e60b0910107b683f7e74f4523bb.tar.xz
gsoc2013-empathy-f65faee618844e60b0910107b683f7e74f4523bb.tar.zst
gsoc2013-empathy-f65faee618844e60b0910107b683f7e74f4523bb.zip
Print autocompletion suggestions to chatview (#599779)
-rw-r--r--libempathy-gtk/empathy-chat.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 61a6f53ba..624b1a03f 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1390,6 +1390,8 @@ chat_input_key_press_event_cb (GtkWidget *widget,
guint len;
const gchar *text;
gchar *complete_char = NULL;
+ GString *message = NULL;
+ GList *l;
gtk_text_buffer_delete (buffer, &start, &current);
@@ -1405,6 +1407,18 @@ chat_input_key_press_event_cb (GtkWidget *widget,
text = empathy_contact_get_name (completed_list->data);
} else {
text = completed;
+
+ /* Print all hits to the scrollback view, so the
+ * user knows what possibilities he has.
+ * Fixes #599779
+ * */
+ message = g_string_new ("");
+ for (l = completed_list; l != NULL; l = l->next) {
+ g_string_append (message, empathy_contact_get_name (l->data));
+ g_string_append (message, " - ");
+ }
+ empathy_chat_view_append_event (chat->view, message->str);
+ g_string_free (message, TRUE);
}
gtk_text_buffer_insert_at_cursor (buffer, text, strlen (text));