Commit 872bfabc authored by Michael Natterer's avatar Michael Natterer 😴
Browse files

app: don't use gimp_drawable_type() in more places

that talk to the outside world.
parent fb93b134
......@@ -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
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment