applied a patch from Maurits Rijk that enables mnemonics (bug #80804).

2002-05-11  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpwidgets.c (gimp_radio_group_new2): applied a
	patch from Maurits Rijk that enables mnemonics (bug #80804).

	* plug-ins/common/blinds.c
	* plug-ins/common/deinterlace.c
	* plug-ins/common/despeckle.c
	* plug-ins/common/destripe.c
	* plug-ins/common/emboss.c
	* plug-ins/common/flarefx.c
	* plug-ins/common/mblur.c
	* plug-ins/common/oilify.c
	* plug-ins/common/pixelize.c
	* plug-ins/common/sel_gauss.c
	* plug-ins/common/struc.c: : applied patches from Maurits Rijk that
	add mnemonics (bug #80804).

	* plug-ins/common/convmatrix.c: merged fix for bug #81345 from stable
	branch.
This commit is contained in:
Sven Neumann 2002-05-11 10:33:51 +00:00 committed by Sven Neumann
parent 0938e33e5b
commit 33b2724510
14 changed files with 108 additions and 113 deletions

View File

@ -1,3 +1,24 @@
2002-05-11 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpwidgets.c (gimp_radio_group_new2): applied a
patch from Maurits Rijk that enables mnemonics (bug #80804).
* plug-ins/common/blinds.c
* plug-ins/common/deinterlace.c
* plug-ins/common/despeckle.c
* plug-ins/common/destripe.c
* plug-ins/common/emboss.c
* plug-ins/common/flarefx.c
* plug-ins/common/mblur.c
* plug-ins/common/oilify.c
* plug-ins/common/pixelize.c
* plug-ins/common/sel_gauss.c
* plug-ins/common/struc.c: : applied patches from Maurits Rijk that
add mnemonics (bug #80804).
* plug-ins/common/convmatrix.c: merged fix for bug #81345 from stable
branch.
2002-05-11 Sven Neumann <sven@gimp.org>
* app/gui/Makefile.am: removed LOCALEDIR definition ...

View File

@ -522,7 +522,7 @@ gimp_radio_group_new2 (gboolean in_frame,
widget_ptr = va_arg (args, GtkWidget **);
if (label != (gpointer) 1)
button = gtk_radio_button_new_with_label (group, label);
button = gtk_radio_button_new_with_mnemonic (group, label);
else
button = gtk_radio_button_new (group);

View File

@ -374,8 +374,8 @@ blinds_dialog (void)
G_CALLBACK (blinds_radio_update),
&bvals.orientation, (gpointer) bvals.orientation,
_("Horizontal"), (gpointer) HORIZONTAL, NULL,
_("Vertical"), (gpointer) VERTICAL, NULL,
_("_Horizontal"), (gpointer) HORIZONTAL, NULL,
_("_Vertical"), (gpointer) VERTICAL, NULL,
NULL);
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
@ -390,7 +390,7 @@ blinds_dialog (void)
gtk_container_add (GTK_CONTAINER (frame), toggle_vbox);
gtk_widget_show (toggle_vbox);
toggle = gtk_check_button_new_with_label (_("Transparent"));
toggle = gtk_check_button_new_with_mnemonic (_("_Transparent"));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
gtk_widget_show (toggle);
@ -419,7 +419,7 @@ blinds_dialog (void)
gtk_widget_show (table);
size_data = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Displacement:"), SCALE_WIDTH, 0,
_("_Displacement:"), SCALE_WIDTH, 0,
bvals.angledsp, 1, 90, 1, 15, 0,
TRUE, 0, 0,
NULL, NULL);
@ -428,7 +428,7 @@ blinds_dialog (void)
&bvals.angledsp);
size_data = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Num Segments:"), SCALE_WIDTH, 0,
_("_Num Segments:"), SCALE_WIDTH, 0,
bvals.numsegs, 1, MAX_FANS, 1, 2, 0,
TRUE, 0, 0,
NULL, NULL);
@ -493,7 +493,7 @@ cache_preview (void)
int y,x;
guchar *src_rows;
guchar *p;
int isgrey = 0;
gboolean isgrey;
gimp_pixel_rgn_init (&src_rgn, blindsdrawable,
sel_x1, sel_y1, sel_width, sel_height, FALSE, FALSE);
@ -510,14 +510,7 @@ cache_preview (void)
bint.img_bpp = 3 + has_alpha;
}
switch (gimp_drawable_type (blindsdrawable->drawable_id))
{
case GIMP_GRAYA_IMAGE:
case GIMP_GRAY_IMAGE:
isgrey = 1;
default:
break;
}
isgrey = gimp_drawable_is_gray (blindsdrawable->drawable_id);
for (y = 0; y < preview_height; y++)
{
@ -527,7 +520,7 @@ cache_preview (void)
sel_y1 + (y * sel_height) / preview_height,
sel_width);
for (x = 0; x < (preview_width); x++)
for (x = 0; x < preview_width; x++)
{
/* Get the pixels of each col */
gint i;

View File

@ -425,9 +425,9 @@ my_get_row (GimpPixelRgn *PR,
w--;
}
}
if (w)
if (w && width - x > 0)
{
i = MIN (w, width);
i = MIN (w, width - x);
gimp_pixel_rgn_get_row (PR, dest, x, y, i);
w -= i;
dest += i * bytes;
@ -503,6 +503,7 @@ doit (void)
GimpPixelRgn srcPR, destPR;
gint width, height, row, col;
gint w, h, i;
gint x1, x2, y1, y2;
guchar *destrow[3];
guchar *srcrow[5];
guchar *temprow;
@ -542,8 +543,12 @@ doit (void)
destrow[i]= g_new (guchar, w * bytes);
/* initialize the pixel regions */
x1 = MAX (sx1 - 2, 0);
y1 = MAX (sy1 - 2, 0);
x2 = MIN (sx2 + 2, width);
y2 = MIN (sy2 + 2, height);
gimp_pixel_rgn_init (&srcPR, drawable,
sx1 - 2, sy1 - 2, w + 4, h + 4, FALSE, FALSE);
x1, y1, x2 - x1, y2 - y1, FALSE, FALSE);
gimp_pixel_rgn_init (&destPR, drawable, sx1, sy1, w, h, TRUE, TRUE);
/* initialize source arrays */

View File

@ -288,10 +288,10 @@ deinterlace_dialog (void)
&DeinterlaceValue,
GINT_TO_POINTER (DeinterlaceValue),
_("Keep Odd Fields"),
_("Keep _Odd Fields"),
GINT_TO_POINTER (ODD_FIELDS), NULL,
_("Keep Even Fields"),
_("Keep _Even Fields"),
GINT_TO_POINTER (EVEN_FIELDS), NULL,
NULL);

