diff options
author | Christian Persch <chpe@gnome.org> | 2007-05-01 22:31:29 +0000 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2007-05-01 22:31:29 +0000 |
commit | 77c55d66ef968d66d8610a6bd56c1c3f5d358252 (patch) | |
tree | 8ea5656dd5e27acf4f6380fd73508c8124f58dd8 /gtk/gtkpapersize.c | |
parent | 014994ce96d8d115339e3dd4f50e0b473482598e (diff) | |
download | gdk-pixbuf-77c55d66ef968d66d8610a6bd56c1c3f5d358252.tar.gz |
Put only GtkPaperSizes into the list, don't mix it with GtkPageSetups. Bug
2007-05-02 Christian Persch <chpe@gnome.org>
* gtk/gtkpapersize.c: (gtk_paper_size_get_paper_sizes): Put only
GtkPaperSizes into the list, don't mix it with GtkPageSetups. Bug
#434861.
svn path=/trunk/; revision=17760
Diffstat (limited to 'gtk/gtkpapersize.c')
-rw-r--r-- | gtk/gtkpapersize.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/gtk/gtkpapersize.c b/gtk/gtkpapersize.c index db6a34b98..4c014808a 100644 --- a/gtk/gtkpapersize.c +++ b/gtk/gtkpapersize.c @@ -455,8 +455,23 @@ gtk_paper_size_get_paper_sizes (gboolean include_custom) GList *list = NULL; guint i; #ifdef G_OS_UNIX /* _gtk_load_custom_papers() only on Unix so far */ - if (include_custom) - list = _gtk_load_custom_papers (); + if (include_custom) + { + GList *page_setups, *l; + + page_setups = _gtk_load_custom_papers (); + for (l = page_setups; l != NULL; l = l->next) + { + GtkPageSetup *setup = (GtkPageSetup *) l->data; + GtkPaperSize *size; + + size = gtk_page_setup_get_paper_size (setup); + list = g_list_prepend (list, gtk_paper_size_copy (size)); + } + + g_list_foreach (page_setups, (GFunc) g_object_unref, NULL); + g_list_free (page_setups); + } #endif for (i = 0; i < G_N_ELEMENTS (standard_names_offsets); ++i) { |