aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/printing
diff options
context:
space:
mode:
authornobody <nobody@localhost>2003-06-29 00:20:00 +0800
committernobody <nobody@localhost>2003-06-29 00:20:00 +0800
commit6205e8cad4ef2c93093b06e579ad26bd6b6505bd (patch)
treee521429188462e4446c632b5bd4b6f333e589995 /addressbook/printing
parent5a8e20476b93515b8e69f7e1c8f659ab3dc55a8f (diff)
downloadgsoc2013-evolution-GDM2_2_4_4_0.tar
gsoc2013-evolution-GDM2_2_4_4_0.tar.gz
gsoc2013-evolution-GDM2_2_4_4_0.tar.bz2
gsoc2013-evolution-GDM2_2_4_4_0.tar.lz
gsoc2013-evolution-GDM2_2_4_4_0.tar.xz
gsoc2013-evolution-GDM2_2_4_4_0.tar.zst
gsoc2013-evolution-GDM2_2_4_4_0.zip
This commit was manufactured by cvs2svn to create tag 'GDM2_2_4_4_0'.GDM2_2_4_4_0
svn path=/tags/GDM2_2_4_4_0/; revision=21592
Diffstat (limited to 'addressbook/printing')
-rw-r--r--addressbook/printing/.cvsignore9
-rw-r--r--addressbook/printing/Makefile.am57
-rw-r--r--addressbook/printing/e-contact-print-envelope.c247
-rw-r--r--addressbook/printing/e-contact-print-envelope.h32
-rw-r--r--addressbook/printing/e-contact-print-style-editor.c149
-rw-r--r--addressbook/printing/e-contact-print-style-editor.h73
-rw-r--r--addressbook/printing/e-contact-print-types.h73
-rw-r--r--addressbook/printing/e-contact-print.c1236
-rw-r--r--addressbook/printing/e-contact-print.glade2018
-rw-r--r--addressbook/printing/e-contact-print.h36
-rw-r--r--addressbook/printing/medbook.ecps30
-rw-r--r--addressbook/printing/phonelist.ecps29
-rw-r--r--addressbook/printing/smallbook.ecps30
-rw-r--r--addressbook/printing/test-contact-print-style-editor.c93
-rw-r--r--addressbook/printing/test-print.c88
15 files changed, 0 insertions, 4200 deletions
diff --git a/addressbook/printing/.cvsignore b/addressbook/printing/.cvsignore
deleted file mode 100644
index 96194f7fd7..0000000000
--- a/addressbook/printing/.cvsignore
+++ /dev/null
@@ -1,9 +0,0 @@
-.deps
-.libs
-.pure
-Makefile
-Makefile.in
-*.lo
-*.la
-contact-print-test
-contact-print-style-editor-test
diff --git a/addressbook/printing/Makefile.am b/addressbook/printing/Makefile.am
deleted file mode 100644
index b28d841ec2..0000000000
--- a/addressbook/printing/Makefile.am
+++ /dev/null
@@ -1,57 +0,0 @@
-ecpsdir = $(privdatadir)/ecps
-ecps_DATA = \
- smallbook.ecps \
- medbook.ecps \
- phonelist.ecps
-
-glade_DATA = \
- e-contact-print.glade
-
-INCLUDES = \
- $(GNOME_INCLUDEDIR) \
- -DG_LOG_DOMAIN=\"addressbook-printing\" \
- -I$(top_srcdir)/addressbook \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_builddir)/addressbook/backend \
- -I$(top_srcdir) \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ECPSDIR=\""$(ecpsdir)"\" \
- $(EVOLUTION_ADDRESSBOOK_CFLAGS)
-
-noinst_LTLIBRARIES = \
- libecontactprint.la
-
-libecontactprint_la_SOURCES = \
- e-contact-print-envelope.c \
- e-contact-print-envelope.h \
- e-contact-print-style-editor.c \
- e-contact-print-style-editor.h \
- e-contact-print-types.h \
- e-contact-print.c \
- e-contact-print.h
-
-noinst_PROGRAMS = \
- contact-print-test \
- contact-print-style-editor-test
-
-contact_print_test_SOURCES = \
- test-print.c
-
-contact_print_test_LDADD = \
- $(top_builddir)/addressbook/backend/ebook/libebook.la \
- libecontactprint.la \
- $(EVOLUTION_ADDRESSBOOK_LIBS)
-
-contact_print_style_editor_test_SOURCES = \
- test-contact-print-style-editor.c
-
-contact_print_style_editor_test_LDADD = \
- $(top_builddir)/addressbook/backend/ebook/libebook.la \
- libecontactprint.la \
- $(EVOLUTION_ADDRESSBOOK_LIBS)
-
-
-
-EXTRA_DIST = \
- $(glade_DATA) \
- $(ecps_DATA)
diff --git a/addressbook/printing/e-contact-print-envelope.c b/addressbook/printing/e-contact-print-envelope.c
deleted file mode 100644
index 33e7361605..0000000000
--- a/addressbook/printing/e-contact-print-envelope.c
+++ /dev/null
@@ -1,247 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-contact-print-envelope.c
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-#include "addressbook/printing/e-contact-print-envelope.h"
-#include <glib.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <time.h>
-#include <libgnomeprintui/gnome-print-dialog.h>
-#include <libgnomeprint/gnome-print.h>
-#include <libgnomeprint/gnome-print-job.h>
-#include <libgnomeprintui/gnome-print-job-preview.h>
-#include "addressbook/backend/ebook/e-card.h"
-#include "addressbook/backend/ebook/e-card-simple.h"
-
-#define ENVELOPE_HEIGHT (72.0 * 4.0)
-#define ENVELOPE_WIDTH (72.0 * 9.5)
-
-typedef struct {
- int start;
- int length;
-} EcpeLine;
-
-static void
-startset(void *pointer, EcpeLine **iterator)
-{
- (*iterator)--;
- (*iterator)->start = GPOINTER_TO_INT(pointer);
-}
-
-static void
-lengthset(void *pointer, EcpeLine **iterator)
-{
- (*iterator)--;
- (*iterator)->length = GPOINTER_TO_INT(pointer);
-}
-
-static EcpeLine *
-ecpe_break(char *address)
-{
- int i;
- int length = 0;
- int laststart = 0;
- GList *startlist = NULL;
- GList *lengthlist = NULL;
- EcpeLine *ret_val;
- EcpeLine *iterator;
-
- for (i = 0; address[i]; i++) {
- if (address[i] == '\n') {
- startlist = g_list_prepend (startlist, GINT_TO_POINTER(laststart));
- lengthlist = g_list_prepend (lengthlist, GINT_TO_POINTER(i - laststart));
- length ++;
- laststart = i + 1;
- }
- }
- startlist = g_list_prepend (startlist, GINT_TO_POINTER(laststart));
- lengthlist = g_list_prepend (lengthlist, GINT_TO_POINTER(i - laststart));
- length ++;
-
- ret_val = g_new(EcpeLine, length + 1);
-
- iterator = ret_val + length;
- g_list_foreach(startlist, (GFunc) startset, &iterator);
- g_list_free(startlist);
-
- iterator = ret_val + length;
- g_list_foreach(lengthlist, (GFunc) lengthset, &iterator);
- g_list_free(lengthlist);
-
- ret_val[length].start = -1;
- ret_val[length].length = -1;
-
- return ret_val;
-}
-
-static void
-ecpe_linelist_dimensions(GnomeFont *font, char *address, EcpeLine *linelist, double *widthp, double *heightp)
-{
- double width = 0;
- int i;
- if (widthp) {
- for (i = 0; linelist[i].length != -1; i++) {
- width = MAX(width, gnome_font_get_width_utf8_sized (font, address + linelist[i].start, linelist[i].length));
- }
- *widthp = width;
- } else {
- for (i = 0; linelist[i].length != -1; i++)
- /* Intentionally empty */;
- }
- if (heightp) {
- *heightp = gnome_font_get_size(font) * i;
- }
-}
-
-static void
-ecpe_linelist_print(GnomePrintContext *pc, GnomeFont *font, char *address, EcpeLine *linelist, double x, double y)
-{
- int i;
- gnome_print_setfont(pc, font);
- for (i = 0; linelist[i].length != -1; i++) {
- gnome_print_moveto(pc, x, y + gnome_font_get_ascender(font));
- gnome_print_show_sized (pc, address + linelist[i].start, linelist[i].length);
- y -= gnome_font_get_size(font);
- }
-}
-
-static gint
-e_contact_print_envelope_close(GnomeDialog *dialog, gpointer data)
-{
- return FALSE;
-}
-
-static void
-ecpe_print(GnomePrintContext *pc, ECard *ecard, gboolean as_return)
-{
- ECardSimple *card = e_card_simple_new(ecard);
- char *address;
- EcpeLine *linelist;
- double x;
- double y;
- GnomeFont *font;
-
-
- gnome_print_rotate(pc, 90);
- gnome_print_translate(pc, 72.0 * 11.0 - ENVELOPE_WIDTH, -72.0 * 8.5 + (72.0 * 8.5 - ENVELOPE_HEIGHT) / 2);
-
- address = e_card_simple_get(card, E_CARD_SIMPLE_FIELD_ADDRESS_BUSINESS);
- linelist = ecpe_break(address);
- if (as_return)
- font = gnome_font_find ("Helvetica", 9);
- else
- font = gnome_font_find ("Helvetica", 12);
- ecpe_linelist_dimensions(font, address, linelist, NULL, &y);
- if (as_return) {
- x = 36;
- y = ENVELOPE_HEIGHT - 36;
- } else {
- x = ENVELOPE_WIDTH / 2;
- y = (ENVELOPE_HEIGHT - y) / 2;
- }
- ecpe_linelist_print(pc, font, address, linelist, x, y);
- g_object_unref(font);
- g_free(linelist);
-
- g_free(address);
-
- gnome_print_showpage(pc);
- gnome_print_context_close(pc);
-
- g_object_unref(card);
-}
-
-static void
-e_contact_print_envelope_button(GnomeDialog *dialog, gint button, gpointer data)
-{
- GnomePrintJob *master;
- GnomePrintContext *pc;
- GnomePrintConfig *config;
- ECard *card = NULL;
- GtkWidget *preview;
-
- card = g_object_get_data(G_OBJECT(dialog), "card");
-
- switch( button ) {
- case GNOME_PRINT_DIALOG_RESPONSE_PRINT:
- config = gnome_print_dialog_get_config (GNOME_PRINT_DIALOG (dialog));
- master = gnome_print_job_new (config);
- pc = gnome_print_job_get_context( master );
-
- ecpe_print(pc, card, FALSE);
-
- gnome_print_job_print(master);
- gnome_dialog_close(dialog);
- break;
- case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW:
- config = gnome_print_dialog_get_config (GNOME_PRINT_DIALOG (dialog));
- master = gnome_print_job_new (config);
- pc = gnome_print_job_get_context( master );
-
- ecpe_print(pc, card, FALSE);
-
- preview = GTK_WIDGET(gnome_print_job_preview_new(master, "Print Preview"));
- gtk_widget_show_all(preview);
- break;
- case GNOME_PRINT_DIALOG_RESPONSE_CANCEL:
- g_object_unref(card);
- gnome_dialog_close(dialog);
- break;
- }
-}
-
-GtkWidget *
-e_contact_print_envelope_dialog_new(ECard *card)
-{
- GtkWidget *dialog;
-
- dialog = gnome_print_dialog_new(NULL, _("Print envelope"), GNOME_PRINT_DIALOG_COPIES);
-
- card = e_card_duplicate(card);
- g_object_set_data(G_OBJECT(dialog), "card", card);
- g_signal_connect(dialog,
- "clicked", G_CALLBACK(e_contact_print_envelope_button), NULL);
- g_signal_connect(dialog,
- "close", G_CALLBACK(e_contact_print_envelope_close), NULL);
- return dialog;
-}
-
-/* FIXME: Print all the contacts selected. */
-GtkWidget *
-e_contact_print_envelope_list_dialog_new(GList *list)
-{
- GtkWidget *dialog;
- ECard *card;
-
- if (list == NULL)
- return NULL;
-
- dialog = gnome_print_dialog_new(NULL, _("Print envelope"), GNOME_PRINT_DIALOG_COPIES);
-
- card = e_card_duplicate(list->data);
- g_object_set_data(G_OBJECT(dialog), "card", card);
- g_signal_connect(dialog,
- "clicked", G_CALLBACK(e_contact_print_envelope_button), NULL);
- g_signal_connect(dialog,
- "close", G_CALLBACK(e_contact_print_envelope_close), NULL);
- return dialog;
-}
diff --git a/addressbook/printing/e-contact-print-envelope.h b/addressbook/printing/e-contact-print-envelope.h
deleted file mode 100644
index 4302c4c5d7..0000000000
--- a/addressbook/printing/e-contact-print-envelope.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-contact-print-envelope.h
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef E_CONTACT_PRINT_ENVELOPE_H
-#define E_CONTACT_PRINT_ENVELOPE_H
-
-#include <addressbook/backend/ebook/e-card.h>
-#include <gtk/gtkwidget.h>
-#include "e-contact-print-types.h"
-
-GtkWidget *e_contact_print_envelope_dialog_new(ECard *card);
-GtkWidget *e_contact_print_envelope_list_dialog_new(GList *list);
-
-#endif /* E_CONTACT_PRINT_ENVELOPE_H */
diff --git a/addressbook/printing/e-contact-print-style-editor.c b/addressbook/printing/e-contact-print-style-editor.c
deleted file mode 100644
index 9267fc0c99..0000000000
--- a/addressbook/printing/e-contact-print-style-editor.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-contact-print-style-editor.c
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "e-contact-print-style-editor.h"
-
-static void e_contact_print_style_editor_init (EContactPrintStyleEditor *card);
-static void e_contact_print_style_editor_class_init (EContactPrintStyleEditorClass *klass);
-static void e_contact_print_style_editor_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
-static void e_contact_print_style_editor_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void e_contact_print_style_editor_destroy (GtkObject *object);
-
-static GtkVBoxClass *parent_class = NULL;
-
-
-/* The arguments we take */
-enum {
- ARG_0,
- ARG_CARD
-};
-
-GtkType
-e_contact_print_style_editor_get_type (void)
-{
- static GtkType contact_print_style_editor_type = 0;
-
- if (!contact_print_style_editor_type)
- {
- static const GtkTypeInfo contact_print_style_editor_info =
- {
- "EContactPrintStyleEditor",
- sizeof (EContactPrintStyleEditor),
- sizeof (EContactPrintStyleEditorClass),
- (GtkClassInitFunc) e_contact_print_style_editor_class_init,
- (GtkObjectInitFunc) e_contact_print_style_editor_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- contact_print_style_editor_type = gtk_type_unique (gtk_vbox_get_type (), &contact_print_style_editor_info);
- }
-
- return contact_print_style_editor_type;
-}
-
-static void
-e_contact_print_style_editor_class_init (EContactPrintStyleEditorClass *klass)
-{
- GtkObjectClass *object_class;
- GtkVBoxClass *vbox_class;
-
- object_class = (GtkObjectClass*) klass;
- vbox_class = (GtkVBoxClass *) klass;
-
- parent_class = gtk_type_class (gtk_vbox_get_type ());
-
- object_class->set_arg = e_contact_print_style_editor_set_arg;
- object_class->get_arg = e_contact_print_style_editor_get_arg;
- object_class->destroy = e_contact_print_style_editor_destroy;
-}
-
-#if 0
-static void
-_add_image(GtkTable *table, gchar *image, int left, int right, int top, int bottom)
-{
- gtk_table_attach(table,
- gtk_widget_new(gtk_alignment_get_type(),
- "child", gnome_pixmap_new_from_file(image),
- "xalign", (double) 0,
- "yalign", (double) 0,
- "xscale", (double) 0,
- "yscale", (double) 0,
- NULL),
- left, right, top, bottom,
- GTK_FILL, GTK_FILL,
- 0, 0);
-}
-#endif
-
-static void
-e_contact_print_style_editor_init (EContactPrintStyleEditor *e_contact_print_style_editor)
-{
- GladeXML *gui;
-
- /* e_contact_print_style_editor->card = NULL;*/
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/e-contact-print.glade", NULL, NULL);
- e_contact_print_style_editor->gui = gui;
- gtk_widget_reparent(glade_xml_get_widget(gui, "vbox-contact-print-style-editor"),
- GTK_WIDGET(e_contact_print_style_editor));
-}
-
-void
-e_contact_print_style_editor_destroy (GtkObject *object)
-{
- EContactPrintStyleEditor *e_contact_print_style_editor = E_CONTACT_PRINT_STYLE_EDITOR(object);
- g_object_unref(e_contact_print_style_editor->gui);
-}
-
-GtkWidget*
-e_contact_print_style_editor_new (char *filename)
-{
- GtkWidget *widget = GTK_WIDGET (gtk_type_new (e_contact_print_style_editor_get_type ()));
- return widget;
-}
-
-static void
-e_contact_print_style_editor_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
-{
- EContactPrintStyleEditor *e_contact_print_style_editor;
-
- e_contact_print_style_editor = E_CONTACT_PRINT_STYLE_EDITOR (o);
-
- switch (arg_id){
- default:
- break;
- }
-}
-
-static void
-e_contact_print_style_editor_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- EContactPrintStyleEditor *e_contact_print_style_editor;
-
- e_contact_print_style_editor = E_CONTACT_PRINT_STYLE_EDITOR (object);
-
- switch (arg_id) {
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
diff --git a/addressbook/printing/e-contact-print-style-editor.h b/addressbook/printing/e-contact-print-style-editor.h
deleted file mode 100644
index e4604d551c..0000000000
--- a/addressbook/printing/e-contact-print-style-editor.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-contact-print-style-editor.h
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __E_CONTACT_PRINT_STYLE_EDITOR_H__
-#define __E_CONTACT_PRINT_STYLE_EDITOR_H__
-
-#include <gtk/gtkvbox.h>
-#include <glade/glade.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-/* EContactPrintStyleEditor - A dialog displaying information about a contact.
- *
- * The following arguments are available:
- *
- * name type read/write description
- * --------------------------------------------------------------------------------
- * card ECard * R The card currently being edited
- */
-
-#define E_CONTACT_PRINT_STYLE_EDITOR_TYPE (e_contact_print_style_editor_get_type ())
-#define E_CONTACT_PRINT_STYLE_EDITOR(obj) (GTK_CHECK_CAST ((obj), E_CONTACT_PRINT_STYLE_EDITOR_TYPE, EContactPrintStyleEditor))
-#define E_CONTACT_PRINT_STYLE_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_CONTACT_PRINT_STYLE_EDITOR_TYPE, EContactPrintStyleEditorClass))
-#define E_IS_MINICARD(obj) (GTK_CHECK_TYPE ((obj), E_CONTACT_PRINT_STYLE_EDITOR_TYPE))
-#define E_IS_MINICARD_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_CONTACT_PRINT_STYLE_EDITOR_TYPE))
-
-
-typedef struct _EContactPrintStyleEditor EContactPrintStyleEditor;
-typedef struct _EContactPrintStyleEditorClass EContactPrintStyleEditorClass;
-
-struct _EContactPrintStyleEditor
-{
- GtkVBox parent;
-
- /* item specific fields */
- GladeXML *gui;
-};
-
-struct _EContactPrintStyleEditorClass
-{
- GtkVBoxClass parent_class;
-};
-
-
-GtkWidget *e_contact_print_style_editor_new(char *filename);
-GtkType e_contact_print_style_editor_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __E_CONTACT_PRINT_STYLE_EDITOR_H__ */
diff --git a/addressbook/printing/e-contact-print-types.h b/addressbook/printing/e-contact-print-types.h
deleted file mode 100644
index b7082b41f6..0000000000
--- a/addressbook/printing/e-contact-print-types.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-contact-print-types.h
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef E_CONTACT_PRINT_TYPES_H
-#define E_CONTACT_PRINT_TYPES_H
-
-#include <glib.h>
-#include <libgnomeprint/gnome-font.h>
-
-typedef struct _EContactPrintStyle EContactPrintStyle;
-typedef enum _EContactPrintType EContactPrintType;
-
-enum _EContactPrintType {
- E_CONTACT_PRINT_TYPE_CARDS,
- E_CONTACT_PRINT_TYPE_MEMO_STYLE,
- E_CONTACT_PRINT_TYPE_PHONE_LIST
-};
-
-struct _EContactPrintStyle
-{
- gchar *title;
- EContactPrintType type;
- gboolean sections_start_new_page;
- guint num_columns;
- guint blank_forms;
- gboolean letter_tabs;
- gboolean letter_headings;
- GnomeFont *headings_font;
- GnomeFont *body_font;
- gboolean print_using_grey;
- gint paper_type;
- gdouble paper_width;
- gdouble paper_height;
- gint paper_source;
- gdouble top_margin;
- gdouble left_margin;
- gdouble bottom_margin;
- gdouble right_margin;
- gint page_size;
- gdouble page_width;
- gdouble page_height;
- gboolean orientation_portrait;
- GnomeFont *header_font;
- gchar *left_header;
- gchar *center_header;
- gchar *right_header;
- GnomeFont *footer_font;
- gchar *left_footer;
- gchar *center_footer;
- gchar *right_footer;
- gboolean reverse_on_even_pages;
-};
-
-#endif /* E_CONTACT_PRINT_TYPES_H */
-
diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c
deleted file mode 100644
index b239b87847..0000000000
--- a/addressbook/printing/e-contact-print.c
+++ /dev/null
@@ -1,1236 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-contact-print.c
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-#include "e-contact-print.h"
-
-#include <ctype.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include <string.h>
-#include <glib.h>
-#include <libxml/tree.h>
-#include <libxml/parser.h>
-#include <libxml/xmlmemory.h>
-#include <libgnome/gnome-util.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeprint/gnome-print.h>
-#include <libgnomeprint/gnome-font.h>
-#include <libgnomeprint/gnome-print-job.h>
-#include <libgnomeprintui/gnome-print-dialog.h>
-#include <libgnomeprintui/gnome-print-job-preview.h>
-#include <addressbook/backend/ebook/e-book.h>
-#include <addressbook/backend/ebook/e-card.h>
-#include <addressbook/backend/ebook/e-card-simple.h>
-#include <addressbook/backend/ebook/e-destination.h>
-
-#define SCALE 5
-#define HYPHEN_PIXELS 20
-#define HYPHEN_PENALTY ( (SCALE) * (SCALE) * (HYPHEN_PIXELS) * (HYPHEN_PIXELS) )
-
-typedef struct _EContactPrintContext EContactPrintContext;
-
-struct _EContactPrintContext
-{
- GnomePrintContext *pc;
- GnomePrintJob *master;
- gdouble x;
- gdouble y;
- gint column;
- EContactPrintStyle *style;
- gboolean first_section;
- gchar first_char_on_page;
- gchar last_char_on_page;
- GnomeFont *letter_heading_font;
- GnomeFont *letter_tab_font;
- char *character;
- gboolean first_contact;
-
- gboolean uses_book;
- int type;
- EBook *book;
- gchar *query;
-
- GList *cards;
-};
-
-static gint
-e_contact_divide_text(GnomePrintContext *pc, GnomeFont *font, double width, const gchar *text, GList **return_val /* Of type char[] */)
-{
- if ( width == -1 || gnome_font_get_width_utf8(font, text) <= width ) {
- if ( return_val ) {
- *return_val = g_list_append(*return_val, g_strdup(text));
- }
- return 1;
- } else {
-#if 1
- int i, l;
- double x = 0;
- int lastend = 0;
- int linestart = 0;
- int firstword = 1;
- int linecount = 0;
- l = strlen(text);
- for ( i = 0; i < l; i++ ) {
- if ( text[i] == ' ' ) {
- if ( (!firstword) && x + gnome_font_get_width_utf8_sized(font, text + lastend, i - lastend) > width ) {
- if (return_val) {
- *return_val = g_list_append(*return_val, g_strndup(text + linestart, lastend - linestart));
- }
- x = gnome_font_get_width_utf8(font, " ");
- linestart = lastend + 1;
- x += gnome_font_get_width_utf8_sized(font, text + linestart, i - linestart);
- lastend = i;
- linecount ++;
- } else {
- x += gnome_font_get_width_utf8_sized(font, text + lastend, i - lastend);
- lastend = i;
- }
- firstword = 0;
- } else if ( text[i] == '\n' ) {
- if ( (!firstword) && x + gnome_font_get_width_utf8_sized(font, text + lastend, i - lastend) > width ) {
- if (return_val) {
- *return_val = g_list_append(*return_val, g_strndup(text + linestart, lastend - linestart));
- }
- linestart = lastend + 1;
- lastend = i;
- linecount ++;
- }
- if (return_val) {
- *return_val = g_list_append(*return_val, g_strndup(text + linestart, i - linestart));
- }
- linestart = i + 1;
- lastend = i + 1;
- linecount ++;
- x = gnome_font_get_width_utf8(font, " ");
-
- firstword = 1;
- }
- }
- if ( (!firstword) && x + gnome_font_get_width_utf8_sized(font, text + lastend, i - lastend) > width ) {
- if (return_val) {
- *return_val = g_list_append(*return_val, g_strndup(text + linestart, lastend - linestart));
- }
- linestart = lastend + 1;
- lastend = i;
- linecount ++;
- }
- if (return_val) {
- *return_val = g_list_append(*return_val, g_strndup(text + linestart, i - linestart));
- }
- linecount ++;
- return(linecount);
-#else
- HnjBreak *breaks;
- gint *result;
- gint *is;
- gint n_breaks = 0, n_actual_breaks = 0;
- gint i;
- gint l;
- gchar *hyphenation;
- double x = - gnome_font_get_width_utf8(font, " ") * SCALE;
- HnjParams hnjparams;
-
- hnjparams.set_width = width * SCALE + x;
- hnjparams.max_neg_space = 0;
- hnjparams.tab_width = 0;
-
- l = strlen(text);
-
- /* find possible line breaks. */
- for (i = 0; i < l; i++) {
- if (text[i] == '-')
- n_breaks++;
- else if (text[i] == ' ')
- n_breaks++;
-#if 0
- else if (hyphenation[i] & 1)
- n_breaks++;
-#endif
- }
-
- breaks = g_new( HnjBreak, n_breaks + 1 );
- result = g_new( gint, n_breaks + 1 );
- is = g_new( gint, n_breaks + 1 );
- n_breaks = 0;
- /* find possible line breaks. */
-
- for (i = 0; i < l; i++) {
- if ( text[i] == '-' ) {
- x += gnome_font_get_width(font, text[i]) * SCALE;
- breaks[n_breaks].x0 = x;
- breaks[n_breaks].x1 = x;
- breaks[n_breaks].penalty = HYPHEN_PENALTY;
- breaks[n_breaks].flags = HNJ_JUST_FLAG_ISHYPHEN;
- is[n_breaks] = i + 1;
- n_breaks++;
- } else if ( text[i] == ' ' ) {
- breaks[ n_breaks ].x0 = x;
- x += gnome_font_get_width(font, text[i]) * SCALE;
- breaks[ n_breaks ].x1 = x;
- breaks[ n_breaks ].penalty = 0;
- breaks[ n_breaks ].flags = HNJ_JUST_FLAG_ISSPACE;
- is[ n_breaks ] = i + 1;
- n_breaks++;
-#if 0
- } else if (word->hyphenation[i] & 1) {
- breaks[n_breaks].x0 = x + gnome_font_get_width(font, '-') * SCALE;
- breaks[n_breaks].x1 = x;
- breaks[n_breaks].penalty = HYPHEN_PENALTY;
- breaks[n_breaks].flags = HNJ_JUST_FLAG_ISHYPHEN;
- is[n_breaks] = i + 1;
- n_breaks++;
-#endif
- } else
- x += gnome_font_get_width(font, text[i]) * SCALE;
-
- }
- is[n_breaks] = i;
- breaks[n_breaks].flags = 0;
- n_breaks++;
-
- /* Calculate optimal line breaks. */
- n_actual_breaks = hnj_hs_just (breaks, n_breaks,
- &hnjparams, result);
-
- if ( return_val ) {
- gchar *next_val;
- if ( breaks[result[0]].flags == HNJ_JUST_FLAG_ISHYPHEN && text[is[result[0]]] != '-' ) {
- next_val = g_new(gchar, is[result[0]] + 2);
- strncpy(next_val, text, is[result[0]]);
- next_val[is[result[0]]] = 0;
- strcat(next_val, "-");
- } else {
- next_val = g_new(gchar, is[result[0]] + 1);
- strncpy(next_val, text, is[result[0]]);
- next_val[is[result[0]]] = 0;
- }
- *return_val = g_list_append(*return_val, next_val);
-
- for ( i = 1; i < n_actual_breaks; i++ ) {
- if ( (breaks[result[i]].flags & HNJ_JUST_FLAG_ISHYPHEN) && (text[is[result[i]]] != '-') ) {
- next_val = g_new(gchar, is[result[i]] - is[result[i - 1]] + 2);
- strncpy(next_val, text + is[result[i - 1]], is[result[i]] - is[result[i - 1]]);
- next_val[is[result[i]] - is[result[i - 1]]] = 0;
- strcat(next_val, "-");
- } else {
- next_val = g_new(gchar, is[result[i]] - is[result[i - 1]] + 1);
- strncpy(next_val, text + is[result[i - 1]], is[result[i]] - is[result[i - 1]]);
- next_val[is[result[i]] - is[result[i - 1]]] = 0;
- }
- *return_val = g_list_append(*return_val, next_val);
- }
- }
-
- g_free (breaks);
- g_free (result);
- g_free (is);
- return n_actual_breaks;
-#endif
- }
-}
-
-static void
-e_contact_output(GnomePrintContext *pc, GnomeFont *font, double x, double y, double width, const gchar *text)
-{
- GList *list = NULL, *list_start;
- int first_line = 1;
- gnome_print_gsave(pc);
- gnome_print_setfont(pc, font);
- e_contact_divide_text(pc, font, width, text, &list);
- for ( list_start = list; list; list = g_list_next(list)) {
- y -= gnome_font_get_ascender(font);
- gnome_print_moveto(pc, x, y);
- gnome_print_show(pc, (char *)list->data);
- y -= gnome_font_get_descender(font);
- y -= .2 * gnome_font_get_size (font);
- if ( first_line ) {
- x += gnome_font_get_width_utf8(font, " ");
- first_line = 0;
- }
- }
- g_list_foreach( list_start, (GFunc) g_free, NULL );
- g_list_free( list_start );
- gnome_print_grestore(pc);
-}
-
-static gdouble
-e_contact_text_height(GnomePrintContext *pc, GnomeFont *font, double width, gchar *text)
-{
- int line_count = e_contact_divide_text(pc, font, width, text, NULL);
- return line_count * (gnome_font_get_ascender(font) + gnome_font_get_descender(font)) +
- (line_count - 1) * .2 * gnome_font_get_size (font);
-}
-
-#if 0
-static void
-e_contact_output_and_advance(EContactPrintContext *ctxt, GnomeFont *font, double x, double width, gchar *text)
-{
- ctxt->y -= .1 * gnome_font_get_size (font);
- e_contact_output(ctxt->pc, font, x, ctxt->y, width, text);
- ctxt->y -= e_contact_text_height(ctxt->pc, font, width, text);
- ctxt->y -= .1 * gnome_font_get_size (font);
-}
-#endif
-
-static void
-e_contact_rectangle(GnomePrintContext *pc,
- gdouble x0,
- gdouble y0,
- gdouble x1,
- gdouble y1,
- gdouble r,
- gdouble g,
- gdouble b)
-{
- gnome_print_gsave(pc);
- gnome_print_setrgbcolor(pc, r, g, b);
- gnome_print_moveto(pc, x0, y0);
- gnome_print_lineto(pc, x1, y0);
- gnome_print_lineto(pc, x1, y1);
- gnome_print_lineto(pc, x0, y1);
- gnome_print_lineto(pc, x0, y0);
- gnome_print_fill(pc);
- gnome_print_grestore(pc);
-}
-
-static double
-e_contact_get_letter_tab_width (EContactPrintContext *ctxt)
-{
- return gnome_font_get_width_utf8(ctxt->letter_tab_font, "123") + 4 + 18;
-}
-
-static double
-e_contact_print_letter_tab (EContactPrintContext *ctxt)
-{
- unsigned char character;
- gdouble x, y;
- gdouble page_width = 72 * (ctxt->style->page_width - ctxt->style->left_margin - ctxt->style->right_margin);
- gdouble tab_height, tab_width;
- gdouble font_size;
- tab_height = 72 * (ctxt->style->page_height - ctxt->style->top_margin - ctxt->style->bottom_margin) / 27.0;
- font_size = tab_height / 2;
- tab_width = e_contact_get_letter_tab_width(ctxt) - 18;
- x = page_width + 72 * (ctxt->style->left_margin) - tab_width;
- y = 72 * (ctxt->style->page_height - ctxt->style->top_margin);
-
-
- gnome_print_gsave( ctxt->pc );
- if ( ctxt->style->print_using_grey )
- e_contact_rectangle( ctxt->pc, x, 72 * (ctxt->style->page_height - ctxt->style->top_margin), x + tab_width, ctxt->style->bottom_margin * 72, .85, .85, .85 );
- for ( character = 'A' - 1; character <= 'Z'; character ++ ) {
- char string[] = "123";
- if ( character >= 'A' ) {
- string[0] = tolower(character);
- string[1] = 0;
- }
- if ( character >= ctxt->first_char_on_page && character <= ctxt->last_char_on_page ) {
- e_contact_rectangle( ctxt->pc, x + 1, y - 1, x + tab_width - 1, y - (tab_height - 1), 0, 0, 0 );
- gnome_print_setrgbcolor( ctxt->pc, 1, 1, 1 );
- e_contact_output( ctxt->pc, ctxt->letter_tab_font, x + tab_width / 2 - gnome_font_get_width_utf8(ctxt->letter_tab_font, string) / 2, y - (tab_height - font_size) / 2, -1, string );
- } else {
- gnome_print_setrgbcolor( ctxt->pc, 0, 0, 0 );
- e_contact_output( ctxt->pc, ctxt->letter_tab_font, x + tab_width / 2 - gnome_font_get_width_utf8(ctxt->letter_tab_font, string) / 2, y - (tab_height - font_size) / 2, -1, string );
- }
- y -= tab_height;
- }
- gnome_print_grestore( ctxt->pc );
- return gnome_font_get_width_utf8(ctxt->style->body_font, "123") + gnome_font_get_size (ctxt->style->body_font) / 5;
-}
-
-static double
-e_contact_get_letter_heading_height (EContactPrintContext *ctxt)
-{
- gdouble ascender, descender;
- ascender = gnome_font_get_ascender(ctxt->letter_heading_font);
- descender = gnome_font_get_descender(ctxt->letter_heading_font);
- return ascender + descender + 9;
-}
-
-static void
-e_contact_print_letter_heading (EContactPrintContext *ctxt, gchar *character)
-{
- gdouble ascender, descender;
- gdouble width;
-
- width = gnome_font_get_width_utf8(ctxt->letter_heading_font, "m") * 1.7;
- ascender = gnome_font_get_ascender(ctxt->letter_heading_font);
- descender = gnome_font_get_descender(ctxt->letter_heading_font);
- gnome_print_gsave( ctxt->pc );
- e_contact_rectangle( ctxt->pc, ctxt->x, ctxt->y, ctxt->x + width, ctxt->y - (ascender + descender + 6), 0, 0, 0);
- gnome_print_setrgbcolor(ctxt->pc, 1, 1, 1);
- ctxt->y -= 4;
- e_contact_output(ctxt->pc, ctxt->letter_heading_font, ctxt->x + (width - gnome_font_get_width_utf8(ctxt->letter_heading_font, character))/ 2, ctxt->y, -1, character);
- ctxt->y -= ascender + descender;
- ctxt->y -= 2;
- ctxt->y -= 3;
- gnome_print_grestore( ctxt->pc );
-}
-
-static void
-e_contact_start_new_page(EContactPrintContext *ctxt)
-{
- ctxt->x = ctxt->style->left_margin * 72;
- ctxt->y = (ctxt->style->page_height - ctxt->style->top_margin) * 72;
- ctxt->column = 0;
- if ( ctxt->style->letter_tabs )
- e_contact_print_letter_tab(ctxt);
- gnome_print_showpage(ctxt->pc);
-
- gnome_print_beginpage (ctxt->pc, NULL);
-
- ctxt->first_char_on_page = ctxt->last_char_on_page + 1;
-}
-
-static double
-e_contact_get_card_size(ECardSimple *simple, EContactPrintContext *ctxt)
-{
- gdouble height = 0;
- gdouble page_width = 72 * (ctxt->style->page_width - ctxt->style->left_margin - ctxt->style->right_margin);
- gdouble column_width;
- char *file_as;
- gint field;
- if ( ctxt->style->letter_tabs )
- page_width -= e_contact_get_letter_tab_width(ctxt);
- column_width = (page_width + 18) / ctxt->style->num_columns - 18;
-
- height += gnome_font_get_size (ctxt->style->headings_font) * .2;
-
- height += gnome_font_get_size (ctxt->style->headings_font) * .2;
-
- g_object_get(simple->card,
- "file_as", &file_as,
- NULL);
- height += e_contact_text_height(ctxt->pc, ctxt->style->headings_font, column_width - 4, file_as);
- g_free (file_as);
-
- height += gnome_font_get_size (ctxt->style->headings_font) * .2;
-
- height += gnome_font_get_size (ctxt->style->headings_font) * .2;
-
- for(field = E_CARD_SIMPLE_FIELD_FULL_NAME; field != E_CARD_SIMPLE_FIELD_LAST_SIMPLE_STRING; field++) {
- char *string;
- string = e_card_simple_get(simple, field);
- if (string && *string) {
- double xoff = 0;
- xoff += gnome_font_get_width_utf8(ctxt->style->body_font, e_card_simple_get_name(simple, field));
- xoff += gnome_font_get_width_utf8(ctxt->style->body_font, ": ");
- height += e_contact_text_height(ctxt->pc, ctxt->style->body_font, column_width - xoff, string);
- height += .2 * gnome_font_get_size (ctxt->style->body_font);
- }
- g_free(string);
- }
- height += gnome_font_get_size (ctxt->style->headings_font) * .4;
-
- /* g_message ("%s %g", e_card_simple_get (simple, E_CARD_SIMPLE_FIELD_FILE_AS), height); */
- return height;
-}
-
-
-static void
-e_contact_print_card (ECardSimple *simple, EContactPrintContext *ctxt)
-{
- gdouble page_width = 72 * (ctxt->style->page_width - ctxt->style->left_margin - ctxt->style->right_margin);
- gdouble column_width;
- char *file_as;
- int field;
-
- if ( ctxt->style->letter_tabs )
- page_width -= e_contact_get_letter_tab_width(ctxt);
- column_width = (page_width + 18) / ctxt->style->num_columns - 18;
-
- gnome_print_gsave(ctxt->pc);
-
- ctxt->y -= gnome_font_get_size (ctxt->style->headings_font) * .2;
- ctxt->y -= gnome_font_get_size (ctxt->style->headings_font) * .2;
-
- g_object_get(simple->card,
- "file_as", &file_as,
- NULL);
- if (ctxt->style->print_using_grey)
- e_contact_rectangle(ctxt->pc, ctxt->x, ctxt->y + gnome_font_get_size (ctxt->style->headings_font) * .3, ctxt->x + column_width, ctxt->y - e_contact_text_height(ctxt->pc, ctxt->style->headings_font, column_width - 4, file_as) - gnome_font_get_size (ctxt->style->headings_font) * .3, .85, .85, .85);
- e_contact_output(ctxt->pc, ctxt->style->headings_font, ctxt->x + 2, ctxt->y, column_width - 4, file_as);
- ctxt->y -= e_contact_text_height(ctxt->pc, ctxt->style->headings_font, column_width - 4, file_as);
- g_free (file_as);
-
- ctxt->y -= gnome_font_get_size (ctxt->style->headings_font) * .2;
- ctxt->y -= gnome_font_get_size (ctxt->style->headings_font) * .2;
-
- for(field = E_CARD_SIMPLE_FIELD_FULL_NAME; field != E_CARD_SIMPLE_FIELD_LAST_SIMPLE_STRING; field++) {
- char *string;
- string = e_card_simple_get(simple, field);
-
- if (string && !strncmp (string, "<?xml", 4)) {
- EDestination *dest = e_destination_import (string);
- if (dest != NULL) {
- gchar *new_string = g_strdup (e_destination_get_address (dest));
- g_free (string);
- string = new_string;
- g_object_unref (dest);
- }
- }
-
- if (string && *string) {
- double xoff = 0;
- e_contact_output(ctxt->pc, ctxt->style->body_font, ctxt->x + xoff, ctxt->y, -1, e_card_simple_get_name(simple, field));
- xoff += gnome_font_get_width_utf8(ctxt->style->body_font, e_card_simple_get_name(simple, field));
- e_contact_output(ctxt->pc, ctxt->style->body_font, ctxt->x + xoff, ctxt->y, -1, ": ");
- xoff += gnome_font_get_width_utf8(ctxt->style->body_font, ": ");
- e_contact_output(ctxt->pc, ctxt->style->body_font, ctxt->x + xoff, ctxt->y, column_width - xoff, string);
- ctxt->y -= e_contact_text_height(ctxt->pc, ctxt->style->body_font, column_width - xoff, string);
- ctxt->y -= .2 * gnome_font_get_size (ctxt->style->body_font);
- }
- g_free(string);
- }
-
- ctxt->y -= gnome_font_get_size (ctxt->style->headings_font) * .4;
- gnome_print_grestore(ctxt->pc);
-}
-
-static void
-e_contact_start_new_column (EContactPrintContext *ctxt)
-{
- gdouble page_width = 72 * (ctxt->style->page_width - ctxt->style->left_margin - ctxt->style->right_margin);
- gdouble column_offset;
- if ( ctxt->style->letter_tabs )
- page_width -= e_contact_get_letter_tab_width(ctxt);
- column_offset = (page_width + 18) / ctxt->style->num_columns;
- ctxt->column ++;
- if (ctxt->column >= ctxt->style->num_columns) {
- e_contact_start_new_page(ctxt);
- ctxt->column = 0;
- }
- ctxt->x = (72 * ctxt->style->left_margin) + column_offset * ctxt->column;
- ctxt->y = 72 * (ctxt->style->page_height - ctxt->style->top_margin);
-}
-
-static void
-complete_sequence(EBookView *book_view, EBookViewStatus status, EContactPrintContext *ctxt)
-{
- GList *cards = ctxt->cards;
-
- gdouble page_width = 72 * (ctxt->style->page_width - ctxt->style->left_margin - ctxt->style->right_margin);
-
- ctxt->first_contact = TRUE;
- ctxt->character = NULL;
- ctxt->y = (ctxt->style->page_height - ctxt->style->top_margin) * 72;
- ctxt->x = (ctxt->style->left_margin) * 72;
- if ( ctxt->style->letter_tabs )
- page_width -= e_contact_get_letter_tab_width(ctxt);
-
- ctxt->first_char_on_page = 'A' - 1;
-
- gnome_print_beginpage (ctxt->pc, NULL);
-
- for(; cards; cards = cards->next) {
- ECard *card = cards->data;
- ECardSimple *simple = e_card_simple_new(card);
- guchar *file_as;
- gchar *letter_str = NULL;
-
- g_object_get(card,
- "file_as", &file_as,
- NULL);
- if (file_as != NULL) {
- letter_str = g_strndup (file_as, g_utf8_next_char (file_as) - (gchar *) file_as);
- }
- if ( file_as && (!ctxt->character || g_utf8_collate (ctxt->character, letter_str) != 0) ) {
- g_free (ctxt->character);
- ctxt->character = g_strdup (letter_str);
- if (ctxt->style->sections_start_new_page && ! ctxt->first_contact) {
- e_contact_start_new_page(ctxt);
- }
- else if ((!ctxt->first_contact) && (ctxt->y - e_contact_get_letter_heading_height(ctxt) - e_contact_get_card_size(simple, ctxt) < ctxt->style->bottom_margin * 72))
- e_contact_start_new_column(ctxt);
- if ( ctxt->style->letter_headings )
- e_contact_print_letter_heading(ctxt, ctxt->character);
- ctxt->first_section = FALSE;
- }
- else if ( (!ctxt->first_contact) && (ctxt->y - e_contact_get_card_size(simple, ctxt) < ctxt->style->bottom_margin * 72)) {
- e_contact_start_new_column(ctxt);
- if ( ctxt->style->letter_headings )
- e_contact_print_letter_heading(ctxt, ctxt->character);
- }
- g_free (letter_str);
- ctxt->last_char_on_page = toupper(*file_as);
- if ( ctxt->last_char_on_page < ctxt->first_char_on_page )
- ctxt->first_char_on_page = ctxt->last_char_on_page;
- e_contact_print_card(simple, ctxt);
- ctxt->first_contact = FALSE;
- g_object_unref(simple);
- }
- ctxt->last_char_on_page = 'Z';
- if ( ctxt->style->letter_tabs )
- e_contact_print_letter_tab(ctxt);
- gnome_print_showpage(ctxt->pc);
- gnome_print_context_close(ctxt->pc);
- g_free(ctxt->character);
- if (book_view)
- g_object_unref(book_view);
- if (ctxt->type == GNOME_PRINT_DIALOG_RESPONSE_PREVIEW) {
- GtkWidget *preview;
- preview = GTK_WIDGET(gnome_print_job_preview_new(ctxt->master, "Print Preview"));
- gtk_widget_show_all(preview);
- } else {
- gnome_print_job_print(ctxt->master);
- }
- g_object_unref(ctxt->pc);
- g_object_unref(ctxt->master);
- if (ctxt->book)
- g_object_unref(ctxt->book);
- g_free(ctxt->query);
- g_list_foreach(ctxt->cards, (GFunc) g_object_unref, NULL);
- g_list_free(ctxt->cards);
- g_object_unref(ctxt->style->headings_font);
- g_object_unref(ctxt->style->body_font);
- g_object_unref(ctxt->style->header_font);
- g_object_unref(ctxt->style->footer_font);
- g_object_unref(ctxt->letter_heading_font);
- g_object_unref(ctxt->letter_tab_font);
- g_free(ctxt->style);
- g_free(ctxt);
-}
-
-static int
-card_compare (ECard *card1, ECard *card2) {
- int cmp = 0;
-
- if (card1 && card2) {
- char *file_as1, *file_as2;
-
- g_object_get(card1,
- "file_as", &file_as1,
- NULL);
- g_object_get(card2,
- "file_as", &file_as2,
- NULL);
- if (file_as1 && file_as2)
- cmp = g_utf8_collate(file_as1, file_as2);
- else if (file_as1)
- cmp = -1;
- else if (file_as2)
- cmp = 1;
- else
- cmp = strcmp(e_card_get_id(card1), e_card_get_id(card2));
-
- g_free (file_as2);
- g_free (file_as1);
-
- }
- return cmp;
-}
-
-static void
-create_card(EBookView *book_view, const GList *cards, EContactPrintContext *ctxt)
-{
- for(; cards; cards = cards->next) {
- ECard *card = cards->data;
- g_object_ref(card);
- ctxt->cards = g_list_insert_sorted(ctxt->cards, card, (GCompareFunc) card_compare);
- }
-}
-
-static void
-book_view_loaded (EBook *book, EBookStatus status, EBookView *book_view, EContactPrintContext *ctxt)
-{
- g_object_ref(book_view);
-
- g_signal_connect(book_view,
- "card_added",
- G_CALLBACK(create_card),
- ctxt);
-
- g_signal_connect(book_view,
- "sequence_complete",
- G_CALLBACK(complete_sequence),
- ctxt);
-}
-
-static void
-e_contact_do_print_cards (EBook *book, char *query, EContactPrintContext *ctxt)
-{
- e_book_get_book_view(book, query, (EBookBookViewCallback) book_view_loaded, ctxt);
-}
-
-#if 0
-static double
-e_contact_get_phone_list_size(ECardSimple *simple, EContactPrintContext *ctxt)
-{
- double height = 0;
- int field;
-
- height += gnome_font_get_size (ctxt->style->headings_font) * .2;
-
- height += gnome_font_get_size (ctxt->style->headings_font) * .2;
-
- for(field = E_CARD_SIMPLE_FIELD_FULL_NAME; field != E_CARD_SIMPLE_FIELD_LAST_SIMPLE_STRING; field++) {
- char *string;
- string = e_card_simple_get(simple, field);
- if (string && *string) {
- if ( 1 ) /* field is a phone field. */ {
- gchar *field = string;
- height += e_contact_text_height(ctxt->pc, ctxt->style->body_font, 100, field);
- height += .2 * gnome_font_get_size (ctxt->style->body_font);
- }
- }
- g_free(string);
- }
- height += gnome_font_get_size (ctxt->style->headings_font) * .4;
- return height;
-}
-
-
-static void
-e_contact_print_phone_list (ECard *card, EContactPrintContext *ctxt)
-{
- gdouble page_width = 72 * (ctxt->style->page_width - ctxt->style->left_margin - ctxt->style->right_margin);
- gdouble column_width;
- double xoff, dotwidth;
- int dotcount;
- char *dots;
- int i;
- char *file_as;
- if ( ctxt->style->letter_tabs )
- page_width -= e_contact_get_letter_tab_width(ctxt);
- column_width = (page_width + 18) / ctxt->style->num_columns - 18;
-
- gnome_print_gsave(ctxt->pc);
-
- ctxt->y -= gnome_font_get_size (ctxt->style->headings_font) * .2;
- ctxt->y -= gnome_font_get_size (ctxt->style->headings_font) * .2;
-
- e_contact_output(ctxt->pc, ctxt->style->body_font, ctxt->x, ctxt->y, -1, e_card_get_string_fileas(card));
-
- xoff = column_width - 9 * gnome_font_get_size (ctxt->style->body_font);
- dotwidth = xoff -
- gnome_font_get_width_utf8(ctxt->style->body_font, e_card_get_string_fileas(card)) -
- gnome_font_get_width_utf8(ctxt->style->body_font, " ");
- dotcount = dotwidth / gnome_font_get_width(ctxt->style->body_font, '.');
- dots = g_new(gchar, dotcount + 1);
- for (i = 0; i < dotcount; i++)
- dots[i] = '.';
- dots[dotcount] = 0;
- e_contact_output(ctxt->pc, ctxt->style->body_font, ctxt->x + xoff - dotcount * gnome_font_get_width(ctxt->style->body_font, '.'), ctxt->y, -1, dots);
- g_free(dots);
-
- for(; shown_fields; shown_fields = g_list_next(shown_fields)) {
- if ( 1 ) /* field is a phone field. */ {
- gchar *field = e_card_get_string(card, shown_fields->data);
- e_contact_output(ctxt->pc, ctxt->style->body_font, ctxt->x + xoff, ctxt->y, -1, shown_fields->data);
- e_contact_output(ctxt->pc, ctxt->style->body_font,
- ctxt->x + column_width - gnome_font_get_width_utf8(ctxt->style->body_font,
- field),
- ctxt->y,
- -1,
- field);
- ctxt->y -= e_contact_text_height(ctxt->pc, ctxt->style->body_font, 100, field);
- ctxt->y -= .2 * gnome_font_get_size (ctxt->style->body_font);
- }
- }
- ctxt->y -= gnome_font_get_size (ctxt->style->headings_font) * .4;
- gnome_print_grestore(ctxt->pc);
-}
-
-static void
-e_contact_do_print_phone_list (EBook *book, char *query, EContactPrintContext *ctxt)
-{
- ECard *card = NULL;
- int i;
- gdouble page_width = 72 * (ctxt->style->page_width - ctxt->style->left_margin - ctxt->style->right_margin);
- gdouble column_width;
- ctxt->first_contact = TRUE;
- ctxt->character = NULL;
- ctxt->y = (ctxt->style->page_height - ctxt->style->top_margin) * 72;
- ctxt->x = (ctxt->style->left_margin) * 72;
- if ( ctxt->style->letter_tabs )
- page_width -= e_contact_get_letter_tab_width(ctxt);
-
- ctxt->first_char_on_page = 'A' - 1;
-
- column_width = (page_width + 18) / ctxt->style->num_columns - 18;
- /*
- for(card = e_book_get_first(book); card; card = e_book_get_next(book)) {
- */
- for (i=0; i < 30; i++) {
- guchar *file_as = e_card_get_string_fileas(card);
- if ( file_as && (!character || *character != tolower(*file_as)) ) {
- if (ctxt->style->sections_start_new_page && ! first_contact) {
- e_contact_start_new_page(ctxt);
- }
- else if ((!first_contact) && (ctxt->y - e_contact_get_letter_heading_height(ctxt) - e_contact_get_phone_list_size(card, ctxt, shown_fields) < ctxt->style->bottom_margin * 72))
- e_contact_start_new_column(ctxt);
- if (!character)
- character = g_strdup(" ");
- *character = tolower(*file_as);
- if ( ctxt->style->letter_headings )
- e_contact_print_letter_heading(ctxt, character);
- ctxt->first_section = FALSE;
- }
- else if ( (!first_contact) && (ctxt->y - e_contact_get_card_size(card, ctxt, shown_fields) < ctxt->style->bottom_margin * 72)) {
- e_contact_start_new_column(ctxt);
- if ( ctxt->style->letter_headings )
- e_contact_print_letter_heading(ctxt, character);
- }
- ctxt->last_char_on_page = toupper(*file_as);
- if ( ctxt->last_char_on_page < ctxt->first_char_on_page )
- ctxt->first_char_on_page = ctxt->last_char_on_page;
- e_contact_print_phone_list(card, ctxt, shown_fields);
- first_contact = FALSE;
- g_free (file_as);
- }
- ctxt->last_char_on_page = 'Z';
- if ( ctxt->style->letter_tabs )
- e_contact_print_letter_tab(ctxt);
- gnome_print_showpage(ctxt->pc);
- gnome_print_context_close(ctxt->pc);
- g_free(character);
-}
-#endif
-
-static void
-e_contact_do_print (EBook *book, char *query, EContactPrintContext *ctxt)
-{
- switch ( ctxt->style->type ) {
- case E_CONTACT_PRINT_TYPE_CARDS:
- e_contact_do_print_cards( book, query, ctxt);
- break;
-#if 0
- case E_CONTACT_PRINT_TYPE_PHONE_LIST:
- e_contact_do_print_phone_list( book, query, ctxt );
- break;
-#endif
- default:
- break;
- }
-}
-
-static void lowify( char *data )
-{
- for ( ; *data; data++ )
- *data = tolower((unsigned char) *data);
-}
-
-static gboolean get_bool( char *data )
-{
- if ( data ) {
- lowify ( data );
- return ! strcmp(data, "true");
- } else
- return FALSE;
-}
-
-static void get_string( char *data, char **variable )
-{
- g_free ( *variable );
- if ( data )
- *variable = g_strdup( data );
- else
- *variable = g_strdup( "" );
-}
-
-static int get_integer( char *data )
-{
- if ( data )
- return atoi(data);
- else
- return 0;
-}
-
-static double get_float( char *data )
-{
- if ( data )
- return atof(data);
- else
- return 0;
-}
-
-static void get_font( char *data, GnomeFont **variable )
-{
- if ( data ) {
- GnomeFont *font = gnome_font_find_from_full_name( data );
- if ( font ) {
- g_object_unref(*variable);
- *variable = font;
- }
- }
-}
-
-
-static void
-e_contact_build_style(EContactPrintStyle *style)
-{
- xmlDocPtr styledoc;
- gchar *filename;
-
- style->title = g_strdup("");
- style->type = E_CONTACT_PRINT_TYPE_CARDS;
- style->sections_start_new_page = TRUE;
- style->num_columns = 2;
- style->blank_forms = 2;
- style->letter_tabs = TRUE;
- style->letter_headings = FALSE;
-
- style->headings_font = gnome_font_find_closest_from_weight_slant ("Helvetica", GNOME_FONT_BOLD, FALSE, 8);
- style->body_font = gnome_font_find_closest_from_weight_slant ("Helvetica", GNOME_FONT_BOOK, FALSE, 6);
-
- style->print_using_grey = TRUE;
- style->paper_type = 0;
- style->paper_width = 8.5;
- style->paper_height = 11;
- style->paper_source = 0;
- style->top_margin = .5;
- style->left_margin = .5;
- style->bottom_margin = .5;
- style->right_margin = .5;
- style->page_size = 0;
- style->page_width = 2.75;
- style->page_height = 4.25;
-#if 0
- style->page_width = 4.25;
- style->page_height = 5.5;
-#endif
-#if 0
- style->page_width = 5.5;
- style->page_height = 8.5;
-#endif
- style->orientation_portrait = FALSE;
-
- style->header_font = gnome_font_find_closest_from_weight_slant ("Helvetica", GNOME_FONT_BOOK, FALSE, 6);
-
- style->left_header = g_strdup("");
- style->center_header = g_strdup("");
- style->right_header = g_strdup("");
-
- style->footer_font = gnome_font_find_closest_from_weight_slant ("Helvetica", GNOME_FONT_BOOK, FALSE, 6);
-
- style->left_footer = g_strdup("");
- style->center_footer = g_strdup("");
- style->right_footer = g_strdup("");
- style->reverse_on_even_pages = FALSE;
- filename = g_concat_dir_and_file(EVOLUTION_ECPSDIR, "medbook.ecps");
- styledoc = xmlParseFile(filename);
- g_free(filename);
- if (styledoc) {
- xmlNodePtr stylenode = xmlDocGetRootElement(styledoc);
- xmlNodePtr node;
- for (node = stylenode->children; node; node = node->next) {
- char *data = xmlNodeGetContent ( node );
- if ( !strcmp( node->name, "title" ) ) {
- get_string(data, &(style->title));
- } else if ( !strcmp( node->name, "type" ) ) {
- lowify( data );
- if ( !strcmp( data, "cards" ) )
- style->type = E_CONTACT_PRINT_TYPE_CARDS;
- else if ( !strcmp( data, "memo_style" ) )
- style->type = E_CONTACT_PRINT_TYPE_MEMO_STYLE;
- else if ( !strcmp( data, "phone_list" ) )
- style->type = E_CONTACT_PRINT_TYPE_PHONE_LIST;
- } else if ( !strcmp( node->name, "sections_start_new_page" ) ) {
- style->sections_start_new_page = get_bool(data);
- } else if ( !strcmp( node->name, "num_columns" ) ) {
- style->num_columns = get_integer(data);
- } else if ( !strcmp( node->name, "blank_forms" ) ) {
- style->blank_forms = get_integer(data);
- } else if ( !strcmp( node->name, "letter_tabs" ) ) {
- style->letter_tabs = get_bool(data);
- } else if ( !strcmp( node->name, "letter_headings" ) ) {
- style->letter_headings = get_bool(data);
- } else if ( !strcmp( node->name, "headings_font" ) ) {
- get_font( data, &(style->headings_font) );
- } else if ( !strcmp( node->name, "body_font" ) ) {
- get_font( data, &(style->body_font) );
- } else if ( !strcmp( node->name, "print_using_grey" ) ) {
- style->print_using_grey = get_bool(data);
- } else if ( !strcmp( node->name, "paper_width" ) ) {
- style->paper_width = get_float(data);
- } else if ( !strcmp( node->name, "paper_height" ) ) {
- style->paper_height = get_float(data);
- } else if ( !strcmp( node->name, "top_margin" ) ) {
- style->top_margin = get_float(data);
- } else if ( !strcmp( node->name, "left_margin" ) ) {
- style->left_margin = get_float(data);
- } else if ( !strcmp( node->name, "bottom_margin" ) ) {
- style->bottom_margin = get_float(data);
- } else if ( !strcmp( node->name, "right_margin" ) ) {
- style->right_margin = get_float(data);
- } else if ( !strcmp( node->name, "page_width" ) ) {
- style->page_width = get_float(data);
- } else if ( !strcmp( node->name, "page_height" ) ) {
- style->page_height = get_float(data);
- } else if ( !strcmp( node->name, "orientation" ) ) {
- if ( data ) {
- lowify(data);
- style->orientation_portrait = strcmp(data, "landscape");
- } else {
- style->orientation_portrait = TRUE;
- }
- } else if ( !strcmp( node->name, "header_font" ) ) {
- get_font( data, &(style->header_font) );
- } else if ( !strcmp( node->name, "left_header" ) ) {
- get_string(data, &(style->left_header));
- } else if ( !strcmp( node->name, "center_header" ) ) {
- get_string(data, &(style->center_header));
- } else if ( !strcmp( node->name, "right_header" ) ) {
- get_string(data, &(style->right_header));
- } else if ( !strcmp( node->name, "footer_font" ) ) {
- get_font( data, &(style->footer_font) );
- } else if ( !strcmp( node->name, "left_footer" ) ) {
- get_string(data, &(style->left_footer));
- } else if ( !strcmp( node->name, "center_footer" ) ) {
- get_string(data, &(style->center_footer));
- } else if ( !strcmp( node->name, "right_footer" ) ) {
- get_string(data, &(style->right_footer));
- } else if ( !strcmp( node->name, "reverse_on_even_pages" ) ) {
- style->reverse_on_even_pages = get_bool(data);
- }
- if ( data )
- xmlFree (data);
- }
- xmlFreeDoc(styledoc);
- }
-}
-
-static gint
-e_contact_print_close(GnomeDialog *dialog, gpointer data)
-{
- return FALSE;
-}
-
-static void
-e_contact_print_response(GtkWidget *dialog, gint response_id, gpointer data)
-{
- EContactPrintContext *ctxt = g_new(EContactPrintContext, 1);
- EContactPrintStyle *style = g_new(EContactPrintStyle, 1);
- GnomePrintJob *master;
- GnomePrintConfig *config;
- GnomePrintContext *pc;
- gboolean uses_book = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(dialog), "uses_book"));
- EBook *book = NULL;
- char *query = NULL;
- ECard *card = NULL;
- gdouble font_size;
-
-
- if (uses_book) {
- book = g_object_get_data(G_OBJECT(dialog), "book");
- query = g_object_get_data(G_OBJECT(dialog), "query");
- } else {
- card = g_object_get_data(G_OBJECT(dialog), "card");
- }
- switch( response_id ) {
- case GNOME_PRINT_DIALOG_RESPONSE_PRINT:
- config = gnome_print_dialog_get_config (GNOME_PRINT_DIALOG(dialog));
- master = gnome_print_job_new( config );
- pc = gnome_print_job_get_context( master );
- e_contact_build_style(style);
-
- ctxt->x = 0;
- ctxt->y = 0;
- ctxt->column = 0;
- ctxt->style = style;
- ctxt->master = master;
- ctxt->first_section = TRUE;
- ctxt->first_char_on_page = 'A' - 1;
- ctxt->type = GNOME_PRINT_DIALOG_RESPONSE_PRINT;
-
- font_size = 72 * ctxt->style->page_height / 27.0 / 2.0;
- ctxt->letter_heading_font = gnome_font_find (gnome_font_get_name(ctxt->style->headings_font), gnome_font_get_size (ctxt->style->headings_font) * 1.5);
- ctxt->letter_tab_font = gnome_font_find (gnome_font_get_name(ctxt->style->headings_font), font_size);
-
- ctxt->pc = pc;
-#warning FIXME gnome_print_multipage_new_from_sizes
-#if 0
- ctxt->pc = GNOME_PRINT_CONTEXT(gnome_print_multipage_new_from_sizes(pc,
- 72 * style->paper_width,
- 72 * style->paper_height,
- 72 * style->page_width,
- 72 * style->page_height));
-#endif
-
- ctxt->book = book;
- ctxt->query = query;
- if (uses_book) {
- ctxt->cards = NULL;
- e_contact_do_print(book, ctxt->query, ctxt);
- } else {
- ctxt->cards = g_list_append(NULL, card);
- complete_sequence(NULL, E_BOOK_VIEW_STATUS_SUCCESS, ctxt);
- }
- gtk_widget_destroy (dialog);
- break;
- case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW:
- config = gnome_print_dialog_get_config (GNOME_PRINT_DIALOG(dialog));
- master = gnome_print_job_new( config );
- pc = gnome_print_job_get_context( master );
- e_contact_build_style(style);
-
- ctxt->x = 0;
- ctxt->y = 0;
- ctxt->column = 0;
- ctxt->style = style;
- ctxt->master = master;
- ctxt->first_section = TRUE;
- ctxt->first_char_on_page = 'A' - 1;
- ctxt->type = GNOME_PRINT_DIALOG_RESPONSE_PREVIEW;
-
- font_size = 72 * ctxt->style->page_height / 27.0 / 2.0;
- ctxt->letter_heading_font = gnome_font_find (gnome_font_get_name(ctxt->style->headings_font), gnome_font_get_size (ctxt->style->headings_font) * 1.5);
- ctxt->letter_tab_font = gnome_font_find (gnome_font_get_name(ctxt->style->headings_font), font_size);
-
- ctxt->pc = pc;
-#warning FIXME gnome_print_multipage_new_from_sizes
-#if 0
- ctxt->pc = GNOME_PRINT_CONTEXT(gnome_print_multipage_new_from_sizes(pc,
- 72 * style->paper_width,
- 72 * style->paper_height,
- 72 * style->page_width,
- 72 * style->page_height));
-#endif
- ctxt->book = book;
- ctxt->query = g_strdup(query);
- if (uses_book) {
- ctxt->cards = NULL;
- g_object_ref(book);
- e_contact_do_print(book, ctxt->query, ctxt);
- } else {
- ctxt->cards = g_list_append(NULL, card);
- g_object_ref(card);
- complete_sequence(NULL, E_BOOK_VIEW_STATUS_SUCCESS, ctxt);
- }
- break;
- case GNOME_PRINT_DIALOG_RESPONSE_CANCEL:
- if (uses_book)
- g_object_unref(book);
- else
- g_object_unref(card);
- g_free(query);
- gtk_widget_destroy (dialog);
- g_free(style);
- g_free(ctxt);
- break;
- }
-}
-
-GtkWidget *
-e_contact_print_dialog_new(EBook *book, char *query)
-{
- GtkWidget *dialog;
-
-
- dialog = gnome_print_dialog_new(NULL, _("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);
-
- g_object_ref(book);
- g_object_set_data(G_OBJECT(dialog), "uses_book", (void *) 1);
- g_object_set_data(G_OBJECT(dialog), "book", book);
- g_object_set_data(G_OBJECT(dialog), "query", g_strdup(query));
- g_signal_connect(dialog,
- "response", G_CALLBACK(e_contact_print_response), NULL);
- g_signal_connect(dialog,
- "close", G_CALLBACK(e_contact_print_close), NULL);
- return dialog;
-}
-
-void
-e_contact_print_preview(EBook *book, char *query)
-{
- EContactPrintContext *ctxt = g_new(EContactPrintContext, 1);
- EContactPrintStyle *style = g_new(EContactPrintStyle, 1);
- GnomePrintJob *master;
- GnomePrintContext *pc;
- 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);
- pc = gnome_print_job_get_context (master);
- e_contact_build_style (style);
-
- ctxt->x = 0;
- ctxt->y = 0;
- ctxt->column = 0;
- ctxt->style = style;
- ctxt->master = master;
- ctxt->first_section = TRUE;
- ctxt->first_char_on_page = 'A' - 1;
- ctxt->type = GNOME_PRINT_DIALOG_RESPONSE_PREVIEW;
-
- font_size = 72 * ctxt->style->page_height / 27.0 / 2.0;
- ctxt->letter_heading_font = gnome_font_find (gnome_font_get_name(ctxt->style->headings_font), gnome_font_get_size (ctxt->style->headings_font) * 1.5);
- ctxt->letter_tab_font = gnome_font_find (gnome_font_get_name(ctxt->style->headings_font), font_size);
-
- ctxt->pc = pc;
-#warning FIXME gnome_print_multipage_new_from_sizes
-#if 0
- ctxt->pc = GNOME_PRINT_CONTEXT(gnome_print_multipage_new_from_sizes(pc,
- 72 * style->paper_width,
- 72 * style->paper_height,
- 72 * style->page_width,
- 72 * style->page_height));
-#endif
- ctxt->book = book;
- ctxt->query = g_strdup(query);
- ctxt->cards = NULL;
- g_object_ref(book);
- e_contact_do_print(book, ctxt->query, ctxt);
-}
-
-GtkWidget *
-e_contact_print_card_dialog_new(ECard *card)
-{
- GtkWidget *dialog;
-
- dialog = gnome_print_dialog_new(NULL, _("Print card"), GNOME_PRINT_DIALOG_COPIES);
-
- card = e_card_duplicate(card);
- g_object_set_data(G_OBJECT(dialog), "card", card);
- g_object_set_data(G_OBJECT(dialog), "uses_book", (void *) 0);
- g_signal_connect(dialog,
- "response", G_CALLBACK(e_contact_print_response), NULL);
- g_signal_connect(dialog,
- "close", G_CALLBACK(e_contact_print_close), NULL);
- return dialog;
-}
-
-/* FIXME: Print all the contacts selected. */
-GtkWidget *
-e_contact_print_card_list_dialog_new(GList *list)
-{
- GtkWidget *dialog;
- ECard *card;
-
- if (list == NULL)
- return NULL;
-
- dialog = gnome_print_dialog_new(NULL, _("Print card"), GNOME_PRINT_DIALOG_COPIES);
-
- card = e_card_duplicate(list->data);
- g_object_set_data(G_OBJECT(dialog), "card", card);
- g_object_set_data(G_OBJECT(dialog), "uses_book", (void *) 0);
- g_signal_connect(dialog,
- "response", G_CALLBACK(e_contact_print_response), NULL);
- g_signal_connect(dialog,
- "close", G_CALLBACK(e_contact_print_close), NULL);
- return dialog;
-}
diff --git a/addressbook/printing/e-contact-print.glade b/addressbook/printing/e-contact-print.glade
deleted file mode 100644
index d1721e3509..0000000000
--- a/addressbook/printing/e-contact-print.glade
+++ /dev/null
@@ -1,2018 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd" >
-
-<glade-interface>
- <widget class="GtkDialog" id="print-edit-style">
- <property name="visible">no</property>
- <property name="title" translatable="yes">Page Setup:</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="modal">no</property>
- <property name="allow_shrink">no</property>
- <property name="allow_grow">no</property>
- <property name="window-position">GTK_WIN_POS_NONE</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="homogeneous">no</property>
- <property name="spacing">8</property>
- <property name="visible">yes</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <property name="spacing">8</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkButton" id="button1">
- <property name="can_default">yes</property>
- <property name="can_focus">yes</property>
- <property name="visible">yes</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button2">
- <property name="can_default">yes</property>
- <property name="can_focus">yes</property>
- <property name="visible">yes</property>
- <property name="label">gtk-apply</property>
- <property name="use_stock">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button3">
- <property name="can_default">yes</property>
- <property name="can_focus">yes</property>
- <property name="visible">yes</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">yes</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox-contact-print-style-editor">
- <property name="homogeneous">no</property>
- <property name="spacing">5</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="border_width">5</property>
- <property name="homogeneous">no</property>
- <property name="spacing">16</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label8">
- <property name="label" translatable="yes">Style name:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="label-style-name">
- <property name="can_focus">yes</property>
- <property name="editable">no</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkNotebook" id="notebook1">
- <property name="can_focus">yes</property>
- <property name="show_tabs">yes</property>
- <property name="show_border">yes</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">no</property>
- <property name="tab_hborder">2</property>
- <property name="tab_vborder">2</property>
- <property name="enable-popup">no</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="border_width">5</property>
- <property name="homogeneous">no</property>
- <property name="spacing">5</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkFrame" id="frame5">
- <property name="label" translatable="yes">Preview:</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <placeholder />
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="homogeneous">yes</property>
- <property name="spacing">7</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkFrame" id="frame6">
- <property name="label" translatable="yes">Options</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment4">
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkTable" id="table1">
- <property name="border_width">8</property>
- <property name="homogeneous">no</property>
- <property name="row_spacing">0</property>
- <property name="column_spacing">0</property>
- <property name="n-rows">6</property>
- <property name="n-columns">5</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label5">
- <property name="label" translatable="yes">Include:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="label" translatable="yes">Sections:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkRadioButton" id="radiobutton1">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Immediately follow each other</property>
- <property name="active">yes</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">5</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="checkbutton1">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Letter tabs on side</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">5</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="checkbutton2">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Headings for each letter</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">5</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment3">
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkRadioButton" id="radiobutton2">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Start on a new page</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">5</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label6">
- <property name="label" translatable="yes">Number of columns:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_padding">0</property>
- <property name="y_padding">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label7">
- <property name="label" translatable="yes">Blank forms at end:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_padding">0</property>
- <property name="y_padding">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment6">
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkSpinButton" id="spinbutton2">
- <property name="can_focus">yes</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">no</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="wrap">no</property>
- <property name="snap_to_ticks">no</property>
- <property name="visible">yes</property>
- <property name="adjustment">2 0 100 1 10 10</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_padding">0</property>
- <property name="y_padding">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment5">
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkSpinButton" id="spinbutton1">
- <property name="can_focus">yes</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">no</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="wrap">no</property>
- <property name="width-request">45</property>
- <property name="snap_to_ticks">no</property>
- <property name="visible">yes</property>
- <property name="adjustment">1 0 100 1 10 10</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_padding">0</property>
- <property name="y_padding">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="homogeneous">no</property>
- <property name="spacing">8</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkFrame" id="frame7">
- <property name="label" translatable="yes">Fonts</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkTable" id="table2">
- <property name="border_width">8</property>
- <property name="homogeneous">no</property>
- <property name="row_spacing">13</property>
- <property name="column_spacing">8</property>
- <property name="n-rows">2</property>
- <property name="n-columns">2</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment7">
- <property name="xalign">0.5</property>
- <property name="yalign">1</property>
- <property name="xscale">1</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkButton" id="button6">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">F_ont...</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="visible">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment8">
- <property name="xalign">0.5</property>
- <property name="yalign">1</property>
- <property name="xscale">1</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkButton" id="button5">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">_Font...</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="width-request">90</property>
- <property name="visible">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox4">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label10">
- <property name="label" translatable="yes">Headings</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry3">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes">10 pt. Tahoma</property>
- <property name="width-request">100</property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label9">
- <property name="label" translatable="yes">Body</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry2">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes">8 pt. Tahoma</property>
- <property name="width-request">100</property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame8">
- <property name="label" translatable="yes">Shading</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkCheckButton" id="checkbutton3">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Print using gray shading</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="label" translatable="yes">Format</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="homogeneous">yes</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox6">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkFrame" id="frame9">
- <property name="label" translatable="yes">Paper</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox16">
- <property name="border_width">10</property>
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox17">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label21">
- <property name="label" translatable="yes">Type:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
- <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkTreeView" id="clist1">
- <property name="can_focus">yes</property>
- <property name="headers-visible">no</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label26">
- <property name="child_name">CList:title</property>
- <property name="label" translatable="yes">label26</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child internal-child="hscrollbar">
- <widget class="GtkHScrollbar" id="convertwidget1">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child internal-child="vscrollbar">
- <widget class="GtkVScrollbar" id="convertwidget2">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox18">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label24">
- <property name="label" translatable="yes">Dimensions:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox5">
- <property name="homogeneous">yes</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label27">
- <property name="label" translatable="yes">Width:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry9">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="width-request">1</property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label28">
- <property name="label" translatable="yes">Height:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry10">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="width-request">1</property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox19">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label25">
- <property name="label" translatable="yes">Paper source:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCombo" id="combo1">
- <property name="value_in_list">no</property>
- <property name="case_sensitive">no</property>
- <property name="enable_arrow_keys">yes</property>
- <property name="enable_arrows_always">no</property>
- <property name="allow_empty">yes</property>
- <property name="visible">yes</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="combo-entry1">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget3">
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkListItem" id="convertwidget4">
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget5">
- <property name="label" translatable="yes"></property>
- <property name="xalign">0.0</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame10">
- <property name="label" translatable="yes">Margins</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkTable" id="table4">
- <property name="border_width">15</property>
- <property name="homogeneous">yes</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">9</property>
- <property name="n-rows">2</property>
- <property name="n-columns">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label29">
- <property name="label" translatable="yes">Top:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">expand|fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label30">
- <property name="label" translatable="yes">Bottom:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">expand|fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label31">
- <property name="label" translatable="yes">Left:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">expand|fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry11">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="width-request">1</property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry12">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="width-request">1</property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry13">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="width-request">1</property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry14">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="width-request">1</property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label32">
- <property name="label" translatable="yes">Right:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">expand|fill</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox7">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkFrame" id="frame11">
- <property name="label" translatable="yes">Page</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox8">
- <property name="border_width">10</property>
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox20">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label33">
- <property name="label" translatable="yes">Size:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow2">
- <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
- <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkTreeView" id="clist2">
- <property name="can_focus">yes</property>
- <property name="headers-visible">no</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label35">
- <property name="child_name">CList:title</property>
- <property name="label" translatable="yes">label26</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child internal-child="hscrollbar">
- <widget class="GtkHScrollbar" id="convertwidget6">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child internal-child="vscrollbar">
- <widget class="GtkVScrollbar" id="convertwidget7">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox21">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label34">
- <property name="label" translatable="yes">Dimensions:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox6">
- <property name="homogeneous">yes</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label36">
- <property name="label" translatable="yes">Width:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry15">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="width-request">1</property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label37">
- <property name="label" translatable="yes">Height:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry16">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="width-request">1</property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame12">
- <property name="label" translatable="yes">Orientation</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkHBox" id="hbox4">
- <property name="homogeneous">no</property>
- <property name="spacing">10</property>
- <property name="visible">yes</property>
-
- <child>
- <placeholder />
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox9">
- <property name="homogeneous">no</property>
- <property name="spacing">5</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment9">
- <property name="xalign">0</property>
- <property name="yalign">1</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkRadioButton" id="radiobutton3">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Portrait</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment10">
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkRadioButton" id="radiobutton4">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Landscape</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="label" translatable="yes">Paper</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox10">
- <property name="border_width">8</property>
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkTable" id="table5">
- <property name="homogeneous">yes</property>
- <property name="row_spacing">4</property>
- <property name="column_spacing">4</property>
- <property name="n-rows">4</property>
- <property name="n-columns">3</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment15">
- <property name="xalign">0</property>
- <property name="yalign">1</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkButton" id="button11">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">F_ont...</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="visible">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTextView" id="text10">
- <property name="can_focus">yes</property>
- <property name="editable">no</property>
- <property name="text" translatable="yes"></property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="height-request">50</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">expand|fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTextView" id="text11">
- <property name="can_focus">yes</property>
- <property name="editable">no</property>
- <property name="text" translatable="yes"></property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="height-request">50</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTextView" id="text12">
- <property name="can_focus">yes</property>
- <property name="editable">no</property>
- <property name="text" translatable="yes"></property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="height-request">50</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTextView" id="text13">
- <property name="can_focus">yes</property>
- <property name="editable">no</property>
- <property name="text" translatable="yes"></property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="height-request">50</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">expand|fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTextView" id="text14">
- <property name="can_focus">yes</property>
- <property name="editable">no</property>
- <property name="text" translatable="yes"></property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="height-request">5</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTextView" id="text15">
- <property name="can_focus">yes</property>
- <property name="editable">no</property>
- <property name="text" translatable="yes"></property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="height-request">50</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment16">
- <property name="xalign">0.5</property>
- <property name="yalign">1</property>
- <property name="xscale">1</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox14">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label14">
- <property name="label" translatable="yes">Header</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry7">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment17">
- <property name="xalign">0.5</property>
- <property name="yalign">1</property>
- <property name="xscale">1</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox15">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label15">
- <property name="label" translatable="yes">Footer:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry8">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment14">
- <property name="xalign">0</property>
- <property name="yalign">1</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkButton" id="button10">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">_Font...</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="visible">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox7">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkToolbar" id="toolbar1">
- <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
- <property name="toolbar-style">GTK_TOOLBAR_ICONS</property>
- <property name="visible">yes</property>
-
- <child>
- <placeholder />
- </child>
-
- <child>
- <placeholder />
- </child>
-
- <child>
- <placeholder />
- </child>
-
- <child>
- <placeholder />
- </child>
-
- <child>
- <placeholder />
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="checkbutton4">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Reverse on even pages</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="label" translatable="yes">Header/Footer</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">4</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
-</glade-interface>
diff --git a/addressbook/printing/e-contact-print.h b/addressbook/printing/e-contact-print.h
deleted file mode 100644
index 12f13f4573..0000000000
--- a/addressbook/printing/e-contact-print.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-contact-print.h
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef E_CONTACT_PRINT_H
-#define E_CONTACT_PRINT_H
-
-#include <glib.h>
-#include <gtk/gtkwidget.h>
-#include <addressbook/backend/ebook/e-book.h>
-#include <addressbook/backend/ebook/e-card.h>
-#include "e-contact-print-types.h"
-
-GtkWidget *e_contact_print_dialog_new(EBook *book, char *query);
-void e_contact_print_preview(EBook *book, char *query);
-GtkWidget *e_contact_print_card_dialog_new(ECard *card);
-GtkWidget *e_contact_print_card_list_dialog_new(GList *list);
-
-#endif /* E_CONTACT_PRINT_H */
diff --git a/addressbook/printing/medbook.ecps b/addressbook/printing/medbook.ecps
deleted file mode 100644
index ef76c0b46e..0000000000
--- a/addressbook/printing/medbook.ecps
+++ /dev/null
@@ -1,30 +0,0 @@
-<style>
-<title/>
-<type>cards</type>
-<sections_start_new_page>FALSE</sections_start_new_page>
-<num_columns>2</num_columns>
-<blank_forms>2</blank_forms>
-<letter_tabs>TRUE</letter_tabs>
-<letter_headings>TRUE</letter_headings>
-<headings_font>Helvetica Bold 12</headings_font>
-<body_font>Helvetica 8</body_font>
-<print_using_grey>TRUE</print_using_grey>
-<paper_width>8.5</paper_width>
-<paper_height>11</paper_height>
-<top_margin>0.5</top_margin>
-<left_margin>0.5</left_margin>
-<bottom_margin>0.5</bottom_margin>
-<right_margin>0.5</right_margin>
-<page_width>8.5</page_width>
-<page_height>11</page_height>
-<orientation>portrait</orientation>
-<header_font>Helvetica 8</header_font>
-<left_header/>
-<center_header/>
-<right_header/>
-<footer_font>Helvetica 8</footer_font>
-<left_footer/>
-<center_footer>[Page #]</center_footer>
-<right_footer/>
-<reverse_on_even_pages>FALSE</reverse_on_even_pages>
-</style>
diff --git a/addressbook/printing/phonelist.ecps b/addressbook/printing/phonelist.ecps
deleted file mode 100644
index 980750a6b2..0000000000
--- a/addressbook/printing/phonelist.ecps
+++ /dev/null
@@ -1,29 +0,0 @@
-<style>
-<title/>
-<type>phone_list</type>
-<sections_start_new_page>FALSE</sections_start_new_page>
-<num_columns>2</num_columns>
-<letter_tabs>FALSE</letter_tabs>
-<letter_headings>TRUE</letter_headings>
-<headings_font>Helvetica Bold 10</headings_font>
-<body_font>Helvetica 8</body_font>
-<print_using_grey>TRUE</print_using_grey>
-<paper_width>8.5</paper_width>
-<paper_height>11</paper_height>
-<top_margin>0.5</top_margin>
-<left_margin>0.5</left_margin>
-<bottom_margin>0.5</bottom_margin>
-<right_margin>0.5</right_margin>
-<page_width>8.5</page_width>
-<page_height>11</page_height>
-<orientation>portrait</orientation>
-<header_font>Helvetica 8</header_font>
-<left_header/>
-<center_header/>
-<right_header/>
-<footer_font>Helvetica 8</footer_font>
-<left_footer>[User Name]</left_footer>
-<center_footer>[Page #]</center_footer>
-<right_footer>[Date Printed]</right_footer>
-<reverse_on_even_pages>FALSE</reverse_on_even_pages>
-</style>
diff --git a/addressbook/printing/smallbook.ecps b/addressbook/printing/smallbook.ecps
deleted file mode 100644
index 0bb19aa92e..0000000000
--- a/addressbook/printing/smallbook.ecps
+++ /dev/null
@@ -1,30 +0,0 @@
-<style>
-<title/>
-<type>cards</type>
-<sections_start_new_page>FALSE</sections_start_new_page>
-<num_columns>1</num_columns>
-<blank_forms>2</blank_forms>
-<letter_tabs>TRUE</letter_tabs>
-<letter_headings>TRUE</letter_headings>
-<headings_font>Helvetica Bold 8</headings_font>
-<body_font>Helvetica 6</body_font>
-<print_using_grey>TRUE</print_using_grey>
-<paper_width>8.5</paper_width>
-<paper_height>11</paper_height>
-<top_margin>0.5</top_margin>
-<left_margin>0.5</left_margin>
-<bottom_margin>0.5</bottom_margin>
-<right_margin>0.5</right_margin>
-<page_width>2.75</page_width>
-<page_height>4.25</page_height>
-<orientation>portrait</orientation>
-<header_font>Helvetica 6</header_font>
-<left_header/>
-<center_header/>
-<right_header/>
-<footer_font>Helvetica 6</footer_font>
-<left_footer/>
-<center_footer>[Page #]</center_footer>
-<right_footer/>
-<reverse_on_even_pages>FALSE</reverse_on_even_pages>
-</style>
diff --git a/addressbook/printing/test-contact-print-style-editor.c b/addressbook/printing/test-contact-print-style-editor.c
deleted file mode 100644
index f49625434e..0000000000
--- a/addressbook/printing/test-contact-print-style-editor.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * test-contact-print-style-editor.c
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "config.h"
-
-#include <stdlib.h>
-#include <gtk/gtkmain.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-ui-init.h>
-#include <bonobo/bonobo-main.h>
-#include "e-contact-print-style-editor.h"
-
-/* This is a horrible thing to do, but it is just a test. */
-GtkWidget *editor;
-
-static void destroy_callback(GtkWidget *app, gpointer data)
-{
- static int count = 2;
- count --;
- if ( count <= 0 )
- exit(0);
-}
-
-#if 0
-static void about_callback( GtkWidget *widget, gpointer data )
-{
-
- const gchar *authors[] =
- {
- "Christopher James Lahey <clahey@umich.edu>",
- NULL
- };
-
- GtkWidget *about =
- gnome_about_new ( _( "Contact Print Style Editor Test" ), VERSION,
- _( "Copyright (C) 2000, Ximian, Inc." ),
- authors,
- _( "This should test the contact print style editor widget" ),
- NULL);
- gtk_widget_show (about);
-}
-#endif
-
-int main( int argc, char *argv[] )
-{
- GtkWidget *app;
-
- /* bindtextdomain (PACKAGE, GNOMELOCALEDIR);
- textdomain (PACKAGE);*/
-
- gnome_program_init ("Contact Print Style Editor Test", VERSION,
- LIBGNOMEUI_MODULE,
- argc, argv,
- NULL);
-
- glade_init ();
-
- app = gnome_app_new("Contact Print Style Editor Test", NULL);
-
- editor = e_contact_print_style_editor_new("");
-
- gnome_app_set_contents( GNOME_APP( app ), editor );
-
- /* Connect the signals */
- g_signal_connect( app, "destroy",
- G_CALLBACK ( destroy_callback ),
- ( gpointer ) app );
-
- gtk_widget_show_all( app );
-
- bonobo_main();
-
- /* Not reached. */
- return 0;
-}
diff --git a/addressbook/printing/test-print.c b/addressbook/printing/test-print.c
deleted file mode 100644
index a1dede7bde..0000000000
--- a/addressbook/printing/test-print.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * test-print.c
- * Copyright (C) 2000 Ximian, Inc.
- * Author: Chris Lahey <clahey@ximian.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "config.h"
-
-#include <stdlib.h>
-#include <gtk/gtkmain.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-ui-init.h>
-#include <glade/glade.h>
-#include <bonobo/bonobo-main.h>
-#include "e-contact-print.h"
-
-/* This is a horrible thing to do, but it is just a test. */
-GtkWidget *print;
-
-static gint test_close(GnomeDialog *dialog, gpointer data)
-{
- exit(0);
- return 1;
-}
-
-#if 0
-static void about_callback( GtkWidget *widget, gpointer data )
-{
-
- const gchar *authors[] =
- {
- "Christopher James Lahey <clahey@umich.edu>",
- NULL
- };
-
- GtkWidget *about =
- gnome_about_new ( _( "Contact Print Test" ), VERSION,
- _( "Copyright (C) 2000, Ximian, Inc." ),
- authors,
- _( "This should test the contact print code" ),
- NULL);
- gtk_widget_show (about);
-}
-#endif
-
-int main( int argc, char *argv[] )
-{
- GList *shown_fields = NULL;
-
- /* bindtextdomain (PACKAGE, GNOMELOCALEDIR);
- textdomain (PACKAGE);*/
-
- gnome_program_init ("Contact Print Test", VERSION,
- LIBGNOMEUI_MODULE,
- argc, argv,
- NULL);
-
- glade_init ();
-
- shown_fields = g_list_append(shown_fields, "First field");
- shown_fields = g_list_append(shown_fields, "Second field");
- shown_fields = g_list_append(shown_fields, "Third field");
- shown_fields = g_list_append(shown_fields, "Fourth field");
-
- print = e_contact_print_dialog_new(NULL, NULL);
- gtk_widget_show_all(print);
- g_signal_connect(print, "close", G_CALLBACK(test_close), NULL);
-
- bonobo_main();
-
- /* Not reached. */
- return 0;
-}