From 114f486953b5446ad40bd369b5e1d9182a01f88c Mon Sep 17 00:00:00 2001 From: Sushma Rai Date: Mon, 3 Oct 2005 08:56:21 +0000 Subject: Fix for issues related to printing contacts. Fixes #248624, #274285, #209354, #202201. Patch submitted by "Devashish Sharma " svn path=/trunk/; revision=30469 --- addressbook/gui/widgets/e-addressbook-view.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'addressbook/gui/widgets') diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index eb4cc72959..ee46475309 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -1751,8 +1751,10 @@ eab_view_print(EABView *view) "query", &query, "book", &book, NULL); - print = e_contact_print_dialog_new(book, query); + GList *list = get_selected_contacts (view); + print = e_contact_print_dialog_new (book, query, list); g_free(query); + e_free_object_list(list); gtk_widget_show(print); } else if (view->view_type == EAB_VIEW_TABLE) { @@ -1761,9 +1763,8 @@ eab_view_print(EABView *view) ETable *etable; EContactPrintDialogWeakData *weak_data; - dialog = e_print_get_dialog (_("Print cards"), GNOME_PRINT_DIALOG_RANGE | GNOME_PRINT_DIALOG_COPIES); - gnome_print_dialog_construct_range_any(GNOME_PRINT_DIALOG(dialog), GNOME_PRINT_RANGE_ALL | GNOME_PRINT_RANGE_SELECTION, - NULL, NULL, NULL); + /* FIXME: Allow range selection in table views, as in minicard view */ + dialog = e_print_get_dialog (_("Print cards"), GNOME_PRINT_DIALOG_COPIES); g_object_get(view->widget, "table", &etable, NULL); printable = e_table_get_printable(etable); @@ -1805,8 +1806,10 @@ eab_view_print_preview(EABView *view) "query", &query, "book", &book, NULL); - e_contact_print_preview(book, query); - g_free(query); + GList *list = get_selected_contacts (view); + e_contact_print_preview (book, query, list); + e_free_object_list (list); + g_free (query); } else if (view->view_type == EAB_VIEW_TABLE) { EPrintable *printable; ETable *etable; @@ -1878,6 +1881,7 @@ eab_view_delete_selection(EABView *view, gboolean is_delete) !eab_editor_confirm_delete(GTK_WINDOW(gtk_widget_get_toplevel(view->widget)), plural, is_list, name)) { g_free (name); + e_free_object_list(list); return; } -- cgit v1.2.3