Commit 949d7eee authored by Jehan's avatar Jehan

app: fix backup creation on crash.

The call to "gimp-xcf-save" was not updated to the new API using a
drawable array and a GFile.
Also for the drawable array, do not actually create it as anyway this is
a dummy argument (so far XCF saving does not even look at this argument
and just re-check the selected drawables).
parent d11e59fc
Pipeline #200286 passed with stages
in 32 minutes and 3 seconds
......@@ -474,13 +474,10 @@ gimp_eek (const gchar *reason,
for (; iter && i < 1000; iter = iter->next)
{
GimpImage *image = iter->data;
GimpItem *item;
if (! gimp_image_is_dirty (image))
continue;
item = GIMP_ITEM (gimp_image_get_active_drawable (image));
/* This is a trick because we want to avoid any memory
* allocation when the process is abnormally terminated.
* We just assume that you'll never have more than 1000 images
......@@ -495,11 +492,11 @@ gimp_eek (const gchar *reason,
gimp_get_user_context (the_errors_gimp),
NULL, NULL,
"gimp-xcf-save",
GIMP_TYPE_RUN_MODE, GIMP_RUN_NONINTERACTIVE,
GIMP_TYPE_IMAGE, image,
GIMP_TYPE_DRAWABLE, item,
G_TYPE_STRING, backup_path,
G_TYPE_STRING, backup_path,
GIMP_TYPE_RUN_MODE, GIMP_RUN_NONINTERACTIVE,
GIMP_TYPE_IMAGE, image,
G_TYPE_INT, 0,
GIMP_TYPE_OBJECT_ARRAY, NULL,
G_TYPE_FILE, g_file_new_for_path (backup_path),
G_TYPE_NONE);
i++;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment