Enable mnemonics (#80804)

This commit is contained in:
Maurits Rijk 2002-05-27 17:25:30 +00:00
parent 74195d1f3f
commit ff06323109
11 changed files with 187 additions and 220 deletions

View File

@ -1,8 +1,17 @@
2002-05-27 Michael Natterer <mitch@gimp.org>
2002-05-27 Maurits Rijk <lpeek.mrijk@consunet.nl>
* libgimpwidgets/gimpsizeentry.c (gimp_size_entry_attach_label):
set the spinbutton which is attached right of the label as
mnemonic_widget for the label.
* plug-ins/common/randomize.c (randomize_dialog)
* plug-ins/Lighting/lighting_ui.c
* plug-ins/common/nova.c (nova_dialog)
* plug-ins/common/sparkle.c (sparkle_dialog)
* plug-ins/common/plasma.c (plasma_dialog)
* plug-ins/common/waves.c (pluginCoreIA): enable_mnemonics.
2002-05-27 Maurits Rijk <lpeek.mrijk@consunet.nl>
* plug-ins/common/apply_lens.c (lens_dialog): call to
gimp_drawable_has_alpha iso seperate check on GIMP_INDEXEDA_IMAGE |
GIMP_GRAYA_IMAGE | GIMP_RGBA_IMAGE
2002-05-27 Michael Natterer <mitch@gimp.org>

View File

@ -847,7 +847,7 @@ gimp_random_seed_new (gint *seed,
"seed - this allows you to repeat a "
"given \"random\" operation"), NULL);
button = gtk_toggle_button_new_with_label (_("Time"));
button = gtk_toggle_button_new_with_mnemonic (_("_Time"));
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (gimp_random_seed_toggle_update),

View File

