app: Move last-save URI management to file_save()

Move the logic to remember the URI of the last saved file from
file_save_dialog_response() to the more central place file_save().
This commit is contained in:
Martin Nordholts 2009-05-02 22:41:08 +02:00
parent 8064bbf22e
commit f6cd700dd6
2 changed files with 4 additions and 4 deletions

View File

@ -141,10 +141,6 @@ file_save_dialog_response (GtkWidget *save_dialog,
dialog->save_a_copy,
FALSE))
{
g_object_set_data_full (G_OBJECT (dialog->image->gimp),
GIMP_FILE_SAVE_LAST_URI_KEY,
g_strdup (uri), (GDestroyNotify) g_free);
if (dialog)
{
GtkWindow *parent;

View File

@ -154,6 +154,10 @@ file_save (Gimp *gimp,
GimpDocumentList *documents;
GimpImagefile *imagefile;
/* Store the URI of the last successfully saved image */
g_object_set_data_full (G_OBJECT (gimp),
GIMP_FILE_SAVE_LAST_URI_KEY,
g_strdup (uri), (GDestroyNotify) g_free);
if (save_a_copy)
{
/* remember the "save-a-copy" filename for the next invocation */