View File

@ -714,7 +714,7 @@ despeckle_dialog (void)
gtk_container_add (GTK_CONTAINER (frame), vbox);
gtk_widget_show (vbox);
button = gtk_check_button_new_with_label (_("Adaptive"));
button = gtk_check_button_new_with_mnemonic (_("_Adaptive"));
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
(filter_type & FILTER_ADAPTIVE) ? TRUE : FALSE);
@ -724,7 +724,7 @@ despeckle_dialog (void)
G_CALLBACK (dialog_adaptive_callback),
NULL);
button = gtk_check_button_new_with_label (_("Recursive"));
button = gtk_check_button_new_with_mnemonic (_("R_ecursive"));
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
(filter_type & FILTER_RECURSIVE) ? TRUE : FALSE);
@ -750,7 +750,7 @@ despeckle_dialog (void)
*/
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Radius:"), 100, 0,
_("_Radius:"), 100, 0,
despeckle_radius, 1, MAX_RADIUS, 1, 5, 0,
TRUE, 0, 0,
NULL, NULL);
@ -763,7 +763,7 @@ despeckle_dialog (void)
*/
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Black Level:"), 100, 0,
_("_Black Level:"), 100, 0,
black_level, -1, 255, 1, 8, 0,
TRUE, 0, 0,
NULL, NULL);
@ -776,7 +776,7 @@ despeckle_dialog (void)
*/
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
_("White Level:"), 100, 0,
_("_White Level:"), 100, 0,
white_level, 0, 256, 1, 8, 0,
TRUE, 0, 0,
NULL, NULL);

