From df723aca28c9e0708058ac4c9e428df982c3442e Mon Sep 17 00:00:00 2001 From: Jehan Date: Tue, 6 Apr 2021 17:23:27 +0200 Subject: [PATCH] =?UTF-8?q?plug-ins:=20use=20GimpChannelOps=20in=20gfig=20?= =?UTF-8?q?rather=20than=20using=20a=20custom=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … SelectionType enum which lists anyway the same. Fixes various warnings: > warning: implicit conversion from ‘SelectionType’ to ‘GimpChannelOps’ --- plug-ins/gfig/gfig-dialog.c | 14 +++++++------- plug-ins/gfig/gfig-types.h | 8 -------- plug-ins/gfig/gfig.h | 14 +++++++------- 3 files changed, 14 insertions(+), 22 deletions(-) diff --git a/plug-ins/gfig/gfig-dialog.c b/plug-ins/gfig/gfig-dialog.c index 16cb0093e7..23209b0fbd 100644 --- a/plug-ins/gfig/gfig-dialog.c +++ b/plug-ins/gfig/gfig-dialog.c @@ -112,13 +112,13 @@ SelectItVals selvals = selection_option selopt = { - ADD, /* type */ - FALSE, /* Antia */ - FALSE, /* Feather */ - 10.0, /* feather radius */ - ARC_SEGMENT, /* Arc as a segment */ - FILL_PATTERN, /* Fill as pattern */ - 100.0, /* Max opacity */ + GIMP_CHANNEL_OP_ADD, /* type */ + FALSE, /* Antia */ + FALSE, /* Feather */ + 10.0, /* feather radius */ + ARC_SEGMENT, /* Arc as a segment */ + FILL_PATTERN, /* Fill as pattern */ + 100.0, /* Max opacity */ }; /* Should be kept in sync with GfigOpts */ diff --git a/plug-ins/gfig/gfig-types.h b/plug-ins/gfig/gfig-types.h index 5cb3168424..947c735cee 100644 --- a/plug-ins/gfig/gfig-types.h +++ b/plug-ins/gfig/gfig-types.h @@ -32,14 +32,6 @@ typedef enum ISO_GRID } GridType; -typedef enum -{ - ADD = 0, - SUBTRACT, - REPLACE, - INTERSECT -} SelectionType; - typedef enum { ARC_SEGMENT = 0, diff --git a/plug-ins/gfig/gfig.h b/plug-ins/gfig/gfig.h index 3435f292a5..dcecfbd336 100644 --- a/plug-ins/gfig/gfig.h +++ b/plug-ins/gfig/gfig.h @@ -48,13 +48,13 @@ typedef struct typedef struct { - SelectionType type; /* ADD etc .. */ - gint antia; /* Boolean for Antia */ - gint feather; /* Feather it ? */ - gdouble feather_radius; /* Radius to feather */ - ArcType as_pie; /* Arc type selection segment/sector */ - FillType fill_type; /* Fill type for selection */ - gdouble fill_opacity; /* You can guess this one */ + GimpChannelOps type; /* ADD etc .. */ + gint antia; /* Boolean for Antia */ + gint feather; /* Feather it ? */ + gdouble feather_radius; /* Radius to feather */ + ArcType as_pie; /* Arc type selection segment/sector */ + FillType fill_type; /* Fill type for selection */ + gdouble fill_opacity; /* You can guess this one */ } selection_option; void object_start (GdkPoint *pnt, gint);