diff --git a/ChangeLog b/ChangeLog index de097e0854..75b78d8411 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2004-05-24 Sven Neumann + + * plug-ins/maze/maze_face.c: fixed a compiler warning. + +2004-05-24 Sven Neumann + + Applied a patch from Philip Lafleur (bug #142808): + + * app/paint/gimppaintcore.h: define PRESSURE_SCALE to 1.5 + + * app/paint/gimpairbrush.c + * app/paint/gimpclone.c + * app/paint/gimpconvolve.c + * app/paint/gimpdodgeburn.c + * app/paint/gimperaser.c + * app/paint/gimppaintbrush.c + * app/paint/gimpsmudge.c: use the PRESSURE_SCALE constant. + 2004-05-24 Michael Natterer Long overdue core container cleanup: diff --git a/app/paint/gimpairbrush.c b/app/paint/gimpairbrush.c index 5f62d446e9..bb9caa2fbb 100644 --- a/app/paint/gimpairbrush.c +++ b/app/paint/gimpairbrush.c @@ -174,8 +174,8 @@ gimp_airbrush_paint (GimpPaintCore *paint_core, airbrush->paint_options = paint_options; timeout = (paint_options->pressure_options->rate ? - (10000 / (options->rate * 2.0 * paint_core->cur_coords.pressure)) : - (10000 / options->rate)); + (10000 / (options->rate * PRESSURE_SCALE * paint_core->cur_coords.pressure)) : + (10000 / options->rate)); airbrush->timeout_id = g_timeout_add (timeout, gimp_airbrush_timeout, @@ -217,7 +217,7 @@ gimp_airbrush_motion (GimpPaintCore *paint_core, saved_pressure = paint_options->pressure_options->pressure; if (saved_pressure) - opacity *= 2.0 * paint_core->cur_coords.pressure; + opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure; paint_options->pressure_options->pressure = FALSE; _gimp_paintbrush_motion (paint_core, drawable, paint_options, opacity); diff --git a/app/paint/gimpclone.c b/app/paint/gimpclone.c index a3db2760b6..e93c80d3d5 100644 --- a/app/paint/gimpclone.c +++ b/app/paint/gimpclone.c @@ -446,7 +446,7 @@ gimp_clone_motion (GimpPaintCore *paint_core, } if (pressure_options->opacity) - opacity *= 2.0 * paint_core->cur_coords.pressure; + opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure; /* paste the newly painted canvas to the gimage which is being worked on */ gimp_paint_core_paste_canvas (paint_core, drawable, diff --git a/app/paint/gimpconvolve.c b/app/paint/gimpconvolve.c index ee4308b8cd..6ac163dd70 100644 --- a/app/paint/gimpconvolve.c +++ b/app/paint/gimpconvolve.c @@ -252,7 +252,7 @@ gimp_convolve_motion (GimpPaintCore *paint_core, rate = options->rate; if (pressure_options->rate) - rate *= 2.0 * paint_core->cur_coords.pressure; + rate *= PRESSURE_SCALE * paint_core->cur_coords.pressure; gimp_convolve_calculate_matrix (options->type, rate); diff --git a/app/paint/gimpdodgeburn.c b/app/paint/gimpdodgeburn.c index 9f82790595..c0bc8fb982 100644 --- a/app/paint/gimpdodgeburn.c +++ b/app/paint/gimpdodgeburn.c @@ -302,7 +302,7 @@ gimp_dodge_burn_motion (GimpPaintCore *paint_core, copy_region (&tempPR, &destPR); if (pressure_options->opacity) - opacity *= 2.0 * paint_core->cur_coords.pressure; + opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure; /* Replace the newly dodgedburned area (canvas_buf) to the gimage */ gimp_paint_core_replace_canvas (paint_core, drawable, diff --git a/app/paint/gimperaser.c b/app/paint/gimperaser.c index 36656e1f6f..d42d363b22 100644 --- a/app/paint/gimperaser.c +++ b/app/paint/gimperaser.c @@ -178,7 +178,7 @@ gimp_eraser_motion (GimpPaintCore *paint_core, area->width * area->height, area->bytes); if (pressure_options->opacity) - opacity *= 2.0 * paint_core->cur_coords.pressure; + opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure; gimp_paint_core_paste_canvas (paint_core, drawable, MIN (opacity, GIMP_OPACITY_OPAQUE), diff --git a/app/paint/gimppaintbrush.c b/app/paint/gimppaintbrush.c index 2dfab2678e..2ddf2ac607 100644 --- a/app/paint/gimppaintbrush.c +++ b/app/paint/gimppaintbrush.c @@ -214,7 +214,7 @@ _gimp_paintbrush_motion (GimpPaintCore *paint_core, } if (pressure_options->opacity) - opacity *= 2.0 * paint_core->cur_coords.pressure; + opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure; gimp_paint_core_paste_canvas (paint_core, drawable, MIN (opacity, GIMP_OPACITY_OPAQUE), diff --git a/app/paint/gimppaintcore.h b/app/paint/gimppaintcore.h index 8c579ecb52..648d71a8c6 100644 --- a/app/paint/gimppaintcore.h +++ b/app/paint/gimppaintcore.h @@ -23,8 +23,10 @@ #include "core/gimpobject.h" -#define PAINT_CORE_SUBSAMPLE 4 -#define PAINT_CORE_SOLID_SUBSAMPLE 2 +#define PAINT_CORE_SUBSAMPLE 4 +#define PAINT_CORE_SOLID_SUBSAMPLE 2 + +#define PRESSURE_SCALE 1.5 /* the different states that the painting function can be called with */ diff --git a/app/paint/gimpsmudge.c b/app/paint/gimpsmudge.c index ce1eeb3101..6121190f6b 100644 --- a/app/paint/gimpsmudge.c +++ b/app/paint/gimpsmudge.c @@ -307,8 +307,8 @@ gimp_smudge_motion (GimpPaintCore *paint_core, /* Enable pressure sensitive rate */ if (pressure_options->rate) - rate = MIN (options->rate / 100.0 * 2.0 * paint_core->cur_coords.pressure, - 1.0); + rate = MIN (options->rate / 100.0 * PRESSURE_SCALE * + paint_core->cur_coords.pressure, 1.0); else rate = options->rate / 100.0; @@ -361,7 +361,7 @@ gimp_smudge_motion (GimpPaintCore *paint_core, copy_region (&tempPR, &destPR); if (pressure_options->opacity) - opacity *= 2.0 * paint_core->cur_coords.pressure; + opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure; /* Replace the newly made paint area to the gimage */ gimp_paint_core_replace_canvas (paint_core, drawable, diff --git a/app/paint/gimpsourcecore.c b/app/paint/gimpsourcecore.c index a3db2760b6..e93c80d3d5 100644 --- a/app/paint/gimpsourcecore.c +++ b/app/paint/gimpsourcecore.c @@ -446,7 +446,7 @@ gimp_clone_motion (GimpPaintCore *paint_core, } if (pressure_options->opacity) - opacity *= 2.0 * paint_core->cur_coords.pressure; + opacity *= PRESSURE_SCALE * paint_core->cur_coords.pressure; /* paste the newly painted canvas to the gimage which is being worked on */ gimp_paint_core_paste_canvas (paint_core, drawable, diff --git a/plug-ins/maze/maze_face.c b/plug-ins/maze/maze_face.c index d59abb3d7a..d19f6a1fc5 100644 --- a/plug-ins/maze/maze_face.c +++ b/plug-ins/maze/maze_face.c @@ -72,18 +72,20 @@ typedef struct gchar buffer[BUFSIZE]; -gboolean maze_dialog (void); +gboolean maze_dialog (void); + +static void maze_msg (const gchar *msg); +static void maze_response (GtkWidget *widget, + gint response_id, + gpointer data); +static void maze_help (void); -static void maze_msg (gchar *msg); -static void maze_response (GtkWidget *widget, - gint response_id, - gpointer data); -static void maze_help (void); #ifdef SHOW_PRNG_PRIVATES -static void maze_entry_callback (GtkWidget *widget, - gpointer data); +static void maze_entry_callback (GtkWidget *widget, + gpointer data); #endif + /* Looking back, it would probably have been easier to completely * re-write the whole entry/scale thing to work with the divbox stuff. * It would undoubtably be cleaner code. But since I already *had* @@ -175,7 +177,6 @@ maze_dialog (void) GtkWidget *hbox; GtkWidget *frame; gint trow = 0; - gchar *message; gimp_ui_init ("maze", FALSE); @@ -557,9 +558,6 @@ maze_help (void) GimpParamDef *params; GimpParamDef *return_vals; - gint baz; - gchar *message; - if (gimp_procedural_db_proc_info ("plug_in_web_browser", &proc_blurb, &proc_help, @@ -570,24 +568,27 @@ maze_help (void) &nparams, &nreturn_vals, ¶ms, &return_vals)) { - /* open URL for help */ - message = g_strdup_printf (_("Opening %s"), MAZE_URL); + gchar *message = g_strdup_printf (_("Opening %s"), MAZE_URL); + gint baz; + maze_msg (message); g_free (message); + gimp_run_procedure ("plug_in_web_browser", &baz, GIMP_PDB_STRING, MAZE_URL, GIMP_PDB_END); } else { - message = g_strdup_printf (_("See %s"), MAZE_URL); + gchar *message = g_strdup_printf (_("See %s"), MAZE_URL); + maze_msg (message); g_free (message); } } static void -maze_msg (gchar *msg) +maze_msg (const gchar *msg) { gtk_label_set_text (GTK_LABEL (msg_label), msg); }