Mercurial > pidgin
changeset 2573:fc54c1a070e7
[gaim-migrate @ 2586]
Well, touch my belly and call me Olga!
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Tue, 23 Oct 2001 00:19:38 +0000 |
parents | ad0d7c423669 |
children | 3526c5581f92 |
files | ChangeLog src/away.c |
diffstat | 2 files changed, 50 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Oct 22 21:05:27 2001 +0000 +++ b/ChangeLog Tue Oct 23 00:19:38 2001 +0000 @@ -14,6 +14,8 @@ * Add Opera to the available browsers (thanks Brian Enigma) * The applet no longer crashes when you remove it while signed on * Improved log viewer (thanks to Ben Miller) + * Double clicking a name unqueue's away messages for that buddy + (thanks to Sean Egan) version 0.46 (10/18/2001): * New applet icons (courtesy David Raeman)
--- a/src/away.c Mon Oct 22 21:05:27 2001 +0000 +++ b/src/away.c Tue Oct 23 00:19:38 2001 +0000 @@ -85,6 +85,51 @@ gtk_clist_thaw(GTK_CLIST(clistqueue)); } +void dequeue_by_buddy(GtkWidget *clist, gint row, gint column, GdkEventButton *event, gpointer data) { + char *temp; + char *name; + GSList *templist; + struct conversation *cnv; + + if(!(event->type == GDK_2BUTTON_PRESS && event->button == 1)) + return; /* Double clicking on the clist will unqueue that users messages. */ + + gtk_clist_get_text(GTK_CLIST(clist), row, 0, &temp); + name = g_strdup(temp); + + if (!name) + return; + debug_printf("Unqueueing messages from %s.\n", name); + templist = message_queue; + while (templist) { + struct queued_message *qm = templist->data; + if (templist->data) { + if (!g_strcasecmp(qm->name, name)) { + cnv = find_conversation(name); + if (!cnv) + cnv = new_conversation(qm->name); + if (g_slist_index(connections, qm->gc) >= 0) + set_convo_gc(cnv, qm->gc); + + write_to_conv(cnv, qm->message, qm->flags, NULL, qm->tm); + g_free(qm->message); + g_free(qm); + templist = message_queue = g_slist_remove(message_queue, qm); + + } else { + templist = templist->next; + } + } + } + g_free(name); + gtk_clist_remove(GTK_CLIST(clist), row); + + +} + + + + void toggle_away_queue() { if (!clistqueue || !clistqueuesw) @@ -187,6 +232,9 @@ gtk_clist_set_column_width(GTK_CLIST(clistqueue), 0, 100); gtk_widget_set_usize(GTK_WIDGET(clistqueue), -1, 50); gtk_container_add(GTK_CONTAINER(clistqueuesw), clistqueue); + gtk_signal_connect(GTK_OBJECT(clistqueue), "select_row", GTK_SIGNAL_FUNC(dequeue_by_buddy), NULL); + + if (away_options & OPT_AWAY_QUEUE) { gtk_widget_show(clistqueuesw);