Mercurial > pidgin.yaz
changeset 8557:fcb03dabbc53
[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 <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Fri, 02 Apr 2004 06:02:15 +0000 |
parents | 267050247da9 |
children | 6cf7a9ae3057 |
files | src/gtkconv.c |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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, _("<h1>Conversation with %s</h1>\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), "<BR>", 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, "<BR>\n"); g_free(with_font_tag); g_free(new_message);