diff options
-rw-r--r-- | addressbook/ChangeLog | 18 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 10 | ||||
-rw-r--r-- | addressbook/printing/e-contact-print-envelope.c | 5 | ||||
-rw-r--r-- | addressbook/printing/e-contact-print.c | 12 |
4 files changed, 32 insertions, 13 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 88493e671d..cc9a75f940 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,21 @@ +2005-01-21 JP Rosevear <jpr@novell.com> + + Fixes #46404 + + * gui/widgets/e-addressbook-view.c (eab_view_print): just show the + dialog, not show all (margin settings aren't supposed to be used); + use e_print to get the dialog + (eab_view_print_preview): use e_print config for previewing + + * printing/e-contact-print.c (e_contact_print_preview): get the + e_print config for previewing + (e_contact_print_contact_dialog_new): use e_print to get the + print dialog + + * printing/e-contact-print-envelope.c + (e_contact_print_envelope_dialog_new): use e_print to get the + print dialog + 2005-01-21 Hans Petter Jansson <hpj@novell.com> * gui/contact-editor/e-contact-quick-add.c (quick_add_set_name) diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 0364f3c005..dd45de4ba0 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -47,6 +47,7 @@ #include "addressbook/gui/widgets/eab-menu.h" #include "e-util/e-categories-master-list-wombat.h" +#include "e-util/e-print.h" #include "libedataserver/e-sexp.h" #ifdef WITH_ADDRESSBOOK_VIEW_TREEVIEW @@ -1728,7 +1729,7 @@ eab_view_print(EABView *view) NULL); print = e_contact_print_dialog_new(book, query); g_free(query); - gtk_widget_show_all(print); + gtk_widget_show(print); } else if (view->view_type == EAB_VIEW_TABLE) { GtkWidget *dialog; @@ -1736,7 +1737,7 @@ eab_view_print(EABView *view) ETable *etable; EContactPrintDialogWeakData *weak_data; - dialog = gnome_print_dialog_new(NULL, "Print cards", GNOME_PRINT_DIALOG_RANGE | GNOME_PRINT_DIALOG_COPIES); + 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); @@ -1796,9 +1797,8 @@ eab_view_print_preview(EABView *view) g_object_ref (printable); gtk_object_sink (GTK_OBJECT (printable)); - master = gnome_print_job_new(NULL); - config = gnome_print_job_get_config (master); - gnome_print_config_set_int (config, GNOME_PRINT_KEY_NUM_COPIES, 1); + config = e_print_load_config (); + master = gnome_print_job_new (config); pc = gnome_print_job_get_context( master ); e_printable_reset(printable); while (e_printable_data_left(printable)) { diff --git a/addressbook/printing/e-contact-print-envelope.c b/addressbook/printing/e-contact-print-envelope.c index c7bd68163f..38532720fa 100644 --- a/addressbook/printing/e-contact-print-envelope.c +++ b/addressbook/printing/e-contact-print-envelope.c @@ -29,6 +29,7 @@ #include <libgnomeprint/gnome-print.h> #include <libgnomeprint/gnome-print-job.h> #include <libgnomeprintui/gnome-print-job-preview.h> +#include <e-util/e-print.h> #define ENVELOPE_HEIGHT (72.0 * 4.0) #define ENVELOPE_WIDTH (72.0 * 9.5) @@ -209,7 +210,7 @@ e_contact_print_envelope_dialog_new(EContact *contact) { GtkWidget *dialog; - dialog = gnome_print_dialog_new(NULL, _("Print envelope"), GNOME_PRINT_DIALOG_COPIES); + dialog = e_print_get_dialog (_("Print envelope"), GNOME_PRINT_DIALOG_COPIES); contact = e_contact_duplicate(contact); g_object_set_data(G_OBJECT(dialog), "contact", contact); @@ -230,7 +231,7 @@ e_contact_print_envelope_list_dialog_new(GList *list) if (list == NULL) return NULL; - dialog = gnome_print_dialog_new(NULL, _("Print envelope"), GNOME_PRINT_DIALOG_COPIES); + dialog = e_print_get_dialog(_("Print envelope"), GNOME_PRINT_DIALOG_COPIES); contact = e_contact_duplicate(list->data); g_object_set_data(G_OBJECT(dialog), "contact", contact); diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c index e47f37f0da..f0a7eff6d6 100644 --- a/addressbook/printing/e-contact-print.c +++ b/addressbook/printing/e-contact-print.c @@ -41,6 +41,7 @@ #include <libebook/e-book.h> #include <libebook/e-contact.h> #include <gal/util/e-util.h> +#include <e-util/e-print.h> #define SCALE 5 #define HYPHEN_PIXELS 20 @@ -997,7 +998,7 @@ e_contact_print_dialog_new(EBook *book, char *query) GtkWidget *dialog; - dialog = gnome_print_dialog_new(NULL, _("Print contacts"), GNOME_PRINT_DIALOG_RANGE | GNOME_PRINT_DIALOG_COPIES); + dialog = e_print_get_dialog(_("Print contacts"), 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); @@ -1023,9 +1024,8 @@ e_contact_print_preview(EBook *book, char *query) GnomePrintConfig *config; gdouble font_size; - master = gnome_print_job_new(NULL); - config = gnome_print_job_get_config (master); - gnome_print_config_set_int (config, GNOME_PRINT_KEY_NUM_COPIES, 1); + config = e_print_load_config (); + master = gnome_print_job_new (config); pc = gnome_print_job_get_context (master); e_contact_build_style (style); @@ -1063,7 +1063,7 @@ e_contact_print_contact_dialog_new(EContact *contact) { GtkWidget *dialog; - dialog = gnome_print_dialog_new(NULL, _("Print contact"), GNOME_PRINT_DIALOG_COPIES); + dialog = e_print_get_dialog(_("Print contact"), GNOME_PRINT_DIALOG_COPIES); contact = e_contact_duplicate(contact); g_object_set_data(G_OBJECT(dialog), "contact", contact); @@ -1090,7 +1090,7 @@ e_contact_print_contact_list_dialog_new(GList *list) for (l = copied_list; l; l = l->next) l->data = e_contact_duplicate (E_CONTACT (l->data)); - dialog = gnome_print_dialog_new(NULL, _("Print contact"), GNOME_PRINT_DIALOG_COPIES); + dialog = e_print_get_dialog(_("Print contact"), GNOME_PRINT_DIALOG_COPIES); g_object_set_data(G_OBJECT(dialog), "contact_list", copied_list); g_object_set_data(G_OBJECT(dialog), "uses_list", GINT_TO_POINTER (TRUE)); |