diff options
author | Radek Doulik <rodo@ximian.com> | 2004-05-21 00:10:48 +0800 |
---|---|---|
committer | Radek Doulik <rodo@src.gnome.org> | 2004-05-21 00:10:48 +0800 |
commit | 0af3cfe692993829b1ac0853d796d83cbad5e950 (patch) | |
tree | 7fceb62ffeed11cba6a42a404ca527887687cfd2 /addressbook/gui | |
parent | e4ff73ed1669f587e59b787330eb46c17af643c1 (diff) | |
download | gsoc2013-evolution-0af3cfe692993829b1ac0853d796d83cbad5e950.tar gsoc2013-evolution-0af3cfe692993829b1ac0853d796d83cbad5e950.tar.gz gsoc2013-evolution-0af3cfe692993829b1ac0853d796d83cbad5e950.tar.bz2 gsoc2013-evolution-0af3cfe692993829b1ac0853d796d83cbad5e950.tar.lz gsoc2013-evolution-0af3cfe692993829b1ac0853d796d83cbad5e950.tar.xz gsoc2013-evolution-0af3cfe692993829b1ac0853d796d83cbad5e950.tar.zst gsoc2013-evolution-0af3cfe692993829b1ac0853d796d83cbad5e950.zip |
added call to begin page, ref printable and sink it to avoid finalizing of
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
svn path=/trunk/; revision=26012
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 8 |
1 files changed, 6 insertions, 2 deletions
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) |