@ -425,7 +425,7 @@ create_options_page (void)
_("Enable/disable environment mapping (reflection)"),
NULL);
*/
toggle = gtk_check_button_new_with_label (_("Transparent Background"));
toggle = gtk_check_button_new_with_mnemonic (_("T_ransparent Background"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
mapvals.transparent_background);
gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
@ -438,7 +438,7 @@ create_options_page (void)
_("Make destination image transparent where bump "
"height is zero"),NULL);
toggle = gtk_check_button_new_with_label (_("Create New Image"));
toggle = gtk_check_button_new_with_mnemonic (_("Cre_ate New Image"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
mapvals.create_new_image);
gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
@ -450,7 +450,7 @@ create_options_page (void)
gimp_help_set_help_data (toggle,
_("Create a new image when applying filter"), NULL);
toggle = gtk_check_button_new_with_label (_("High Quality Preview"));
toggle = gtk_check_button_new_with_mnemonic (_("High _Quality Preview"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
mapvals.previewquality);
gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
@ -473,7 +473,7 @@ create_options_page (void)
gtk_container_add (GTK_CONTAINER (frame), vbox);
gtk_widget_show (vbox);
toggle = gtk_check_button_new_with_label (_("Enable Antialiasing"));
toggle = gtk_check_button_new_with_mnemonic (_("E_nable Antialiasing"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
mapvals.antialiasing);
gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
@ -496,7 +496,7 @@ create_options_page (void)
g_object_set_data (G_OBJECT (toggle), "set_sensitive", table);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Depth:"), 0, 0,
_("_Depth:"), 0, 0,
mapvals.max_depth, 1.0, 5.0, 0.5, 1.0,
1, TRUE, 0, 0,
_("Antialiasing quality. Higher is better, "
@ -506,7 +506,7 @@ create_options_page (void)
&mapvals.max_depth);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Threshold:"), 0, 0,
_("T_hreshold:"), 0, 0,
mapvals.pixel_treshold, 0.01, 1000.0, 1.0, 15.0, 2,
TRUE, 0, 0,
_("Stop when pixel differences are smaller than "
@ -579,7 +579,7 @@ create_light_page (void)
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Light Type:"), 1.0, 0.5,
_("L_ight Type:"), 1.0, 0.5,
optionmenu, 1, TRUE);
gimp_help_set_help_data (optionmenu, _("Type of light source to apply"), NULL);
@ -592,7 +592,7 @@ create_light_page (void)
G_CALLBACK (gimp_color_button_get_color),
&mapvals.lightsource.color);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Light Color:"), 1.0, 0.5,
_("Lig_ht Color:"), 1.0, 0.5,
colorbutton, 1, TRUE);
gimp_help_set_help_data (colorbutton,
@ -615,7 +615,7 @@ create_light_page (void)
-G_MAXFLOAT, G_MAXFLOAT,
0.1, 1.0, 1.0, 0.0, 2);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("X:"), 1.0, 0.5,
_("_X:"), 1.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
@ -628,7 +628,7 @@ create_light_page (void)
-G_MAXFLOAT, G_MAXFLOAT,
0.1, 1.0, 1.0, 0.0, 2);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Y:"), 1.0, 0.5,
_("_Y:"), 1.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
@ -641,7 +641,7 @@ create_light_page (void)
-G_MAXFLOAT, G_MAXFLOAT,
0.1, 1.0, 1.0, 0.0, 2);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
_("Z:"), 1.0, 0.5,
_("_Z:"), 1.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
@ -715,6 +715,7 @@ create_material_page (void)
GtkWidget *page;
GtkWidget *frame;
GtkWidget *table;
GtkWidget *label;
GtkWidget *hbox;
GtkWidget *spinbutton;
GtkObject *adj;
@ -740,9 +741,9 @@ create_material_page (void)
/* Ambient intensity */
pixmap = gimp_pixmap_new (amb1_xpm);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Ambient:"), 1.0, 0.5,
pixmap, 1, FALSE);
label = gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("_Ambient:"), 1.0, 0.5,
pixmap, 1, FALSE);
spinbutton = gimp_spin_button_new (&adj, mapvals.material.ambient_int,
0, G_MAXFLOAT, 0.1, 1.0, 1.0, 0.0, 2);
@ -752,6 +753,7 @@ create_material_page (void)
G_CALLBACK (gimp_double_adjustment_update),
&mapvals.material.ambient_int);
gtk_widget_show (spinbutton);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), spinbutton);
gimp_help_set_help_data (spinbutton,
_("Amount of original color to show where no "
@ -765,9 +767,9 @@ create_material_page (void)
/* Diffuse intensity */
pixmap = gimp_pixmap_new (diffint1_xpm);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Diffuse:"), 1.0, 0.5,
pixmap, 1, FALSE);
label = gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("_Diffuse:"), 1.0, 0.5,
pixmap, 1, FALSE);
spinbutton = gimp_spin_button_new (&adj, mapvals.material.diffuse_int,
0, G_MAXFLOAT, 0.1, 1.0, 1.0, 0.0, 2);
@ -777,6 +779,7 @@ create_material_page (void)
G_CALLBACK (gimp_double_adjustment_update),
&mapvals.material.diffuse_int);
gtk_widget_show (spinbutton);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), spinbutton);
gimp_help_set_help_data (spinbutton,
_("Intensity of original color when lit by a light "
@ -804,9 +807,9 @@ create_material_page (void)
/* Diffuse reflection */
pixmap = gimp_pixmap_new (diffref1_xpm);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Diffuse:"), 1.0, 0.5,
pixmap, 1, FALSE);
label = gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("D_iffuse:"), 1.0, 0.5,
pixmap, 1, FALSE);
spinbutton = gimp_spin_button_new (&adj, mapvals.material.diffuse_ref,
0, G_MAXFLOAT, 0.1, 1.0, 1.0, 0.0, 2);
@ -816,6 +819,7 @@ create_material_page (void)
G_CALLBACK (gimp_double_adjustment_update),
&mapvals.material.diffuse_ref);
gtk_widget_show (spinbutton);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), spinbutton);
gimp_help_set_help_data (spinbutton,
_("Higher values makes the object reflect more "
@ -829,9 +833,9 @@ create_material_page (void)
/* Specular reflection */
pixmap = gimp_pixmap_new (specref1_xpm);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Specular:"), 1.0, 0.5,
pixmap, 1, FALSE);
label = gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("_Specular:"), 1.0, 0.5,
pixmap, 1, FALSE);
spinbutton = gimp_spin_button_new (&adj, mapvals.material.specular_ref,
0, G_MAXFLOAT, 0.1, 1.0, 1.0, 0.0, 2);
@ -841,6 +845,7 @@ create_material_page (void)
G_CALLBACK (gimp_double_adjustment_update),
&mapvals.material.specular_ref);
gtk_widget_show (spinbutton);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), spinbutton);
gimp_help_set_help_data (spinbutton,
_("Controls how intense the highlights will be"),
@ -854,9 +859,9 @@ create_material_page (void)
/* Highlight */
pixmap = gimp_pixmap_new (high1_xpm);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
_("Highlight:"), 1.0, 0.5,
pixmap, 1, FALSE);
label = gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
_("_Highlight:"), 1.0, 0.5,
pixmap, 1, FALSE);
spinbutton = gimp_spin_button_new (&adj, mapvals.material.highlight,
0, G_MAXFLOAT, 0.1, 1.0, 1.0, 0.0, 2);
@ -866,6 +871,7 @@ create_material_page (void)
G_CALLBACK (gimp_double_adjustment_update),
&mapvals.material.highlight);
gtk_widget_show (spinbutton);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), spinbutton);
gimp_help_set_help_data (spinbutton,
_("Higher values makes the highlights more focused"),
@ -907,7 +913,7 @@ create_bump_page (void)
gtk_container_add (GTK_CONTAINER (frame), vbox);
gtk_widget_show (vbox);
toggle = gtk_check_button_new_with_label (_("Enable Bump Mapping"));
toggle = gtk_check_button_new_with_mnemonic (_("E_nable Bump Mapping"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
mapvals.bump_mapped);
gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
@ -934,7 +940,7 @@ create_bump_page (void)
NULL, mapvals.bumpmap_id);
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Bumpmap Image:"), 1.0, 0.5,
_("Bumpm_ap Image:"), 1.0, 0.5,
optionmenu, 1, TRUE);
optionmenu =
@ -950,13 +956,13 @@ create_bump_page (void)
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Curve:"), 1.0, 0.5,
_("Cu_rve:"), 1.0, 0.5,
optionmenu, 1, TRUE);
spinbutton = gimp_spin_button_new (&adj, mapvals.bumpmax,
0, G_MAXFLOAT, 0.01, 0.1, 1.0, 0.0, 2);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
_("Maximum Height:"), 1.0, 0.5,
_("Ma_ximum Height:"), 1.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
@ -969,7 +975,7 @@ create_bump_page (void)
spinbutton = gimp_spin_button_new (&adj, mapvals.bumpmin,
0, G_MAXFLOAT, 0.01, 0.1, 1.0, 0.0, 2);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 3,
_("Minimum Height:"), 1.0, 0.5,
_("M_inimum Height:"), 1.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
@ -979,7 +985,7 @@ create_bump_page (void)
_("Minimum height for bumps"),
NULL);
toggle = gtk_check_button_new_with_label (_("Autostretch to Fit Value Range"));
toggle = gtk_check_button_new_with_mnemonic (_("Auto_stretch to Fit Value Range"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
mapvals.bumpstretch);
gtk_table_attach_defaults (GTK_TABLE (table), toggle, 0, 2, 4, 5);
@ -1019,7 +1025,7 @@ create_environment_page (void)
gtk_container_add (GTK_CONTAINER (frame), vbox);
gtk_widget_show (vbox);
toggle = gtk_check_button_new_with_label (_("Enable Environment Mapping"));
toggle = gtk_check_button_new_with_mnemonic (_("E_nable Environment Mapping"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
mapvals.env_mapped);
gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
@ -1046,7 +1052,7 @@ create_environment_page (void)
NULL, mapvals.envmap_id);
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Environment Image:"), 1.0, 0.5,
_("En_vironment Image:"), 1.0, 0.5,
optionmenu, 1, TRUE);
gimp_help_set_help_data (optionmenu,
@ -1073,23 +1079,23 @@ create_main_notebook (GtkWidget *container)
page = create_options_page ();
gtk_notebook_append_page (options_note_book, page,
gtk_label_new (_("Options")));
gtk_label_new_with_mnemonic (_("Op_tions")));
page = create_light_page ();
gtk_notebook_append_page (options_note_book, page,
gtk_label_new (_("Light")));
gtk_label_new_with_mnemonic (_("_Light")));
page = create_material_page ();
gtk_notebook_append_page (options_note_book, page,
gtk_label_new (_("Material")));
gtk_label_new_with_mnemonic (_("_Material")));
page = create_bump_page ();
gtk_notebook_append_page (options_note_book, page,
gtk_label_new (_("Bump Map")));
gtk_label_new_with_mnemonic (_("_Bump Map")));
page = create_environment_page ();
gtk_notebook_append_page (options_note_book, page,
gtk_label_new (_("Environment Map")));
gtk_label_new_with_mnemonic (_("_Environment Map")));
/*
if (mapvals.bump_mapped == TRUE)
@ -1191,7 +1197,7 @@ main_dialog (GimpDrawable *drawable)
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
button = gtk_button_new_with_label (_("Update Preview"));
button = gtk_button_new_with_mnemonic (_("_Update Preview"));
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
g_signal_connect (G_OBJECT (button), "clicked",

View File

@ -380,9 +380,6 @@ lens_dialog (GimpDrawable *drawable)
GtkWidget *hbox;
GtkWidget *spinbutton;
GtkObject *adj;
GimpImageType drawtype;
drawtype = gimp_drawable_type (drawable->drawable_id);
gimp_ui_init ("apply_lens", FALSE);
@ -424,9 +421,9 @@ lens_dialog (GimpDrawable *drawable)
toggle = gtk_radio_button_new_with_mnemonic_from_widget
(GTK_RADIO_BUTTON (toggle),
drawtype == GIMP_INDEXEDA_IMAGE || drawtype == GIMP_INDEXED_IMAGE ?
_("_Set Surroundings to Index 0") :
_("_Set Surroundings to Background Color"));
gimp_drawable_is_indexed (drawable->drawable_id)
? _("_Set Surroundings to Index 0")
: _("_Set Surroundings to Background Color"));
gtk_box_pack_start(GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), lvals.use_bkgr);
gtk_widget_show (toggle);
@ -435,9 +432,7 @@ lens_dialog (GimpDrawable *drawable)
G_CALLBACK (gimp_toggle_button_update),
&lvals.use_bkgr);
if ((drawtype == GIMP_INDEXEDA_IMAGE) ||
(drawtype == GIMP_GRAYA_IMAGE) ||
(drawtype == GIMP_RGBA_IMAGE))
if (gimp_drawable_has_alpha (drawable->drawable_id))
{
toggle = gtk_radio_button_new_with_mnemonic_from_widget
(GTK_RADIO_BUTTON (toggle), _("_Make Surroundings Transparent"));

View File

@ -53,30 +53,14 @@
#include "libgimp/stdplugins-intl.h"
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;
gdouble alpha;
gdouble radius;
gint filter;
};
} piArgs;
typedef enum
{
@ -87,23 +71,23 @@ typedef enum
/* 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 struct mwPreview *thePreview;
static mwPreview *thePreview;
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);
/* function protos */
@ -115,8 +99,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 nlfilt_do_preview (GtkWidget *preview);
@ -176,12 +160,12 @@ run (gchar *name,
{
static GimpParam rvals[1];
struct piArgs args;
piArgs args;
*nretvals = 1;
*retvals = rvals;
memset (&args, (int) 0, sizeof (struct piArgs));
memset (&args, (int) 0, sizeof (piArgs));
args.radius = -1.0;
gimp_get_data ("plug_in_nlfilt", &args);
@ -212,7 +196,7 @@ run (gchar *name,
}
else
{
gimp_set_data ("plug_in_nlfilt", &args, sizeof (struct piArgs));
gimp_set_data ("plug_in_nlfilt", &args, sizeof (piArgs));
}
break;
@ -247,22 +231,22 @@ run (gchar *name,
}
static gint
pluginCore (struct piArgs *argp)
pluginCore (piArgs *argp)
{
GimpDrawable *drw;
GimpPixelRgn srcPr, dstPr;
guchar *srcbuf, *dstbuf;
guchar *lastrow, *thisrow, *nextrow, *temprow;
guint width, height, Bpp;
guint width, height, bpp;
gint filtno, y, rowsize, exrowsize, p_update;
drw = gimp_drawable_get (argp->drw);
width = drw->width;
height = drw->height;
Bpp = drw->bpp;
rowsize = width * Bpp;
exrowsize = (width + 2) * Bpp;
bpp = drw->bpp;
rowsize = width * bpp;
exrowsize = (width + 2) * bpp;
p_update = width / 20 + 1;
gimp_tile_cache_ntiles (2 * (width / gimp_tile_width () + 1));
@ -275,7 +259,7 @@ pluginCore (struct piArgs *argp)
dstbuf = g_new0 (guchar, rowsize);
/* pointers to second pixel in each source row */
lastrow = srcbuf + Bpp;
lastrow = srcbuf + bpp;
thisrow = lastrow + exrowsize;
nextrow = thisrow + exrowsize;
@ -285,10 +269,10 @@ pluginCore (struct piArgs *argp)
/* first row */
gimp_pixel_rgn_get_row (&srcPr, thisrow, 0, 0, width);
/* copy thisrow[0] to thisrow[-1], thisrow[width-1] to thisrow[width] */
memcpy (thisrow - Bpp, thisrow, Bpp);
memcpy (thisrow + rowsize, thisrow + rowsize - Bpp, Bpp);
memcpy (thisrow - bpp, thisrow, bpp);
memcpy (thisrow + rowsize, thisrow + rowsize - bpp, bpp);
/* copy whole thisrow to lastrow */
memcpy (lastrow - Bpp, thisrow - Bpp, exrowsize);
memcpy (lastrow - bpp, thisrow - bpp, exrowsize);
for (y = 0; y < height - 1; y++)
{
@ -296,9 +280,9 @@ pluginCore (struct piArgs *argp)
gimp_progress_update ((gdouble) y / (gdouble) height);
gimp_pixel_rgn_get_row (&srcPr, nextrow, 0, y + 1, width);
memcpy (nextrow - Bpp, nextrow, Bpp);
memcpy (nextrow + rowsize, nextrow + rowsize - Bpp, Bpp);
nlfiltRow (lastrow, thisrow, nextrow, dstbuf, width, Bpp, filtno);
memcpy (nextrow - bpp, nextrow, bpp);
memcpy (nextrow + rowsize, nextrow + rowsize - bpp, bpp);
nlfiltRow (lastrow, thisrow, nextrow, dstbuf, width, bpp, filtno);
gimp_pixel_rgn_set_row (&dstPr, dstbuf, 0, y, width);
/* rotate row buffers */
temprow = lastrow; lastrow = thisrow;
@ -306,8 +290,8 @@ pluginCore (struct piArgs *argp)
}
/* last row */
memcpy (nextrow - Bpp, thisrow - Bpp, exrowsize);
nlfiltRow (lastrow, thisrow, nextrow, dstbuf, width, Bpp, filtno);
memcpy (nextrow - bpp, thisrow - bpp, exrowsize);
nlfiltRow (lastrow, thisrow, nextrow, dstbuf, width, bpp, filtno);
gimp_pixel_rgn_set_row (&dstPr, dstbuf, 0, height - 1, width);
g_free (srcbuf);
@ -353,7 +337,7 @@ nlfilt_double_adjustment_update (GtkAdjustment *adjustment,
}
static gint
pluginCoreIA (struct piArgs *argp)
pluginCoreIA (piArgs *argp)
{
gint retval = -1; /* default to error return */
GtkWidget *dlg;
@ -400,11 +384,11 @@ pluginCoreIA (struct piArgs *argp)
G_CALLBACK (nlfilt_radio_button_update),
&argp->filter, (gpointer) argp->filter,
_("Alpha Trimmed Mean"),
_("_Alpha Trimmed Mean"),
(gpointer) filter_alpha_trim, NULL,
_("Optimal Estimation"),
_("Op_timal Estimation"),
(gpointer) filter_opt_est, NULL,
_("Edge Enhancement"),
_("_Edge Enhancement"),
(gpointer) filter_edge_enhance, NULL,
NULL);
@ -424,7 +408,7 @@ pluginCoreIA (struct piArgs *argp)
gtk_container_add (GTK_CONTAINER (frame), table);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Alpha:"), 0, 0,
_("A_lpha:"), 0, 0,
argp->alpha, 0.0, 1.0, 0.05, 0.1, 2,
TRUE, 0, 0,
NULL, NULL);
@ -433,7 +417,7 @@ pluginCoreIA (struct piArgs *argp)
&argp->alpha);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Radius:"), 0, 0,
_("_Radius:"), 0, 0,
argp->radius, 1.0 / 3.0, 1.0, 0.05, 0.1, 2,
TRUE, 0, 0,
NULL, NULL);
@ -450,13 +434,6 @@ pluginCoreIA (struct piArgs *argp)
if (run_flag)
{
#if 0
fprintf (stderr, "running:\n");
fprintf (stderr, "\t(image %d)\n", argp->img);
fprintf (stderr, "\t(drawable %d)\n", argp->drw);
fprintf (stderr, "\t(alpha %f)\n", argp->alpha);
fprintf (stderr, "\t(radius %f)\n", argp->radius);
#endif
return pluginCore (argp);
}
else
@ -469,7 +446,7 @@ static void
nlfilt_do_preview (GtkWidget *w)
{
static GtkWidget *theWidget = NULL;
struct piArgs *ap;
piArgs *ap;
guchar *dst, *src0, *src1, *src2;
gint y, rowsize, filtno;
@ -512,12 +489,12 @@ mw_preview_toggle_callback (GtkWidget *widget,
nlfilt_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)
{
@ -538,10 +515,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;
@ -571,7 +548,7 @@ mw_preview_build (GimpDrawable *drw)
static GtkWidget *
mw_preview_new (GtkWidget *parent,
struct mwPreview *mwp)
mwPreview *mwp)
{
GtkWidget *preview;
GtkWidget *frame;
@ -599,7 +576,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_label (_("_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);
@ -713,31 +690,31 @@ gint noisevariance; /* global so that pixel processing code can get at it q
#define UNSCALE(x) ((x) >> SCALEB)
/* Note: modified by David Hodson, nlfiltRow now accesses
* srclast, srcthis, and srcnext from [-Bpp] to [width*Bpp-1].
* srclast, srcthis, and srcnext from [-bpp] to [width*bpp-1].
* Beware if you use this code anywhere else!
*/
static void
nlfiltRow(guchar *srclast, guchar *srcthis, guchar *srcnext, guchar *dst,
gint width, gint Bpp, gint filtno) {
gint width, gint bpp, gint filtno) {
gint pf[9];
guchar *ip0, *ip1, *ip2, *or, *orend;
or = dst;
orend = dst + width * Bpp;
orend = dst + width * bpp;
ip0 = srclast;
ip1 = srcthis;
ip2 = srcnext;
for (or = dst; or < orend; ip0++, ip1++, ip2++, or++) {
pf[0] = *ip1;
pf[1] = *(ip1 - Bpp);
pf[2] = *(ip2 - Bpp);
pf[1] = *(ip1 - bpp);
pf[2] = *(ip2 - bpp);
pf[3] = *(ip2);
pf[4] = *(ip2 + Bpp);
pf[5] = *(ip1 + Bpp);
pf[6] = *(ip0 + Bpp);
pf[4] = *(ip2 + bpp);
pf[5] = *(ip1 + bpp);
pf[6] = *(ip0 + bpp);
pf[7] = *(ip0);
pf[8] = *(ip0 - Bpp);
pf[8] = *(ip0 - bpp);
*or=(atfuncs[filtno])(pf);
}
}

View File

@ -516,7 +516,7 @@ nova_dialog (GimpDrawable *drawable)
SCALE_WIDTH - 8, 16,
&pvals.color, GIMP_COLOR_AREA_FLAT);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
_("Color:"), 1.0, 0.5,
_("Co_lor:"), 1.0, 0.5,
button, 1, TRUE);
g_signal_connect (G_OBJECT (button), "color_changed",
@ -527,7 +527,7 @@ nova_dialog (GimpDrawable *drawable)
drawable);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 3,
_("Radius:"), SCALE_WIDTH, 0,
_("_Radius:"), SCALE_WIDTH, 0,
pvals.radius, 1, 100, 1, 10, 0,
FALSE, 1, GIMP_MAX_IMAGE_SIZE,
NULL, NULL);
@ -539,7 +539,7 @@ nova_dialog (GimpDrawable *drawable)
drawable);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 4,
_("Spokes:"), SCALE_WIDTH, 0,
_("_Spokes:"), SCALE_WIDTH, 0,
pvals.nspoke, 1, 1024, 1, 16, 0,
TRUE, 0, 0,
NULL, NULL);
@ -551,7 +551,7 @@ nova_dialog (GimpDrawable *drawable)
drawable);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 5,
_("Random Hue:"), SCALE_WIDTH, 0,
_("R_andom Hue:"), SCALE_WIDTH, 0,
pvals.randomhue, 0, 360, 1, 15, 0,
TRUE, 0, 0,
NULL, NULL);
@ -634,7 +634,7 @@ nova_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_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
@ -647,6 +647,7 @@ nova_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);
@ -654,7 +655,7 @@ nova_center_create (GimpDrawable *drawable)
G_CALLBACK (nova_center_adjustment_update),
&pvals.xcenter);
label = gtk_label_new (_("Y:"));
label = gtk_label_new_with_mnemonic (_("_Y:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
@ -667,6 +668,7 @@ nova_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);
@ -700,7 +702,7 @@ nova_center_create (GimpDrawable *drawable)
gtk_widget_show (frame);
check = gtk_check_button_new_with_label (_("Show Cursor"));
check = gtk_check_button_new_with_label (_("S_how 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

@ -376,7 +376,7 @@ plasma_dialog (GimpDrawable *drawable, GimpImageType drawable_type)
&pvals.timeseed,
TRUE, FALSE);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Random Seed:"), 1.0, 0.5,
_("_Random Seed:"), 1.0, 0.5,
seed, 1, TRUE);
g_signal_connect_swapped (G_OBJECT (GIMP_RANDOM_SEED_SPINBUTTON_ADJ (seed)),
"value_changed",
@ -388,7 +388,7 @@ plasma_dialog (GimpDrawable *drawable, GimpImageType drawable_type)
drawable);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Turbulence:"), SCALE_WIDTH, 0,
_("T_urbulence:"), SCALE_WIDTH, 0,
pvals.turbulence,
0.1, 7.0, 0.1, 1.0, 1,
TRUE, 0, 0,

View File

@ -690,6 +690,7 @@ randomize_dialog (void)
GtkWidget *dlg;
GtkWidget *frame;
GtkWidget *table;
GtkWidget *label;
GtkWidget *seed_hbox;
GtkObject *adj;
@ -734,15 +735,17 @@ randomize_dialog (void)
seed_hbox = gimp_random_seed_new (&pivals.rndm_seed,
&pivals.seed_type,
SEED_TIME, SEED_USER);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Random Seed:"), 1.0, 0.5,
seed_hbox, 1, TRUE);
label = gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("_Random Seed:"), 1.0, 0.5,
seed_hbox, 1, TRUE);
gtk_label_set_mnemonic_widget (GTK_LABEL (label),
GIMP_RANDOM_SEED_SPINBUTTON (seed_hbox));
/*
* Randomization percentage label & scale (1 to 100)
*/
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Randomization (%):"), SCALE_WIDTH, 0,
_("R_andomization (%):"), SCALE_WIDTH, 0,
pivals.rndm_pct, 1.0, 100.0, 1.0, 10.0, 0,
TRUE, 0, 0,
_("Percentage of pixels to be filtered"), NULL);
@ -754,7 +757,7 @@ randomize_dialog (void)
* Repeat count label & scale (1 to 100)
*/
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
_("Repeat:"), SCALE_WIDTH, 0,
_("R_epeat:"), SCALE_WIDTH, 0,
pivals.rndm_rcount, 1.0, 100.0, 1.0, 10.0, 0,
TRUE, 0, 0,
_("Number of times to apply filter"), NULL);

