configure.in plug-ins/common/Makefile.am plug-ins/common/plugin-defs.pl

2005-04-22  Sven Neumann  <sven@gimp.org>

	* configure.in
	* plug-ins/common/Makefile.am
	* plug-ins/common/plugin-defs.pl
	* plug-ins/common/winclipboard.c: removed winclipboard plug-in
	from CVS. It is not any longer needed as long as GTK+ >= 2.6.5
	is being used. Fixes bug #165219.
This commit is contained in:
Sven Neumann 2005-04-22 16:51:18 +00:00 committed by Sven Neumann
parent 8caef76cda
commit d1486ee5fb
9 changed files with 31 additions and 422 deletions

View File

@ -1,3 +1,12 @@
2005-04-22 Sven Neumann <sven@gimp.org>
* configure.in
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl
* plug-ins/common/winclipboard.c: removed winclipboard plug-in
from CVS. It is not any longer needed as long as GTK+ >= 2.6.5
is being used. Fixes bug #165219.
2005-04-22 Raphaël Quinet <raphael@gimp.org>
* plug-ins/metadata/xmp-model.[ch]: Fixed crash occuring after a

View File

@ -1381,7 +1381,6 @@ AM_CONDITIONAL(BUILD_PYTHON, test "x$enable_python" != xno)
###########################################################
if test x"$os_win32" = xyes; then
WINCLIPBOARD='winclipboard$(EXEEXT)'
WINPRINT='winprint$(EXEEXT)'
else
MAIL='mail$(EXEEXT)'
@ -1390,7 +1389,6 @@ fi
AC_SUBST(MAIL)
AC_SUBST(SCREENSHOT)
AC_SUBST(WINCLIPBOARD)
AC_SUBST(WINPRINT)
AC_SUBST(WMF)

View File

@ -133,7 +133,6 @@ warp
waves
webbrowser
whirlpinch
winclipboard
wind
winprint
wmf

View File

@ -160,7 +160,6 @@ libexec_PROGRAMS = \
waves \
webbrowser \
whirlpinch \
$(WINCLIPBOARD) \
wind \
$(WINPRINT) \
$(WMF) \
@ -178,7 +177,6 @@ EXTRA_PROGRAMS = \
screenshot \
svg \
tiff \
winclipboard \
winprint \
wmf \
xpm
@ -2104,22 +2102,6 @@ whirlpinch_LDADD = \
$(RT_LIBS) \
$(INTLLIBS)
winclipboard_SOURCES = \
winclipboard.c
winclipboard_LDADD = \
$(libgimpui) \
$(libgimpconfig) \
$(libgimpwidgets) \
$(libgimp) \
$(libgimpcolor) \
$(libgimpmath) \
$(libgimpbase) \
$(LIBWINCLIPBOARD) \
$(GLIB_LIBS) \
$(RT_LIBS) \
$(INTLLIBS)
wind_SOURCES = \
wind.c

View File

@ -130,7 +130,6 @@
'waves' => { libdep => 'gtk', ui => 1 },
'webbrowser' => { libdep => 'glib' },
'whirlpinch' => { libdep => 'gtk', ui => 1 },
'winclipboard' => { libdep => 'glib', ui => 1, optional => 1 },
'wind' => { libdep => 'gtk', ui => 1 },
'winprint' => { libdep => 'glib', ui => 1, optional => 1 },
'wmf' => { libdep => 'gtk', ui => 1, optional => 1 },

View File

