[gimp] app: add gimp_imagefile_set_file()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: add gimp_imagefile_set_file()
- Date: Mon, 7 Jul 2014 22:51:47 +0000 (UTC)
commit f319a9c838bcc314be285686fc73fa25310151c7
Author: Michael Natterer <mitch gimp org>
Date: Tue Jul 8 00:49:05 2014 +0200
app: add gimp_imagefile_set_file()
app/core/gimpimagefile.c | 10 ++++++++++
app/core/gimpimagefile.h | 3 +++
2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimpimagefile.c b/app/core/gimpimagefile.c
index 2c98f56..a1c441a 100644
--- a/app/core/gimpimagefile.c
+++ b/app/core/gimpimagefile.c
@@ -256,6 +256,16 @@ gimp_imagefile_get_file (GimpImagefile *imagefile)
return GET_PRIVATE (imagefile)->file;
}
+void
+gimp_imagefile_set_file (GimpImagefile *imagefile,
+ GFile *file)
+{
+ g_return_if_fail (GIMP_IS_IMAGEFILE (imagefile));
+ g_return_if_fail (G_IS_FILE (file));
+
+ gimp_object_take_name (GIMP_OBJECT (imagefile), g_file_get_uri (file));
+}
+
GimpThumbnail *
gimp_imagefile_get_thumbnail (GimpImagefile *imagefile)
{
diff --git a/app/core/gimpimagefile.h b/app/core/gimpimagefile.h
index c43cafd..ced13b8 100644
--- a/app/core/gimpimagefile.h
+++ b/app/core/gimpimagefile.h
@@ -59,6 +59,9 @@ GimpImagefile * gimp_imagefile_new (Gimp *gimp,
GFile *file);
GFile * gimp_imagefile_get_file (GimpImagefile *imagefile);
+void gimp_imagefile_set_file (GimpImagefile *imagefile,
+ GFile *file);
+
GimpThumbnail * gimp_imagefile_get_thumbnail (GimpImagefile *imagefile);
GIcon * gimp_imagefile_get_gicon (GimpImagefile *imagefile);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]