[gimp] app: move the enum of indexes into the trans_info array to the .c files
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: move the enum of indexes into the trans_info array to the .c files
- Date: Sun, 27 Mar 2011 22:51:48 +0000 (UTC)
commit babc2186c57b65f3a486015ba29ee9cc5ba6d838
Author: Michael Natterer <mitch gimp org>
Date: Mon Mar 28 00:50:46 2011 +0200
app: move the enum of indexes into the trans_info array to the .c files
and turn #defines from 0 to N into enums.
app/core/gimpdrawable-transform.h | 13 -------------
app/tools/gimpperspectiveclonetool.c | 14 ++++++++++++++
app/tools/gimpperspectivetool.c | 14 ++++++++++++++
app/tools/gimprotatetool.c | 11 +++++++----
app/tools/gimpscaletool.c | 14 ++++++++++++++
app/tools/gimpsheartool.c | 9 ++++++---
6 files changed, 55 insertions(+), 20 deletions(-)
---
diff --git a/app/core/gimpdrawable-transform.h b/app/core/gimpdrawable-transform.h
index dcf66cd..4f35138 100644
--- a/app/core/gimpdrawable-transform.h
+++ b/app/core/gimpdrawable-transform.h
@@ -19,19 +19,6 @@
#define __GIMP_DRAWABLE_TRANSFORM_H__
-typedef enum
-{
- X0,
- Y0,
- X1,
- Y1,
- X2,
- Y2,
- X3,
- Y3
-} GimpTransformBoundingBox;
-
-
TileManager * gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
GimpContext *context,
TileManager *orig_tiles,
diff --git a/app/tools/gimpperspectiveclonetool.c b/app/tools/gimpperspectiveclonetool.c
index 265ddf4..a0c107f 100644
--- a/app/tools/gimpperspectiveclonetool.c
+++ b/app/tools/gimpperspectiveclonetool.c
@@ -46,6 +46,20 @@
#include "gimp-intl.h"
+/* index into trans_info array */
+enum
+{
+ X0,
+ Y0,
+ X1,
+ Y1,
+ X2,
+ Y2,
+ X3,
+ Y3
+};
+
+
static void gimp_perspective_clone_tool_constructed (GObject *object);
static gboolean gimp_perspective_clone_tool_initialize (GimpTool *tool,
diff --git a/app/tools/gimpperspectivetool.c b/app/tools/gimpperspectivetool.c
index d9fa56a..82f3d06 100644
--- a/app/tools/gimpperspectivetool.c
+++ b/app/tools/gimpperspectivetool.c
@@ -41,6 +41,20 @@
#include "gimp-intl.h"
+/* index into trans_info array */
+enum
+{
+ X0,
+ Y0,
+ X1,
+ Y1,
+ X2,
+ Y2,
+ X3,
+ Y3
+};
+
+
/* local function prototypes */
static void gimp_perspective_tool_dialog (GimpTransformTool *tr_tool);
diff --git a/app/tools/gimprotatetool.c b/app/tools/gimprotatetool.c
index cdc779e..dca28d2 100644
--- a/app/tools/gimprotatetool.c
+++ b/app/tools/gimprotatetool.c
@@ -44,10 +44,13 @@
/* index into trans_info array */
-#define ANGLE 0
-#define REAL_ANGLE 1
-#define CENTER_X 2
-#define CENTER_Y 3
+enum
+{
+ ANGLE,
+ REAL_ANGLE,
+ CENTER_X,
+ CENTER_Y
+};
#define FIFTEEN_DEG (G_PI / 12.0)
diff --git a/app/tools/gimpscaletool.c b/app/tools/gimpscaletool.c
index aa2fa57..f2812af 100644
--- a/app/tools/gimpscaletool.c
+++ b/app/tools/gimpscaletool.c
@@ -44,6 +44,20 @@
#include "gimp-intl.h"
+/* index into trans_info array */
+enum
+{
+ X0,
+ Y0,
+ X1,
+ Y1,
+ X2,
+ Y2,
+ X3,
+ Y3
+};
+
+
/* local function prototypes */
static void gimp_scale_tool_dialog (GimpTransformTool *tr_tool);
diff --git a/app/tools/gimpsheartool.c b/app/tools/gimpsheartool.c
index 4219bcc..914b955 100644
--- a/app/tools/gimpsheartool.c
+++ b/app/tools/gimpsheartool.c
@@ -38,9 +38,12 @@
/* index into trans_info array */
-#define HORZ_OR_VERT 0
-#define XSHEAR 1
-#define YSHEAR 2
+enum
+{
+ HORZ_OR_VERT,
+ XSHEAR,
+ YSHEAR
+};
/* the minimum movement before direction of shear can be determined (pixels) */
#define MIN_MOVE 5
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]