View File

@ -647,7 +647,7 @@ destripe_dialog (void)
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
button = gtk_check_button_new_with_label (_("Create Histogram"));
button = gtk_check_button_new_with_mnemonic (_("Create _Histogram"));
gtk_table_attach_defaults (GTK_TABLE (table), button, 0, 3, 0, 1);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
histogram ? TRUE : FALSE);
@ -671,7 +671,7 @@ destripe_dialog (void)
*/
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Width:"), SCALE_WIDTH, 0,
_("_Width:"), SCALE_WIDTH, 0,
avg_width, 2, MAX_AVG, 1, 10, 0,
TRUE, 0, 0,
NULL, NULL);

View File

@ -52,22 +52,7 @@ enum
FUNCTION_EMBOSS = 1
};
struct Grgb
{
guint8 red;
guint8 green;
guint8 blue;
};
struct GRegion
{
gint32 x;
gint32 y;
gint32 width;
gint32 height;
};
struct piArgs
typedef struct
{
gint32 img;
gint32 drw;
@ -75,7 +60,7 @@ struct piArgs
gdouble elevation;
gint32 depth;
gint32 embossp;
};
} piArgs;
struct embossFilter
{
@ -90,22 +75,22 @@ struct embossFilter
/* preview stuff -- to be removed as soon as we have a real libgimp preview */
struct mwPreview
typedef struct
{
gint width;
gint height;
gint bpp;
gdouble scale;
guchar *bits;
};
} mwPreview;
#define PREVIEW_SIZE 100
static gint do_preview = TRUE;
static GtkWidget * mw_preview_new (GtkWidget *parent,
struct mwPreview *mwp);
static struct mwPreview * mw_preview_build (GimpDrawable *drw);
static GtkWidget *mw_preview_new (GtkWidget *parent,
mwPreview *mwp);
static mwPreview *mw_preview_build (GimpDrawable *drw);
@ -116,8 +101,8 @@ static void run (gchar *name,
gint *nretvals,
GimpParam **retvals);
static gint pluginCore (struct piArgs *argp);
static gint pluginCoreIA (struct piArgs *argp);
static gint pluginCore (piArgs *argp);
static gint pluginCoreIA (piArgs *argp);
static void emboss_do_preview (GtkWidget *preview);
@ -141,7 +126,7 @@ GimpPlugInInfo PLUG_IN_INFO =
run, /* run */
};
static struct mwPreview *thePreview;
static mwPreview *thePreview;
MAIN ()
@ -181,13 +166,13 @@ run (gchar *name,
GimpParam **retvals)
{
static GimpParam rvals[1];
struct piArgs args;
piArgs args;
GimpDrawable *drw;
*nretvals = 1;
*retvals = rvals;
memset(&args, (int) 0, sizeof (struct piArgs));
memset(&args, (int) 0, sizeof (piArgs));
rvals[0].type = GIMP_PDB_STATUS;
rvals[0].data.d_status = GIMP_PDB_SUCCESS;
@ -217,7 +202,7 @@ run (gchar *name,
}
else
{
gimp_set_data ("plug_in_emboss", &args, sizeof (struct piArgs));
gimp_set_data ("plug_in_emboss", &args, sizeof (piArgs));
}
break;
@ -375,7 +360,7 @@ EmbossRow (guchar *src,
}
static gint
pluginCore (struct piArgs *argp)
pluginCore (piArgs *argp)
{
GimpDrawable *drw;
GimpPixelRgn src, dst;
@ -406,11 +391,8 @@ pluginCore (struct piArgs *argp)
gimp_pixel_rgn_init (&src, drw, x1, y1, width, height, FALSE, FALSE);
gimp_pixel_rgn_init (&dst, drw, x1, y1, width, height, TRUE, TRUE);
srcbuf = g_new (guchar, rowsize * 3);
dstbuf = g_new (guchar, rowsize);
memset (srcbuf, 0, (size_t) rowsize * 3);
memset (dstbuf, 0, (size_t) rowsize);
srcbuf = g_new0 (guchar, rowsize * 3);
dstbuf = g_new0 (guchar, rowsize);
EmbossInit (DtoR(argp->azimuth), DtoR(argp->elevation), argp->depth);
gimp_progress_init (_("Emboss"));
@ -504,7 +486,7 @@ emboss_int_adjustment_callback (GtkAdjustment *adj,
}
static gint
pluginCoreIA (struct piArgs *argp)
pluginCoreIA (piArgs *argp)
{
GtkWidget *dlg;
GtkWidget *main_vbox;
@ -550,8 +532,8 @@ pluginCoreIA (struct piArgs *argp)
G_CALLBACK (emboss_radio_button_callback),
&argp->embossp, (gpointer) argp->embossp,
_("Bumpmap"), (gpointer) FUNCTION_BUMPMAP, NULL,
_("Emboss"), (gpointer) FUNCTION_EMBOSS, NULL,
_("_Bumpmap"), (gpointer) FUNCTION_BUMPMAP, NULL,
_("_Emboss"), (gpointer) FUNCTION_EMBOSS, NULL,
NULL);
@ -570,7 +552,7 @@ pluginCoreIA (struct piArgs *argp)
gtk_container_add (GTK_CONTAINER (frame), table);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Azimuth:"), 100, 0,
_("_Azimuth:"), 100, 0,
argp->azimuth, 0.0, 360.0, 1.0, 10.0, 2,
TRUE, 0, 0,
NULL, NULL);
@ -579,7 +561,7 @@ pluginCoreIA (struct piArgs *argp)
&argp->azimuth);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Elevation:"), 100, 0,
_("E_levation:"), 100, 0,
argp->elevation, 0.0, 180.0, 1.0, 10.0, 2,
TRUE, 0, 0,
NULL, NULL);
@ -588,7 +570,7 @@ pluginCoreIA (struct piArgs *argp)
&argp->elevation);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
_("Depth:"), 100, 0,
_("_Depth:"), 100, 0,
argp->depth, 1.0, 100.0, 1.0, 5.0, 0,
TRUE, 0, 0,
NULL, NULL);
@ -613,7 +595,7 @@ static void
emboss_do_preview (GtkWidget *w)
{
static GtkWidget *theWidget = NULL;
struct piArgs *ap;
piArgs *ap;
guchar *dst, *c;
gint y, rowsize;
@ -671,12 +653,12 @@ mw_preview_toggle_callback (GtkWidget *widget,
emboss_do_preview (NULL);
}
static struct mwPreview *
static mwPreview *
mw_preview_build_virgin (GimpDrawable *drw)
{
struct mwPreview *mwp;
mwPreview *mwp;
mwp = g_new (struct mwPreview, 1);
mwp = g_new (mwPreview, 1);
if (drw->width > drw->height)
{
@ -697,10 +679,10 @@ mw_preview_build_virgin (GimpDrawable *drw)
return mwp;
}
static struct mwPreview *
static mwPreview *
mw_preview_build (GimpDrawable *drw)
{
struct mwPreview *mwp;
mwPreview *mwp;
gint x, y, b;
guchar *bc;
guchar *drwBits;
@ -730,7 +712,7 @@ mw_preview_build (GimpDrawable *drw)
static GtkWidget *
mw_preview_new (GtkWidget *parent,
struct mwPreview *mwp)
mwPreview *mwp)
{
GtkWidget *preview;
GtkWidget *frame;
@ -758,7 +740,7 @@ mw_preview_new (GtkWidget *parent,
gtk_container_add (GTK_CONTAINER (pframe), preview);
gtk_widget_show (preview);
button = gtk_check_button_new_with_label (_("Do Preview"));
button = gtk_check_button_new_with_mnemonic (_("Do _Preview"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), do_preview);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);

View File

@ -196,7 +196,7 @@ static guchar *preview_bits;
static GtkWidget *preview;
static gdouble preview_scale_x;
static gdouble preview_scale_y;
static gboolean show_cursor = 0;
static gboolean show_cursor = FALSE;
/* --- Functions --- */
MAIN ()
@ -791,7 +791,7 @@ flare_center_create (GimpDrawable *drawable)
gtk_container_set_border_width (GTK_CONTAINER (table), 4);
gtk_container_add (GTK_CONTAINER (frame), table);
label = gtk_label_new (_("X:"));
label = gtk_label_new_with_mnemonic (_("_X:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5 );
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
@ -804,6 +804,7 @@ flare_center_create (GimpDrawable *drawable)
gtk_table_attach (GTK_TABLE (table), spinbutton, 1, 2, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (spinbutton);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), spinbutton);
g_object_set_data (G_OBJECT (center->xadj), "center", center);
@ -811,7 +812,7 @@ flare_center_create (GimpDrawable *drawable)
G_CALLBACK (flare_center_adjustment_update),
&fvals.posx);
label = gtk_label_new (_("Y:"));
label = gtk_label_new_with_mnemonic (_("_Y:"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5 );
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1,
GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
@ -824,6 +825,7 @@ flare_center_create (GimpDrawable *drawable)
gtk_table_attach (GTK_TABLE (table), spinbutton, 3, 4, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (spinbutton);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), spinbutton);
g_object_set_data (G_OBJECT (center->yadj), "center", center);
@ -857,7 +859,7 @@ flare_center_create (GimpDrawable *drawable)
gtk_widget_show (frame);
/* show / hide cursor */
check = gtk_check_button_new_with_label (_("Show Cursor"));
check = gtk_check_button_new_with_mnemonic (_("_Show Cursor"));
gtk_table_attach (GTK_TABLE (table), check, 0, 4, 2, 3,
GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), show_cursor);

View File

@ -453,9 +453,9 @@ mblur_radial (void)
n = 4 * angle * sqrt (R) + 2;
theta = angle / ((float) (n - 1));
if (((ct = g_new (float, n)) == NULL) ||
((st = g_new (float, n)) == NULL))
return;
ct = g_new (float, n);
st = g_new (float, n);
offset = theta * (n - 1) / 2;
for (i = 0; i < n; ++i)
{
@ -780,13 +780,13 @@ mblur_dialog (void)
&mbvals.mblur_type,
GINT_TO_POINTER (mbvals.mblur_type),
_("Linear"),
_("_Linear"),
GINT_TO_POINTER (MBLUR_LINEAR), NULL,
_("Radial"),
_("_Radial"),
GINT_TO_POINTER (MBLUR_RADIAL), NULL,
_("Zoom"),
_("_Zoom"),
GINT_TO_POINTER (MBLUR_ZOOM), NULL,
NULL);
@ -806,7 +806,7 @@ mblur_dialog (void)
gtk_widget_show (table);
adjustment = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Length:"), 150, 0,
_("L_ength:"), 150, 0,
mbvals.length, 0.0, 256.0, 1.0, 8.0, 0,
TRUE, 0, 0,
NULL, NULL);
@ -815,7 +815,7 @@ mblur_dialog (void)
&mbvals.length);
adjustment = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Angle:"), 150, 0,
_("_Angle:"), 150, 0,
mbvals.angle, 0.0, 360.0, 1.0, 15.0, 0,
TRUE, 0, 0,
NULL, NULL);

