[gimp] app: remove GError** argument from gimp_image_get_color_profile()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: remove GError** argument from gimp_image_get_color_profile()
- Date: Tue, 16 Jun 2015 22:47:05 +0000 (UTC)
commit bf10da29fa04025be7f3c9dbae640ec44752fe58
Author: Michael Natterer <mitch gimp org>
Date: Wed Jun 17 00:45:43 2015 +0200
app: remove GError** argument from gimp_image_get_color_profile()
we validate everything when setting it, so this function always
returns either a valid profile, or NULL.
app/core/gimpimage-profile.c | 6 ++----
app/core/gimpimage-profile.h | 3 +--
app/core/gimpimage.c | 2 +-
app/pdb/image-color-profile-cmds.c | 2 +-
tools/pdbgen/pdb/image_color_profile.pdb | 2 +-
5 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/app/core/gimpimage-profile.c b/app/core/gimpimage-profile.c
index 13daa5c..870ed10 100644
--- a/app/core/gimpimage-profile.c
+++ b/app/core/gimpimage-profile.c
@@ -246,20 +246,18 @@ gimp_image_validate_color_profile (GimpImage *image,
}
GimpColorProfile
-gimp_image_get_color_profile (GimpImage *image,
- GError **error)
+gimp_image_get_color_profile (GimpImage *image)
{
const GimpParasite *parasite;
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, NULL);
parasite = gimp_image_get_icc_parasite (image);
if (parasite)
return gimp_color_profile_open_from_data (gimp_parasite_data (parasite),
gimp_parasite_data_size (parasite),
- error);
+ NULL);
return NULL;
}
diff --git a/app/core/gimpimage-profile.h b/app/core/gimpimage-profile.h
index 1492d96..035f4bf 100644
--- a/app/core/gimpimage-profile.h
+++ b/app/core/gimpimage-profile.h
@@ -46,8 +46,7 @@ gboolean gimp_image_set_icc_profile (GimpImage *ima
gboolean gimp_image_validate_color_profile (GimpImage *image,
GimpColorProfile profile,
GError **error);
-GimpColorProfile gimp_image_get_color_profile (GimpImage *image,
- GError **error);
+GimpColorProfile gimp_image_get_color_profile (GimpImage *image);
gboolean gimp_image_set_color_profile (GimpImage *image,
GimpColorProfile profile,
GError **error);
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index a7dabe3..72a1458 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -1391,7 +1391,7 @@ gimp_image_color_managed_get_color_profile (GimpColorManaged *managed)
GimpImage *image = GIMP_IMAGE (managed);
GimpColorProfile profile;
- profile = gimp_image_get_color_profile (image, NULL);
+ profile = gimp_image_get_color_profile (image);
if (! profile)
{
diff --git a/app/pdb/image-color-profile-cmds.c b/app/pdb/image-color-profile-cmds.c
index ab6a6f1..818e05d 100644
--- a/app/pdb/image-color-profile-cmds.c
+++ b/app/pdb/image-color-profile-cmds.c
@@ -62,7 +62,7 @@ image_get_color_profile_invoker (GimpProcedure *procedure,
{
GimpColorProfile profile;
- profile = gimp_image_get_color_profile (image, NULL);
+ profile = gimp_image_get_color_profile (image);
if (profile)
{
diff --git a/tools/pdbgen/pdb/image_color_profile.pdb b/tools/pdbgen/pdb/image_color_profile.pdb
index c401ebf..e72097f 100644
--- a/tools/pdbgen/pdb/image_color_profile.pdb
+++ b/tools/pdbgen/pdb/image_color_profile.pdb
@@ -43,7 +43,7 @@ HELP
{
GimpColorProfile profile;
- profile = gimp_image_get_color_profile (image, NULL);
+ profile = gimp_image_get_color_profile (image);
if (profile)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]