gimp r28112 - in trunk: . plug-ins/common
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r28112 - in trunk: . plug-ins/common
- Date: Thu, 5 Mar 2009 20:03:10 +0000 (UTC)
Author: mitch
Date: Thu Mar 5 20:03:10 2009
New Revision: 28112
URL: http://svn.gnome.org/viewvc/gimp?rev=28112&view=rev
Log:
2009-03-05 Michael Natterer <mitch gimp org>
* plug-ins/common/blinds.c: use enum GimpOrientationType instead
of local #defines for HORIZONTAL and VERTICAL with identical
values. Some indentation and formatting fixups.
Modified:
trunk/ChangeLog
trunk/plug-ins/common/blinds.c
Modified: trunk/plug-ins/common/blinds.c
==============================================================================
--- trunk/plug-ins/common/blinds.c (original)
+++ trunk/plug-ins/common/blinds.c Thu Mar 5 20:03:10 2009
@@ -47,15 +47,12 @@
#define MAX_FANS 100
-#define HORIZONTAL 0
-#define VERTICAL 1
-
/* Variables set in dialog box */
typedef struct data
{
- gint angledsp;
- gint numsegs;
- gint orientation;
+ gint angledsp;
+ gint numsegs;
+ GimpOrientationType orientation;
gboolean bg_trans;
} BlindVals;
@@ -91,7 +88,7 @@
{
30,
3,
- HORIZONTAL, /* orientation */
+ GIMP_ORIENTATION_HORIZONTAL,
FALSE
};
@@ -107,8 +104,8 @@
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_INT32, "angle-dsp", "Angle of Displacement" },
{ GIMP_PDB_INT32, "num-segments", "Number of segments in blinds" },
- { GIMP_PDB_INT32, "orientation", "orientation; 0 = Horizontal, 1 = Vertical" },
- { GIMP_PDB_INT32, "bg-transparent", "background transparent; FALSE,TRUE" }
+ { GIMP_PDB_INT32, "orientation", "The orientation { ORIENTATION-HORIZONTAL (0), ORIENTATION-VERTICAL (1) }" },
+ { GIMP_PDB_INT32, "bg-transparent", "Background transparent { FALSE, TRUE }" }
};
gimp_install_procedure (PLUG_IN_PROC,
@@ -166,10 +163,10 @@
status = GIMP_PDB_CALLING_ERROR;
if (status == GIMP_PDB_SUCCESS)
{
- bvals.angledsp = param[3].data.d_int32;
- bvals.numsegs = param[4].data.d_int32;
+ bvals.angledsp = param[3].data.d_int32;
+ bvals.numsegs = param[4].data.d_int32;
bvals.orientation = param[5].data.d_int32;
- bvals.bg_trans = param[6].data.d_int32;
+ bvals.bg_trans = param[6].data.d_int32;
}
break;
@@ -260,8 +257,11 @@
G_CALLBACK (gimp_radio_button_update),
&bvals.orientation, bvals.orientation,
- _("_Horizontal"), HORIZONTAL, &horizontal,
- _("_Vertical"), VERTICAL, &vertical,
+ _("_Horizontal"), GIMP_ORIENTATION_HORIZONTAL,
+ &horizontal,
+
+ _("_Vertical"), GIMP_ORIENTATION_VERTICAL,
+ &vertical,
NULL);
gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, FALSE, 0);
@@ -466,7 +466,7 @@
buffer = g_new (guchar, width * height * bpp);
- if (bvals.orientation)
+ if (bvals.orientation == GIMP_ORIENTATION_VERTICAL)
{
for (y = 0; y < height; y++)
{
@@ -581,7 +581,7 @@
src_rows = g_new (guchar, MAX (sel_width, sel_height) * 4 * STEP);
des_rows = g_new (guchar, MAX (sel_width, sel_height) * 4 * STEP);
- if (bvals.orientation)
+ if (bvals.orientation == GIMP_ORIENTATION_VERTICAL)
{
for (y = 0; y < sel_height; y += STEP)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]