# HG changeset patch # User Tim Ringenbach # Date 1088053114 0 # Node ID e4654f277514754fc6ad0e4cd9513950095660d0 # Parent 7b524aa577188128c25e14c8e6140d8231833811 [gaim-migrate @ 10182] this makes /cmds show up in ctrl-up and stuff. previously only things sent showed up. This might be considered an API change, at least for libgaim users, since the ui now adds the stuff to send_history. I also ChangeLogged switching back to web messenger. committer: Tailor Script diff -r 7b524aa57718 -r e4654f277514 ChangeLog --- a/ChangeLog Thu Jun 24 04:44:36 2004 +0000 +++ b/ChangeLog Thu Jun 24 04:58:34 2004 +0000 @@ -32,6 +32,8 @@ gaim-include/. Bug Fixes: + * Switched Yahoo! (not Japan) over to using Web Messenger auth + again, like 0.75, due to last minute protocol changes * Non-looping animated icons no longer cause Gaim to freeze * Flashing windows should work again for unix in window managers that support the URGENT hint (Etan Reisner) diff -r 7b524aa57718 -r e4654f277514 src/gtkconv.c --- a/src/gtkconv.c Thu Jun 24 04:44:36 2004 +0000 +++ b/src/gtkconv.c Thu Jun 24 04:58:34 2004 +0000 @@ -429,6 +429,21 @@ } static void +send_history_add(GaimConversation *conv, const char *message) +{ + GList *first; + + first = g_list_first(conv->send_history); + + if (first->data) + g_free(first->data); + + first->data = g_strdup(message); + + conv->send_history = g_list_prepend(first, NULL); +} + +static void send_cb(GtkWidget *widget, GaimConversation *conv) { GaimGtkConversation *gtkconv; @@ -446,9 +461,13 @@ cmd = gtk_imhtml_get_text(GTK_IMHTML(gtkconv->entry), NULL, NULL); if(cmd && (strncmp(cmd, prefix, strlen(prefix)) == 0)) { GaimCmdStatus status; - char *error, *cmdline, *markup; + char *error, *cmdline, *markup, *send_history; GtkTextIter start, end; + send_history = gtk_imhtml_get_markup(GTK_IMHTML(gtkconv->entry)); + send_history_add(conv, send_history); + g_free(send_history); + cmdline = cmd + strlen(prefix); gtk_text_buffer_get_start_iter(GTK_IMHTML(gtkconv->entry)->text_buffer, &start); gtk_text_iter_forward_chars(&start, g_utf8_strlen(prefix, -1)); @@ -524,6 +543,7 @@ bufs = gtk_imhtml_get_markup_lines(GTK_IMHTML(gtkconv->entry)); for (i = 0; bufs[i]; i++) { + send_history_add(conv, bufs[i]); if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) gaim_conv_im_send(GAIM_CONV_IM(conv), bufs[i]); else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) @@ -533,6 +553,7 @@ g_strfreev(bufs); } else { + send_history_add(conv, buf); if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) gaim_conv_im_send(GAIM_CONV_IM(conv), buf); else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT)