minor cleanup.

2004-10-12  Sven Neumann  <sven@gimp.org>

	* app/file/file-open.c: minor cleanup.

	* app/file/file-save.c (file_save_as): no need to fiddle with the
	image name, the URI is taken from the imagefile anyway.
This commit is contained in:
Sven Neumann 2004-10-12 19:04:03 +00:00 committed by Sven Neumann
parent 1fdb729dce
commit f398bbfec6
3 changed files with 9 additions and 18 deletions

View File

@ -1,3 +1,10 @@
2004-10-12 Sven Neumann <sven@gimp.org>
* app/file/file-open.c: minor cleanup.
* app/file/file-save.c (file_save_as): no need to fiddle with the
image name, the URI is taken from the imagefile anyway.
2004-10-12 Sven Neumann <sven@gimp.org>
* app/actions/layers-actions.c (layers_actions_update): set

View File

@ -245,9 +245,8 @@ file_open_with_proc_and_display (Gimp *gimp,
/* can only create a thumbnail if the passed uri and the
* resulting image's uri match.
*/
if (! strcmp (uri, gimp_image_get_uri (gimage)))
if (strcmp (uri, gimp_image_get_uri (gimage)) == 0)
{
/* save a thumbnail of every opened image */
gimp_imagefile_save_thumbnail (imagefile, gimage);
}

View File

@ -205,22 +205,7 @@ file_save_as (GimpImage *gimage,
gimp_image_set_save_proc (gimage, file_proc);
}
/* Write a thumbnail for the saved image */
if (set_uri_and_proc)
{
gimp_imagefile_save_thumbnail (imagefile, gimage);
}
else
{
gchar *saved_uri;
saved_uri = GIMP_OBJECT (gimage)->name;
GIMP_OBJECT (gimage)->name = (gchar *) uri;
gimp_imagefile_save_thumbnail (imagefile, gimage);
GIMP_OBJECT (gimage)->name = saved_uri;
}
gimp_imagefile_save_thumbnail (imagefile, gimage);
gimp_recent_list_add_uri (uri, file_proc->mime_type);
}