Mercurial > pidgin
changeset 1595:f281f4d94973
[gaim-migrate @ 1605]
implement ctl-tab/[/]
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 16 Mar 2001 20:58:55 +0000 |
parents | ac8eddd16e89 |
children | f5845007e3bc |
files | src/conversation.c |
diffstat | 1 files changed, 34 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/conversation.c Fri Mar 16 20:33:28 2001 +0000 +++ b/src/conversation.c Fri Mar 16 20:58:55 2001 +0000 @@ -645,25 +645,49 @@ } } if (display_options & OPT_DISP_ONE_WINDOW) { - /* if (event->keyval == GDK_Left) { + if (event->keyval == '[') { gtk_notebook_prev_page(GTK_NOTEBOOK(convo_notebook)); gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); - } else if (event->keyval == GDK_Right) { + } else if (event->keyval == ']') { gtk_notebook_next_page(GTK_NOTEBOOK(convo_notebook)); gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); - } else */ if (event->keyval == GDK_Tab) { - GList *cnv = conversations; - struct conversation *c; + } else if (event->keyval == GDK_Tab) { + GList *cnv = g_list_nth(conversations, + gtk_notebook_get_current_page( + GTK_NOTEBOOK(convo_notebook))); + struct conversation *d; while (cnv) { - c = cnv->data; - if (c->unseen) + d = cnv->data; + if (d->unseen) break; cnv = cnv->next; - c = NULL; + d = NULL; } - if (c) { + if (d) { gtk_notebook_set_page(GTK_NOTEBOOK(convo_notebook), - g_list_index(conversations, c)); + g_list_index(conversations, d)); + } else { + cnv = conversations; + while (cnv) { + d = cnv->data; + if (d->unseen) + break; + cnv = cnv->next; + d = NULL; + } + if (d) { + gtk_notebook_set_page( + GTK_NOTEBOOK(convo_notebook), + g_list_index(conversations, d)); + } else { + cnv = g_list_last(conversations); + if (c == cnv->data) + gtk_notebook_set_page( + GTK_NOTEBOOK(convo_notebook), 0); + else + gtk_notebook_next_page( + GTK_NOTEBOOK(convo_notebook)); + } } gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); }