View File

@ -541,21 +541,21 @@ solid_noise_dialog (void)
&snvals.timeseed,
TRUE, FALSE);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Random Seed:"), 1.0, 0.5,
_("_Random Seed:"), 1.0, 0.5,
seed_hbox, 1, TRUE);
/* Detail */
spinbutton = gimp_spin_button_new (&adj, snvals.detail,
1, 15, 1, 3, 0, 1, 0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Detail:"), 1.0, 0.5,
_("_Detail:"), 1.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&snvals.detail);
/* Turbulent */
toggle = gtk_check_button_new_with_label ( _("Turbulent"));
toggle = gtk_check_button_new_with_label ( _("T_urbulent"));
gtk_table_attach (GTK_TABLE (table), toggle, 2, 3, 0, 1,
GTK_SHRINK | GTK_FILL, GTK_FILL, 1, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), snvals.turbulent);
@ -566,7 +566,7 @@ solid_noise_dialog (void)
&snvals.turbulent);
/* Tilable */
toggle = gtk_check_button_new_with_label ( _("Tilable"));
toggle = gtk_check_button_new_with_label ( _("T_ilable"));
gtk_table_attach (GTK_TABLE (table), toggle, 2, 3, 1, 2,
GTK_SHRINK | GTK_FILL, GTK_FILL, 1, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), snvals.tilable);
@ -578,7 +578,7 @@ solid_noise_dialog (void)
/* X Size */
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
_("X Size:"), SCALE_WIDTH, 0,
_("_X Size:"), SCALE_WIDTH, 0,
snvals.xsize, 0.1, SCALE_MAX, 0.1, 1.0, 1,
TRUE, 0, 0,
NULL, NULL);
@ -588,7 +588,7 @@ solid_noise_dialog (void)
/* Y Size */
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 3,
_("Y Size:"), SCALE_WIDTH, 0,
_("_Y Size:"), SCALE_WIDTH, 0,
snvals.ysize, 0.1, SCALE_MAX, 0.1, 1.0, 1,
TRUE, 0, 0,
NULL, NULL);

