INSTALL configure.in plug-ins/Makefile.am removed the gimp-print plug-in.

2006-06-20  Sven Neumann  <sven@gimp.org>

	* INSTALL
	* configure.in
	* plug-ins/Makefile.am
	* plug-ins/print: removed the gimp-print plug-in. gutenprint
comes
	with a GIMP plug-in, so there is no point in supporting this any
	longer.
This commit is contained in:
Sven Neumann 2006-06-20 18:57:38 +00:00 committed by Sven Neumann
parent b520a3eece
commit 972511dba8
14 changed files with 13 additions and 5805 deletions

View File

@ -1,3 +1,12 @@
2006-06-20 Sven Neumann <sven@gimp.org>
* INSTALL
* configure.in
* plug-ins/Makefile.am
* plug-ins/print: removed the gimp-print plug-in. gutenprint comes
with a GIMP plug-in, so there is no point in supporting this any
longer.
2006-06-20 Sven Neumann <sven@gimp.org>
* authors.xml: only use the "artist" role for the newly added

View File

@ -147,13 +147,6 @@ These are:
--without-gnomeprint. If you don't want to build the Print plug-in
that uses libgnomeprint, you can use --without-gnomeprint.
--without-gimpprint. The gimp-print plug-in provides Print support
by means of libgimpprint (see http://gimp-print.sourceforge.net/).
The gimp-print project has changed its name to gutenprint in the
meantime and you may find that libgimpprint 4.2 is somewhat outdated.
You can disable the build of this plug-in and instead grab a beta
release of gutenprint which comes with a GIMP plug-in.
--with-gif-compression=[lzw|rle|none]. Allows to tune the compression
algorithm used by the GIF plug-in. If you are afraid of Unisys' LZW
patent (which should have expired in most countries by now), you

View File

@ -47,9 +47,6 @@ m4_define([pangoft2_required_version], [1.10.0])
m4_define([fontconfig_required_version], [2.2.0])
m4_define([gtkdoc_required_version], [1.0])
m4_define([gtkhtml2_required_version], [2.0.0])
m4_define([gimpprint_required_version], [4.2.0])
m4_define([gimpprint_suggested_version], [4.2.6])
m4_define([gimpprint_toonew_version], [4.3.0])
m4_define([alsa_required_version], [1.0.0])
m4_define([rsvg_required_version], [2.8.0])
m4_define([wmf_required_version], [0.2.8])
@ -133,8 +130,6 @@ PANGOFT2_REQUIRED_VERSION=pangoft2_required_version
FONTCONFIG_REQUIRED_VERSION=fontconfig_required_version
GTKDOC_REQUIRED_VERSION=gtkdoc_required_version
GTKHTML2_REQUIRED_VERSION=gtkhtml2_required_version
GIMPPRINT_REQUIRED_VERSION=gimpprint_required_version
GIMPPRINT_TOONEW_VERSION=gimpprint_toonew_version
RSVG_REQUIRED_VERSION=rsvg_required_version
WMF_REQUIRED_VERSION=wmf_required_version
AC_SUBST(GLIB_REQUIRED_VERSION)
@ -144,8 +139,6 @@ AC_SUBST(PANGOFT2_REQUIRED_VERSION)
AC_SUBST(FONTCONFIG_REQUIRED_VERSION)
AC_SUBST(GTKDOC_REQUIRED_VERSION)
AC_SUBST(GTKHTML2_REQUIRED_VERSION)
AC_SUBST(GIMPPRINT_REQUIRED_VERSION)
AC_SUBST(GIMPPRINT_TOONEW_VERSION)
AC_SUBST(RSVG_REQUIRED_VERSION)
AC_SUBST(WMF_REQUIRED_VERSION)
@ -1286,39 +1279,6 @@ AC_SUBST(GNOMEPRINT)
AC_SUBST(LIBGNOMEPRINT)
######################
# Check for gimp-print
######################
have_gimp_print=no
AC_ARG_WITH(gimpprint, [ --without-gimpprint disable build of gimpprint plug-in])
if test "x$with_gimpprint" != xno; then
AM_PATH_GIMPPRINT(gimpprint_required_version,
[print_version=`$GIMPPRINT_CONFIG --version`
if expr $print_version \>= gimpprint_toonew_version >/dev/null; then
have_gimp_print="no (you have a version that's too new!)"
AC_MSG_WARN([
*** libgimpprint version $print_version is too new.
*** It is likely an unstable development version.
*** You need a version before gimpprint_toonew_version.])
else
have_gimp_print=yes
dnl sanity check to avoid bug #125283
if expr $print_version \< gimpprint_suggested_version >/dev/null; then
AC_MSG_WARN([
*** libgimpprint version $print_version causes problems under certain locales.
*** We strongly suggest you upgrade to version gimpprint_suggested_version.])
fi
fi
])
fi
AC_SUBST(PRINT_LIBS)
AC_SUBST(PRINT_CFLAGS)
AM_CONDITIONAL(BUILD_PRINT, test x$have_gimp_print = xyes)
###################
# Check for libwmf2
###################
@ -1798,7 +1758,6 @@ plug-ins/jpeg/Makefile
plug-ins/maze/Makefile
plug-ins/metadata/Makefile
plug-ins/pagecurl/Makefile
plug-ins/print/Makefile
plug-ins/pygimp/Makefile
plug-ins/pygimp/plug-ins/Makefile
plug-ins/rcm/Makefile
@ -1897,7 +1856,6 @@ Extra Binaries:
Optional Plug-Ins:
Ascii Art: $have_libaa
Help Browser: $have_gtkhtml2
Gimp-Print: $have_gimp_print
GNOME Print: $have_gnomeprint
JPEG: $jpeg_ok
MNG: $have_libmng

View File

@ -8,10 +8,6 @@ if BUILD_HELPBROWSER
helpbrowser = helpbrowser
endif
if BUILD_PRINT
print = print
endif
if BUILD_PYTHON
pygimp = pygimp
endif
@ -53,7 +49,6 @@ SUBDIRS = \
maze \
metadata \
pagecurl \
$(print) \
$(pygimp) \
rcm \
sgi \

View File

@ -1,6 +0,0 @@
Makefile.in
Makefile
.deps
_libs
.libs
print

View File

@ -1,75 +0,0 @@
The original version, up to release 2.0, of the Gimp Print plug-in was
written by Mike Sweet <mike@easysw.com>.
Version 3.0, which is based on version 2, was written by Robert
Krawitz <rlk@alum.mit.edu> in late 1999, and frozen in early 2000.
Version 4.0 was developed by a team led by Robert Krawitz. We hosted
the development on SourceForge, a service provided to the free source
community by VA Linux Systems. The complete hosting service provided
by SourceForge permitted the development team to concentrate on
improving the software rather than having to worry about maintaining a
development system.
The list of contributors to release 4.0, in alphabetical order, is as
follows. The principal areas that each contributed to are listed in
addition.
Andy Thaller <thaller@ph.tum.de>
Canon driver
Charles Briscoe-Smith <cpbs@debian.org>
Epson driver
Internals
UI
Dave Hill <dave@minnie.demon.co.uk>
PCL driver
Eric Sharkey <sharkey@ale.physics.sunysb.edu>
Debian support
Epson unprinter
Eugene Anikin <eugene@anikin.com>
Performance instrumentation
Sharp-eyed bug fixer
Grant Taylor <gtaylor@picante.com>
Implementor of the "foomatic" spooler configuration system
Henryk "Buggs" Richter <tfa652@cks1.rz.uni-rostock.de>
Initial implementation of the Ghostscript driver
Ian Young <ian@iay.org.uk>
Documentation of the Epson driver
Experimental inks/color management
Jean-Marc Verbavatz <verbavatz@ifrance.fr>
Dithering and color management
Karl Heinz Kremer <khk@khk.net>
Liaison with Epson
Engineering and design
Michael Natterer <mitschel@cs.tu-berlin.de>
New user interface
Liaison with the Gimp development team
Mike Sweet <mike@easysw.com>
CUPS work
Portability
Lots o'details
Robert Krawitz <rlk@alum.mit.edu>
Epson driver
Dithering and color management
User interface
Engineering/Project lead
Documentation
Ghostscript driver
Steve Miller <smiller@rni.net>
User interface
Thomas Tonino <ttonino@bio.vu.nl>
Vastly improved dithering and color management

View File

@ -1,39 +0,0 @@
## Process this file with automake to produce Makefile.in
libgimpui = $(top_builddir)/libgimp/libgimpui-$(GIMP_API_VERSION).la
libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la
libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la
libgimp = $(top_builddir)/libgimp/libgimp-$(GIMP_API_VERSION).la
libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la
libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la
libexecdir = $(gimpplugindir)/plug-ins
libexec_PROGRAMS = print
print_SOURCES = \
print.c \
print-image-gimp.c \
gimp_color_window.c \
gimp_main_window.c \
print_gimp.h
INCLUDES = \
-I$(top_srcdir) \
$(GTK_CFLAGS) \
$(GIMPPRINT_CFLAGS) \
-I$(includedir)
LDADD = \
$(libgimpui) \
$(libgimpwidgets) \
$(libgimpconfig) \
$(libgimpmath) \
$(libgimp) \
$(libgimpcolor) \
$(libgimpbase) \
$(GTK_LIBS) \
$(GIMPPRINT_LIBS) \
$(RT_LIBS) \
$(INTLLIBS)

View File

@ -1,610 +0,0 @@
/*
* "$Id$"
*
* Main window code for Print plug-in for the GIMP.
*
* Copyright 1997-2000 Michael Sweet (mike@easysw.com),
* Robert Krawitz (rlk@alum.mit.edu), Steve Miller (smiller@rni.net)
* and Michael Natterer (mitch@gimp.org)
*
* 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.
*/
#include "config.h"
#include <string.h>
#ifdef __GNUC__
#warning GTK_DISABLE_DEPRECATED
#endif
#undef GTK_DISABLE_DEPRECATED
#include <gtk/gtk.h>
#include <gimp-print/gimp-print.h>
#include "libgimp/gimp.h"
#include "libgimp/gimpui.h"
#include "print_gimp.h"
#include "libgimp/stdplugins-intl.h"
#define RESPONSE_RESET 1
gint thumbnail_w, thumbnail_h, thumbnail_bpp;
guchar *thumbnail_data;
gint adjusted_thumbnail_bpp;
guchar *adjusted_thumbnail_data;
GtkWidget *gimp_color_adjust_dialog;
static GtkObject *brightness_adjustment;
static GtkObject *saturation_adjustment;
static GtkObject *density_adjustment;
static GtkObject *contrast_adjustment;
static GtkObject *cyan_adjustment;
static GtkObject *magenta_adjustment;
static GtkObject *yellow_adjustment;
static GtkObject *gamma_adjustment;
GtkWidget *dither_algo_combo = NULL;
static gint dither_algo_callback_id = -1;
static void gimp_brightness_update (GtkAdjustment *adjustment);
static void gimp_saturation_update (GtkAdjustment *adjustment);
static void gimp_density_update (GtkAdjustment *adjustment);
static void gimp_contrast_update (GtkAdjustment *adjustment);
static void gimp_cyan_update (GtkAdjustment *adjustment);
static void gimp_magenta_update (GtkAdjustment *adjustment);
static void gimp_yellow_update (GtkAdjustment *adjustment);
static void gimp_gamma_update (GtkAdjustment *adjustment);
static void gimp_set_color_defaults (void);
static void gimp_dither_algo_callback (GtkWidget *widget,
gpointer data);
void gimp_build_dither_combo (void);
static GtkWidget *swatch = NULL;
static void
gimp_dither_algo_callback (GtkWidget *widget,
gpointer data)
{
const gchar *new_algo =
gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (dither_algo_combo)->entry));
int i;
for (i = 0; i < stp_dither_algorithm_count (); i++)
if (strcasecmp (new_algo, stp_dither_algorithm_text (i)) == 0)
{
stp_set_dither_algorithm (*pv, stp_dither_algorithm_name (i));
return;
}
stp_set_dither_algorithm (*pv, stp_default_dither_algorithm ());
}
void
gimp_build_dither_combo (void)
{
stp_param_t *vec = g_new (stp_param_t, stp_dither_algorithm_count());
gint i;
for (i = 0; i < stp_dither_algorithm_count(); i++)
{
vec[i].name = g_strdup (stp_dither_algorithm_name (i));
vec[i].text = g_strdup (stp_dither_algorithm_text (i));
}
gimp_plist_build_combo (dither_algo_combo,
stp_dither_algorithm_count (),
vec,
stp_get_dither_algorithm (*pv),
stp_default_dither_algorithm (),
G_CALLBACK (gimp_dither_algo_callback),
&dither_algo_callback_id);
for (i = 0; i < stp_dither_algorithm_count (); i++)
{
g_free ((void *) vec[i].name);
g_free ((void *) vec[i].text);
}
g_free (vec);
}
void
gimp_redraw_color_swatch (void)
{
if (swatch)
gtk_widget_queue_draw (swatch);
}
static gboolean
gimp_color_swatch_expose (void)
{
(adjusted_thumbnail_bpp == 1
? gdk_draw_gray_image
: gdk_draw_rgb_image) (swatch->window,
swatch->style->fg_gc[GTK_STATE_NORMAL],
0, 0, thumbnail_w, thumbnail_h,
GDK_RGB_DITHER_NORMAL,
adjusted_thumbnail_data,
adjusted_thumbnail_bpp * thumbnail_w);
return FALSE;
}
static void
gimp_color_adjust_response (GtkWidget *widget,
gint response_id,
gpointer data)
{
if (response_id == RESPONSE_RESET)
{
gimp_set_color_defaults ();
}
else
{
gtk_widget_hide (widget);
}
}
/*
* gimp_create_color_adjust_window (void)
*
* NOTES:
* creates the color adjuster popup, allowing the user to adjust brightness,
* contrast, saturation, etc.
*/
void
gimp_create_color_adjust_window (void)
{
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *frame;
GtkWidget *table;
GtkWidget *event_box;
const stp_vars_t lower = stp_minimum_settings ();
const stp_vars_t upper = stp_maximum_settings ();
const stp_vars_t defvars = stp_default_settings ();
/*
* Fetch a thumbnail of the image we're to print from the Gimp. This must
*
*/
thumbnail_w = THUMBNAIL_MAXW;
thumbnail_h = THUMBNAIL_MAXH;
thumbnail_data = gimp_image_get_thumbnail_data (image_ID,
&thumbnail_w,
&thumbnail_h,
&thumbnail_bpp);
/*
* thumbnail_w and thumbnail_h have now been adjusted to the actual
* thumbnail dimensions. Now initialize a color-adjusted version of
* the thumbnail.
*/
adjusted_thumbnail_data = g_malloc (3 * thumbnail_w * thumbnail_h);
gimp_color_adjust_dialog =
gimp_dialog_new (_("Print Color Adjust"), "print",
NULL, 0,
gimp_standard_help_func, "file-print-gimp",
GIMP_STOCK_RESET, RESPONSE_RESET,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (gimp_color_adjust_dialog),
GTK_RESPONSE_CLOSE);
g_signal_connect (gimp_color_adjust_dialog, "response",
G_CALLBACK (gimp_color_adjust_response),
NULL);
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (gimp_color_adjust_dialog)->vbox),
vbox, FALSE, FALSE, 0);
gtk_widget_show (vbox);
/*
* Drawing area for color swatch feedback display...
*/
hbox = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
swatch = gtk_drawing_area_new ();
gtk_widget_set_size_request (swatch, thumbnail_w, thumbnail_h);
gtk_container_add (GTK_CONTAINER (frame), swatch);
gtk_widget_show (swatch);
g_signal_connect (swatch, "expose-event",
G_CALLBACK (gimp_color_swatch_expose),
NULL);
table = gtk_table_new (9, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacing (GTK_TABLE (table), 1, 12);
gtk_table_set_row_spacing (GTK_TABLE (table), 4, 12);
gtk_table_set_row_spacing (GTK_TABLE (table), 7, 12);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
gtk_widget_show (table);
/*
* Brightness slider...
*/
brightness_adjustment =
gimp_scale_entry_new (GTK_TABLE (table), 0, 0, _("Brightness:"), 200, 0,
stp_get_brightness (defvars),
stp_get_brightness (lower),
stp_get_brightness (upper),
stp_get_brightness (defvars) / 100,
stp_get_brightness (defvars) / 10,
3, TRUE, 0, 0, NULL, NULL);
set_adjustment_tooltip (brightness_adjustment,
_("Set the brightness of the print.\n"
"0 is solid black, 2 is solid white"),
NULL);
g_signal_connect (brightness_adjustment, "value-changed",
G_CALLBACK (gimp_brightness_update),
NULL);
/*
* Contrast slider...
*/
contrast_adjustment =
gimp_scale_entry_new (GTK_TABLE (table), 0, 1, _("Contrast:"), 200, 0,
stp_get_contrast (defvars),
stp_get_contrast (lower),
stp_get_contrast (upper),
stp_get_contrast (defvars) / 100,
stp_get_contrast (defvars) / 10,
3, TRUE, 0, 0, NULL, NULL);
set_adjustment_tooltip (contrast_adjustment,
_("Set the contrast of the print"),
NULL);
g_signal_connect (contrast_adjustment, "value-changed",
G_CALLBACK (gimp_contrast_update),
NULL);
/*
* Cyan slider...
*/
cyan_adjustment =
gimp_scale_entry_new (GTK_TABLE (table), 0, 2, _("Cyan:"), 200, 0,
stp_get_cyan (defvars),
stp_get_cyan (lower),
stp_get_cyan (upper),
stp_get_cyan (defvars) / 100,
stp_get_cyan (defvars) / 10,
3, TRUE, 0, 0, NULL, NULL);
set_adjustment_tooltip (cyan_adjustment,
_("Adjust the cyan balance of the print"),
NULL);
g_signal_connect (cyan_adjustment, "value-changed",
G_CALLBACK (gimp_cyan_update),
NULL);
/*
* Magenta slider...
*/
magenta_adjustment =
gimp_scale_entry_new (GTK_TABLE (table), 0, 3, _("Magenta:"), 200, 0,
stp_get_magenta (defvars),
stp_get_magenta (lower),
stp_get_magenta (upper),
stp_get_magenta (defvars) / 100,
stp_get_magenta (defvars) / 10,
3, TRUE, 0, 0, NULL, NULL);
set_adjustment_tooltip (magenta_adjustment,
_("Adjust the magenta balance of the print"),
NULL);
g_signal_connect (magenta_adjustment, "value-changed",
G_CALLBACK (gimp_magenta_update),
NULL);
/*
* Yellow slider...
*/
yellow_adjustment =
gimp_scale_entry_new (GTK_TABLE (table), 0, 4, _("Yellow:"), 200, 0,
stp_get_yellow (defvars),
stp_get_yellow (lower),
stp_get_yellow (upper),
stp_get_yellow (defvars) / 100,
stp_get_yellow (defvars) / 10,
3, TRUE, 0, 0, NULL, NULL);
set_adjustment_tooltip (yellow_adjustment,
_("Adjust the yellow balance of the print"),
NULL);
g_signal_connect (yellow_adjustment, "value-changed",
G_CALLBACK (gimp_yellow_update),
NULL);
/*
* Saturation slider...
*/
saturation_adjustment =
gimp_scale_entry_new (GTK_TABLE (table), 0, 5, _("Saturation:"), 200, 0,
stp_get_saturation (defvars),
stp_get_saturation (lower),
stp_get_saturation (upper),
stp_get_saturation (defvars) / 1000,
stp_get_saturation (defvars) / 100,
3, TRUE, 0, 0, NULL, NULL);
set_adjustment_tooltip (saturation_adjustment,
_("Adjust the saturation (color balance) of the print\n"
"Use zero saturation to produce grayscale output "
"using color and black inks"),
NULL);
g_signal_connect (saturation_adjustment, "value-changed",
G_CALLBACK (gimp_saturation_update),
NULL);
/*
* Density slider...
*/
density_adjustment =
gimp_scale_entry_new (GTK_TABLE (table), 0, 6, _("Density:"), 200, 0,
stp_get_density (defvars),
stp_get_density (lower),
stp_get_density (upper),
stp_get_density (defvars) / 1000,
stp_get_density (defvars) / 100,
3, TRUE, 0, 0, NULL, NULL);
set_adjustment_tooltip (density_adjustment,
_("Adjust the density (amount of ink) of the print. "
"Reduce the density if the ink bleeds through the "
"paper or smears; increase the density if black "
"regions are not solid."),
NULL);
g_signal_connect (density_adjustment, "value-changed",
G_CALLBACK (gimp_density_update),
NULL);
/*
* Gamma slider...
*/
gamma_adjustment =
gimp_scale_entry_new (GTK_TABLE (table), 0, 7, _("Gamma:"), 200, 0,
stp_get_gamma (defvars),
stp_get_gamma (lower),
stp_get_gamma (upper),
stp_get_gamma (defvars) / 1000,
stp_get_gamma (defvars) / 100,
3, TRUE, 0, 0, NULL, NULL);
set_adjustment_tooltip (gamma_adjustment,
_("Adjust the gamma of the print. Larger values will "
"produce a generally brighter print, while smaller "
"values will produce a generally darker print. "
"Black and white will remain the same, unlike with "
"the brightness adjustment."),
NULL);
g_signal_connect (gamma_adjustment, "value-changed",
G_CALLBACK (gimp_gamma_update),
NULL);
/*
* Dither algorithm option combo...
*/
event_box = gtk_event_box_new ();
gimp_table_attach_aligned (GTK_TABLE (table), 0, 8,
_("Dither algorithm:"), 0.0, 0.5,
event_box, 2, FALSE);
dither_algo_combo = gtk_combo_new ();
gtk_container_add (GTK_CONTAINER(event_box), dither_algo_combo);
gtk_widget_show (dither_algo_combo);
gimp_help_set_help_data (GTK_WIDGET (event_box),
_("Choose the dither algorithm to be used.\n"
"Adaptive Hybrid usually produces the best "
"all-around quality.\n"
"Ordered is faster and produces almost as good "
"quality on photographs.\n"
"Fast and Very Fast are considerably faster, and "
"work well for text and line art.\n"
"Hybrid Floyd-Steinberg generally produces "
"inferior output."),
NULL);
gimp_build_dither_combo ();
}
static void
gimp_brightness_update (GtkAdjustment *adjustment)
{
gimp_invalidate_preview_thumbnail ();
if (stp_get_brightness (*pv) != adjustment->value)
{
stp_set_brightness (*pv, adjustment->value);
gimp_update_adjusted_thumbnail ();
}
}
static void
gimp_contrast_update (GtkAdjustment *adjustment)
{
gimp_invalidate_preview_thumbnail ();
if (stp_get_contrast (*pv) != adjustment->value)
{
stp_set_contrast (*pv, adjustment->value);
gimp_update_adjusted_thumbnail ();
}
}
static void
gimp_cyan_update (GtkAdjustment *adjustment)
{
gimp_invalidate_preview_thumbnail ();
if (stp_get_cyan (*pv) != adjustment->value)
{
stp_set_cyan (*pv, adjustment->value);
gimp_update_adjusted_thumbnail ();
}
}
static void
gimp_magenta_update (GtkAdjustment *adjustment)
{
gimp_invalidate_preview_thumbnail ();
if (stp_get_magenta (*pv) != adjustment->value)
{
stp_set_magenta (*pv, adjustment->value);
gimp_update_adjusted_thumbnail ();
}
}
static void
gimp_yellow_update (GtkAdjustment *adjustment)
{
gimp_invalidate_preview_thumbnail ();
if (stp_get_yellow (*pv) != adjustment->value)
{
stp_set_yellow (*pv, adjustment->value);
gimp_update_adjusted_thumbnail ();
}
}
static void
gimp_saturation_update (GtkAdjustment *adjustment)
{
gimp_invalidate_preview_thumbnail ();
if (stp_get_saturation (*pv) != adjustment->value)
{
stp_set_saturation (*pv, adjustment->value);
gimp_update_adjusted_thumbnail ();
}
}
static void
gimp_density_update (GtkAdjustment *adjustment)
{
if (stp_get_density (*pv) != adjustment->value)
{
stp_set_density (*pv, adjustment->value);
}
}
static void
gimp_gamma_update (GtkAdjustment *adjustment)
{
gimp_invalidate_preview_thumbnail ();
if (stp_get_gamma (*pv) != adjustment->value)
{
stp_set_gamma (*pv, adjustment->value);
gimp_update_adjusted_thumbnail ();
}
}
static void
gimp_set_adjustment_active (GtkObject *adj,
gboolean active)
{
gtk_widget_set_sensitive (GTK_WIDGET (GIMP_SCALE_ENTRY_LABEL (adj)), active);
gtk_widget_set_sensitive (GTK_WIDGET (GIMP_SCALE_ENTRY_SCALE (adj)), active);
gtk_widget_set_sensitive (GTK_WIDGET (GIMP_SCALE_ENTRY_SPINBUTTON (adj)),
active);
}
void
gimp_set_color_sliders_active (gboolean active)
{
gimp_set_adjustment_active (cyan_adjustment, active);
gimp_set_adjustment_active (magenta_adjustment, active);
gimp_set_adjustment_active (yellow_adjustment, active);
gimp_set_adjustment_active (saturation_adjustment, active);
}
void
gimp_do_color_updates (void)
{
gtk_adjustment_set_value (GTK_ADJUSTMENT (brightness_adjustment),
stp_get_brightness (*pv));
gtk_adjustment_set_value (GTK_ADJUSTMENT (gamma_adjustment),
stp_get_gamma (*pv));
gtk_adjustment_set_value (GTK_ADJUSTMENT (contrast_adjustment),
stp_get_contrast (*pv));
gtk_adjustment_set_value (GTK_ADJUSTMENT (cyan_adjustment),
stp_get_cyan (*pv));
gtk_adjustment_set_value (GTK_ADJUSTMENT (magenta_adjustment),
stp_get_magenta (*pv));
gtk_adjustment_set_value (GTK_ADJUSTMENT (yellow_adjustment),
stp_get_yellow (*pv));
gtk_adjustment_set_value (GTK_ADJUSTMENT (saturation_adjustment),
stp_get_saturation (*pv));
gtk_adjustment_set_value (GTK_ADJUSTMENT (density_adjustment),
stp_get_density (*pv));
gimp_update_adjusted_thumbnail ();
}
void
gimp_set_color_defaults (void)
{
const stp_vars_t defvars = stp_default_settings ();
stp_set_brightness (*pv, stp_get_brightness (defvars));
stp_set_gamma (*pv, stp_get_gamma (defvars));
stp_set_contrast (*pv, stp_get_contrast (defvars));
stp_set_cyan (*pv, stp_get_cyan (defvars));
stp_set_magenta (*pv, stp_get_magenta (defvars));
stp_set_yellow (*pv, stp_get_yellow (defvars));
stp_set_saturation (*pv, stp_get_saturation (defvars));
stp_set_density (*pv, stp_get_density (defvars));
gimp_do_color_updates ();
}

