diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2007-11-22 00:38:28 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2007-11-22 00:38:28 +0800 |
commit | a9ffb1b56c5f6c034bb81ee94750cf33acad12ab (patch) | |
tree | 53e2b16c82553fdc401006b64d8890c19fa3e4b2 /libempathy-gtk/empathy-chat.c | |
parent | d9257855a9850c731f07092bdf5309dbc7c60816 (diff) | |
download | gsoc2013-empathy-a9ffb1b56c5f6c034bb81ee94750cf33acad12ab.tar gsoc2013-empathy-a9ffb1b56c5f6c034bb81ee94750cf33acad12ab.tar.gz gsoc2013-empathy-a9ffb1b56c5f6c034bb81ee94750cf33acad12ab.tar.bz2 gsoc2013-empathy-a9ffb1b56c5f6c034bb81ee94750cf33acad12ab.tar.lz gsoc2013-empathy-a9ffb1b56c5f6c034bb81ee94750cf33acad12ab.tar.xz gsoc2013-empathy-a9ffb1b56c5f6c034bb81ee94750cf33acad12ab.tar.zst gsoc2013-empathy-a9ffb1b56c5f6c034bb81ee94750cf33acad12ab.zip |
Add nick completion for MUCs. Fixes bug #453418.
2007-11-21 Xavier Claessens <xclaesse@gmail.com>
* libempathy-gtk/empathy-group-chat.c:
* libempathy-gtk/empathy-chat.c:
* libempathy-gtk/empathy-chat.h: Add nick completion for MUCs.
Fixes bug #453418.
svn path=/trunk/; revision=441
Diffstat (limited to 'libempathy-gtk/empathy-chat.c')
-rw-r--r-- | libempathy-gtk/empathy-chat.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index edff73a3e..30ec5d53c 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -566,7 +566,7 @@ chat_sent_message_get_last (EmpathyChat *chat) static gboolean chat_input_key_press_event_cb (GtkWidget *widget, GdkEventKey *event, - EmpathyChat *chat) + EmpathyChat *chat) { EmpathyChatPriv *priv; GtkAdjustment *adj; @@ -575,10 +575,6 @@ chat_input_key_press_event_cb (GtkWidget *widget, priv = GET_PRIV (chat); - if (event->keyval == GDK_Tab && !(event->state & GDK_CONTROL_MASK)) { - return TRUE; - } - /* Catch ctrl+up/down so we can traverse messages we sent */ if ((event->state & GDK_CONTROL_MASK) && (event->keyval == GDK_Up || @@ -606,7 +602,8 @@ chat_input_key_press_event_cb (GtkWidget *widget, } /* Catch enter but not ctrl/shift-enter */ - if (IS_ENTER (event->keyval) && !(event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK))) { + if (IS_ENTER (event->keyval) && + !(event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK))) { GtkTextView *view; /* This is to make sure that kinput2 gets the enter. And if @@ -627,11 +624,12 @@ chat_input_key_press_event_cb (GtkWidget *widget, text_view_sw = gtk_widget_get_parent (GTK_WIDGET (chat->view)); - if (IS_ENTER (event->keyval) && (event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK))) { - /* Newline for shift-enter. */ + if (IS_ENTER (event->keyval) && + (event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK))) { + /* Newline for shift/control-enter. */ return FALSE; } - else if ((event->state & GDK_CONTROL_MASK) != GDK_CONTROL_MASK && + else if (!(event->state & GDK_CONTROL_MASK) && event->keyval == GDK_Page_Up) { adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (text_view_sw)); gtk_adjustment_set_value (adj, adj->value - adj->page_size); @@ -647,6 +645,10 @@ chat_input_key_press_event_cb (GtkWidget *widget, return TRUE; } + if (EMPATHY_CHAT_GET_CLASS (chat)->key_press_event) { + return EMPATHY_CHAT_GET_CLASS (chat)->key_press_event (chat, event); + } + return FALSE; } @@ -1399,7 +1401,6 @@ empathy_chat_set_tp_chat (EmpathyChat *chat, if (EMPATHY_CHAT_GET_CLASS (chat)->set_tp_chat) { EMPATHY_CHAT_GET_CLASS (chat)->set_tp_chat (chat, tp_chat); } - } const gchar * |