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
This commit is contained in:
Christian Persch 2007-05-01 22:31:29 +00:00 committed by Christian Persch
parent 014994ce96
commit 77c55d66ef
2 changed files with 23 additions and 2 deletions

View File

@ -1,3 +1,9 @@
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.
2007-05-02 Christian Persch <chpe@gnome.org>
* gtk/gtkpapersize.c: (gtk_paper_size_new_from_info),

View File

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