app: Remember last export URI for each image

This commit is contained in:
Martin Nordholts 2009-05-03 10:07:13 +02:00
parent 9625c4610e
commit 72bc3aeed3
2 changed files with 21 additions and 6 deletions

View File

@ -211,13 +211,26 @@ file_save_dialog_response (GtkWidget *save_dialog,
}
if (! dialog->export)
g_object_set_data_full (G_OBJECT (dialog->image->gimp),
GIMP_FILE_SAVE_LAST_URI_KEY,
g_strdup (uri), (GDestroyNotify) g_free);
{
g_object_set_data_full (G_OBJECT (dialog->image->gimp),
GIMP_FILE_SAVE_LAST_URI_KEY,
g_strdup (uri), (GDestroyNotify) g_free);
}
else
g_object_set_data_full (G_OBJECT (dialog->image->gimp),
GIMP_FILE_EXPORT_LAST_URI_KEY,
g_strdup (uri), (GDestroyNotify) g_free);
{
g_object_set_data_full (G_OBJECT (dialog->image->gimp),
GIMP_FILE_EXPORT_LAST_URI_KEY,
g_strdup (uri), (GDestroyNotify) g_free);
/* Remeber the last entered Export URI for the image. We
* only need to do this explicitly when exporting. It
* happens implicitly when saving since the GimpObject name
* of a GimpImage is the last-save URI
*/
g_object_set_data_full (G_OBJECT (dialog->image),
GIMP_FILE_EXPORT_URI_KEY,
g_strdup (uri), (GDestroyNotify) g_free);
}
g_object_set_data_full (G_OBJECT (dialog->image->gimp),
GIMP_FILE_SAVE_LAST_URI_KEY,

View File

@ -27,9 +27,11 @@
#define GIMP_FILE_EXPORT_LAST_URI_KEY "gimp-file-export-last-uri"
/* Data keys for GimpImage */
#define GIMP_FILE_EXPORT_URI_KEY "gimp-file-export-uri"
#define GIMP_FILE_SAVE_A_COPY_URI_KEY "gimp-file-save-a-copy-uri"
#define GIMP_FILE_EXPORT_TO_URI_KEY "gimp-file-export-to-uri"
#define GIMP_FILE_IMPORT_SOURCE_URI_KEY "gimp-file-import-source-uri"
#endif /* __GIMP_FILE_H__ */