View File

@ -477,7 +477,7 @@ oilify_dialog (void)
gtk_container_set_border_width (GTK_CONTAINER (table), 4);
gtk_container_add (GTK_CONTAINER (frame), table);
toggle = gtk_check_button_new_with_label (_("Use Intensity Algorithm"));
toggle = gtk_check_button_new_with_mnemonic (_("_Use Intensity Algorithm"));
gtk_table_attach (GTK_TABLE (table), toggle, 0, 3, 0, 1, GTK_FILL, 0, 0, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), ovals.mode);
gtk_widget_show (toggle);
@ -487,7 +487,7 @@ oilify_dialog (void)
&ovals.mode);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Mask Size:"), SCALE_WIDTH, 0,
_("_Mask Size:"), SCALE_WIDTH, 0,
ovals.mask_size, 3.0, 50.0, 1.0, 5.0, 0,
TRUE, 0, 0,
NULL, NULL);

View File

@ -355,12 +355,12 @@ pixelize_dialog (GimpDrawable *drawable)
GIMP_SIZE_ENTRY_UPDATE_SIZE,
TRUE, FALSE,
_("Pixel Width:"),
_("Pixel _Width:"),
pvals.pixelwidth, xres,
1, drawable->width,
1, drawable->width,
_("Pixel Height:"),
_("Pixel _Height:"),
pvals.pixelheight, yres,
1, drawable->height,
1, drawable->height);

