Mercurial > pidgin.yaz
changeset 2483:e73ca8d8d358
[gaim-migrate @ 2496]
fine.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 11 Oct 2001 07:49:02 +0000 |
parents | 7e4757801725 |
children | a4647b25dbf1 |
files | src/conversation.c |
diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/conversation.c Thu Oct 11 07:19:20 2001 +0000 +++ b/src/conversation.c Thu Oct 11 07:49:02 2001 +0000 @@ -605,10 +605,20 @@ gtk_signal_emit_by_name(GTK_OBJECT(entry), "activate", c); gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); } else { + int oldpos; gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); - pos = gtk_editable_get_position(GTK_EDITABLE(entry)); + oldpos = pos = gtk_editable_get_position(GTK_EDITABLE(entry)); gtk_editable_insert_text(GTK_EDITABLE(entry), "\n", 1, &pos); + if (oldpos == pos) + gtk_editable_set_position(GTK_EDITABLE(entry), pos + 1); } + } else if ((event->state & GDK_CONTROL_MASK) && (event->keyval == 'm')) { + int oldpos; + gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); + oldpos = pos = gtk_editable_get_position(GTK_EDITABLE(entry)); + gtk_editable_insert_text(GTK_EDITABLE(entry), "\n", 1, &pos); + if (oldpos == pos) + gtk_editable_set_position(GTK_EDITABLE(entry), pos + 1); } else if (event->state & GDK_CONTROL_MASK) { if (convo_options & OPT_CONVO_CTL_CHARS) { switch (event->keyval) {