Commit a4b80790 authored by Michael Natterer's avatar Michael Natterer 😴

app: change gimp_get_temp_filename() to gimp_get_temp_file()

parent 1348cd06
......@@ -1309,15 +1309,16 @@ gimp_image_opened (Gimp *gimp,
g_signal_emit (gimp, gimp_signals[IMAGE_OPENED], 0, file);
}
gchar *
gimp_get_temp_filename (Gimp *gimp,
const gchar *extension)
GFile *
gimp_get_temp_file (Gimp *gimp,
const gchar *extension)
{
static gint id = 0;
static gint pid;
gchar *filename;
gchar *basename;
gchar *path;
GFile *file;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
......@@ -1337,5 +1338,9 @@ gimp_get_temp_filename (Gimp *gimp,
g_free (path);
g_free (basename);
return filename;
file = g_file_new_for_path (filename);
g_free (filename);
return file;
}
......@@ -217,7 +217,7 @@ void gimp_message_literal (Gimp *gimp,
void gimp_image_opened (Gimp *gimp,
GFile *file);
gchar * gimp_get_temp_filename (Gimp *gimp,
GFile * gimp_get_temp_file (Gimp *gimp,
const gchar *extension);
......
......@@ -392,7 +392,11 @@ temp_name_invoker (GimpProcedure *procedure,
if (success)
{
name = gimp_get_temp_filename (gimp, extension);
GFile *file = gimp_get_temp_file (gimp, extension);
name = g_file_get_path (file);
g_object_unref (file);
}
return_vals = gimp_procedure_get_return_values (procedure, success,
......
......@@ -432,7 +432,11 @@ HELP
%invoke = (
code => <<'CODE'
{
name = gimp_get_temp_filename (gimp, extension);
GFile *file = gimp_get_temp_file (gimp, extension);
name = g_file_get_path (file);
g_object_unref (file);
}
CODE
);
......
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