View File

@ -380,7 +380,7 @@ sparkle_dialog (void)
scale_data =
gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Luminosity Threshold:"), SCALE_WIDTH, 0,
_("Luminosity _Threshold:"), SCALE_WIDTH, 0,
svals.lum_threshold, 0.0, 0.1, 0.001, 0.01, 3,
TRUE, 0, 0,
_("Adjust the Luminosity Threshold"), NULL);
@ -390,7 +390,7 @@ sparkle_dialog (void)
scale_data =
gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Flare Intensity:"), SCALE_WIDTH, 0,
_("F_lare Intensity:"), SCALE_WIDTH, 0,
svals.flare_inten, 0.0, 1.0, 0.01, 0.1, 2,
TRUE, 0, 0,
_("Adjust the Flare Intensity"), NULL);
@ -400,7 +400,7 @@ sparkle_dialog (void)
scale_data =
gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
_("Spike Length:"), SCALE_WIDTH, 0,
_("_Spike Length:"), SCALE_WIDTH, 0,
svals.spike_len, 1, 100, 1, 10, 0,
TRUE, 0, 0,
_("Adjust the Spike Length"), NULL);
@ -410,7 +410,7 @@ sparkle_dialog (void)
scale_data =
gimp_scale_entry_new (GTK_TABLE (table), 0, 3,
_("Spike Points:"), SCALE_WIDTH, 0,
_("Sp_ike Points:"), SCALE_WIDTH, 0,
svals.spike_pts, 0, 16, 1, 4, 0,
TRUE, 0, 0,
_("Adjust the Number of Spikes"), NULL);
@ -420,7 +420,7 @@ sparkle_dialog (void)
scale_data =
gimp_scale_entry_new (GTK_TABLE (table), 0, 4,
_("Spike Angle (-1: Random):"), SCALE_WIDTH, 0,
_("Spi_ke Angle (-1: Random):"), SCALE_WIDTH, 0,
svals.spike_angle, -1, 360, 1, 15, 0,
TRUE, 0, 0,
_("Adjust the Spike Angle "
@ -431,7 +431,7 @@ sparkle_dialog (void)
scale_data =
gimp_scale_entry_new (GTK_TABLE (table), 0, 5,
_("Spike Density:"), SCALE_WIDTH, 0,
_("Spik_e Density:"), SCALE_WIDTH, 0,
svals.density, 0.0, 1.0, 0.01, 0.1, 2,
TRUE, 0, 0,
_("Adjust the Spike Density"), NULL);
@ -441,7 +441,7 @@ sparkle_dialog (void)
scale_data =
gimp_scale_entry_new (GTK_TABLE (table), 0, 6,
_("Opacity:"), SCALE_WIDTH, 0,
_("Op_acity:"), SCALE_WIDTH, 0,
svals.opacity, 0.0, 1.0, 0.01, 0.1, 2,
TRUE, 0, 0,
_("Adjust the Opacity of the Spikes"), NULL);
@ -451,7 +451,7 @@ sparkle_dialog (void)
scale_data =
gimp_scale_entry_new (GTK_TABLE (table), 0, 7,
_("Random Hue:"), SCALE_WIDTH, 0,
_("_Random Hue:"), SCALE_WIDTH, 0,
svals.random_hue, 0.0, 1.0, 0.01, 0.1, 2,
TRUE, 0, 0,
_("Adjust the Value how much the Hue should "
@ -462,7 +462,7 @@ sparkle_dialog (void)
scale_data =
gimp_scale_entry_new (GTK_TABLE (table), 0, 8,
_("Random Saturation:"), SCALE_WIDTH, 0,
_("Rando_m Saturation:"), SCALE_WIDTH, 0,
svals.random_saturation, 0.0, 1.0, 0.01, 0.1, 2,
TRUE, 0, 0,
_("Adjust the Value how much the Saturation should "
@ -483,7 +483,7 @@ sparkle_dialog (void)
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
toggle = gtk_check_button_new_with_label (_("Preserve Luminosity"));
toggle = gtk_check_button_new_with_mnemonic (_("_Preserve Luminosity"));
gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
svals.preserve_luminosity);
@ -496,7 +496,7 @@ sparkle_dialog (void)
G_CALLBACK (gimp_toggle_button_update),
&svals.preserve_luminosity);
toggle = gtk_check_button_new_with_label (_("Inverse"));
toggle = gtk_check_button_new_with_mnemonic (_("In_verse"));
gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), svals.invers);
gtk_widget_show (toggle);
@ -507,7 +507,7 @@ sparkle_dialog (void)
G_CALLBACK (gimp_toggle_button_update),
&svals.invers);
toggle = gtk_check_button_new_with_label (_("Add Border"));
toggle = gtk_check_button_new_with_mnemonic (_("A_dd Border"));
gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), svals.border);
gtk_widget_show (toggle);
@ -530,13 +530,13 @@ sparkle_dialog (void)
&svals.colortype,
GINT_TO_POINTER (svals.colortype),
_("Natural Color"),
_("_Natural Color"),
GINT_TO_POINTER (NATURAL), &r1,
_("Foreground Color"),
_("_Foreground Color"),
GINT_TO_POINTER (FOREGROUND), &r2,
_("Background Color"),
_("_Background Color"),
GINT_TO_POINTER (BACKGROUND), &r3,
NULL);

