Mercurial > pidgin.yaz
comparison pidgin/gtkconv.c @ 19665:37429bc82307
I think this fixes #2858.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Thu, 06 Sep 2007 07:47:30 +0000 |
parents | 1729367f0a4f |
children | a2f5a28ba983 |
comparison
equal
deleted
inserted
replaced
19662:132876614048 | 19665:37429bc82307 |
---|---|
927 savelog_writefile_cb(void *user_data, const char *filename) | 927 savelog_writefile_cb(void *user_data, const char *filename) |
928 { | 928 { |
929 PurpleConversation *conv = (PurpleConversation *)user_data; | 929 PurpleConversation *conv = (PurpleConversation *)user_data; |
930 FILE *fp; | 930 FILE *fp; |
931 const char *name; | 931 const char *name; |
932 char **lines; | |
932 gchar *text; | 933 gchar *text; |
933 | 934 |
934 if ((fp = g_fopen(filename, "w+")) == NULL) { | 935 if ((fp = g_fopen(filename, "w+")) == NULL) { |
935 purple_notify_error(PIDGIN_CONVERSATION(conv), NULL, _("Unable to open file."), NULL); | 936 purple_notify_error(PIDGIN_CONVERSATION(conv), NULL, _("Unable to open file."), NULL); |
936 return; | 937 return; |
938 | 939 |
939 name = purple_conversation_get_name(conv); | 940 name = purple_conversation_get_name(conv); |
940 fprintf(fp, "<html>\n<head><title>%s</title></head>\n<body>", name); | 941 fprintf(fp, "<html>\n<head><title>%s</title></head>\n<body>", name); |
941 fprintf(fp, _("<h1>Conversation with %s</h1>\n"), name); | 942 fprintf(fp, _("<h1>Conversation with %s</h1>\n"), name); |
942 | 943 |
943 text = gtk_imhtml_get_markup( | 944 lines = gtk_imhtml_get_markup_lines( |
944 GTK_IMHTML(PIDGIN_CONVERSATION(conv)->imhtml)); | 945 GTK_IMHTML(PIDGIN_CONVERSATION(conv)->imhtml)); |
946 text = g_strjoinv("\n", lines); | |
945 fprintf(fp, "%s", text); | 947 fprintf(fp, "%s", text); |
946 g_free(text); | 948 g_free(text); |
949 g_strfreev(lines); | |
947 | 950 |
948 fprintf(fp, "\n</body>\n</html>\n"); | 951 fprintf(fp, "\n</body>\n</html>\n"); |
949 fclose(fp); | 952 fclose(fp); |
950 } | 953 } |
951 | 954 |