diff options
-rw-r--r-- | addressbook/ChangeLog | 10 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 8 |
2 files changed, 16 insertions, 2 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 24749363c4..fbba4a78ac 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,13 @@ +2004-05-20 Radek Doulik <rodo@ximian.com> + + * gui/widgets/e-addressbook-view.c (eab_view_print_preview): added + call to begin page, ref printable and sink it to avoid finalizing of + floating object + (eab_view_print): ref and sink printable to avoid finalizing of + floating object + + Fixes #46658 + 2004-05-19 Chris Toshok <toshok@ximian.com> * importers/evolution-vcard-importer.c (load_file_fn): use the new diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 16177afa68..9c123432ae 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -1881,6 +1881,8 @@ eab_view_print(EABView *view) g_object_get(view->widget, "table", &etable, NULL); printable = e_table_get_printable(etable); + g_object_ref (printable); + gtk_object_sink (GTK_OBJECT (printable)); g_object_unref(etable); g_object_ref (view->widget); @@ -1919,8 +1921,7 @@ eab_view_print_preview(EABView *view) NULL); e_contact_print_preview(book, query); g_free(query); - } - else if (view->view_type == EAB_VIEW_TABLE) { + } else if (view->view_type == EAB_VIEW_TABLE) { EPrintable *printable; ETable *etable; GnomePrintJob *master; @@ -1931,6 +1932,8 @@ eab_view_print_preview(EABView *view) g_object_get(view->widget, "table", &etable, NULL); printable = e_table_get_printable(etable); g_object_unref(etable); + g_object_ref (printable); + gtk_object_sink (GTK_OBJECT (printable)); master = gnome_print_job_new(NULL); config = gnome_print_job_get_config (master); @@ -1938,6 +1941,7 @@ eab_view_print_preview(EABView *view) pc = gnome_print_job_get_context( master ); e_printable_reset(printable); while (e_printable_data_left(printable)) { + gnome_print_beginpage (pc, "Contacts"); if (gnome_print_gsave(pc) == -1) /* FIXME */; if (gnome_print_translate(pc, 72, 72) == -1) |