View File

@ -267,14 +267,14 @@ sel_gauss_dialog (void)
bvals.radius, 1.0, G_MAXINT, 1.0, 5.0,
0, 1, 2);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Blur Radius:"), 1.0, 0.5,
_("_Blur Radius:"), 1.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
&bvals.radius);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Max. Delta:"), 128, 0,
_("_Max. Delta:"), 128, 0,
bvals.maxdelta, 0, 255, 1, 8, 0,
TRUE, 0, 0,
FALSE, FALSE);

View File

@ -1304,16 +1304,16 @@ struc_dialog (void)
&svals.direction,
GINT_TO_POINTER (svals.direction),
_("Top-Right"),
_("_Top-Right"),
GINT_TO_POINTER (TOP_RIGHT), NULL,
_("Top-Left"),
_("Top-_Left"),
GINT_TO_POINTER (TOP_LEFT), NULL,
_("Bottom-Left"),
_("_Bottom-Left"),
GINT_TO_POINTER (BOTTOM_LEFT), NULL,
_("Bottom-Right"),
_("Bottom-_Right"),
GINT_TO_POINTER (BOTTOM_RIGHT), NULL,
NULL);
@ -1327,7 +1327,7 @@ struc_dialog (void)
gtk_widget_show (table);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Depth:"), 100, 0,
_("_Depth:"), 100, 0,
svals.depth, 1, 50, 1, 5, 0,
TRUE, 0, 0,
NULL, NULL);
@ -1433,9 +1433,7 @@ strucpi (GimpDrawable *drawable)
for (col = 0; col < (x2 - x1) * bytes; col+=bytes)
{
varde = cur_row[col] + mult*sdata[rcol*xm+rrow*ym+offs];
if (varde > 255 ) varde = 255;
if (varde < 0) varde = 0;
*d++ = (guchar)varde;
*d++ = (guchar) CLAMP (varde, 0, 255);
if (bytes == 2)
*d++ = cur_row[col+1];
rcol++;
@ -1447,17 +1445,11 @@ strucpi (GimpDrawable *drawable)
for (col = 0; col < (x2 - x1) * bytes; col+=bytes)
{
varde = cur_row[col] + mult * sdata[rcol*xm+rrow*ym+offs];
if (varde > 255 ) varde = 255;
if (varde < 0) varde = 0;
*d++ = (guchar) varde;
*d++ = (guchar) CLAMP (varde, 0, 255);
varde = cur_row[col+1] + mult * sdata[rcol*xm+rrow*ym+offs];
if (varde > 255 ) varde = 255;
if (varde < 0) varde = 0;
*d++ = (guchar) varde;
*d++ = (guchar) CLAMP (varde, 0, 255);
varde = cur_row[col+2] + mult * sdata[rcol*xm+rrow*ym+offs];
if (varde > 255 ) varde = 255;
if (varde < 0) varde = 0;
*d++ = (guchar) varde;
*d++ = (guchar) CLAMP (varde, 0, 255);
if (bytes == 4)
*d++ = cur_row[col+3];
rcol++;
@ -1480,6 +1472,6 @@ strucpi (GimpDrawable *drawable)
gimp_drawable_merge_shadow (drawable->drawable_id, TRUE);
gimp_drawable_update (drawable->drawable_id, x1, y1, (x2 - x1), (y2 - y1));
free (cur_row);
free (dest);
g_free (cur_row);
g_free (dest);
}