Small error fixed, renamed the tool.

--Sven
This commit is contained in:
Sven Neumann 1999-04-15 10:20:27 +00:00
parent 83bfd05c71
commit 712b38cdd2
6 changed files with 24 additions and 18 deletions

View file

@ -1,3 +1,9 @@
Thu Apr 15 12:14:30 MEST 1999 Sven Neumann <sven@gimp.org>
* app/crop.c: fixed an off-by-one error and renamed the tool
to "Resize & Crop"
* app/tools.c: reflect the name change
Thu Apr 15 01:32:58 MEST 1999 Sven Neumann <sven@gimp.org>
* app/crop.c: The autocrop mechanism now first checks if there's

View file

@ -173,7 +173,7 @@ crop_options_new (void)
/* the new crop tool options structure */
options = (CropOptions *) g_malloc (sizeof (CropOptions));
tool_options_init ((ToolOptions *) options,
_("Crop Options"),
_("Crop & Resize Options"),
crop_options_reset);
options->layer_only = options->layer_only_d = FALSE;
options->default_to_enlarge = options->default_to_enlarge_d = TRUE;
@ -1069,7 +1069,7 @@ crop_info_create (Tool *tool)
gdisp = (GDisplay *) tool->gdisp_ptr;
/* create the info dialog */
crop_info = info_dialog_new (_("Crop Information"));
crop_info = info_dialog_new (_("Crop & Resize Information"));
/* add the information fields */
spinbutton = info_dialog_add_spinbutton (crop_info, _("Origin X:"), NULL,
@ -1331,7 +1331,7 @@ crop_automatic_callback (GtkWidget *w,
/* Check how many of the bottom lines are uniform/transparent. */
abort = FALSE;
for (y = height - 1; y > y1 && !abort; y--)
for (y = height - 1; y >= y1 && !abort; y--)
for (x = 0; x < width && !abort; x++)
{
color = (*get_color_func) (get_color_obj, x, y);
@ -1353,7 +1353,7 @@ crop_automatic_callback (GtkWidget *w,
/* Check how many of the right lines are uniform/transparent. */
abort = FALSE;
for (x = width - 1; x > x1 && !abort; x--)
for (x = width - 1; x >= x1 && !abort; x--)
for (y = y1; y < y2 && !abort; y++)
{
color = (*get_color_func) (get_color_obj, x, y);

View file

@ -202,12 +202,12 @@ ToolInfo tool_info[] =
{
NULL,
N_("Crop"),
N_("Crop & Resize"),
8,
N_("/Tools/Crop"),
N_("/Tools/Crop & Resize"),
"<shift>C",
(char **) crop_bits,
N_("Crop the image"),
N_("Crop or resize the image"),
"ContextHelp/crop",
CROP,
tools_new_crop,

View file

@ -173,7 +173,7 @@ crop_options_new (void)
/* the new crop tool options structure */
options = (CropOptions *) g_malloc (sizeof (CropOptions));
tool_options_init ((ToolOptions *) options,
_("Crop Options"),
_("Crop & Resize Options"),
crop_options_reset);
options->layer_only = options->layer_only_d = FALSE;
options->default_to_enlarge = options->default_to_enlarge_d = TRUE;
@ -1069,7 +1069,7 @@ crop_info_create (Tool *tool)
gdisp = (GDisplay *) tool->gdisp_ptr;
/* create the info dialog */
crop_info = info_dialog_new (_("Crop Information"));
crop_info = info_dialog_new (_("Crop & Resize Information"));
/* add the information fields */
spinbutton = info_dialog_add_spinbutton (crop_info, _("Origin X:"), NULL,
@ -1331,7 +1331,7 @@ crop_automatic_callback (GtkWidget *w,
/* Check how many of the bottom lines are uniform/transparent. */
abort = FALSE;
for (y = height - 1; y > y1 && !abort; y--)
for (y = height - 1; y >= y1 && !abort; y--)
for (x = 0; x < width && !abort; x++)
{
color = (*get_color_func) (get_color_obj, x, y);
@ -1353,7 +1353,7 @@ crop_automatic_callback (GtkWidget *w,
/* Check how many of the right lines are uniform/transparent. */
abort = FALSE;
for (x = width - 1; x > x1 && !abort; x--)
for (x = width - 1; x >= x1 && !abort; x--)
for (y = y1; y < y2 && !abort; y++)
{
color = (*get_color_func) (get_color_obj, x, y);

View file

@ -173,7 +173,7 @@ crop_options_new (void)
/* the new crop tool options structure */
options = (CropOptions *) g_malloc (sizeof (CropOptions));
tool_options_init ((ToolOptions *) options,
_("Crop Options"),
_("Crop & Resize Options"),
crop_options_reset);
options->layer_only = options->layer_only_d = FALSE;
options->default_to_enlarge = options->default_to_enlarge_d = TRUE;
@ -1069,7 +1069,7 @@ crop_info_create (Tool *tool)
gdisp = (GDisplay *) tool->gdisp_ptr;
/* create the info dialog */
crop_info = info_dialog_new (_("Crop Information"));
crop_info = info_dialog_new (_("Crop & Resize Information"));
/* add the information fields */
spinbutton = info_dialog_add_spinbutton (crop_info, _("Origin X:"), NULL,
@ -1331,7 +1331,7 @@ crop_automatic_callback (GtkWidget *w,
/* Check how many of the bottom lines are uniform/transparent. */
abort = FALSE;
for (y = height - 1; y > y1 && !abort; y--)
for (y = height - 1; y >= y1 && !abort; y--)
for (x = 0; x < width && !abort; x++)
{
color = (*get_color_func) (get_color_obj, x, y);
@ -1353,7 +1353,7 @@ crop_automatic_callback (GtkWidget *w,
/* Check how many of the right lines are uniform/transparent. */
abort = FALSE;
for (x = width - 1; x > x1 && !abort; x--)
for (x = width - 1; x >= x1 && !abort; x--)
for (y = y1; y < y2 && !abort; y++)
{
color = (*get_color_func) (get_color_obj, x, y);

View file

@ -202,12 +202,12 @@ ToolInfo tool_info[] =
{
NULL,
N_("Crop"),
N_("Crop & Resize"),
8,
N_("/Tools/Crop"),
N_("/Tools/Crop & Resize"),
"<shift>C",
(char **) crop_bits,
N_("Crop the image"),
N_("Crop or resize the image"),
"ContextHelp/crop",
CROP,
tools_new_crop,