Add newest files.

* app/makefile.{cygwin,msc} (gimp_OBJECTS): Add newest files.

	* plug-ins/common/winclipboard.c: Speed up by using
	gimp_tile_cache_size().

	* app/gimprc.c
	* plug-ins/script-fu/script-fu-scripts.c: Guard
	use of GLIB_CHECK_VERSION from old GLibs that don't have it.
This commit is contained in:
Tor Lillqvist
1999-08-12 22:08:19 +00:00
parent d7ef90812c
commit cac72d12f8
8 changed files with 33 additions and 8 deletions

View File

@ -1,3 +1,14 @@
1999-08-13 Tor Lillqvist <tml@iki.fi>
* app/makefile.{cygwin,msc} (gimp_OBJECTS): Add newest files.
* plug-ins/common/winclipboard.c: Speed up by using
gimp_tile_cache_size().
* app/gimprc.c
* plug-ins/script-fu/script-fu-scripts.c: Guard
use of GLIB_CHECK_VERSION from old GLibs that don't have it.
Thu Aug 12 19:53:19 MEST 1999 Sven Neumann <sven@gimp.org> Thu Aug 12 19:53:19 MEST 1999 Sven Neumann <sven@gimp.org>
* app/Makefile.am * app/Makefile.am

View File

@ -2325,7 +2325,7 @@ static inline char *
string_to_str (gpointer val1p, string_to_str (gpointer val1p,
gpointer val2p) gpointer val2p)
{ {
#if GLIB_CHECK_VERSION (1,3,1) #if defined (GLIB_CHECK_VERSION) && GLIB_CHECK_VERSION (1,3,1)
gchar *str = g_strescape (*((char **)val1p), NULL); gchar *str = g_strescape (*((char **)val1p), NULL);
#else #else
gchar *str = g_strescape (*((char **)val1p)); gchar *str = g_strescape (*((char **)val1p));

View File

@ -66,6 +66,7 @@ gimp_OBJECTS = \
boundary.o \ boundary.o \
brightness_contrast.o \ brightness_contrast.o \
brush_edit.o \ brush_edit.o \
brush_scale.o \
brush_select.o \ brush_select.o \
brush_select_cmds.o \ brush_select_cmds.o \
brushes_cmds.o \ brushes_cmds.o \
@ -135,6 +136,7 @@ gimp_OBJECTS = \
gimpbrush.o \ gimpbrush.o \
gimpbrushgenerated.o \ gimpbrushgenerated.o \
gimpbrushlist.o \ gimpbrushlist.o \
gimpbrushpixmap.o \
gimpcontext.o \ gimpcontext.o \
gimphistogram.o \ gimphistogram.o \
gimplist.o \ gimplist.o \
@ -198,6 +200,7 @@ gimp_OBJECTS = \
perspective_tool.o \ perspective_tool.o \
pixel_processor.o \ pixel_processor.o \
pixel_region.o \ pixel_region.o \
pixmapbrush.o \
plug_in.o \ plug_in.o \
plug_in_cmds.o \ plug_in_cmds.o \
posterize.o \ posterize.o \

View File

@ -77,6 +77,7 @@ gimp_OBJECTS = \
boundary.obj \ boundary.obj \
brightness_contrast.obj \ brightness_contrast.obj \
brush_edit.obj \ brush_edit.obj \
brush_scale.obj \
brush_select.obj \ brush_select.obj \
brush_select_cmds.obj \ brush_select_cmds.obj \
brushes_cmds.obj \ brushes_cmds.obj \
@ -146,6 +147,7 @@ gimp_OBJECTS = \
gimpbrush.obj \ gimpbrush.obj \
gimpbrushgenerated.obj \ gimpbrushgenerated.obj \
gimpbrushlist.obj \ gimpbrushlist.obj \
gimpbrushpixmap.obj \
gimpcontext.obj \ gimpcontext.obj \
gimphistogram.obj \ gimphistogram.obj \
gimplist.obj \ gimplist.obj \
@ -209,6 +211,7 @@ gimp_OBJECTS = \
perspective_tool.obj \ perspective_tool.obj \
pixel_processor.obj \ pixel_processor.obj \
pixel_region.obj \ pixel_region.obj \
pixmapbrush.obj \
plug_in.obj \ plug_in.obj \
plug_in_cmds.obj \ plug_in_cmds.obj \
posterize.obj \ posterize.obj \

View File

@ -32,11 +32,12 @@
/* History: /* History:
* *
* 08/07/99 Implementation and release. * 08/07/99 Implementation and release.
* 08/10/99 Big speed increase by using gimp_tile_cache_size()
* Thanks to Kevin Turner's documentation at:
* http://www.poboxes.com/kevint/gimp/doc/plugin-doc-2.1.html
* *
* TODO (maybe): * TODO (maybe):
* *
* - Speed up (e.g. by transfering greater chunks of memory between
* plug-in and gimp)
* - Support for 4,2,1 bit bitmaps * - Support for 4,2,1 bit bitmaps
* - Unsupported formats could be delegated to GIMP Loader (e.g. wmf) * - Unsupported formats could be delegated to GIMP Loader (e.g. wmf)
* - ... * - ...
@ -200,7 +201,6 @@ CB_CopyImage (gboolean interactive,
HANDLE hDIB; HANDLE hDIB;
BOOL bRet; BOOL bRet;
gimp_image_disable_undo(image_ID);
drawable = gimp_drawable_get (drawable_ID); drawable = gimp_drawable_get (drawable_ID);
drawable_type = gimp_drawable_type (drawable_ID); drawable_type = gimp_drawable_type (drawable_ID);
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, drawable->width, drawable->height, FALSE, FALSE); gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, drawable->width, drawable->height, FALSE, FALSE);
@ -300,6 +300,10 @@ CB_CopyImage (gboolean interactive,
if (interactive) if (interactive)
gimp_progress_init ("Copying ..."); gimp_progress_init ("Copying ...");
/* speed it up with: */
gimp_tile_cache_size( drawable->width * gimp_tile_height()
* drawable->bpp );
/* copy data to DIB */ /* copy data to DIB */
if (bRet) if (bRet)
{ {
@ -400,8 +404,6 @@ CB_CopyImage (gboolean interactive,
if (hDIB) GlobalFree(hDIB); if (hDIB) GlobalFree(hDIB);
gimp_drawable_detach (drawable); gimp_drawable_detach (drawable);
/* shouldn't this be done by caller?? */
gimp_image_enable_undo(image_ID);
return bRet; return bRet;
} /* CB_CopyImage */ } /* CB_CopyImage */
@ -558,6 +560,10 @@ CB_PasteImage (gboolean interactive,
} }
} }
/* speed it up with: */
gimp_tile_cache_size( drawable->width * gimp_tile_height()
* drawable->bpp );
/* change data format and copy data */ /* change data format and copy data */
if (24 == nBitsPS) if (24 == nBitsPS)
{ {

View File

@ -57,7 +57,7 @@
#endif /* NATIVE_WIN32 */ #endif /* NATIVE_WIN32 */
#if GLIB_CHECK_VERSION (1,3,1) #if defined (GLIB_CHECK_VERSION) && GLIB_CHECK_VERSION (1,3,1)
#define ESCAPE(string) g_strescape (string, NULL) #define ESCAPE(string) g_strescape (string, NULL)
#else #else
#define ESCAPE(string) g_strescape (string) #define ESCAPE(string) g_strescape (string)

View File

@ -57,7 +57,7 @@
#endif /* NATIVE_WIN32 */ #endif /* NATIVE_WIN32 */
#if GLIB_CHECK_VERSION (1,3,1) #if defined (GLIB_CHECK_VERSION) && GLIB_CHECK_VERSION (1,3,1)
#define ESCAPE(string) g_strescape (string, NULL) #define ESCAPE(string) g_strescape (string, NULL)
#else #else
#define ESCAPE(string) g_strescape (string) #define ESCAPE(string) g_strescape (string)

View File

@ -1195,6 +1195,8 @@ sendBMPToGimp(HBITMAP hBMP, HDC hDC, RECT rect)
/* Get our drawable */ /* Get our drawable */
drawable = gimp_drawable_get(layer_id); drawable = gimp_drawable_get(layer_id);
gimp_tile_cache_size(ROUND4(width) * gimp_tile_height() * 3);
/* Initialize a pixel region for writing to the image */ /* Initialize a pixel region for writing to the image */
gimp_pixel_rgn_init(&pixel_rgn, drawable, 0, 0, gimp_pixel_rgn_init(&pixel_rgn, drawable, 0, 0,
ROUND4(width), height, TRUE, FALSE); ROUND4(width), height, TRUE, FALSE);