diff gtk3/dw.c @ 1152:58b5374355ab

Added print jobname parameter to dw_print_new(). If parameter is NULL a dummy name will be used.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 12 Sep 2011 19:26:49 +0000
parents cf934fd39d03
children e6a2f57c0842
line wrap: on
line diff
--- a/gtk3/dw.c	Mon Sep 12 02:22:48 2011 +0000
+++ b/gtk3/dw.c	Mon Sep 12 19:26:49 2011 +0000
@@ -10248,6 +10248,7 @@
 /*
  * Creates a new print object.
  * Parameters:
+ *       jobname: Name of the print job to show in the queue.
  *       flags: Flags to initially configure the print object.
  *       pages: Number of pages to print.
  *       drawfunc: The pointer to the function to be used as the callback.
@@ -10255,7 +10256,7 @@
  * Returns:
  *       A handle to the print object or NULL on failure.
  */
-HPRINT API dw_print_new(unsigned long flags, unsigned int pages, void *drawfunc, void *drawdata)
+HPRINT API dw_print_new(char *jobname, unsigned long flags, unsigned int pages, void *drawfunc, void *drawdata)
 {
    GtkPrintOperation *op;
    int _locked_by_me = FALSE;
@@ -10267,6 +10268,7 @@
    if((op = gtk_print_operation_new()))
    {
       gtk_print_operation_set_n_pages(op, pages);
+      gtk_print_operation_set_job_name(op, jobname ? jobname : "Dynamic Windows Print Job");
       g_object_set_data(G_OBJECT(op), "_dw_drawfunc", drawfunc);
       g_object_set_data(G_OBJECT(op), "_dw_drawdata", drawdata);
       g_signal_connect(op, "draw_page", G_CALLBACK(_dw_draw_page), NULL);