app: Implement 'File -> Export to'

Handle 'Export to' by finding a file proc based on the import URI and
then save back to that location using the proc.
This commit is contained in:
Martin Nordholts 2009-04-26 17:44:10 +02:00
parent 64f7d9b93b
commit 7a771a09d3
1 changed files with 22 additions and 1 deletions

View File

@ -283,7 +283,28 @@ file_save_cmd_callback (GtkAction *action,
break;
case GIMP_SAVE_MODE_EXPORT_TO:
/* TODO */
{
const gchar *uri;
GimpPlugInProcedure *export_proc;
uri = g_object_get_data (G_OBJECT (image),
GIMP_FILE_EXPORT_TO_URI_KEY);
if (uri)
{
export_proc =
file_procedure_find (image->gimp->plug_in_manager->export_procs,
uri, NULL);
}
if (uri && export_proc)
{
saved = file_save_dialog_save_image (GIMP_PROGRESS (display),
gimp, image, uri,
export_proc,
GIMP_RUN_WITH_LAST_VALS,
FALSE, TRUE);
}
}
break;
}