app: don't use gimp_drawable_type() in more places
that talk to the outside world.
This commit is contained in:
@ -63,7 +63,7 @@ drawable_type_invoker (GimpProcedure *procedure,
|
||||
|
||||
if (success)
|
||||
{
|
||||
type = gimp_drawable_type (drawable);
|
||||
type = gimp_babl_format_get_image_type (gimp_drawable_get_format (drawable));
|
||||
}
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, success,
|
||||
|
@ -28,6 +28,8 @@
|
||||
|
||||
#include "plug-in-types.h"
|
||||
|
||||
#include "gegl/gimp-gegl-utils.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimp-utils.h"
|
||||
#include "core/gimpdrawable.h"
|
||||
@ -687,7 +689,11 @@ gimp_plug_in_procedure_get_sensitive (const GimpPlugInProcedure *proc,
|
||||
g_return_val_if_fail (drawable == NULL || GIMP_IS_DRAWABLE (drawable), FALSE);
|
||||
|
||||
if (drawable)
|
||||
image_type = gimp_drawable_type (drawable);
|
||||
{
|
||||
const Babl *format = gimp_drawable_get_format (drawable);
|
||||
|
||||
image_type = gimp_babl_format_get_image_type (format);
|
||||
}
|
||||
|
||||
switch (image_type)
|
||||
{
|
||||
|
@ -283,7 +283,7 @@ sub drawable_type {
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
type = gimp_drawable_type (drawable);
|
||||
type = gimp_babl_format_get_image_type (gimp_drawable_get_format (drawable));
|
||||
}
|
||||
CODE
|
||||
);
|
||||
|
Reference in New Issue
Block a user