mirror of https://github.com/GNOME/gimp.git
app/file/file-open.c minor cleanups.
2007-07-29 Sven Neumann <sven@gimp.org> * app/file/file-open.c * app/plug-in/plug-in-icc-profile.c: minor cleanups. svn path=/trunk/; revision=23063
This commit is contained in:
parent
2cff876952
commit
143c5f9173
|
@ -1,3 +1,8 @@
|
|||
2007-07-29 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/file/file-open.c
|
||||
* app/plug-in/plug-in-icc-profile.c: minor cleanups.
|
||||
|
||||
2007-07-29 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/common/tiff-load.c
|
||||
|
|
|
@ -566,12 +566,15 @@ file_open_profile_apply_rgb (GimpImage *image,
|
|||
{
|
||||
GError *error = NULL;
|
||||
|
||||
if (gimp_image_base_type (image) != GIMP_GRAY &&
|
||||
! plug_in_icc_profile_apply_rgb (image, context, progress,
|
||||
run_mode, &error))
|
||||
if (gimp_image_base_type (image) == GIMP_GRAY)
|
||||
return;
|
||||
|
||||
if (! plug_in_icc_profile_apply_rgb (image, context, progress, run_mode,
|
||||
&error))
|
||||
{
|
||||
gimp_message (image->gimp, G_OBJECT (progress),
|
||||
GIMP_MESSAGE_WARNING, error->message);
|
||||
|
||||
g_error_free (error);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,9 +58,15 @@ plug_in_icc_profile_apply_rgb (GimpImage *image,
|
|||
GimpRunMode run_mode,
|
||||
GError **error)
|
||||
{
|
||||
Gimp *gimp = image->gimp;
|
||||
Gimp *gimp;
|
||||
GimpProcedure *procedure;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), FALSE);
|
||||
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), FALSE);
|
||||
|
||||
gimp = image->gimp;
|
||||
|
||||
if (gimp_image_base_type (image) == GIMP_GRAY)
|
||||
return FALSE;
|
||||
|
||||
|
@ -137,9 +143,15 @@ plug_in_icc_profile_info (GimpImage *image,
|
|||
gchar **info,
|
||||
GError **error)
|
||||
{
|
||||
Gimp *gimp = image->gimp;
|
||||
Gimp *gimp;
|
||||
GimpProcedure *procedure;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), FALSE);
|
||||
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), FALSE);
|
||||
|
||||
gimp = image->gimp;
|
||||
|
||||
procedure = gimp_pdb_lookup_procedure (gimp->pdb, ICC_PROFILE_INFO_PROC);
|
||||
|
||||
if (procedure &&
|
||||
|
@ -194,6 +206,8 @@ plug_in_icc_profile_file_info (Gimp *gimp,
|
|||
GimpProcedure *procedure;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), FALSE);
|
||||
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), FALSE);
|
||||
g_return_val_if_fail (filename != NULL, FALSE);
|
||||
|
||||
procedure = gimp_pdb_lookup_procedure (gimp->pdb, ICC_PROFILE_FILE_INFO_PROC);
|
||||
|
|
Loading…
Reference in New Issue