Add a capabilities argument to the printer_get_options method and to the

2006-06-19  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprinter-private.h:
	* gtk/gtkprinter.c (_gtk_printer_get_options):
	* gtk/gtkprintbackend.h: Add a capabilities argument to the
	printer_get_options method and to the _gtk_printer_get_options
	function

	* modules/printbackends/lpr/gtkprintbackendlpr.c
	(lpr_printer_get_options):
	* modules/printbackends/pdf/gtkprintbackendpdf.c
	(pdf_printer_get_options):
	* modules/printbackends/cups/gtkprintbackendcups.c
	(cups_printer_get_options):
	* gtk/gtkprintunixdialog.c (selected_printer_changed): Adjust
	callers and implementations.
This commit is contained in:
Matthias Clasen 2006-06-19 05:09:49 +00:00 committed by Matthias Clasen
parent 2858512ebe
commit 7a44ce3366
7 changed files with 52 additions and 15 deletions

View File

@ -1,5 +1,20 @@
2006-06-19 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprinter-private.h:
* gtk/gtkprinter.c (_gtk_printer_get_options):
* gtk/gtkprintbackend.h: Add a capabilities argument to the
printer_get_options method and to the _gtk_printer_get_options
function
* modules/printbackends/lpr/gtkprintbackendlpr.c
(lpr_printer_get_options):
* modules/printbackends/pdf/gtkprintbackendpdf.c
(pdf_printer_get_options):
* modules/printbackends/cups/gtkprintbackendcups.c
(cups_printer_get_options):
* gtk/gtkprintunixdialog.c (selected_printer_changed): Adjust
callers and implementations.
* gtk/gtkprintjob.h: Add a GENERATE_PS capability.
* gtk/gtkprintunixdialog.c (is_printer_active): And use it here.

View File

@ -1,5 +1,20 @@
2006-06-19 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprinter-private.h:
* gtk/gtkprinter.c (_gtk_printer_get_options):
* gtk/gtkprintbackend.h: Add a capabilities argument to the
printer_get_options method and to the _gtk_printer_get_options
function
* modules/printbackends/lpr/gtkprintbackendlpr.c
(lpr_printer_get_options):
* modules/printbackends/pdf/gtkprintbackendpdf.c
(pdf_printer_get_options):
* modules/printbackends/cups/gtkprintbackendcups.c
(cups_printer_get_options):
* gtk/gtkprintunixdialog.c (selected_printer_changed): Adjust
callers and implementations.
* gtk/gtkprintjob.h: Add a GENERATE_PS capability.
* gtk/gtkprintunixdialog.c (is_printer_active): And use it here.

View File

@ -87,7 +87,8 @@ struct _GtkPrintBackendClass
gint cache_fd);
GtkPrinterOptionSet * (*printer_get_options) (GtkPrinter *printer,
GtkPrintSettings *settings,
GtkPageSetup *page_setup);
GtkPageSetup *page_setup,
GtkPrintCapabilities capabilities);
gboolean (*printer_mark_conflicts) (GtkPrinter *printer,
GtkPrinterOptionSet *options);
void (*printer_get_settings_from_options) (GtkPrinter *printer,

View File

@ -34,8 +34,8 @@ gboolean _gtk_printer_has_details (GtkPrinter
void _gtk_printer_request_details (GtkPrinter *printer);
GtkPrinterOptionSet *_gtk_printer_get_options (GtkPrinter *printer,
GtkPrintSettings *settings,
GtkPageSetup *page_setup);
gboolean _gtk_printer_mark_conflicts (GtkPrinter *printer,
GtkPageSetup *page_setup,
GtkPrintCapabilities capabilities);gboolean _gtk_printer_mark_conflicts (GtkPrinter *printer,
GtkPrinterOptionSet *options);
void _gtk_printer_get_settings_from_options (GtkPrinter *printer,
GtkPrinterOptionSet *options,

View File

@ -713,12 +713,13 @@ _gtk_printer_request_details (GtkPrinter *printer)
}
GtkPrinterOptionSet *
_gtk_printer_get_options (GtkPrinter *printer,
GtkPrintSettings *settings,
GtkPageSetup *page_setup)
_gtk_printer_get_options (GtkPrinter *printer,
GtkPrintSettings *settings,
GtkPageSetup *page_setup,
GtkPrintCapabilities capabilities)
{
GtkPrintBackendClass *backend_class = GTK_PRINT_BACKEND_GET_CLASS (printer->priv->backend);
return backend_class->printer_get_options (printer, settings, page_setup);
return backend_class->printer_get_options (printer, settings, page_setup, capabilities);
}
gboolean

View File

@ -67,7 +67,8 @@ static void lpr_printer_get_settings_from_options (GtkPrinter
GtkPrintSettings *settings);
static GtkPrinterOptionSet *lpr_printer_get_options (GtkPrinter *printer,
GtkPrintSettings *settings,
GtkPageSetup *page_setup);
GtkPageSetup *page_setup,
GtkPrintCapabilities capabilities);
static void lpr_printer_prepare_for_print (GtkPrinter *printer,
GtkPrintJob *print_job,
GtkPrintSettings *settings,
@ -392,9 +393,10 @@ gtk_print_backend_lpr_init (GtkPrintBackendLpr *backend)
}
static GtkPrinterOptionSet *
lpr_printer_get_options (GtkPrinter *printer,
GtkPrintSettings *settings,
GtkPageSetup *page_setup)
lpr_printer_get_options (GtkPrinter *printer,
GtkPrintSettings *settings,
GtkPageSetup *page_setup,
GtkPrintCapabilities capabilities)
{
GtkPrinterOptionSet *set;
GtkPrinterOption *option;

View File

@ -39,6 +39,7 @@
#include "gtkprintbackendpdf.h"
#include "gtkprinter.h"
#include "gtkprinter-private.h"
typedef struct _GtkPrintBackendPdfClass GtkPrintBackendPdfClass;
@ -69,7 +70,8 @@ static void pdf_printer_get_settings_from_options (GtkPrinter
GtkPrintSettings *settings);
static GtkPrinterOptionSet *pdf_printer_get_options (GtkPrinter *printer,
GtkPrintSettings *settings,
GtkPageSetup *page_setup);
GtkPageSetup *page_setup,
GtkPrintCapabilities capabilities);
static void pdf_printer_prepare_for_print (GtkPrinter *printer,
GtkPrintJob *print_job,
GtkPrintSettings *settings,
@ -367,9 +369,10 @@ gtk_print_backend_pdf_init (GtkPrintBackendPdf *backend)
}
static GtkPrinterOptionSet *
pdf_printer_get_options (GtkPrinter *printer,
GtkPrintSettings *settings,
GtkPageSetup *page_setup)
pdf_printer_get_options (GtkPrinter *printer,
GtkPrintSettings *settings,
GtkPageSetup *page_setup,
GtkPrintCapabilities capabilities)
{
GtkPrinterOptionSet *set;
GtkPrinterOption *option;