gimp r27635 - in trunk: . app/pdb
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27635 - in trunk: . app/pdb
- Date: Thu, 13 Nov 2008 08:21:01 +0000 (UTC)
Author: neo
Date: Thu Nov 13 08:21:00 2008
New Revision: 27635
URL: http://svn.gnome.org/viewvc/gimp?rev=27635&view=rev
Log:
2008-11-13 Sven Neumann <sven gimp org>
Bug 559292 â SOTA Chrome cannot accept different textures
* app/pdb/gimppdb-utils.c (gimp_pdb_image_is_base_type)
(gimp_pdb_image_is_not_base_type): gimp_object_get_name() may
return NULL for images. Use gimp_image_get_uri() instead.
Modified:
trunk/ChangeLog
trunk/app/pdb/gimppdb-utils.c
Modified: trunk/app/pdb/gimppdb-utils.c
==============================================================================
--- trunk/app/pdb/gimppdb-utils.c (original)
+++ trunk/app/pdb/gimppdb-utils.c Thu Nov 13 08:21:00 2008
@@ -32,6 +32,8 @@
#include "core/gimpimage.h"
#include "core/gimpitem.h"
+#include "file/file-utils.h"
+
#include "text/gimptextlayer.h"
#include "vectors/gimpvectors.h"
@@ -385,21 +387,27 @@
GimpImageBaseType type,
GError **error)
{
+ gchar *name;
+
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
if (gimp_image_base_type (image) == type)
return TRUE;
+ name = file_utils_uri_display_basename (gimp_image_get_uri (image));
+
g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_INVALID_ARGUMENT,
_("Image '%s' (%d) is of type '%s', "
"but an image of type '%s' is expected"),
- gimp_object_get_name (GIMP_OBJECT (image)),
+ name,
gimp_image_get_ID (image),
gimp_pdb_enum_value_get_nick (GIMP_TYPE_IMAGE_BASE_TYPE,
gimp_image_base_type (image)),
gimp_pdb_enum_value_get_nick (GIMP_TYPE_IMAGE_BASE_TYPE, type));
+ g_free (name);
+
return FALSE;
}
@@ -408,18 +416,24 @@
GimpImageBaseType type,
GError **error)
{
+ gchar *name;
+
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
if (gimp_image_base_type (image) != type)
return TRUE;
+ name = file_utils_uri_display_basename (gimp_image_get_uri (image));
+
g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_INVALID_ARGUMENT,
_("Image '%s' (%d) is already of type '%s'"),
- gimp_object_get_name (GIMP_OBJECT (image)),
+ name,
gimp_image_get_ID (image),
gimp_pdb_enum_value_get_nick (GIMP_TYPE_IMAGE_BASE_TYPE, type));
+ g_free (name);
+
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]