diff options
author | Matthias Clasen <mclasen@redhat.com> | 2007-04-29 04:50:28 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2007-04-29 04:50:28 +0000 |
commit | 4e316dd99e14d4aae9dee38a052a6c465a657d3d (patch) | |
tree | ad9ae1238b97d169f98230c851e55b7e0200648e | |
parent | bcbbbe51014219d72afff61cd20aa28ced37947d (diff) | |
download | gtk+-4e316dd99e14d4aae9dee38a052a6c465a657d3d.tar.gz |
Add a function to list the builtin paper sizes. (#382355, Christian
2007-04-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk.symbols:
* gtk/gtkpapersize.[hc]: Add a function to list the
builtin paper sizes. (#382355, Christian Persch)
svn path=/trunk/; revision=17691
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | docs/reference/ChangeLog | 4 | ||||
-rw-r--r-- | docs/reference/gtk/gtk-sections.txt | 1 | ||||
-rw-r--r-- | gtk/gtk.symbols | 1 | ||||
-rw-r--r-- | gtk/gtkpapersize.c | 27 | ||||
-rw-r--r-- | gtk/gtkpapersize.h | 1 |
6 files changed, 40 insertions, 0 deletions
@@ -1,6 +1,12 @@ 2007-04-29 Matthias Clasen <mclasen@redhat.com> * gtk/gtk.symbols: + * gtk/gtkpapersize.[hc]: Add a function to list the + builtin paper sizes. (#382355, Christian Persch) + +2007-04-29 Matthias Clasen <mclasen@redhat.com> + + * gtk/gtk.symbols: * gtk/gtkprinter-private.h: * gtk/gtkprinter.[hc]: Make gtk_printer_has_details() and gtk_printer_request_details() public. diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 3d0d4beafe..d6e37db5f8 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,5 +1,9 @@ 2007-04-29 Matthias Clasen <mclasen@redhat.com> + * gtk/gtk-sections.txt: Add gtk_paper_size_get_builtins + +2007-04-29 Matthias Clasen <mclasen@redhat.com> + * gtk/gtk-sections.txt: Add gtk_printer_{has,request}_details 2007-04-28 Matthias Clasen <mclasen@redhat.com> diff --git a/docs/reference/gtk/gtk-sections.txt b/docs/reference/gtk/gtk-sections.txt index 8727f81f23..24ecc7437a 100644 --- a/docs/reference/gtk/gtk-sections.txt +++ b/docs/reference/gtk/gtk-sections.txt @@ -6361,6 +6361,7 @@ gtk_paper_size_new_custom gtk_paper_size_copy gtk_paper_size_free gtk_paper_size_is_equal +gtk_paper_size_get_builtins gtk_paper_size_get_name gtk_paper_size_get_display_name gtk_paper_size_get_ppd_name diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols index cc602ac5f1..ada3a398d1 100644 --- a/gtk/gtk.symbols +++ b/gtk/gtk.symbols @@ -2555,6 +2555,7 @@ gtk_paper_size_new_custom gtk_paper_size_copy gtk_paper_size_free gtk_paper_size_is_equal +gtk_paper_size_get_builtins gtk_paper_size_get_name gtk_paper_size_get_display_name gtk_paper_size_get_ppd_name diff --git a/gtk/gtkpapersize.c b/gtk/gtkpapersize.c index 00292df917..be21faf68e 100644 --- a/gtk/gtkpapersize.c +++ b/gtk/gtkpapersize.c @@ -431,6 +431,33 @@ gtk_paper_size_is_equal (GtkPaperSize *size1, } /** + * gtk_paper_size_get_builtins: + * + * Creates a list of builtin paper sizes. + * + * Return value: a newly allocated list of newly + * allocated #GtkPaperSize objects + * + * Since: 2.12 + */ +GList * +gtk_paper_size_get_builtins (void) +{ + GList *list = NULL; + guint i; + + for (i = 0; i < G_N_ELEMENTS (standard_names_offsets); ++i) + { + GtkPaperSize *size; + + size = gtk_paper_size_new_from_info (&standard_names_offsets[i]); + list = g_list_prepend (list, size); + } + + return list; +} + +/** * gtk_paper_size_get_name: * @size: a #GtkPaperSize object * diff --git a/gtk/gtkpapersize.h b/gtk/gtkpapersize.h index 679915cdab..8709cdf2f4 100644 --- a/gtk/gtkpapersize.h +++ b/gtk/gtkpapersize.h @@ -56,6 +56,7 @@ void gtk_paper_size_free (GtkPaperSize *size); gboolean gtk_paper_size_is_equal (GtkPaperSize *size1, GtkPaperSize *size2); +GList *gtk_paper_size_get_builtins (void); /* The width is always the shortest side, measure in mm */ G_CONST_RETURN gchar *gtk_paper_size_get_name (GtkPaperSize *size); |