Revision 3250

View differences:

libsylph/procmsg.c
1720 1720
	if (buf[strlen(buf) - 1] != '&')
1721 1721
		strcat(buf, "&");
1722 1722

  
1723
	system(buf);
1723
	if (system(buf) != 0)
1724
		return -1;
1724 1725

  
1725 1726
	return 0;
1726 1727
}
......
1792 1793
			   gboolean all_headers)
1793 1794
{
1794 1795
	gchar *prtmp;
1795
	FILE *msgfp, *tmpfp, *prfp;
1796
	gchar buf[BUFFSIZE];
1797 1796

  
1798 1797
	g_return_if_fail(msginfo != NULL);
1799 1798

  
1800
	if ((tmpfp = procmime_get_first_text_content
1801
		(msginfo, conv_get_locale_charset_str())) == NULL) {
1802
		g_warning("Can't get text part\n");
1803
		return;
1804
	}
1805

  
1806 1799
	prtmp = g_strdup_printf("%s%cprinttmp-%08x.txt",
1807 1800
				get_mime_tmp_dir(), G_DIR_SEPARATOR,
1808 1801
				print_id++);
1809 1802

  
1810
	if ((prfp = g_fopen(prtmp, "w")) == NULL) {
1811
		FILE_OP_ERROR(prtmp, "procmsg_print_message: fopen");
1812
		g_free(prtmp);
1813
		fclose(tmpfp);
1814
		return;
1815
	}
1803
	if (procmsg_save_message_as_text(msginfo, prtmp,
1804
					 conv_get_locale_charset_str(),
1805
					 all_headers) == 0)
1806
		print_command_exec(prtmp, cmdline);
1816 1807

  
1817
	if ((msgfp = procmsg_open_message(msginfo)) == NULL) {
1818
		fclose(prfp);
1819
		g_free(prtmp);
1820
		fclose(tmpfp);
1821
		return;
1822
	}
1823

  
1824
	procmsg_write_headers(msginfo, NULL, msgfp, prfp,
1825
			      conv_get_locale_charset_str(), all_headers);
1826

  
1827
	fclose(msgfp);
1828

  
1829
	fputc('\n', prfp);
1830

  
1831
	while (fgets(buf, sizeof(buf), tmpfp) != NULL)
1832
		fputs(buf, prfp);
1833

  
1834
	fclose(prfp);
1835
	fclose(tmpfp);
1836

  
1837
	print_command_exec(prtmp, cmdline);
1838

  
1839 1808
	g_free(prtmp);
1840 1809
}
1841 1810

  
ChangeLog
1 1
2013-04-05
2 2

  
3
	* libsylph/procmsg.c: procmsg_print_message(): print all texts in
4
	  messages, not only the first one.
5

  
6
2013-04-05
7

  
3 8
	* src/printing.c: print all texts in messages, not only the first one.
4 9

  
5 10
2013-04-04

Also available in: Unified diff