only write a .presets file if the presets container is not empty.

2006-12-06  Sven Neumann  <sven@gimp.org>

	* app/tools/gimp-tools.c (gimp_tools_save): only write a
.presets
	file if the presets container is not empty.
This commit is contained in:
Sven Neumann 2006-12-06 20:43:06 +00:00 committed by Sven Neumann
parent 8aa1c19e4d
commit 5cc125827b
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2006-12-06 Sven Neumann <sven@gimp.org>
* app/tools/gimp-tools.c (gimp_tools_save): only write a .presets
file if the presets container is not empty.
2006-12-06 Sven Neumann <sven@gimp.org>
* plug-ins/common/xpm.c: applied patch by Min Sik Kim. Fixes build

View File

@ -378,7 +378,8 @@ gimp_tools_save (Gimp *gimp,
if (save_tool_options && (! tool_options_deleted || always_save))
gimp_tool_options_serialize (tool_info->tool_options, NULL, NULL);
if (tool_info->options_presets)
if (tool_info->options_presets &&
gimp_container_num_children (tool_info->options_presets) > 0)
{
gchar *header;
gchar *footer;