diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2008-05-21 02:17:30 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2008-05-21 02:17:30 +0000 |
commit | 59ae44d00ee7876b3c69fd462d515a4f50c55b6a (patch) | |
tree | 76c8f2df967022569c134fa9e177663ffb07b27f /gtk/gtkprintbackend.c | |
parent | 75a9722aa14784e70c49b988ce28589eceb752e3 (diff) | |
download | gtk+-59ae44d00ee7876b3c69fd462d515a4f50c55b6a.tar.gz |
RH bug 204621 - "GtkPrint" asks for "Letter" size paper when "A4" size
was chosen
Patch by Marek Kasik.
* gtk/gtk.symbols:
* gtk/gtkprinter.[hc]: Add gtk_printer_get_default_page_size.
* gtk/gtkprintbackend.[hc]: Add fallback implementation.
* modules/printbackends/file/gtkprintbackendfile.c:
* modules/printbackends/cups/gtkprintbackendcups.c: Implement
get_default_page_size.
* gtk/gtkpagesetupunixdialog.c: When selecting a different printer,
select its default paper size.
* gtk/gtkprintunixdialog.c: If no explicit page setup has been set,
use the printer default.
* gtk/gtkprintoperation-unix.c: Don't create an empty page setup
if we don't have a default page setup.
svn path=/trunk/; revision=20120
Diffstat (limited to 'gtk/gtkprintbackend.c')
-rw-r--r-- | gtk/gtkprintbackend.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/gtk/gtkprintbackend.c b/gtk/gtkprintbackend.c index 8be27d2f40..9b4e455208 100644 --- a/gtk/gtkprintbackend.c +++ b/gtk/gtkprintbackend.c @@ -283,16 +283,17 @@ gtk_print_backend_load_modules (void) G_DEFINE_TYPE (GtkPrintBackend, gtk_print_backend, G_TYPE_OBJECT) -static void fallback_printer_request_details (GtkPrinter *printer); -static gboolean fallback_printer_mark_conflicts (GtkPrinter *printer, - GtkPrinterOptionSet *options); -static void fallback_printer_get_hard_margins (GtkPrinter *printer, - gdouble *top, - gdouble *bottom, - gdouble *left, - gdouble *right); -static GList * fallback_printer_list_papers (GtkPrinter *printer); -static GtkPrintCapabilities fallback_printer_get_capabilities (GtkPrinter *printer); +static void fallback_printer_request_details (GtkPrinter *printer); +static gboolean fallback_printer_mark_conflicts (GtkPrinter *printer, + GtkPrinterOptionSet *options); +static void fallback_printer_get_hard_margins (GtkPrinter *printer, + gdouble *top, + gdouble *bottom, + gdouble *left, + gdouble *right); +static GList * fallback_printer_list_papers (GtkPrinter *printer); +static GtkPageSetup * fallback_printer_get_default_page_size (GtkPrinter *printer); +static GtkPrintCapabilities fallback_printer_get_capabilities (GtkPrinter *printer); static void gtk_print_backend_class_init (GtkPrintBackendClass *class) @@ -308,6 +309,7 @@ gtk_print_backend_class_init (GtkPrintBackendClass *class) class->printer_mark_conflicts = fallback_printer_mark_conflicts; class->printer_get_hard_margins = fallback_printer_get_hard_margins; class->printer_list_papers = fallback_printer_list_papers; + class->printer_get_default_page_size = fallback_printer_get_default_page_size; class->printer_get_capabilities = fallback_printer_get_capabilities; g_type_class_add_private (class, sizeof (GtkPrintBackendPrivate)); @@ -419,6 +421,12 @@ fallback_printer_list_papers (GtkPrinter *printer) return NULL; } +static GtkPageSetup * +fallback_printer_get_default_page_size (GtkPrinter *printer) +{ + return NULL; +} + static GtkPrintCapabilities fallback_printer_get_capabilities (GtkPrinter *printer) { |