File diff suppressed because it is too large Load Diff

View File

@ -1,345 +0,0 @@
/*
* "$Id$"
*
* Print plug-in for the GIMP.
*
* Copyright 1997-2000 Michael Sweet (mike@easysw.com) and
* Robert Krawitz (rlk@alum.mit.edu)
* Copyright 2000 Charles Briscoe-Smith <cpbs@debian.org>
*
* 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.
*/
#include "config.h"
#include <gimp-print/gimp-print.h>
#include "libgimp/gimp.h"
#include "libgimp/gimpui.h"
#include "print_gimp.h"
#include "libgimp/stdplugins-intl.h"
/*
* "Image" ADT
*
* This file defines an abstract data type called "Image". An Image wraps
* a Gimp drawable (or some other application-level image representation)
* for presentation to the low-level printer drivers (which do CMYK
* separation, dithering and weaving). The Image ADT has the ability
* to perform any combination of flips and rotations on the image,
* and then deliver individual rows to the driver code.
*
* Stuff which might be useful to do in this layer:
*
* - Scaling, optionally with interpolation/filtering.
*
* - Colour-adjustment.
*
* - Multiple-image composition.
*
* Also useful might be to break off a thin application-dependent
* sublayer leaving this layer (which does the interesting stuff)
* application-independent.
*/
/* Concrete type to represent image */
typedef struct
{
GimpDrawable *drawable;
GimpPixelRgn rgn;
/*
* Transformations we can impose on the image. The transformations
* are considered to be performed in the order given here.
*/
/* 1: Transpose the x and y axes (flip image over its leading diagonal) */
int columns; /* Set if returning columns instead of rows. */
/* 2: Translate (ox,oy) to the origin */
int ox, oy; /* Origin of image */
/* 3: Flip vertically about the x axis */
int increment; /* +1 or -1 for offset of row n+1 from row n. */
/* 4: Crop to width w, height h */
int w, h; /* Width and height of output image */
/* 5: Flip horizontally about the vertical centre-line of the image */
int mirror; /* Set if mirroring rows end-for-end. */
} Gimp_Image_t;
static const char *Image_get_appname(stp_image_t *image);
static void Image_progress_conclude(stp_image_t *image);
static void Image_note_progress(stp_image_t *image,
double current, double total);
static void Image_progress_init(stp_image_t *image);
static stp_image_status_t Image_get_row(stp_image_t *image,
unsigned char *data, int row);
static int Image_height(stp_image_t *image);
static int Image_width(stp_image_t *image);
static int Image_bpp(stp_image_t *image);
static void Image_rotate_180(stp_image_t *image);
static void Image_rotate_cw(stp_image_t *image);
static void Image_rotate_ccw(stp_image_t *image);
static void Image_crop(stp_image_t *image,
int left, int top, int right, int bottom);
static void Image_vflip(stp_image_t *image);
static void Image_hflip(stp_image_t *image);
static void Image_transpose(stp_image_t *image);
static void Image_reset(stp_image_t *image);
static void Image_init(stp_image_t *image);
static stp_image_t theImage =
{
Image_init,
Image_reset,
Image_transpose,
Image_hflip,
Image_vflip,
Image_crop,
Image_rotate_ccw,
Image_rotate_cw,
Image_rotate_180,
Image_bpp,
Image_width,
Image_height,
Image_get_row,
Image_get_appname,
Image_progress_init,
Image_note_progress,
Image_progress_conclude,
NULL
};
stp_image_t *
Image_GimpDrawable_new(GimpDrawable *drawable)
{
Gimp_Image_t *i = g_malloc(sizeof(Gimp_Image_t));
i->drawable = drawable;
gimp_pixel_rgn_init(&(i->rgn), drawable, 0, 0,
drawable->width, drawable->height, FALSE, FALSE);
theImage.rep = i;
theImage.reset(&theImage);
return &theImage;
}
static void
Image_init(stp_image_t *image)
{
/* Nothing to do. */
}
static void
Image_reset(stp_image_t *image)
{
Gimp_Image_t *i = (Gimp_Image_t *) (image->rep);
i->columns = FALSE;
i->ox = 0;
i->oy = 0;
i->increment = 1;
i->w = i->drawable->width;
i->h = i->drawable->height;
i->mirror = FALSE;
}
static void
Image_transpose(stp_image_t *image)
{
Gimp_Image_t *i = (Gimp_Image_t *) (image->rep);
int tmp;
if (i->mirror) i->ox += i->w - 1;
i->columns = !i->columns;
tmp = i->ox;
i->ox = i->oy;
i->oy = tmp;
tmp = i->mirror;
i->mirror = i->increment < 0;
i->increment = tmp ? -1 : 1;
tmp = i->w;
i->w = i->h;
i->h = tmp;
if (i->mirror) i->ox -= i->w - 1;
}
static void
Image_hflip(stp_image_t *image)
{
Gimp_Image_t *i = (Gimp_Image_t *) (image->rep);
i->mirror = !i->mirror;
}
static void
Image_vflip(stp_image_t *image)
{
Gimp_Image_t *i = (Gimp_Image_t *) (image->rep);
i->oy += (i->h-1) * i->increment;
i->increment = -i->increment;
}
/*
* Image_crop:
*
* Crop the given number of pixels off the LEFT, TOP, RIGHT and BOTTOM
* of the image.
*/
static void
Image_crop(stp_image_t *image, int left, int top, int right, int bottom)
{
Gimp_Image_t *i = (Gimp_Image_t *) (image->rep);
int xmax = (i->columns ? i->drawable->height : i->drawable->width) - 1;
int ymax = (i->columns ? i->drawable->width : i->drawable->height) - 1;
int nx = i->ox + i->mirror ? right : left;
int ny = i->oy + top * (i->increment);
int nw = i->w - left - right;
int nh = i->h - top - bottom;
int wmax, hmax;
if (nx < 0) nx = 0;
else if (nx > xmax) nx = xmax;
if (ny < 0) ny = 0;
else if (ny > ymax) ny = ymax;
wmax = xmax - nx + 1;
hmax = i->increment ? ny + 1 : ymax - ny + 1;
if (nw < 1) nw = 1;
else if (nw > wmax) nw = wmax;
if (nh < 1) nh = 1;
else if (nh > hmax) nh = hmax;
i->ox = nx;
i->oy = ny;
i->w = nw;
i->h = nh;
}
static void
Image_rotate_ccw(stp_image_t *image)
{
Image_transpose(image);
Image_vflip(image);
}
static void
Image_rotate_cw(stp_image_t *image)
{
Image_transpose(image);
Image_hflip(image);
}
static void
Image_rotate_180(stp_image_t *image)
{
Image_vflip(image);
Image_hflip(image);
}
static int
Image_bpp(stp_image_t *image)
{
Gimp_Image_t *i = (Gimp_Image_t *) (image->rep);
return i->drawable->bpp;
}
static int
Image_width(stp_image_t *image)
{
Gimp_Image_t *i = (Gimp_Image_t *) (image->rep);
return i->w;
}
static int
Image_height(stp_image_t *image)
{
Gimp_Image_t *i = (Gimp_Image_t *) (image->rep);
return i->h;
}
static stp_image_status_t
Image_get_row(stp_image_t *image, unsigned char *data, int row)
{
Gimp_Image_t *i = (Gimp_Image_t *) (image->rep);
if (i->columns)
gimp_pixel_rgn_get_col(&(i->rgn), data,
i->oy + row * i->increment, i->ox, i->w);
else
gimp_pixel_rgn_get_row(&(i->rgn), data,
i->ox, i->oy + row * i->increment, i->w);
if (i->mirror)
{
/* Flip row -- probably inefficiently */
int f, l, b = i->drawable->bpp;
for (f = 0, l = i->w - 1; f < l; f++, l--)
{
int c;
unsigned char tmp;
for (c = 0; c < b; c++)
{
tmp = data[f*b+c];
data[f*b+c] = data[l*b+c];
data[l*b+c] = tmp;
}
}
}
return STP_IMAGE_OK;
}
static void
Image_progress_init(stp_image_t *image)
{
gimp_progress_init(_("Printing"));
}
static void
Image_note_progress(stp_image_t *image, double current, double total)
{
gimp_progress_update(current / total);
}
static void
Image_progress_conclude(stp_image_t *image)
{
gimp_progress_update(1);
}
static const char *
Image_get_appname(stp_image_t *image)
{
static char pluginname[] = PLUG_IN_NAME " plug-in V" PLUG_IN_VERSION
" for GIMP";
return pluginname;
}
/*
* End of "$Id$".
*/