@ -1,381 +0,0 @@
/*
* WinClipboard Win32 Windoze Copy&Paste Plug-in
* Copyright (C) 1999 Hans Breuer
* Hans Breuer, Hans@Breuer.org
* 08/07/99
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* Based on (at least) the following plug-ins:
* Header
* WinSnap
*
* Any suggestions, bug-reports or patches are welcome.
*/
#include "config.h"
#include <windows.h>
#include <stdlib.h>
#include <libgimp/gimp.h>
#include "libgimp/stdplugins-intl.h"
/* History:
*
* 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):
*
* - Support for 4,2,1 bit bitmaps
* - Unsupported formats could be delegated to GIMP Loader (e.g. wmf)
* - ...
*/
/* How many steps the progress control should do
*/
#define PROGRESS_STEPS 25
#define StepProgress(one,all) \
(0 == (one % ((all / PROGRESS_STEPS)+1)))
/* FIXME: I'll use -1 as IMAGE_NONE. Is it correct ???
*/
#define IMAGE_NONE -1
/* Declare some local functions.
*/
static void query (void);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
/* Plugin function prototypes
*/
static int CB_CopyImage (gboolean interactive,
gint32 image_ID,
gint32 drawable_ID);
GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
query, /* query_proc */
run, /* run_proc */
};
MAIN ()
static void
query ()
{
static GimpParamDef copy_args[] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Drawable to save" }
};
gimp_install_procedure ("plug_in_clipboard_copy",
"copy image to clipboard",
"Copies the active drawable to the clipboard.",
"Hans Breuer",
"Hans Breuer",
"1999",
N_("Copy to Clipboard"),
"INDEXED*, RGB*, GRAY*",
GIMP_PLUGIN,
G_N_ELEMENTS (copy_args), 0,
copy_args, NULL);
gimp_plugin_menu_register ("plug_in_clipboard_copy",
"<Image>/Edit");
}
static void
run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[2];
GimpRunMode run_mode;
run_mode = param[0].data.d_int32;
*nreturn_vals = 1;
*return_vals = values;
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = GIMP_PDB_CALLING_ERROR;
INIT_I18N();
if (strcmp (name, "plug_in_clipboard_copy") == 0)
{
*nreturn_vals = 1;
if (CB_CopyImage (GIMP_RUN_INTERACTIVE==run_mode,
param[1].data.d_int32,
param[2].data.d_int32))
values[0].data.d_status = GIMP_PDB_SUCCESS;
else
values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
}
}
/* Plugin Function implementation
*/
static int
CB_CopyImage (gboolean interactive,
gint32 image_ID,
gint32 drawable_ID)
{
GimpDrawable *drawable;
GimpImageType drawable_type;
GimpPixelRgn pixel_rgn;
gchar *sStatus = NULL;
int nSizeDIB=0;
int nSizePal=0;
int nSizeLine=0; /* DIB lines are 32 bit aligned */
HANDLE hDIB;
BOOL bRet;
drawable = gimp_drawable_get (drawable_ID);
drawable_type = gimp_drawable_type (drawable_ID);
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, drawable->width, drawable->height, FALSE, FALSE);
/* allocate room for DIB */
if (GIMP_INDEXED_IMAGE == drawable_type || GIMP_GRAY_IMAGE == drawable_type)
{
nSizeLine = ((drawable->width-1)/4+1)*4;
nSizeDIB = sizeof(RGBQUAD) * 256 /* always full color map size */
+ nSizeLine * drawable->height
+ sizeof (BITMAPINFOHEADER);
}
else
{
nSizeLine = ((drawable->width*3-1)/4+1)*4;
nSizeDIB = nSizeLine * drawable->height
+ sizeof (BITMAPINFOHEADER);
}
hDIB = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE, nSizeDIB);
if (NULL == hDIB)
{
g_message ("Failed to allocate DIB");
bRet = FALSE;
}
/* fill header info */
if (bRet)
{
BITMAPINFOHEADER *pInfo;
bRet = FALSE;
pInfo = GlobalLock (hDIB);
if (pInfo)
{
pInfo->biSize = sizeof(BITMAPINFOHEADER);
pInfo->biWidth = drawable->width;
pInfo->biHeight = drawable->height;
pInfo->biPlanes = 1;
pInfo->biBitCount =
(GIMP_INDEXED_IMAGE == drawable_type || GIMP_GRAY_IMAGE == drawable_type ? 8 : 24);
pInfo->biCompression = BI_RGB; /* none */
pInfo->biSizeImage = 0; /* not calculated/needed */
pInfo->biXPelsPerMeter =
pInfo->biYPelsPerMeter = 0;
/* color map size */
pInfo->biClrUsed =
(GIMP_INDEXED_IMAGE == drawable_type || GIMP_GRAY_IMAGE == drawable_type ? 256 : 0);
pInfo->biClrImportant = 0; /* all */
GlobalUnlock (hDIB);
bRet = TRUE;
} /* (pInfo) */
else
g_message("Failed to lock DIB Header");
}
/* fill color map */
if (bRet && (GIMP_INDEXED_IMAGE == drawable_type || GIMP_GRAY_IMAGE == drawable_type))
{
char *pBmp;
bRet = FALSE;
pBmp = GlobalLock (hDIB);
if (pBmp)
{
RGBQUAD *pPal;
int nColors;
unsigned char *cmap = NULL;
pPal = (RGBQUAD*)(pBmp + sizeof(BITMAPINFOHEADER));
nSizePal = sizeof(RGBQUAD) * 256;
/* get the gimp colormap */
if (GIMP_GRAY_IMAGE != drawable_type)
cmap = gimp_image_get_colormap (image_ID, &nColors);
if (cmap)
{
int i;
for (i = 0; (i < 256) && (i < nColors); i++)
{
pPal[i].rgbReserved = 0; /* is this alpha? */
pPal[i].rgbRed = cmap[3*i];
pPal[i].rgbGreen = cmap[3*i+1];
pPal[i].rgbBlue = cmap[3*i+2];
}
g_free(cmap);
bRet = TRUE;
} /* (cmap) */
else if (GIMP_GRAY_IMAGE == drawable_type)
{
/* fill with identity palette */
int i;
for (i = 0; (i < 256) && (i < nColors); i++)
{
pPal[i].rgbReserved = 0; /* is this alpha? */
pPal[i].rgbRed = i;
pPal[i].rgbGreen = i;
pPal[i].rgbBlue = i;
}
bRet = TRUE;
}
else
g_message ("Can't get color map");
GlobalUnlock (hDIB);
} /* (pBmp) */
else
g_message ("Failed to lock DIB Palette");
} /* indexed or grayscale */
/* following the slow part ... */
if (interactive)
gimp_progress_init (_("Copying..."));
/* speed it up with: */
gimp_tile_cache_size (drawable->width * gimp_tile_height () * drawable->bpp);
/* copy data to DIB */
if (bRet)
{
unsigned char *pData;
bRet = FALSE;
pData = GlobalLock (hDIB);
if (pData)
{
unsigned char *pLine;
/* calculate real offset */
pData += (sizeof(BITMAPINFOHEADER) + nSizePal);
pLine = g_new (guchar, drawable->width * drawable->bpp);
if (GIMP_INDEXED_IMAGE == drawable_type || GIMP_GRAY_IMAGE == drawable_type)
{
int x, y;
for (y = 0; y < drawable->height; y++)
{
if ((interactive) && (StepProgress(y,drawable->height)))
gimp_progress_update ((double)y / drawable->height);
gimp_pixel_rgn_get_row (&pixel_rgn, pLine, 0,
drawable->height-y-1, /* invert it */
drawable->width);
for (x = 0; x < drawable->width; x++)
pData[x+y*nSizeLine] = pLine[x*drawable->bpp];
}
}
else
{
int x, y;
for (y = 0; y < drawable->height; y++)
{
if ((interactive) && (StepProgress(y,drawable->height)))
gimp_progress_update ((double)y / drawable->height);
gimp_pixel_rgn_get_row (&pixel_rgn, pLine, 0,
drawable->height-y-1, /* invert it */
drawable->width);
for (x = 0; x < drawable->width; x++)
{
/* RGBQUAD: blue, green, red, reserved */
pData[x*3+y*nSizeLine] = pLine[x*drawable->bpp+2]; /* blue */
pData[x*3+y*nSizeLine+1] = pLine[x*drawable->bpp+1]; /* green */
pData[x*3+y*nSizeLine+2] = pLine[x*drawable->bpp]; /* red */
/*pData[x+y*drawable->width*3+3] = 0;*/ /* reserved */
}
}
}
g_free (pLine);
bRet = TRUE;
GlobalUnlock (hDIB);
} /* (pData) */
else
g_message("Failed to lock DIB Data");
} /* copy data to DIB */
/* copy DIB to ClipBoard */
if (bRet)
{
if (!OpenClipboard (NULL))
{
g_message ("Cannot open the Clipboard!");
bRet = FALSE;
}
else
{
if (bRet && !EmptyClipboard ())
{
g_message ("Cannot empty the Clipboard");
bRet = FALSE;
}
if (bRet)
{
if (NULL != SetClipboardData (CF_DIB, hDIB))
hDIB = NULL; /* data now owned by clipboard */
else
g_message ("Failed to set clipboard data ");
}
if (!CloseClipboard ())
g_message ("Failed to close Clipboard");
}
}
/* done */
if (hDIB)
GlobalFree(hDIB);
gimp_drawable_detach (drawable);
return bRet;
} /* CB_CopyImage */