View File

@ -50,50 +50,35 @@ enum
MODE_BLACKEN
};
struct Grgb
{
guint8 red;
guint8 green;
guint8 blue;
};
struct GRegion
{
gint32 x;
gint32 y;
gint32 width;
gint32 height;
};
struct piArgs
typedef struct
{
gdouble amplitude;
gdouble phase;
gdouble wavelength;
gint32 type;
gint32 reflective;
};
} piArgs;
/* 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 *drawable);
static GtkWidget *mw_preview_new (GtkWidget *parent,
mwPreview *mwp);
static mwPreview *mw_preview_build (GimpDrawable *drawable);
static struct mwPreview *mwp;
static mwPreview *mwp;
static void query (void);
@ -103,10 +88,10 @@ static void run (gchar *name,
gint *nretvals,
GimpParam **retvals);
static gint pluginCore (struct piArgs *argp,
gint32 drawable);
static gint pluginCoreIA (struct piArgs *argp,
gint32 drawable);
static gint pluginCore (piArgs *argp,
gint32 drawable);
static gint pluginCoreIA (piArgs *argp,
gint32 drawable);
static void waves_do_preview (GtkWidget *preview);
@ -175,7 +160,7 @@ run (gchar *name,
{
static GimpParam rvals[1];
struct piArgs args;
piArgs args;
*nretvals = 1;
*retvals = rvals;
@ -183,7 +168,7 @@ run (gchar *name,
rvals[0].type = GIMP_PDB_STATUS;
rvals[0].data.d_status = GIMP_PDB_SUCCESS;
memset (&args, (int) 0, sizeof (struct piArgs));
memset (&args, (int) 0, sizeof (piArgs));
args.type = -1;
gimp_get_data ("plug_in_waves", &args);
@ -212,7 +197,7 @@ run (gchar *name,
}
else
{
gimp_set_data ("plug_in_waves", &args, sizeof (struct piArgs));
gimp_set_data ("plug_in_waves", &args, sizeof (piArgs));
}
break;
@ -250,8 +235,8 @@ run (gchar *name,
}
static gint
pluginCore (struct piArgs *argp,
gint32 drawable)
pluginCore (piArgs *argp,
gint32 drawable)
{
gint retval=0;
GimpDrawable *drw;
@ -329,7 +314,7 @@ waves_double_adjustment_update (GtkAdjustment *adjustment,
}
static gint
pluginCoreIA (struct piArgs *argp,
pluginCoreIA (piArgs *argp,
gint32 drawable)
{
gint r=-1; /* default to error return */
@ -380,8 +365,8 @@ pluginCoreIA (struct piArgs *argp,
G_CALLBACK (waves_radio_button_update),
&argp->type, (gpointer) argp->type,
_("Smear"), (gpointer) MODE_SMEAR, NULL,
_("Blacken"), (gpointer) MODE_BLACKEN, NULL,
_("_Smear"), (gpointer) MODE_SMEAR, NULL,
_("_Blacken"), (gpointer) MODE_BLACKEN, NULL,
NULL);
gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0);
@ -393,7 +378,7 @@ pluginCoreIA (struct piArgs *argp,
gtk_box_pack_start (GTK_BOX (vbox), sep, FALSE, FALSE, 2);
gtk_widget_show (sep);
toggle = gtk_check_button_new_with_label ( _("Reflective"));
toggle = gtk_check_button_new_with_mnemonic ( _("_Reflective"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), argp->reflective);
gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
gtk_widget_show (toggle);
@ -414,7 +399,7 @@ pluginCoreIA (struct piArgs *argp,
gtk_container_add (GTK_CONTAINER (frame), table);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
_("Amplitude:"), 140, 0,
_("_Amplitude:"), 140, 0,
argp->amplitude, 0.0, 101.0, 1.0, 5.0, 2,
TRUE, 0, 0,
NULL, NULL);
@ -423,7 +408,7 @@ pluginCoreIA (struct piArgs *argp,
&argp->amplitude);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Phase:"), 140, 0,
_("_Phase:"), 140, 0,
argp->phase, 0.0, 360.0, 2.0, 5.0, 2,
TRUE, 0, 0,
NULL, NULL);
@ -432,7 +417,7 @@ pluginCoreIA (struct piArgs *argp,
&argp->phase);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
_("Wavelength:"), 140, 0,
_("_Wavelength:"), 140, 0,
argp->wavelength, 0.1, 50.0, 1.0, 5.0, 2,
TRUE, 0, 0,
NULL, NULL);
@ -449,16 +434,6 @@ pluginCoreIA (struct piArgs *argp,
if (run_flag)
{
#if 0
fprintf (stderr, "running:\n");
/*fprintf (stderr, "\t(image %d)\n", argp->image);*/
fprintf (stderr, "\t(drawable %d)\n", argp->drawable);
fprintf (stderr, "\t(amplitude %f)\n", argp->amplitude);
fprintf (stderr, "\t(phase %f)\n", argp->phase);
fprintf (stderr, "\t(wavelength %f)\n", argp->wavelength);
fprintf (stderr, "\t(type %d)\n", argp->type);
fprintf (stderr, "\t(reflective %d)\n", argp->reflective);
#endif
return pluginCore (argp, drawable);
}
else
@ -471,7 +446,7 @@ static void
waves_do_preview (GtkWidget *widget)
{
static GtkWidget *theWidget = NULL;
struct piArgs *argp;
piArgs *argp;
guchar *dst;
gint y;
@ -509,12 +484,12 @@ mw_preview_toggle_callback (GtkWidget *widget,
waves_do_preview (NULL);
}
static struct mwPreview *
static mwPreview *
mw_preview_build_virgin (GimpDrawable *drawable)
{
struct mwPreview *mwp;
mwPreview *mwp;
mwp = g_new (struct mwPreview, 1);
mwp = g_new (mwPreview, 1);
if (drawable->width > drawable->height)
{
@ -535,10 +510,10 @@ mw_preview_build_virgin (GimpDrawable *drawable)
return mwp;
}
static struct mwPreview *
static mwPreview *
mw_preview_build (GimpDrawable *drawable)
{
struct mwPreview *mwp;
mwPreview *mwp;
gint x, y, b;
guchar *bc;
guchar *drawableBits;
@ -570,8 +545,8 @@ mw_preview_build (GimpDrawable *drawable)
}
static GtkWidget *
mw_preview_new (GtkWidget *parent,
struct mwPreview *mwp)
mw_preview_new (GtkWidget *parent,
mwPreview *mwp)
{
GtkWidget *preview;
GtkWidget *frame;
@ -599,7 +574,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);