# HG changeset patch # User Luke Schierer # Date 1080885735 0 # Node ID fcb03dabbc5317d23627ae593650e0760f3f5600 # Parent 267050247da9d122c3dac0bb89eba64b954a468c [gaim-migrate @ 9301] " This patch makes conversation text get added to the history buffer so that the Save As menu item actually saves something useful. As the patch is now, it breaks the string freeze, though someone could probably adapt it to not do so if we wanted this to be back in gaim for 0.76." --Kevin Stange committer: Tailor Script diff -r 267050247da9 -r fcb03dabbc53 src/gtkconv.c --- a/src/gtkconv.c Fri Apr 02 05:59:11 2004 +0000 +++ b/src/gtkconv.c Fri Apr 02 06:02:15 2004 +0000 @@ -145,6 +145,7 @@ do_save_convo(GtkWidget *wid) { GaimConversation *conv; + const char *name; const char *filename; FILE *fp; @@ -167,6 +168,9 @@ if ((fp = fopen(filename, "w+")) == NULL) return; + name = gaim_conversation_get_name(conv); + + fprintf(fp, _("

Conversation with %s

\n"), name); fprintf(fp, "%s", conv->history->str); fclose(fp); @@ -3069,7 +3073,7 @@ window = gtk_file_selection_new(_("Save Conversation")); - g_snprintf(buf, sizeof(buf), "%s" G_DIR_SEPARATOR_S "%s.log", + g_snprintf(buf, sizeof(buf), "%s" G_DIR_SEPARATOR_S "%s.html", gaim_home_dir(), gaim_normalize(c->account, c->name)); gtk_file_selection_set_filename(GTK_FILE_SELECTION(window), buf); g_object_set_data(G_OBJECT(GTK_FILE_SELECTION(window)->ok_button), @@ -4626,12 +4630,9 @@ gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), "
", 0); - /*conv->history = g_string_append(conv->history, t1); - conv->history = g_string_append(conv->history, t2); - conv->history = g_string_append(conv->history, "\n"); - - g_free(t1); - g_free(t2); */ + conv->history = g_string_append(conv->history, buf); + conv->history = g_string_append(conv->history, new_message); + conv->history = g_string_append(conv->history, "
\n"); g_free(with_font_tag); g_free(new_message);