File diff suppressed because it is too large Load Diff

View File

@ -1,102 +0,0 @@
/*
* "$Id$"
*
* Print plug-in for the GIMP.
*
* Copyright 1997-2000 Michael Sweet (mike@easysw.com),
* Robert Krawitz (rlk@alum.mit.edu). and Steve Miller (smiller@rni.net
*
* 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.
*
*
* Revision History:
*
* See ChangeLog
*/
#ifndef __PRINT_GIMP_H__
#define __PRINT_GIMP_H__
/*
* All Gimp-specific code is in this file.
*/
#define PLUG_IN_VERSION "4.2"
#define PLUG_IN_NAME "Print"
typedef struct /**** Printer List ****/
{
int active; /* Do we know about this printer? */
char name[128]; /* Name of printer */
stp_vars_t v;
} gp_plist_t;
#define THUMBNAIL_MAXW (128)
#define THUMBNAIL_MAXH (128)
extern gint thumbnail_w, thumbnail_h, thumbnail_bpp;
extern guchar *thumbnail_data;
extern gint adjusted_thumbnail_bpp;
extern guchar *adjusted_thumbnail_data;
extern stp_vars_t vars;
extern gint plist_count; /* Number of system printers */
extern gint plist_current; /* Current system printer */
extern gp_plist_t *plist; /* System printers */
extern gint32 image_ID;
extern gchar *image_name;
extern gint image_width;
extern gint image_height;
extern stp_printer_t current_printer;
extern gint runme;
extern gint saveme;
extern GtkWidget *gimp_color_adjust_dialog;
extern GtkWidget *dither_algo_combo;
extern stp_vars_t *pv;
/*
* Function prototypes
*/
/* How to create an Image wrapping a Gimp drawable */
extern void printrc_save (void);
extern stp_image_t *Image_GimpDrawable_new(GimpDrawable *drawable);
extern int add_printer(const gp_plist_t *key, int add_only);
extern void initialize_printer(gp_plist_t *printer);
extern void gimp_update_adjusted_thumbnail (void);
extern void gimp_plist_build_combo (GtkWidget *combo,
gint num_items,
stp_param_t *items,
const gchar *cur_item,
const gchar *def_value,
GCallback callback,
gint *callback_id);
extern void gimp_invalidate_frame(void);
extern void gimp_invalidate_preview_thumbnail(void);
extern void gimp_do_color_updates (void);
extern void gimp_redraw_color_swatch (void);
extern void gimp_build_dither_combo (void);
extern void gimp_create_color_adjust_window (void);
extern void gimp_update_adjusted_thumbnail (void);
extern void gimp_create_main_window (void);
extern void gimp_set_color_sliders_active(int active);
extern void gimp_writefunc (void *file, const char *buf, size_t bytes);
extern void set_adjustment_tooltip(GtkObject *adjustment,
const gchar *tip, const gchar *private);
#endif /* __PRINT_GIMP_H__ */

View File

@ -1,3 +1,7 @@
2006-06-20 Sven Neumann <sven@gimp.org>
* POTFILES.in: added desktop-link.c, removed print plug-in.
2006-06-20 Jakub Friedl <jfriedl@suse.cz>
* cs.po: cs update

View File

@ -251,10 +251,6 @@ plug-ins/metadata/interface.c
plug-ins/metadata/metadata.c
plug-ins/metadata/xmp-parse.c
plug-ins/pagecurl/pagecurl.c
plug-ins/print/gimp_color_window.c
plug-ins/print/gimp_main_window.c
plug-ins/print/print-image-gimp.c
plug-ins/print/print.c
plug-ins/rcm/rcm.c
plug-ins/rcm/rcm_dialog.c
plug-ins/rcm/rcm_stock.c