Make gtk_printer_list_papers public. Bug #345587.

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.
This commit is contained in:
Christian Persch 2006-12-24 13:16:05 +00:00 committed by Christian Persch
parent 842b318306
commit 4f5e5b4834
7 changed files with 29 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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,

View File

@ -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);
}

View File

@ -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__ */