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:

committed by
Sven Neumann

parent
c180bc4590
commit
b7e345a06c
@ -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>
|
2007-07-25 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/tools/gimptool.c (gimp_tool_set_active_modifier_state):
|
* app/tools/gimptool.c (gimp_tool_set_active_modifier_state):
|
||||||
|
@ -54,13 +54,12 @@ static void begin_print (GtkPrintOperation *operation,
|
|||||||
PrintData *data);
|
PrintData *data);
|
||||||
static void end_print (GtkPrintOperation *operation,
|
static void end_print (GtkPrintOperation *operation,
|
||||||
GtkPrintContext *context,
|
GtkPrintContext *context,
|
||||||
PrintData *data);
|
gint32 *image_ID);
|
||||||
static void draw_page (GtkPrintOperation *print,
|
static void draw_page (GtkPrintOperation *print,
|
||||||
GtkPrintContext *context,
|
GtkPrintContext *context,
|
||||||
gint page_nr,
|
gint page_nr,
|
||||||
PrintData *data);
|
PrintData *data);
|
||||||
static void status_changed (GtkPrintOperation *operation,
|
static void status_changed (GtkPrintOperation *operation);
|
||||||
gint32 *image_ID);
|
|
||||||
|
|
||||||
static GtkWidget * create_custom_widget (GtkPrintOperation *operation,
|
static GtkWidget * create_custom_widget (GtkPrintOperation *operation,
|
||||||
PrintData *data);
|
PrintData *data);
|
||||||
@ -187,6 +186,9 @@ print_image (gint32 image_ID,
|
|||||||
|
|
||||||
load_print_settings (&data, orig_image_ID);
|
load_print_settings (&data, orig_image_ID);
|
||||||
|
|
||||||
|
if (export != GIMP_EXPORT_EXPORT)
|
||||||
|
image_ID = -1;
|
||||||
|
|
||||||
g_signal_connect (operation, "begin-print",
|
g_signal_connect (operation, "begin-print",
|
||||||
G_CALLBACK (begin_print),
|
G_CALLBACK (begin_print),
|
||||||
&data);
|
&data);
|
||||||
@ -195,14 +197,11 @@ print_image (gint32 image_ID,
|
|||||||
&data);
|
&data);
|
||||||
g_signal_connect (operation, "end-print",
|
g_signal_connect (operation, "end-print",
|
||||||
G_CALLBACK (end_print),
|
G_CALLBACK (end_print),
|
||||||
&data);
|
&image_ID);
|
||||||
|
|
||||||
if (export != GIMP_EXPORT_EXPORT)
|
|
||||||
image_ID = -1;
|
|
||||||
|
|
||||||
g_signal_connect (operation, "status-changed",
|
g_signal_connect (operation, "status-changed",
|
||||||
G_CALLBACK (status_changed),
|
G_CALLBACK (status_changed),
|
||||||
&image_ID);
|
NULL);
|
||||||
|
|
||||||
if (interactive)
|
if (interactive)
|
||||||
{
|
{
|
||||||
@ -297,28 +296,23 @@ begin_print (GtkPrintOperation *operation,
|
|||||||
static void
|
static void
|
||||||
end_print (GtkPrintOperation *operation,
|
end_print (GtkPrintOperation *operation,
|
||||||
GtkPrintContext *context,
|
GtkPrintContext *context,
|
||||||
PrintData *data)
|
gint32 *image_ID)
|
||||||
{
|
{
|
||||||
gimp_progress_update (1.0);
|
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
|
static void
|
||||||
status_changed (GtkPrintOperation *operation,
|
status_changed (GtkPrintOperation *operation)
|
||||||
gint32 *image_ID)
|
|
||||||
{
|
{
|
||||||
const gchar *status = gtk_print_operation_get_status_string (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))
|
if (status && strlen (status))
|
||||||
{
|
{
|
||||||
/* display status of the print operation in the status bar */
|
/* display status of the print operation in the status bar */
|
||||||
|
Reference in New Issue
Block a user