job->scale = 1.0;
job->page_set = GTK_PAGE_SET_ALL;
job->rotate_to_orientation = FALSE;
+ job->number_up = 1;
+ job->number_up_layout = GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_TOP_TO_BOTTOM;
}
/**
* gtk_print_job_get_surface:
* @job: a #GtkPrintJob
- * @error: return location for errors, or %NULL
+ * @error: (allow-none): return location for errors, or %NULL
*
* Gets a cairo surface onto which the pages of
* the print job should be rendered.
&tmp_error);
if (fd == -1)
{
+ g_free (filename);
g_propagate_error (error, tmp_error);
return NULL;
}
/* If we are debugging printing don't delete the tmp files */
if (!(gtk_debug_flags & GTK_DEBUG_PRINTING))
#endif /* G_ENABLE_DEBUG */
- unlink (filename);
+ g_unlink (filename);
+ g_free (filename);
paper_size = gtk_page_setup_get_paper_size (priv->page_setup);
width = gtk_paper_size_get_width (paper_size, GTK_UNIT_POINTS);
switch (prop_id)
{
case PROP_TITLE:
+ g_free (priv->title);
priv->title = g_value_dup_string (value);
break;
/**
* gtk_print_job_send:
* @job: a GtkPrintJob
- * @callback: function to call when the job completes or an error occures
+ * @callback: function to call when the job completes or an error occurs
* @user_data: user data that gets passed to @callback
* @dnotify: destroy notify for @user_data
*
callback, user_data, dnotify);
}
-GType
-gtk_print_capabilities_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0)
- {
- static const GFlagsValue values[] = {
- { GTK_PRINT_CAPABILITY_PAGE_SET, "GTK_PRINT_CAPABILITY_PAGE_SET", "page-set" },
- { GTK_PRINT_CAPABILITY_COPIES, "GTK_PRINT_CAPABILITY_COPIES", "copies" },
- { GTK_PRINT_CAPABILITY_COLLATE, "GTK_PRINT_CAPABILITY_COLLATE", "collate" },
- { GTK_PRINT_CAPABILITY_REVERSE, "GTK_PRINT_CAPABILITY_REVERSE", "reverse" },
- { GTK_PRINT_CAPABILITY_SCALE, "GTK_PRINT_CAPABILITY_SCALE", "scale" },
- { 0, NULL, NULL }
- };
-
- etype = g_flags_register_static (I_("GtkPrintCapabilities"), values);
- }
-
- return etype;
-}
-
#define __GTK_PRINT_JOB_C__
#include "gtkaliasdef.c"