Fix for select by color on multilayer indexed images. Turned it back on for

indexed images.
Quelled warnings about uninited vars in disp_callbacks.
Updated COPYING files with latest FSF address.

-Yosh
This commit is contained in:
Manish Singh 1998-03-13 03:35:33 +00:00
parent 370c5fc2f9
commit 382eb47914
12 changed files with 50 additions and 36 deletions

View File

@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@ -279,7 +279,7 @@ POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
@ -305,7 +305,8 @@ the "copyright" line and a pointer to where the full notice is found.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.

View File

@ -1,3 +1,10 @@
Thu Mar 12 18:51:09 PST 1998 Manish Singh <yosh@gimp.org>
* app/gdisplay.c
* app/by_color_select.c: Fix for indexed selection for multiple
layers by Ben Jackson. Reenabled select by color for indexed
images
Thu Mar 12 21:25:51 1998 Scott Goehring <scott@poverty.bloomington.in.us>
* app/undo.c (undo_pop_layer_mod): Fixed a desynch bug when

View File

@ -359,6 +359,8 @@ by_color_select_button_release (Tool *tool,
tile = tile_manager_get_tile (gimage_composite (gdisp->gimage), x, y, 0);
tile_ref (tile);
data = tile->data + tile->bpp * (tile->ewidth * (y % TILE_HEIGHT) + (x % TILE_WIDTH));
gimage_get_color (gdisp->gimage, gimage_composite_type(gdisp->gimage), col, data);
tile_unref (tile, FALSE);
}
else
{
@ -367,11 +369,10 @@ by_color_select_button_release (Tool *tool,
tile = tile_manager_get_tile (drawable_data (drawable), x, y, 0);
tile_ref (tile);
data = tile->data + tile->bpp * (tile->ewidth * (y % TILE_HEIGHT) + (x % TILE_WIDTH));
gimage_get_color (gdisp->gimage, drawable_type(drawable), col, data);
tile_unref (tile, FALSE);
}
gimage_get_color (gdisp->gimage, gimage_composite_type(gdisp->gimage), col, data);
tile_unref (tile, FALSE);
/* select the area */
by_color_select (gdisp->gimage, drawable, col,
by_color_dialog->threshold,

View File

@ -1019,7 +1019,6 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
menus_set_sensitive ("<Image>/Image/Colors/Desaturate", (base_type == RGB));
menus_set_sensitive ("<Image>/Select", lp);
menus_set_sensitive ("<Image>/Select/By Color...", (base_type != INDEXED));
menus_set_sensitive ("<Image>/Edit/Cut", lp);
menus_set_sensitive ("<Image>/Edit/Copy", lp);
menus_set_sensitive ("<Image>/Edit/Paste Into", lp);

View File

@ -340,12 +340,13 @@ gdisplay_hruler_button_press (GtkWidget *widget,
{
GDisplay *gdisp;
if (!active_tool)
active_tool_control (RECREATE, gdisp);
if (event->button == 1)
{
gdisp = data;
if (!active_tool)
active_tool_control (RECREATE, gdisp);
gtk_widget_activate (tool_widgets[tool_info[(int) MOVE].toolbar_position]);
move_tool_start_hguide (active_tool, gdisp);
gtk_grab_add (gdisp->canvas);
@ -361,12 +362,13 @@ gdisplay_vruler_button_press (GtkWidget *widget,
{
GDisplay *gdisp;
if (!active_tool)
active_tool_control (RECREATE, gdisp);
if (event->button == 1)
{
gdisp = data;
if (!active_tool)
active_tool_control (RECREATE, gdisp);
gtk_widget_activate (tool_widgets[tool_info[(int) MOVE].toolbar_position]);
move_tool_start_vguide (active_tool, gdisp);
gtk_grab_add (gdisp->canvas);

View File

@ -340,12 +340,13 @@ gdisplay_hruler_button_press (GtkWidget *widget,
{
GDisplay *gdisp;
if (!active_tool)
active_tool_control (RECREATE, gdisp);
if (event->button == 1)
{
gdisp = data;
if (!active_tool)
active_tool_control (RECREATE, gdisp);
gtk_widget_activate (tool_widgets[tool_info[(int) MOVE].toolbar_position]);
move_tool_start_hguide (active_tool, gdisp);
gtk_grab_add (gdisp->canvas);
@ -361,12 +362,13 @@ gdisplay_vruler_button_press (GtkWidget *widget,
{
GDisplay *gdisp;
if (!active_tool)
active_tool_control (RECREATE, gdisp);
if (event->button == 1)
{
gdisp = data;
if (!active_tool)
active_tool_control (RECREATE, gdisp);
gtk_widget_activate (tool_widgets[tool_info[(int) MOVE].toolbar_position]);
move_tool_start_vguide (active_tool, gdisp);
gtk_grab_add (gdisp->canvas);

View File

@ -1019,7 +1019,6 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
menus_set_sensitive ("<Image>/Image/Colors/Desaturate", (base_type == RGB));
menus_set_sensitive ("<Image>/Select", lp);
menus_set_sensitive ("<Image>/Select/By Color...", (base_type != INDEXED));
menus_set_sensitive ("<Image>/Edit/Cut", lp);
menus_set_sensitive ("<Image>/Edit/Copy", lp);
menus_set_sensitive ("<Image>/Edit/Paste Into", lp);

View File

@ -340,12 +340,13 @@ gdisplay_hruler_button_press (GtkWidget *widget,
{
GDisplay *gdisp;
if (!active_tool)
active_tool_control (RECREATE, gdisp);
if (event->button == 1)
{
gdisp = data;
if (!active_tool)
active_tool_control (RECREATE, gdisp);
gtk_widget_activate (tool_widgets[tool_info[(int) MOVE].toolbar_position]);
move_tool_start_hguide (active_tool, gdisp);
gtk_grab_add (gdisp->canvas);
@ -361,12 +362,13 @@ gdisplay_vruler_button_press (GtkWidget *widget,
{
GDisplay *gdisp;
if (!active_tool)
active_tool_control (RECREATE, gdisp);
if (event->button == 1)
{
gdisp = data;
if (!active_tool)
active_tool_control (RECREATE, gdisp);
gtk_widget_activate (tool_widgets[tool_info[(int) MOVE].toolbar_position]);
move_tool_start_vguide (active_tool, gdisp);
gtk_grab_add (gdisp->canvas);

View File

@ -1019,7 +1019,6 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
menus_set_sensitive ("<Image>/Image/Colors/Desaturate", (base_type == RGB));
menus_set_sensitive ("<Image>/Select", lp);
menus_set_sensitive ("<Image>/Select/By Color...", (base_type != INDEXED));
menus_set_sensitive ("<Image>/Edit/Cut", lp);
menus_set_sensitive ("<Image>/Edit/Copy", lp);
menus_set_sensitive ("<Image>/Edit/Paste Into", lp);

View File

@ -359,6 +359,8 @@ by_color_select_button_release (Tool *tool,
tile = tile_manager_get_tile (gimage_composite (gdisp->gimage), x, y, 0);
tile_ref (tile);
data = tile->data + tile->bpp * (tile->ewidth * (y % TILE_HEIGHT) + (x % TILE_WIDTH));
gimage_get_color (gdisp->gimage, gimage_composite_type(gdisp->gimage), col, data);
tile_unref (tile, FALSE);
}
else
{
@ -367,11 +369,10 @@ by_color_select_button_release (Tool *tool,
tile = tile_manager_get_tile (drawable_data (drawable), x, y, 0);
tile_ref (tile);
data = tile->data + tile->bpp * (tile->ewidth * (y % TILE_HEIGHT) + (x % TILE_WIDTH));
gimage_get_color (gdisp->gimage, drawable_type(drawable), col, data);
tile_unref (tile, FALSE);
}
gimage_get_color (gdisp->gimage, gimage_composite_type(gdisp->gimage), col, data);
tile_unref (tile, FALSE);
/* select the area */
by_color_select (gdisp->gimage, drawable, col,
by_color_dialog->threshold,

View File

@ -359,6 +359,8 @@ by_color_select_button_release (Tool *tool,
tile = tile_manager_get_tile (gimage_composite (gdisp->gimage), x, y, 0);
tile_ref (tile);
data = tile->data + tile->bpp * (tile->ewidth * (y % TILE_HEIGHT) + (x % TILE_WIDTH));
gimage_get_color (gdisp->gimage, gimage_composite_type(gdisp->gimage), col, data);
tile_unref (tile, FALSE);
}
else
{
@ -367,11 +369,10 @@ by_color_select_button_release (Tool *tool,
tile = tile_manager_get_tile (drawable_data (drawable), x, y, 0);
tile_ref (tile);
data = tile->data + tile->bpp * (tile->ewidth * (y % TILE_HEIGHT) + (x % TILE_WIDTH));
gimage_get_color (gdisp->gimage, drawable_type(drawable), col, data);
tile_unref (tile, FALSE);
}
gimage_get_color (gdisp->gimage, gimage_composite_type(gdisp->gimage), col, data);
tile_unref (tile, FALSE);
/* select the area */
by_color_select (gdisp->gimage, drawable, col,
by_color_dialog->threshold,

View File

@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@ -436,7 +436,7 @@ DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Libraries
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
@ -464,7 +464,7 @@ convey the exclusion of warranty; and each file should have at least the
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.