delete the export image from the "end-print" handler.

2007-07-25  Sven Neumann  <sven@gimp.org>

	* plug-ins/print/print.c: delete the export image from the
	"end-print" handler.


svn path=/trunk/; revision=22993
This commit is contained in:
Sven Neumann
2007-07-25 07:36:15 +00:00
committed by Sven Neumann
parent c180bc4590
commit b7e345a06c
2 changed files with 21 additions and 22 deletions

View File

@ -1,3 +1,8 @@
2007-07-25 Sven Neumann <sven@gimp.org>
* plug-ins/print/print.c: delete the export image from the
"end-print" handler.
2007-07-25 Michael Natterer <mitch@gimp.org>
* app/tools/gimptool.c (gimp_tool_set_active_modifier_state):

View File

@ -54,13 +54,12 @@ static void begin_print (GtkPrintOperation *operation,
PrintData *data);
static void end_print (GtkPrintOperation *operation,
GtkPrintContext *context,
PrintData *data);
gint32 *image_ID);
static void draw_page (GtkPrintOperation *print,
GtkPrintContext *context,
gint page_nr,
PrintData *data);
static void status_changed (GtkPrintOperation *operation,
gint32 *image_ID);
static void status_changed (GtkPrintOperation *operation);
static GtkWidget * create_custom_widget (GtkPrintOperation *operation,
PrintData *data);
@ -187,6 +186,9 @@ print_image (gint32 image_ID,
load_print_settings (&data, orig_image_ID);
if (export != GIMP_EXPORT_EXPORT)
image_ID = -1;
g_signal_connect (operation, "begin-print",
G_CALLBACK (begin_print),
&data);
@ -195,14 +197,11 @@ print_image (gint32 image_ID,
&data);
g_signal_connect (operation, "end-print",
G_CALLBACK (end_print),
&data);
if (export != GIMP_EXPORT_EXPORT)
image_ID = -1;
&image_ID);
g_signal_connect (operation, "status-changed",
G_CALLBACK (status_changed),
&image_ID);
NULL);
if (interactive)
{
@ -297,28 +296,23 @@ begin_print (GtkPrintOperation *operation,
static void
end_print (GtkPrintOperation *operation,
GtkPrintContext *context,
PrintData *data)
gint32 *image_ID)
{
gimp_progress_update (1.0);
/* we don't need the export image any longer, delete it */
if (gimp_image_is_valid (*image_ID))
{
gimp_image_delete (*image_ID);
*image_ID = -1;
}
}
static void
status_changed (GtkPrintOperation *operation,
gint32 *image_ID)
status_changed (GtkPrintOperation *operation)
{
const gchar *status = gtk_print_operation_get_status_string (operation);
if (gtk_print_operation_get_status (operation) >
GTK_PRINT_STATUS_GENERATING_DATA)
{
/* we don't need the export image any longer, delete it */
if (gimp_image_is_valid (*image_ID))
{
gimp_image_delete (*image_ID);
*image_ID = -1;
}
}
if (status && strlen (status))
{
/* display status of the print operation in the status bar */