View File

@ -1,6 +1,10 @@
2005-04-22 Sven Neumann <sven@gimp.org>
* POTFILES.in: removed winclipboard.c.
2005-04-22 Marco Ciampa <ciampix@libero.it>
* it.po: Updated italian translation.
* it.po: Updated italian translation.
2005-04-19 Gareth Owen <gowen72@yahoo.com>
@ -28,7 +32,7 @@
2005-04-10 Marco Ciampa <ciampix@libero.it>
* it.po: Updated italian translation.
* it.po: Updated italian translation.
2005-04-09 Adam Weinberger <adamw@gnome.org>
@ -36,11 +40,11 @@
2005-04-09 Josep Puigdemont i Casamajó <josep.puigdemont@gmail.com>
* ca.po: Updated Catalan translation by Quim Perez i Noguer, et al.
* ca.po: Updated Catalan translation by Quim Perez i Noguer, et al.
2005-04-07 Marco Ciampa <ciampix@libero.it>
* it.po: Updated italian translation.
* it.po: Updated italian translation.
2005-04-06 Adam Weinberger <adamw@gnome.org>
@ -52,7 +56,7 @@
2005-04-04 Marco Ciampa <ciampix@libero.it>
* it.po: Updated italian translation.
* it.po: Updated italian translation.
2005-04-01 Steve Murphy <murf@e-tools.com>
@ -285,7 +289,7 @@
2004-11-21 David Lodge <dave@cirt.net>
* en_GB.po: Updated British translation.
2004-11-21 Vincent van Adrighem <adrighem@gnome.org>
* nl.po: Translation updated by Tino Meinen.
@ -452,7 +456,7 @@
2004-10-19 David Lodge <dave@cirt.net>
* en_GB.po: Updated British English translation.
2004-10-19 Adam Weinberger <adamw@gnome.org>
* en_CA.po: Updated Canadian English translation.
@ -468,7 +472,7 @@
2004-10-17 David Lodge <dave@cirt.net>
* en_GB.po: Updated British English translation.
2004-10-16 Vincent van Adrighem <adrighem@gnome.org>
* nl.po: Translation updated.
@ -764,7 +768,7 @@
2004-03-20 Robert Sedak <robert.sedak@sk.htnet.hr>
* hr.po: Updated Croatian translation.
* hr.po: Updated Croatian translation.
2004-03-19 Sven Neumann <sven@gimp.org>
@ -924,7 +928,7 @@
2003-01-27 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
* es.po: Updated Spanish translation.
* es.po: Updated Spanish translation.
2004-01-27 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
@ -1003,7 +1007,7 @@
2003-01-07 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
* es.po: Updated Spanish translation.
* es.po: Updated Spanish translation.
2004-01-06 Jan Morén <jan.moren@lucs.lu.se>
@ -1043,7 +1047,7 @@
2003-12-16 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
* es.po: Updated Spanish translation.
* es.po: Updated Spanish translation.
2003-12-16 Danilo Šegan <dsegan@gmx.net>
@ -1097,7 +1101,7 @@
2003-11-24 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
* es.po: Updated Spanish translation.
* es.po: Updated Spanish translation.
2003-11-23 Sven Neumann <sven@gimp.org>
@ -1142,7 +1146,7 @@
2003-11-12 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
* es.po: Updated Spanish translation.
* es.po: Updated Spanish translation.
2003-11-11 Maurits Rijk <lpeek.mrijk@consunet.nl>
@ -1159,7 +1163,7 @@
2003-11-07 Hasbullah Bin Pit <sebol@ikhlas.com>
* ms.po: Updated fix for bug #125360 by
MIMOS Open Source Development Group <ismas@mimos.my>
MIMOS Open Source Development Group <ismas@mimos.my>
2003-11-05 Abel Cheung <maddog@linux.org.hk>

View File

@ -143,7 +143,6 @@ plug-ins/common/warp.c
plug-ins/common/waves.c
plug-ins/common/webbrowser.c
plug-ins/common/whirlpinch.c
plug-ins/common/winclipboard.c
plug-ins/common/wind.c
plug-ins/common/winprint.c
plug-ins/common/wmf.c

View File

@ -4,7 +4,7 @@
2005-04-22 Marco Ciampa <ciampix@libero.it>
* it.po: Updated italian translation.
* it.po: Updated italian translation.
2005-04-19 Gareth Owen <gowen72@yahoo.com>
@ -32,7 +32,7 @@
2005-04-13 Marco Ciampa <ciampix@libero.it>
* it.po: Updated italian translation.
* it.po: Updated italian translation.
2005-04-13 Adi Attar <aattar@cvs.gnome.org>
@ -48,7 +48,7 @@
2005-04-10 Marco Ciampa <ciampix@libero.it>
* it.po: Updated italian translation.
* it.po: Updated italian translation.
2005-04-09 Adam Weinberger <adamw@gnome.org>