diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | docs/reference/gtk/gtk-sections.txt | 1 | ||||
-rw-r--r-- | gtk/gtk.symbols | 1 | ||||
-rw-r--r-- | gtk/gtkpagesetupunixdialog.c | 2 | ||||
-rw-r--r-- | gtk/gtkprinter-private.h | 1 | ||||
-rw-r--r-- | gtk/gtkprinter.c | 17 | ||||
-rw-r--r-- | gtk/gtkprinter.h | 3 |
7 files changed, 29 insertions, 5 deletions
@@ -1,3 +1,12 @@ +2006-12-24 Christian Persch <chpe@cvs.gnome.org> + + * docs/reference/gtk/gtk-sections.txt: + * gtk/gtk.symbols: + * gtk/gtkpagesetupunixdialog.c: (fill_paper_sizes_from_printer): + * gtk/gtkprinter-private.h: + * gtk/gtkprinter.c: (gtk_printer_list_papers): + * gtk/gtkprinter.h: Make gtk_printer_list_papers public. Bug #345587. + 2006-12-24 Carlos Garcia Campos <carlosgc@gnome.org> * gtk/gtkpagesetupunixdialog.c: Don't ignore reverse portrait option diff --git a/docs/reference/gtk/gtk-sections.txt b/docs/reference/gtk/gtk-sections.txt index 865cfb0ac5..8b58ed4a42 100644 --- a/docs/reference/gtk/gtk-sections.txt +++ b/docs/reference/gtk/gtk-sections.txt @@ -6210,6 +6210,7 @@ gtk_printer_is_virtual gtk_printer_is_default gtk_printer_accepts_ps gtk_printer_accepts_pdf +gtk_printer_list_papers gtk_printer_compare GtkPrinterFunc gtk_enumerate_printers diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols index 939370a65d..7124cf14d0 100644 --- a/gtk/gtk.symbols +++ b/gtk/gtk.symbols @@ -2610,6 +2610,7 @@ gtk_printer_get_location gtk_printer_get_icon_name gtk_printer_get_job_count gtk_printer_is_virtual +gtk_printer_list_papers gtk_printer_accepts_pdf gtk_printer_accepts_ps gtk_printer_compare diff --git a/gtk/gtkpagesetupunixdialog.c b/gtk/gtkpagesetupunixdialog.c index 81c9af152c..df1a936e98 100644 --- a/gtk/gtkpagesetupunixdialog.c +++ b/gtk/gtkpagesetupunixdialog.c @@ -723,7 +723,7 @@ fill_paper_sizes_from_printer (GtkPageSetupUnixDialog *dialog, } else { - list = _gtk_printer_list_papers (printer); + list = gtk_printer_list_papers (printer); /* TODO: We should really sort this list so interesting size are at the top */ for (l = list; l != NULL; l = l->next) diff --git a/gtk/gtkprinter-private.h b/gtk/gtkprinter-private.h index 58ea80780b..568e3bc087 100644 --- a/gtk/gtkprinter-private.h +++ b/gtk/gtkprinter-private.h @@ -49,7 +49,6 @@ cairo_surface_t * _gtk_printer_create_cairo_surface (GtkPrinter gdouble width, gdouble height, GIOChannel *cache_io); -GList * _gtk_printer_list_papers (GtkPrinter *printer); void _gtk_printer_get_hard_margins (GtkPrinter *printer, gdouble *top, gdouble *bottom, diff --git a/gtk/gtkprinter.c b/gtk/gtkprinter.c index 60c06523e8..b8200b8c10 100644 --- a/gtk/gtkprinter.c +++ b/gtk/gtkprinter.c @@ -784,11 +784,24 @@ _gtk_printer_create_cairo_surface (GtkPrinter *printer, width, height, cache_io); } +/** + * gtk_printer_list_papers: + * @printer: + * + * Lists all the page sizes @printer supports. + * + * Return value: a newly allocated list of newly allocated #GtkPageSetup:s. + * + * Since: 2.12 + */ GList * -_gtk_printer_list_papers (GtkPrinter *printer) +gtk_printer_list_papers (GtkPrinter *printer) { - GtkPrintBackendClass *backend_class = GTK_PRINT_BACKEND_GET_CLASS (printer->priv->backend); + GtkPrintBackendClass *backend_class; + + g_return_val_if_fail (GTK_IS_PRINTER (printer), NULL); + backend_class = GTK_PRINT_BACKEND_GET_CLASS (printer->priv->backend); return backend_class->printer_list_papers (printer); } diff --git a/gtk/gtkprinter.h b/gtk/gtkprinter.h index 7454f0e424..f3050f970e 100644 --- a/gtk/gtkprinter.h +++ b/gtk/gtkprinter.h @@ -79,6 +79,7 @@ gboolean gtk_printer_is_virtual (GtkPrinter *printer gboolean gtk_printer_is_default (GtkPrinter *printer); gboolean gtk_printer_accepts_pdf (GtkPrinter *printer); gboolean gtk_printer_accepts_ps (GtkPrinter *printer); +GList *gtk_printer_list_papers (GtkPrinter *printer); gint gtk_printer_compare (GtkPrinter *a, GtkPrinter *b); @@ -90,7 +91,7 @@ void gtk_enumerate_printers (GtkPrinterFunc func, gpointer data, GDestroyNotify destroy, gboolean wait); - + G_END_DECLS #endif /* __GTK_PRINTER_H__ */ |