]> git.sur5r.net Git - glabels/commitdiff
2003-12-30 Jim Evins <evins@snaught.com>
authorJim Evins <evins@snaught.com>
Tue, 30 Dec 2003 05:41:48 +0000 (05:41 +0000)
committerJim Evins <evins@snaught.com>
Tue, 30 Dec 2003 05:41:48 +0000 (05:41 +0000)
* src/template-designer.c:
* src/template-designer.h:
* src/template-designer.glade:
New template designer assistant.

* po/POTFILES.in:
* src/Makefile.am:
Added entries for src/template-designer.* files.

* pixmaps/ex-1layout.png
* pixmaps/ex-2layouts.png
* pixmaps/Makefile.am:
Added the new image files ex-*.png used as illustrations in the
template designer assistant.

* src/print-dialog.h:
* src/print-dialog.c: (gl_print_dialog_finalize),
(gl_print_dialog_new), (gl_print_dialog_construct),
(gl_print_dialog_force_outline_flag):
Changed first argument of gl_print_dialog_new() from glView to glLabel,
to support printing from the template designer assistant which does not
have a full-fledged view.  Nothing else from the view object was being
used by the dialog anyway.

Added the gl_print_dialog_force_outline_flag() method, for better
integration with the template designer assistant.

* src/commands.h:
* src/commands.c: (gl_cmd_file_template_designer),
(gl_cmd_file_print):
Modified print command to provide label instead of view to dialog.
Added the gl_cmd_file_template_designer() command to invoke the
template designer assistant.

* src/ui.c:
* src/glabels-ui.xml:
Added support for template designer assistant.

* src/wdgt-mini-preview.h:
* src/wdgt-mini-preview.c: (gl_wdgt_mini_preview_set_template),
(gl_wdgt_mini_preview_set_bg_color):
Preview is now centered in canvas.  Added
gl_wdgt_mini_preview_set_bg_color() to allow the template designer
assistant to match the background color with its own.

* src/print.c: (clip_to_outline):
Fixed really stupid bug when adding waste to clip region of rectangular
labels/cards.  Each side of the clip region needs to be extended by
twice the waste margin, as well as negatively offset by the waste
margin.

git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@397 f5e0f49d-192f-0410-a22d-a8d8700d0965

18 files changed:
glabels2/ChangeLog
glabels2/pixmaps/Makefile.am
glabels2/pixmaps/ex-1layout.png [new file with mode: 0644]
glabels2/pixmaps/ex-2layouts.png [new file with mode: 0644]
glabels2/po/POTFILES.in
glabels2/src/Makefile.am
glabels2/src/commands.c
glabels2/src/commands.h
glabels2/src/glabels-ui.xml
glabels2/src/print-dialog.c
glabels2/src/print-dialog.h
glabels2/src/print.c
glabels2/src/template-designer.c [new file with mode: 0644]
glabels2/src/template-designer.glade [new file with mode: 0644]
glabels2/src/template-designer.h [new file with mode: 0644]
glabels2/src/ui.c
glabels2/src/wdgt-mini-preview.c
glabels2/src/wdgt-mini-preview.h

index 612c9791d2a42d0e247232a163fa9b0c02a11e0e..2c2a6bc4e3d84c89847a761cf32e04d262a3d997 100644 (file)
@@ -1,3 +1,57 @@
+2003-12-30  Jim Evins  <evins@snaught.com>
+
+       * src/template-designer.c:
+       * src/template-designer.h:
+       * src/template-designer.glade:
+               New template designer assistant.
+       
+       * po/POTFILES.in:
+       * src/Makefile.am:
+               Added entries for src/template-designer.* files.
+       
+       * pixmaps/ex-1layout.png
+       * pixmaps/ex-2layouts.png
+       * pixmaps/Makefile.am:
+               Added the new image files ex-*.png used as illustrations in the
+               template designer assistant.
+       
+       * src/print-dialog.h:
+       * src/print-dialog.c: (gl_print_dialog_finalize),
+       (gl_print_dialog_new), (gl_print_dialog_construct),
+       (gl_print_dialog_force_outline_flag):
+               Changed first argument of gl_print_dialog_new() from glView to glLabel,
+               to support printing from the template designer assistant which does not
+               have a full-fledged view.  Nothing else from the view object was being
+               used by the dialog anyway.
+
+               Added the gl_print_dialog_force_outline_flag() method, for better
+               integration with the template designer assistant.
+               
+
+       * src/commands.h:
+       * src/commands.c: (gl_cmd_file_template_designer),
+       (gl_cmd_file_print):
+               Modified print command to provide label instead of view to dialog.
+               Added the gl_cmd_file_template_designer() command to invoke the
+               template designer assistant.
+       
+       * src/ui.c:
+       * src/glabels-ui.xml:
+               Added support for template designer assistant.
+       
+       * src/wdgt-mini-preview.h:
+       * src/wdgt-mini-preview.c: (gl_wdgt_mini_preview_set_template),
+       (gl_wdgt_mini_preview_set_bg_color):
+               Preview is now centered in canvas.  Added
+               gl_wdgt_mini_preview_set_bg_color() to allow the template designer
+               assistant to match the background color with its own.
+       
+       * src/print.c: (clip_to_outline):
+               Fixed really stupid bug when adding waste to clip region of rectangular
+               labels/cards.  Each side of the clip region needs to be extended by
+               twice the waste margin, as well as negatively offset by the waste
+               margin.
+
 2003-12-28  Jim Evins  <evins@snaught.com>
 
        * src/prefs-dialog.c: (update_object_page_from_prefs):
index dff7dc6b998147303b7ef31a7e6db8d25940adad..f337e7b42cc6c91cc9d1991a7be3ef9032d0af2c 100644 (file)
@@ -5,7 +5,9 @@ glabels_pixmapsdir = $(datadir)/pixmaps/glabels
 glabels_pixmaps_DATA = \
        glabels-icon.png        \
        glabels-logo.png        \
-       glabels-about-logo.png
+       glabels-about-logo.png  \
+       ex-1layout.png          \
+       ex-2layouts.png
 
 glabels_mime_icondir = $(datadir)/pixmaps
 
diff --git a/glabels2/pixmaps/ex-1layout.png b/glabels2/pixmaps/ex-1layout.png
new file mode 100644 (file)
index 0000000..3045c5f
Binary files /dev/null and b/glabels2/pixmaps/ex-1layout.png differ
diff --git a/glabels2/pixmaps/ex-2layouts.png b/glabels2/pixmaps/ex-2layouts.png
new file mode 100644 (file)
index 0000000..1bb5931
Binary files /dev/null and b/glabels2/pixmaps/ex-2layouts.png differ
index 9e4795a5cfb9dcbeda5ba8124084201615c8e562..fdfda28e09565c574aaf3e9a01330b0b694e6b57 100644 (file)
@@ -72,6 +72,9 @@ src/print.c
 src/print.h
 src/print-dialog.c
 src/print-dialog.h
+src/template-designer.c
+src/template-designer.h
+src/template-designer.glade
 src/bc.c
 src/bc.h
 src/bc-gnubarcode.c
index 9df6c1b04732d735f94a27490518b9264654dafa..fe27a4f02f70a51526defa6e7ac4d4da185ddbd7 100644 (file)
@@ -108,6 +108,8 @@ glabels_SOURCES =                   \
        print.h                         \
        print-dialog.c                  \
        print-dialog.h                  \
+       template-designer.c             \
+       template-designer.h             \
        bc.c                            \
        bc.h                            \
        bc-gnubarcode.c                 \
@@ -256,7 +258,8 @@ ui_DATA = \
 
 glade_DATA = \
        object-editor.glade             \
-       prefs-dialog.glade
+       prefs-dialog.glade              \
+       template-designer.glade
 
 EXTRA_DIST = \
        $(ui_DATA)                      \
index ee029948e50e92fc855d6eb1b80cd1cc0079714f..caf4d2fb58d0ac721457550585003101a8c391dd 100644 (file)
@@ -29,6 +29,7 @@
 #include "commands.h"
 #include "view.h"
 #include "file.h"
+#include "template-designer.h"
 #include "print-dialog.h"
 #include "prefs.h"
 #include "prefs-dialog.h"
@@ -70,6 +71,26 @@ gl_cmd_file_properties (BonoboUIComponent *uic,
        gl_file_properties (GL_VIEW(window->view)->label, GTK_WINDOW(window));
 }
 
+/****************************************************************************/
+/* File->Template Designer command.                                         */
+/****************************************************************************/
+void
+gl_cmd_file_template_designer (BonoboUIComponent *uic,
+                              gpointer           user_data,
+                              const gchar       *verbname)
+{
+       glWindow  *window = GL_WINDOW (user_data);
+       GtkWidget *dialog;
+
+       gl_debug (DEBUG_COMMANDS, "");
+
+       g_return_if_fail (window && GL_IS_WINDOW(window));
+
+       dialog = gl_template_designer_new (GTK_WINDOW(window));
+
+       gtk_widget_show (dialog);
+}
+
 /****************************************************************************/
 /* File->Open command.                                                      */
 /****************************************************************************/
@@ -142,7 +163,8 @@ gl_cmd_file_print (BonoboUIComponent *uic,
        } else {
 
                GL_VIEW(window->view)->print_dialog =
-                       gl_print_dialog_new (GL_VIEW(window->view), BONOBO_WINDOW(window));
+                       gl_print_dialog_new (GL_VIEW(window->view)->label,
+                                            BONOBO_WINDOW(window));
 
                gtk_widget_show (GL_VIEW(window->view)->print_dialog);
        }
index 88e450fb4ef979e995831a036baf805c2bbc27a3..1d199ca1ea71d590aab02f85c48303364651031b 100644 (file)
@@ -35,6 +35,10 @@ void gl_cmd_file_properties      (BonoboUIComponent *uic,
                                  gpointer           user_data,
                                  const gchar       *verbname);
 
+void gl_cmd_file_template_designer (BonoboUIComponent *uic,
+                                   gpointer           user_data,
+                                   const gchar       *verbname);
+
 void gl_cmd_file_open            (BonoboUIComponent *uic,
                                  gpointer           user_data,
                                  const gchar       *verbname);
index bea87739946a7f68d8c52204f3643d242faea228..0170536bc6d8d3d9e288a848fc8e082ea1630365 100644 (file)
@@ -13,7 +13,7 @@
 
                <cmd name="FileProperties"
                        _label="Properties"
-                       _tip="Create a new document"
+                       _tip="Modify document properties"
                        pixtype="stock" pixname="gtk-properties"
                />
 
                        accel="*Shift**Control*S"
                />
 
+               <cmd name="FileTemplateDesigner"
+                       _label="Template Designer"
+                       _tip="Create a custom template"
+               />
+
                <cmd name="FilePrint"
                        _label="Print"
                        _tip="Print the current file"
 
                        <menuitem name="FileProperties"
                                verb=""
-                               _label="Proper_ties"
+                               _label="Proper_ties..."
+                       />
+
+                       <menuitem name="FileTemplateDesigner"
+                               verb=""
+                               _label="Template _Designer..."
                        />
 
                        <separator />
index b87ba2189931094991eefa980ec351922adc553c..11e46d18d6e254fbab83cdaa074e7b5ead61e06e 100644 (file)
@@ -54,6 +54,8 @@ GnomePrintConfig   *gnome_printer_selector_get_config (GtkWidget *psel);
 
 struct _glPrintDialogPrivate {
 
+       glLabel   *label;
+
        GtkWidget *simple_frame;
        GtkWidget *copies;
 
@@ -83,7 +85,7 @@ static void       gl_print_dialog_init            (glPrintDialog      *dlg);
 static void       gl_print_dialog_finalize        (GObject            *object);
 
 static void       gl_print_dialog_construct       (glPrintDialog      *dialog,
-                                                  glView             *view,
+                                                  glLabel            *label,
                                                   BonoboWindow       *win);
 
 static GtkWidget *job_page_new                    (glPrintDialog      *dialog,
@@ -217,6 +219,11 @@ gl_print_dialog_finalize (GObject *object)
        g_return_if_fail (GL_IS_PRINT_DIALOG (dialog));
        g_return_if_fail (dialog->priv != NULL);
 
+       if (dialog->priv->label) {
+               g_object_unref (G_OBJECT(dialog->priv->label));
+       }
+       g_free (dialog->priv);
+
        G_OBJECT_CLASS (parent_class)->finalize (object);
 
        g_free (dialog->priv);
@@ -226,7 +233,7 @@ gl_print_dialog_finalize (GObject *object)
 /* NEW object properties dialog.                                              */
 /*****************************************************************************/
 GtkWidget *
-gl_print_dialog_new (glView       *view,
+gl_print_dialog_new (glLabel      *label,
                     BonoboWindow *win)
 {
        GtkWidget *dialog;
@@ -235,7 +242,7 @@ gl_print_dialog_new (glView       *view,
 
        dialog = GTK_WIDGET (g_object_new (GL_TYPE_PRINT_DIALOG, NULL));
 
-       gl_print_dialog_construct (GL_PRINT_DIALOG(dialog), view, win);
+       gl_print_dialog_construct (GL_PRINT_DIALOG(dialog), label, win);
 
        return dialog;
 }
@@ -245,7 +252,7 @@ gl_print_dialog_new (glView       *view,
 /*--------------------------------------------------------------------------*/
 static void
 gl_print_dialog_construct (glPrintDialog      *dialog,
-                          glView             *view,
+                          glLabel            *label,
                           BonoboWindow       *win)
 {
        GtkWidget *notebook, *page;
@@ -253,37 +260,39 @@ gl_print_dialog_construct (glPrintDialog      *dialog,
 
        gl_debug (DEBUG_PRINT, "START");
 
-       g_return_if_fail (view && GL_IS_VIEW(view));
-       g_return_if_fail (view->label && GL_IS_LABEL(view->label));
-       g_return_if_fail (win && BONOBO_IS_WINDOW(win));
+       g_return_if_fail (label && GL_IS_LABEL(label));
+
+       dialog->priv->label = GL_LABEL(g_object_ref (G_OBJECT(label)));
 
-       name = gl_label_get_short_name (view->label);
+       name = gl_label_get_short_name (label);
        title = g_strdup_printf ("%s \"%s\"", _("Print"), name);
        g_free (name);
 
        gtk_window_set_title (GTK_WINDOW(dialog), title);
-       gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(win));
-       gtk_window_set_destroy_with_parent (GTK_WINDOW(dialog), TRUE);
+       if (win) {
+               gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(win));
+               gtk_window_set_destroy_with_parent (GTK_WINDOW(dialog), TRUE);
+       }
 
        notebook = gtk_notebook_new ();
        gl_hig_dialog_add_widget (GL_HIG_DIALOG(dialog), notebook);
 
        /* ----- Create Job notebook page ----- */
-       page = job_page_new (dialog, view->label);
+       page = job_page_new (dialog, label);
        gtk_notebook_append_page (GTK_NOTEBOOK(notebook), page,
                                  gtk_label_new_with_mnemonic (_("_Job")));
 
        /* ----- Create Printer notebook page ----- */
-       page = printer_page_new (dialog, view->label);
+       page = printer_page_new (dialog, label);
        gtk_notebook_append_page (GTK_NOTEBOOK(notebook), page,
                                  gtk_label_new_with_mnemonic (_("P_rinter")));
 
        g_signal_connect (G_OBJECT(dialog), "response",
-                         G_CALLBACK (print_response_cb), view->label);
+                         G_CALLBACK (print_response_cb), label);
 
        gtk_widget_show_all (GTK_WIDGET (dialog));
 
-       merge_changed_cb (GL_LABEL(view->label), dialog);
+       merge_changed_cb (GL_LABEL(label), dialog);
 
        g_free (title);
 
@@ -591,3 +600,18 @@ print_sheets_merge (GnomePrintConfig *config,
        g_object_unref (G_OBJECT (job));
 }
 
+/*****************************************************************************/
+/* Set outline flag/checkbox.                                                */
+/*****************************************************************************/
+void
+gl_print_dialog_force_outline_flag (glPrintDialog *dialog)
+{
+       gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(dialog->priv->outline_check),
+                                     TRUE);
+
+       gtk_widget_set_sensitive (dialog->priv->outline_check, FALSE);
+       gtk_widget_set_sensitive (dialog->priv->reverse_check, FALSE);
+       gtk_widget_set_sensitive (dialog->priv->crop_marks_check, FALSE);
+}
+
+
index 7b5911d06dc8fa6b9fb9f84274cf70fe0501d925..20e17c1e80dd28cddd8f2c65e66a4d32a4dfa4bc 100644 (file)
@@ -56,10 +56,12 @@ struct  _glPrintDialogClass
 };
 
 
-GtkType    gl_print_dialog_get_type     (void) G_GNUC_CONST;
+GtkType    gl_print_dialog_get_type            (void) G_GNUC_CONST;
 
-GtkWidget *gl_print_dialog_new          (glView       *view,
-                                        BonoboWindow *win);
+GtkWidget *gl_print_dialog_new                 (glLabel       *label,
+                                               BonoboWindow  *win);
+
+void       gl_print_dialog_force_outline_flag  (glPrintDialog *dialog);
 
 G_END_DECLS
 
index f768eae7416dc281e79a1e9b61b824b81154d3b9..ea11e0d48c2ba6237e69b597760972fca667bb17 100644 (file)
@@ -1175,11 +1175,12 @@ clip_to_outline (PrintInfo *pi,
                waste = template->label.rect.waste;
                if (r == 0.0) {
                        /* simple rectangle */
-                       create_rectangle_path (pi->pc, -waste, -waste, w+waste, h+waste);
+                       create_rectangle_path (pi->pc,
+                                              -waste, -waste, w+2*waste, h+2*waste);
                } else {
                        /* rectangle with rounded corners */
                        create_rounded_rectangle_path (pi->pc, -waste, -waste,
-                                                      w+waste, h+waste, r);
+                                                      w+2*waste, h+2*waste, r);
                }
                gnome_print_clip (pi->pc);
                break;
diff --git a/glabels2/src/template-designer.c b/glabels2/src/template-designer.c
new file mode 100644 (file)
index 0000000..24baf57
--- /dev/null
@@ -0,0 +1,1619 @@
+/*
+ *  (GLABELS) Label and Business Card Creation program for GNOME
+ *
+ *  template-designer.c:  Template designer module
+ *
+ *  Copyright (C) 2003  Jim Evins <evins@snaught.com>.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  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 program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ */
+#include <config.h>
+
+#include <math.h>
+#include <libgnome/libgnome.h>
+#include <libgnomeui/libgnomeui.h>
+#include <glade/glade-xml.h>
+
+#include "template-designer.h"
+#include "prefs.h"
+#include "paper.h"
+#include "wdgt-mini-preview.h"
+#include "print-dialog.h"
+
+#include "debug.h"
+
+/*========================================================*/
+/* Private macros and constants.                          */
+/*========================================================*/
+#define ICON_PIXMAP gnome_program_locate_file (NULL,\
+                                               GNOME_FILE_DOMAIN_APP_PIXMAP,\
+                                               "glabels/glabels-icon.png",\
+                                               FALSE, NULL)
+
+#define EX_1LAYOUT_PIXMAP gnome_program_locate_file (NULL,\
+                                               GNOME_FILE_DOMAIN_APP_PIXMAP,\
+                                               "glabels/ex-1layout.png",\
+                                               FALSE, NULL)
+
+#define EX_2LAYOUTS_PIXMAP gnome_program_locate_file (NULL,\
+                                               GNOME_FILE_DOMAIN_APP_PIXMAP,\
+                                               "glabels/ex-2layouts.png",\
+                                               FALSE, NULL)
+#define CONTENTS_BG 0xF5F5F5FF
+#define DELTA 0.01
+#define MAX_PAGE_DIM_POINTS 5000.0
+
+/*========================================================*/
+/* Private types.                                         */
+/*========================================================*/
+
+struct _glTemplateDesignerPrivate
+{
+       GladeXML        *gui;
+       GtkWidget       *druid;
+
+       /* Druid pages */
+       GtkWidget       *start_page;
+       GtkWidget       *name_page;
+       GtkWidget       *pg_size_page;
+       GtkWidget       *shape_page;
+       GtkWidget       *rect_size_page;
+       GtkWidget       *round_size_page;
+       GtkWidget       *cd_size_page;
+       GtkWidget       *nlayouts_page;
+       GtkWidget       *layout_page;
+       GtkWidget       *finish_page;
+
+       /* Name page controls */
+       GtkWidget       *brand_entry;
+       GtkWidget       *part_num_entry;
+       GtkWidget       *description_entry;
+
+       /* Page size page controls */
+       GtkWidget       *pg_size_combo;
+       GtkWidget       *pg_size_entry;
+       GtkWidget       *pg_w_spin;
+       GtkWidget       *pg_h_spin;
+       GtkWidget       *pg_w_units_label;
+       GtkWidget       *pg_h_units_label;
+
+       /* Shape page controls */
+       GtkWidget       *shape_rect_radio;
+       GtkWidget       *shape_round_radio;
+       GtkWidget       *shape_cd_radio;
+
+       /* Label size (rectangular) page controls */
+       GtkWidget       *rect_w_spin;
+       GtkWidget       *rect_h_spin;
+       GtkWidget       *rect_r_spin;
+       GtkWidget       *rect_waste_spin;
+       GtkWidget       *rect_w_units_label;
+       GtkWidget       *rect_h_units_label;
+       GtkWidget       *rect_r_units_label;
+       GtkWidget       *rect_waste_units_label;
+
+       /* Label size (round) page controls */
+       GtkWidget       *round_r_spin;
+       GtkWidget       *round_waste_spin;
+       GtkWidget       *round_r_units_label;
+       GtkWidget       *round_waste_units_label;
+
+       /* Label size (cd) page controls */
+       GtkWidget       *cd_radius_spin;
+       GtkWidget       *cd_hole_spin;
+       GtkWidget       *cd_w_spin;
+       GtkWidget       *cd_h_spin;
+       GtkWidget       *cd_waste_spin;
+       GtkWidget       *cd_radius_units_label;
+       GtkWidget       *cd_hole_units_label;
+       GtkWidget       *cd_w_units_label;
+       GtkWidget       *cd_h_units_label;
+       GtkWidget       *cd_waste_units_label;
+
+       /* Number of layouts controls */
+       GtkWidget       *nlayouts_image1;
+       GtkWidget       *nlayouts_image2;
+       GtkWidget       *nlayouts_spin;
+
+       /* Layout page controls */
+       GtkWidget       *layout1_head_label;
+       GtkWidget       *layout1_nx_spin;
+       GtkWidget       *layout1_ny_spin;
+       GtkWidget       *layout1_x0_spin;
+       GtkWidget       *layout1_y0_spin;
+       GtkWidget       *layout1_dx_spin;
+       GtkWidget       *layout1_dy_spin;
+       GtkWidget       *layout2_head_label;
+       GtkWidget       *layout2_nx_spin;
+       GtkWidget       *layout2_ny_spin;
+       GtkWidget       *layout2_x0_spin;
+       GtkWidget       *layout2_y0_spin;
+       GtkWidget       *layout2_dx_spin;
+       GtkWidget       *layout2_dy_spin;
+       GtkWidget       *layout_x0_units_label;
+       GtkWidget       *layout_y0_units_label;
+       GtkWidget       *layout_dx_units_label;
+       GtkWidget       *layout_dy_units_label;
+       GtkWidget       *layout_mini_preview;
+       GtkWidget       *layout_test_button;
+
+       /* Units related stuff */
+       const gchar     *units_string;
+       gdouble          units_per_point;
+       gdouble          climb_rate;
+       gint             digits;
+
+};
+
+/*========================================================*/
+/* Private globals.                                       */
+/*========================================================*/
+
+static GtkWindowClass* parent_class = NULL;
+
+/*========================================================*/
+/* Private function prototypes.                           */
+/*========================================================*/
+
+static void gl_template_designer_class_init      (glTemplateDesignerClass *klass);
+static void gl_template_designer_init            (glTemplateDesigner      *dlg);
+static void gl_template_designer_finalize        (GObject                 *object);
+static void gl_template_designer_construct        (glTemplateDesigner      *dlg);
+
+static void     construct_start_page              (glTemplateDesigner      *dlg,
+                                                  GdkPixbuf               *logo);
+
+static void     construct_name_page               (glTemplateDesigner      *dlg,
+                                                  GdkPixbuf               *logo);
+
+static void     construct_pg_size_page            (glTemplateDesigner      *dlg,
+                                                  GdkPixbuf               *logo);
+
+static void     construct_shape_page              (glTemplateDesigner      *dlg,
+                                                  GdkPixbuf               *logo);
+
+static void     construct_rect_size_page          (glTemplateDesigner      *dlg,
+                                                  GdkPixbuf               *logo);
+
+static void     construct_round_size_page         (glTemplateDesigner      *dlg,
+                                                  GdkPixbuf               *logo);
+
+static void     construct_cd_size_page            (glTemplateDesigner      *dlg,
+                                                  GdkPixbuf               *logo);
+
+static void     construct_nlayouts_page           (glTemplateDesigner      *dlg,
+                                                  GdkPixbuf               *logo);
+
+static void     construct_layout_page             (glTemplateDesigner      *dlg,
+                                                  GdkPixbuf               *logo);
+
+static void     construct_finish_page             (glTemplateDesigner      *dlg,
+                                                  GdkPixbuf               *logo);
+
+static void     construct_edge_page_boilerplate   (glTemplateDesigner      *dlg,
+                                                  GnomeDruidPageEdge      *page,
+                                                  GdkPixbuf               *logo);
+
+static void     construct_page_boilerplate        (glTemplateDesigner      *dlg,
+                                                  GnomeDruidPageStandard  *page,
+                                                  GdkPixbuf               *logo);
+
+static void     cancel_cb                         (glTemplateDesigner      *dlg);
+
+static void     name_page_changed_cb              (glTemplateDesigner      *dlg);
+
+static void     pg_size_page_changed_cb           (glTemplateDesigner      *dlg);
+
+static void     rect_size_page_prepare_cb         (glTemplateDesigner      *dlg);
+
+static void     round_size_page_prepare_cb        (glTemplateDesigner      *dlg);
+
+static void     cd_size_page_prepare_cb           (glTemplateDesigner      *dlg);
+
+static void     layout_page_prepare_cb            (glTemplateDesigner      *dlg);
+
+static void     layout_page_changed_cb            (glTemplateDesigner      *dlg);
+
+static void     print_test_cb                     (glTemplateDesigner      *dlg);
+
+static glTemplate *build_template                 (glTemplateDesigner      *dlg);
+
+static gboolean next_cb                           (GnomeDruidPage          *druidpage,
+                                                  GtkWidget               *widget,
+                                                  glTemplateDesigner      *dlg);
+
+static gboolean back_cb                           (GnomeDruidPage          *druidpage,
+                                                  GtkWidget               *widget,
+                                                  glTemplateDesigner      *dlg);
+
+static void finish_cb                             (glTemplateDesigner      *dlg);
+
+\f
+/*****************************************************************************/
+/* Boilerplate object stuff.                                                 */
+/*****************************************************************************/
+GType
+gl_template_designer_get_type (void)
+{
+       static GType dialog_type = 0;
+
+       if (!dialog_type)
+       {
+               static const GTypeInfo dialog_info =
+               {
+                       sizeof (glTemplateDesignerClass),
+                       NULL,           /* base_init */
+                       NULL,           /* base_finalize */
+                       (GClassInitFunc) gl_template_designer_class_init,
+                       NULL,           /* class_finalize */
+                       NULL,           /* class_data */
+                       sizeof (glTemplateDesigner),
+                       0,              /* n_preallocs */
+                       (GInstanceInitFunc) gl_template_designer_init
+               };
+
+               dialog_type = g_type_register_static (GTK_TYPE_WINDOW,
+                                                     "glTemplateDesigner",
+                                                     &dialog_info, 
+                                                     0);
+       }
+
+       return dialog_type;
+}
+
+static void
+gl_template_designer_class_init (glTemplateDesignerClass *klass)
+{
+       GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+       gl_debug (DEBUG_TEMPLATE, "");
+       
+       parent_class = g_type_class_peek_parent (klass);
+
+       object_class->finalize = gl_template_designer_finalize;         
+}
+
+static void
+gl_template_designer_init (glTemplateDesigner *dlg)
+{
+       gl_debug (DEBUG_TEMPLATE, "START");
+
+       dlg->priv = g_new0 (glTemplateDesignerPrivate, 1);
+
+       dlg->priv->gui = glade_xml_new (GLABELS_GLADE_DIR "template-designer.glade",
+                                       "druid",
+                                       NULL);
+
+       if (!dlg->priv->gui) {
+               g_warning ("Could not open template-designer.glade, reinstall glabels!");
+               return;
+       }
+
+       gl_debug (DEBUG_TEMPLATE, "END");
+}
+
+static void 
+gl_template_designer_finalize (GObject *object)
+{
+       glTemplateDesigner* dlg;
+       
+       gl_debug (DEBUG_TEMPLATE, "START");
+
+       g_return_if_fail (object != NULL);
+       
+       dlg = GL_TEMPLATE_DESIGNER (object);
+
+       g_return_if_fail (GL_IS_TEMPLATE_DESIGNER (dlg));
+       g_return_if_fail (dlg->priv != NULL);
+
+       G_OBJECT_CLASS (parent_class)->finalize (object);
+
+       g_free (dlg->priv);
+
+       gl_debug (DEBUG_TEMPLATE, "END");
+}
+
+/*****************************************************************************/
+/* NEW preferences dialog.                                                   */
+/*****************************************************************************/
+GtkWidget*
+gl_template_designer_new (GtkWindow *parent)
+{
+       GtkWidget *dlg;
+
+       gl_debug (DEBUG_TEMPLATE, "START");
+
+       dlg = GTK_WIDGET (g_object_new (GL_TYPE_TEMPLATE_DESIGNER, NULL));
+
+       if (parent)
+               gtk_window_set_transient_for (GTK_WINDOW (dlg), parent);
+       
+       gl_template_designer_construct (GL_TEMPLATE_DESIGNER(dlg));
+
+
+       gl_debug (DEBUG_TEMPLATE, "END");
+
+       return dlg;
+}
+
+/*---------------------------------------------------------------------------*/
+/* PRIVATE.  Construct composite widget.                                     */
+/*---------------------------------------------------------------------------*/
+static void
+gl_template_designer_construct (glTemplateDesigner *dlg)
+{
+       GdkPixbuf  *logo;
+
+       g_return_if_fail (dlg && GL_IS_TEMPLATE_DESIGNER (dlg));
+       g_return_if_fail (dlg->priv != NULL);
+
+       /* Initialize units stuff from prefs */
+       dlg->priv->units_string    = gl_prefs_get_units_string ();
+        dlg->priv->units_per_point = gl_prefs_get_units_per_point ();
+        dlg->priv->climb_rate      = gl_prefs_get_units_step_size ();
+        dlg->priv->digits          = gl_prefs_get_units_precision ();
+
+       gtk_window_set_title (GTK_WINDOW(dlg), _("gLabels Template Designer"));
+
+       logo = gdk_pixbuf_new_from_file (ICON_PIXMAP, NULL);
+
+       dlg->priv->druid = glade_xml_get_widget (dlg->priv->gui, "druid");
+       gtk_container_add (GTK_CONTAINER(dlg), dlg->priv->druid);
+
+       construct_start_page (dlg, logo);
+       construct_name_page (dlg, logo);
+       construct_pg_size_page (dlg, logo);
+       construct_shape_page (dlg, logo);
+       construct_rect_size_page (dlg, logo);
+       construct_round_size_page (dlg, logo);
+       construct_cd_size_page (dlg, logo);
+       construct_nlayouts_page (dlg, logo);
+       construct_layout_page (dlg, logo);
+       construct_finish_page (dlg, logo);
+
+       /* Cancel button */
+       g_signal_connect_swapped (G_OBJECT(dlg->priv->druid), "cancel",
+                                 G_CALLBACK(cancel_cb), dlg);
+
+        gtk_widget_show_all (GTK_WIDGET(dlg));   
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Construct start page.                                          */
+/*--------------------------------------------------------------------------*/
+static void
+construct_start_page (glTemplateDesigner      *dlg,
+                     GdkPixbuf               *logo)
+{
+       dlg->priv->start_page =
+               glade_xml_get_widget (dlg->priv->gui, "start_page");
+
+       construct_edge_page_boilerplate (dlg,
+                                        GNOME_DRUID_PAGE_EDGE(dlg->priv->start_page),
+                                        logo);
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Construct name page.                                           */
+/*--------------------------------------------------------------------------*/
+static void
+construct_name_page (glTemplateDesigner      *dlg,
+                    GdkPixbuf               *logo)
+{
+       dlg->priv->name_page =
+               glade_xml_get_widget (dlg->priv->gui, "name_page");
+
+       /* Name Page Widgets */
+       dlg->priv->brand_entry =
+               glade_xml_get_widget (dlg->priv->gui, "brand_entry");
+       dlg->priv->part_num_entry =
+               glade_xml_get_widget (dlg->priv->gui, "part_num_entry");
+       dlg->priv->description_entry =
+               glade_xml_get_widget (dlg->priv->gui, "description_entry");
+
+       /* Connect a handler that listens for changes in these widgets */
+       /* This controls whether we can progress to the next page. */
+       g_signal_connect_swapped (G_OBJECT(dlg->priv->brand_entry), "changed",
+                                 G_CALLBACK(name_page_changed_cb), dlg);
+       g_signal_connect_swapped (G_OBJECT(dlg->priv->part_num_entry), "changed",
+                                 G_CALLBACK(name_page_changed_cb), dlg);
+       g_signal_connect_swapped (G_OBJECT(dlg->priv->description_entry), "changed",
+                                 G_CALLBACK(name_page_changed_cb), dlg);
+
+       /* Use this same handler to prepare the page. */
+       g_signal_connect_data (G_OBJECT(dlg->priv->name_page), "prepare",
+                              G_CALLBACK(name_page_changed_cb), dlg,
+                              NULL, (G_CONNECT_AFTER|G_CONNECT_SWAPPED));
+
+       construct_page_boilerplate (dlg,
+                                   GNOME_DRUID_PAGE_STANDARD(dlg->priv->name_page),
+                                   logo);
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE. Construct page size page.                                       */
+/*--------------------------------------------------------------------------*/
+static void
+construct_pg_size_page (glTemplateDesigner      *dlg,
+                       GdkPixbuf               *logo)
+{
+       GList *page_sizes;
+       const gchar *default_page_size_id;
+       gchar       *default_page_size_name;
+
+       dlg->priv->pg_size_page =
+               glade_xml_get_widget (dlg->priv->gui, "pg_size_page");
+
+       /* Page Size Page Widgets */
+       dlg->priv->pg_size_combo =
+               glade_xml_get_widget (dlg->priv->gui, "pg_size_combo");
+       dlg->priv->pg_size_entry =
+               glade_xml_get_widget (dlg->priv->gui, "pg_size_entry");
+       dlg->priv->pg_w_spin =
+               glade_xml_get_widget (dlg->priv->gui, "pg_w_spin");
+       dlg->priv->pg_h_spin =
+               glade_xml_get_widget (dlg->priv->gui, "pg_h_spin");
+       dlg->priv->pg_w_units_label =
+               glade_xml_get_widget (dlg->priv->gui, "pg_w_units_label");
+       dlg->priv->pg_h_units_label =
+               glade_xml_get_widget (dlg->priv->gui, "pg_h_units_label");
+
+       /* Load page size combo */
+       page_sizes = gl_paper_get_name_list ();
+       gtk_combo_set_popdown_strings (GTK_COMBO(dlg->priv->pg_size_combo), page_sizes);
+       gl_paper_free_name_list (&page_sizes);
+       default_page_size_id = gl_prefs_get_page_size ();
+       default_page_size_name = gl_paper_lookup_name_from_id (default_page_size_id);
+       gtk_entry_set_text (GTK_ENTRY(dlg->priv->pg_size_entry), default_page_size_name);
+       g_free (default_page_size_name);
+
+       /* Apply units to spinbuttons and units labels. */
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->pg_w_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->pg_w_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_label_set_text (GTK_LABEL(dlg->priv->pg_w_units_label),
+                           dlg->priv->units_string);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->pg_w_spin),
+                                   0.0, MAX_PAGE_DIM_POINTS*dlg->priv->units_per_point);
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->pg_h_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->pg_h_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_label_set_text (GTK_LABEL(dlg->priv->pg_h_units_label),
+                           dlg->priv->units_string);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->pg_h_spin),
+                                   0.0, MAX_PAGE_DIM_POINTS*dlg->priv->units_per_point);
+
+       /* Connect a handler that listens for changes in these widgets */
+       /* This controls sensitivity of related widgets. */
+       g_signal_connect_swapped (G_OBJECT(dlg->priv->pg_size_entry), "changed",
+                                 G_CALLBACK(pg_size_page_changed_cb), dlg);
+
+       /* Use this same handler to prepare the page. */
+       g_signal_connect_data (G_OBJECT(dlg->priv->pg_size_page), "prepare",
+                              G_CALLBACK(pg_size_page_changed_cb), dlg,
+                              NULL, (G_CONNECT_AFTER|G_CONNECT_SWAPPED));
+
+       construct_page_boilerplate (dlg,
+                                   GNOME_DRUID_PAGE_STANDARD(dlg->priv->pg_size_page),
+                                   logo);
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Construct shape page.                                          */
+/*--------------------------------------------------------------------------*/
+static void
+construct_shape_page (glTemplateDesigner      *dlg,
+                     GdkPixbuf               *logo)
+{
+       dlg->priv->shape_page =
+               glade_xml_get_widget (dlg->priv->gui, "shape_page");
+
+       /* Shape Page Widgets */
+       dlg->priv->shape_rect_radio =
+               glade_xml_get_widget (dlg->priv->gui, "shape_rect_radio");
+       dlg->priv->shape_round_radio =
+               glade_xml_get_widget (dlg->priv->gui, "shape_round_radio");
+       dlg->priv->shape_cd_radio =
+               glade_xml_get_widget (dlg->priv->gui, "shape_cd_radio");
+
+       construct_page_boilerplate (dlg,
+                                   GNOME_DRUID_PAGE_STANDARD(dlg->priv->shape_page),
+                                   logo);
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Construct rect size page.                                      */
+/*--------------------------------------------------------------------------*/
+static void
+construct_rect_size_page (glTemplateDesigner      *dlg,
+                         GdkPixbuf               *logo)
+{
+       dlg->priv->rect_size_page =
+               glade_xml_get_widget (dlg->priv->gui, "rect_size_page");
+
+       /* Rect Size Page Widgets */
+       dlg->priv->rect_w_spin =
+               glade_xml_get_widget (dlg->priv->gui, "rect_w_spin");
+       dlg->priv->rect_h_spin =
+               glade_xml_get_widget (dlg->priv->gui, "rect_h_spin");
+       dlg->priv->rect_r_spin =
+               glade_xml_get_widget (dlg->priv->gui, "rect_r_spin");
+       dlg->priv->rect_waste_spin =
+               glade_xml_get_widget (dlg->priv->gui, "rect_waste_spin");
+       dlg->priv->rect_w_units_label =
+               glade_xml_get_widget (dlg->priv->gui, "rect_w_units_label");
+       dlg->priv->rect_h_units_label =
+               glade_xml_get_widget (dlg->priv->gui, "rect_h_units_label");
+       dlg->priv->rect_r_units_label =
+               glade_xml_get_widget (dlg->priv->gui, "rect_r_units_label");
+       dlg->priv->rect_waste_units_label =
+               glade_xml_get_widget (dlg->priv->gui, "rect_waste_units_label");
+
+       /* Apply units to spinbuttons and units labels. */
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->rect_w_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->rect_w_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_label_set_text (GTK_LABEL(dlg->priv->rect_w_units_label),
+                           dlg->priv->units_string);
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->rect_h_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->rect_h_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_label_set_text (GTK_LABEL(dlg->priv->rect_h_units_label),
+                           dlg->priv->units_string);
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->rect_r_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->rect_r_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_label_set_text (GTK_LABEL(dlg->priv->rect_r_units_label),
+                           dlg->priv->units_string);
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->rect_waste_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->rect_waste_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_label_set_text (GTK_LABEL(dlg->priv->rect_waste_units_label),
+                           dlg->priv->units_string);
+
+       /* Handler to prepare the page. */
+       g_signal_connect_data (G_OBJECT(dlg->priv->rect_size_page), "prepare",
+                              G_CALLBACK(rect_size_page_prepare_cb), dlg,
+                              NULL, (G_CONNECT_AFTER|G_CONNECT_SWAPPED));
+
+       construct_page_boilerplate (dlg,
+                                   GNOME_DRUID_PAGE_STANDARD(dlg->priv->rect_size_page),
+                                   logo);
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Construct round size page.                                     */
+/*--------------------------------------------------------------------------*/
+static void
+construct_round_size_page (glTemplateDesigner      *dlg,
+                          GdkPixbuf               *logo)
+{
+       dlg->priv->round_size_page =
+               glade_xml_get_widget (dlg->priv->gui, "round_size_page");
+
+       /* Round Size Page Widgets */
+       dlg->priv->round_r_spin =
+               glade_xml_get_widget (dlg->priv->gui, "round_r_spin");
+       dlg->priv->round_waste_spin =
+               glade_xml_get_widget (dlg->priv->gui, "round_waste_spin");
+       dlg->priv->round_r_units_label =
+               glade_xml_get_widget (dlg->priv->gui, "round_r_units_label");
+       dlg->priv->round_waste_units_label =
+               glade_xml_get_widget (dlg->priv->gui, "round_waste_units_label");
+
+       /* Apply units to spinbuttons and units labels. */
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->round_r_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->round_r_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_label_set_text (GTK_LABEL(dlg->priv->round_r_units_label),
+                           dlg->priv->units_string);
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->round_waste_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->round_waste_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_label_set_text (GTK_LABEL(dlg->priv->round_waste_units_label),
+                           dlg->priv->units_string);
+
+       /* Handler to prepare the page. */
+       g_signal_connect_data (G_OBJECT(dlg->priv->round_size_page), "prepare",
+                              G_CALLBACK(round_size_page_prepare_cb), dlg,
+                              NULL, (G_CONNECT_AFTER|G_CONNECT_SWAPPED));
+
+       construct_page_boilerplate (dlg,
+                                   GNOME_DRUID_PAGE_STANDARD(dlg->priv->round_size_page),
+                                   logo);
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Construct CD/DVD size page.                                    */
+/*--------------------------------------------------------------------------*/
+static void
+construct_cd_size_page (glTemplateDesigner      *dlg,
+                       GdkPixbuf               *logo)
+{
+       dlg->priv->cd_size_page =
+               glade_xml_get_widget (dlg->priv->gui, "cd_size_page");
+
+       /* Cd Size Page Widgets */
+       dlg->priv->cd_radius_spin =
+               glade_xml_get_widget (dlg->priv->gui, "cd_radius_spin");
+       dlg->priv->cd_hole_spin =
+               glade_xml_get_widget (dlg->priv->gui, "cd_hole_spin");
+       dlg->priv->cd_w_spin =
+               glade_xml_get_widget (dlg->priv->gui, "cd_w_spin");
+       dlg->priv->cd_h_spin =
+               glade_xml_get_widget (dlg->priv->gui, "cd_h_spin");
+       dlg->priv->cd_waste_spin =
+               glade_xml_get_widget (dlg->priv->gui, "cd_waste_spin");
+       dlg->priv->cd_radius_units_label =
+               glade_xml_get_widget (dlg->priv->gui, "cd_radius_units_label");
+       dlg->priv->cd_hole_units_label =
+               glade_xml_get_widget (dlg->priv->gui, "cd_hole_units_label");
+       dlg->priv->cd_w_units_label =
+               glade_xml_get_widget (dlg->priv->gui, "cd_w_units_label");
+       dlg->priv->cd_h_units_label =
+               glade_xml_get_widget (dlg->priv->gui, "cd_h_units_label");
+       dlg->priv->cd_waste_units_label =
+               glade_xml_get_widget (dlg->priv->gui, "cd_waste_units_label");
+
+       /* Apply units to spinbuttons and units labels. */
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->cd_radius_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->cd_radius_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_label_set_text (GTK_LABEL(dlg->priv->cd_radius_units_label),
+                           dlg->priv->units_string);
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->cd_hole_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->cd_hole_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_label_set_text (GTK_LABEL(dlg->priv->cd_hole_units_label),
+                           dlg->priv->units_string);
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->cd_w_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->cd_w_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_label_set_text (GTK_LABEL(dlg->priv->cd_w_units_label),
+                           dlg->priv->units_string);
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->cd_h_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->cd_h_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_label_set_text (GTK_LABEL(dlg->priv->cd_h_units_label),
+                           dlg->priv->units_string);
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->cd_waste_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->cd_waste_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_label_set_text (GTK_LABEL(dlg->priv->cd_waste_units_label),
+                           dlg->priv->units_string);
+
+       /* Handler to prepare the page. */
+       g_signal_connect_data (G_OBJECT(dlg->priv->cd_size_page), "prepare",
+                              G_CALLBACK(cd_size_page_prepare_cb), dlg,
+                              NULL, (G_CONNECT_AFTER|G_CONNECT_SWAPPED));
+
+       construct_page_boilerplate (dlg,
+                                   GNOME_DRUID_PAGE_STANDARD(dlg->priv->cd_size_page),
+                                   logo);
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Construct number of layouts page.                              */
+/*--------------------------------------------------------------------------*/
+static void
+construct_nlayouts_page (glTemplateDesigner      *dlg,
+                        GdkPixbuf               *logo)
+{
+       GdkPixbuf *pixbuf;
+
+       dlg->priv->nlayouts_page =
+               glade_xml_get_widget (dlg->priv->gui, "nlayouts_page");
+
+       /* Widgets */
+       dlg->priv->nlayouts_image1 =
+               glade_xml_get_widget (dlg->priv->gui, "nlayouts_image1");
+       dlg->priv->nlayouts_image2 =
+               glade_xml_get_widget (dlg->priv->gui, "nlayouts_image2");
+       dlg->priv->nlayouts_spin =
+               glade_xml_get_widget (dlg->priv->gui, "nlayouts_spin");
+
+       /* Initialize illustrations. */
+       pixbuf = gdk_pixbuf_new_from_file (EX_1LAYOUT_PIXMAP, NULL);
+       gtk_image_set_from_pixbuf (GTK_IMAGE(dlg->priv->nlayouts_image1), pixbuf);
+       pixbuf = gdk_pixbuf_new_from_file (EX_2LAYOUTS_PIXMAP, NULL);
+       gtk_image_set_from_pixbuf (GTK_IMAGE(dlg->priv->nlayouts_image2), pixbuf);
+
+       construct_page_boilerplate (dlg,
+                                   GNOME_DRUID_PAGE_STANDARD(dlg->priv->nlayouts_page),
+                                   logo);
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Construct layout page.                                         */
+/*--------------------------------------------------------------------------*/
+static void
+construct_layout_page (glTemplateDesigner      *dlg,
+                      GdkPixbuf               *logo)
+{
+       dlg->priv->layout_page =
+               glade_xml_get_widget (dlg->priv->gui, "layout_page");
+
+       /* Page Size Page Widgets */
+       dlg->priv->layout1_head_label =
+               glade_xml_get_widget (dlg->priv->gui, "layout1_head_label");
+       dlg->priv->layout1_nx_spin =
+               glade_xml_get_widget (dlg->priv->gui, "layout1_nx_spin");
+       dlg->priv->layout1_ny_spin =
+               glade_xml_get_widget (dlg->priv->gui, "layout1_ny_spin");
+       dlg->priv->layout1_x0_spin =
+               glade_xml_get_widget (dlg->priv->gui, "layout1_x0_spin");
+       dlg->priv->layout1_y0_spin =
+               glade_xml_get_widget (dlg->priv->gui, "layout1_y0_spin");
+       dlg->priv->layout1_dx_spin =
+               glade_xml_get_widget (dlg->priv->gui, "layout1_dx_spin");
+       dlg->priv->layout1_dy_spin =
+               glade_xml_get_widget (dlg->priv->gui, "layout1_dy_spin");
+       dlg->priv->layout2_head_label =
+               glade_xml_get_widget (dlg->priv->gui, "layout2_head_label");
+       dlg->priv->layout2_nx_spin =
+               glade_xml_get_widget (dlg->priv->gui, "layout2_nx_spin");
+       dlg->priv->layout2_ny_spin =
+               glade_xml_get_widget (dlg->priv->gui, "layout2_ny_spin");
+       dlg->priv->layout2_x0_spin =
+               glade_xml_get_widget (dlg->priv->gui, "layout2_x0_spin");
+       dlg->priv->layout2_y0_spin =
+               glade_xml_get_widget (dlg->priv->gui, "layout2_y0_spin");
+       dlg->priv->layout2_dx_spin =
+               glade_xml_get_widget (dlg->priv->gui, "layout2_dx_spin");
+       dlg->priv->layout2_dy_spin =
+               glade_xml_get_widget (dlg->priv->gui, "layout2_dy_spin");
+       dlg->priv->layout_x0_units_label =
+               glade_xml_get_widget (dlg->priv->gui, "layout_x0_units_label");
+       dlg->priv->layout_y0_units_label =
+               glade_xml_get_widget (dlg->priv->gui, "layout_y0_units_label");
+       dlg->priv->layout_dx_units_label =
+               glade_xml_get_widget (dlg->priv->gui, "layout_dx_units_label");
+       dlg->priv->layout_dy_units_label =
+               glade_xml_get_widget (dlg->priv->gui, "layout_dy_units_label");
+       dlg->priv->layout_mini_preview =
+               glade_xml_get_widget (dlg->priv->gui, "layout_mini_preview");
+       dlg->priv->layout_test_button =
+               glade_xml_get_widget (dlg->priv->gui, "layout_test_button");
+
+       /* Apply units to spinbuttons and units labels. */
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->layout1_x0_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->layout1_x0_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->layout2_x0_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->layout2_x0_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_label_set_text (GTK_LABEL(dlg->priv->layout_x0_units_label),
+                           dlg->priv->units_string);
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->layout1_y0_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->layout1_y0_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->layout2_y0_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->layout2_y0_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_label_set_text (GTK_LABEL(dlg->priv->layout_y0_units_label),
+                           dlg->priv->units_string);
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->layout1_dx_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->layout1_dx_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->layout2_dx_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->layout2_dx_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_label_set_text (GTK_LABEL(dlg->priv->layout_dx_units_label),
+                           dlg->priv->units_string);
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->layout1_dy_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->layout1_dy_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dlg->priv->layout2_dy_spin),
+                                   dlg->priv->digits);
+        gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dlg->priv->layout2_dy_spin),
+                                        dlg->priv->climb_rate, 10.0*dlg->priv->climb_rate);
+        gtk_label_set_text (GTK_LABEL(dlg->priv->layout_dy_units_label),
+                           dlg->priv->units_string);
+
+       /* Adjust preview */
+       gl_wdgt_mini_preview_set_bg_color (GL_WDGT_MINI_PREVIEW(dlg->priv->layout_mini_preview),
+                                          CONTENTS_BG);
+
+       /* Connect a handler that listens for changes in these widgets */
+       /* This controls sensitivity of related widgets. */
+       g_signal_connect_swapped (G_OBJECT(dlg->priv->layout1_nx_spin), "changed",
+                                 G_CALLBACK(layout_page_changed_cb), dlg);
+       g_signal_connect_swapped (G_OBJECT(dlg->priv->layout1_ny_spin), "changed",
+                                 G_CALLBACK(layout_page_changed_cb), dlg);
+       g_signal_connect_swapped (G_OBJECT(dlg->priv->layout1_x0_spin), "changed",
+                                 G_CALLBACK(layout_page_changed_cb), dlg);
+       g_signal_connect_swapped (G_OBJECT(dlg->priv->layout1_y0_spin), "changed",
+                                 G_CALLBACK(layout_page_changed_cb), dlg);
+       g_signal_connect_swapped (G_OBJECT(dlg->priv->layout1_dx_spin), "changed",
+                                 G_CALLBACK(layout_page_changed_cb), dlg);
+       g_signal_connect_swapped (G_OBJECT(dlg->priv->layout1_dy_spin), "changed",
+                                 G_CALLBACK(layout_page_changed_cb), dlg);
+       g_signal_connect_swapped (G_OBJECT(dlg->priv->layout2_nx_spin), "changed",
+                                 G_CALLBACK(layout_page_changed_cb), dlg);
+       g_signal_connect_swapped (G_OBJECT(dlg->priv->layout2_ny_spin), "changed",
+                                 G_CALLBACK(layout_page_changed_cb), dlg);
+       g_signal_connect_swapped (G_OBJECT(dlg->priv->layout2_x0_spin), "changed",
+                                 G_CALLBACK(layout_page_changed_cb), dlg);
+       g_signal_connect_swapped (G_OBJECT(dlg->priv->layout2_y0_spin), "changed",
+                                 G_CALLBACK(layout_page_changed_cb), dlg);
+       g_signal_connect_swapped (G_OBJECT(dlg->priv->layout2_dx_spin), "changed",
+                                 G_CALLBACK(layout_page_changed_cb), dlg);
+       g_signal_connect_swapped (G_OBJECT(dlg->priv->layout2_dy_spin), "changed",
+                                 G_CALLBACK(layout_page_changed_cb), dlg);
+
+
+       /* Print button */
+       g_signal_connect_swapped (G_OBJECT(dlg->priv->layout_test_button), "clicked",
+                                 G_CALLBACK(print_test_cb), dlg);
+
+       /* Handler to prepare the page. */
+       g_signal_connect_data (G_OBJECT(dlg->priv->layout_page), "prepare",
+                              G_CALLBACK(layout_page_prepare_cb), dlg,
+                              NULL, (G_CONNECT_AFTER|G_CONNECT_SWAPPED));
+
+       construct_page_boilerplate (dlg,
+                                   GNOME_DRUID_PAGE_STANDARD(dlg->priv->layout_page),
+                                   logo);
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Construct finish page.                                         */
+/*--------------------------------------------------------------------------*/
+static void
+construct_finish_page (glTemplateDesigner      *dlg,
+                      GdkPixbuf               *logo)
+{
+
+       dlg->priv->finish_page =
+               glade_xml_get_widget (dlg->priv->gui, "finish_page");
+
+       /* Accept button */
+       g_signal_connect_swapped (G_OBJECT(dlg->priv->finish_page), "finish",
+                                 G_CALLBACK(finish_cb), dlg);
+
+       construct_edge_page_boilerplate (dlg,
+                                        GNOME_DRUID_PAGE_EDGE(dlg->priv->start_page),
+                                        logo);
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Common construction tasks for start and finish page.           */
+/*--------------------------------------------------------------------------*/
+static void
+construct_edge_page_boilerplate (glTemplateDesigner      *dlg,
+                                GnomeDruidPageEdge      *page,
+                                GdkPixbuf               *logo)
+{
+       gnome_druid_page_edge_set_logo (page, logo);
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Common construction tasks for all other pages.                 */
+/*--------------------------------------------------------------------------*/
+static void
+construct_page_boilerplate (glTemplateDesigner      *dlg,
+                           GnomeDruidPageStandard  *page,
+                           GdkPixbuf               *logo)
+{
+       gnome_druid_page_standard_set_logo (page, logo);
+
+       g_signal_connect (G_OBJECT(page), "next", G_CALLBACK(next_cb), dlg);
+       g_signal_connect (G_OBJECT(page), "back", G_CALLBACK(back_cb), dlg);
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Cancel druid.                                                  */
+/*--------------------------------------------------------------------------*/
+static void
+cancel_cb (glTemplateDesigner *dlg)
+{
+                                                                               
+       gtk_widget_destroy (GTK_WIDGET(dlg));
+
+}
+                         
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Widget on name page "changed" callback.                        */
+/*--------------------------------------------------------------------------*/
+static void
+name_page_changed_cb (glTemplateDesigner *dlg)
+{
+       gchar *brand, *part_num, *desc;
+
+       brand    = gtk_editable_get_chars (GTK_EDITABLE(dlg->priv->brand_entry), 0, -1);
+       part_num = gtk_editable_get_chars (GTK_EDITABLE(dlg->priv->part_num_entry), 0, -1);
+       desc     = gtk_editable_get_chars (GTK_EDITABLE(dlg->priv->description_entry), 0, -1);
+
+       if (brand && brand[0] && part_num && part_num[0] && desc && desc[0]) {
+
+               gnome_druid_set_buttons_sensitive (GNOME_DRUID(dlg->priv->druid),
+                                                  TRUE, TRUE, TRUE, FALSE);
+
+       } else {
+
+               gnome_druid_set_buttons_sensitive (GNOME_DRUID(dlg->priv->druid),
+                                                  TRUE, FALSE, TRUE, FALSE);
+
+       }
+
+       g_free (brand);
+       g_free (part_num);
+       g_free (desc);
+
+}
+                                                                               
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Widget on page size page "changed" callback.                   */
+/*--------------------------------------------------------------------------*/
+static void
+pg_size_page_changed_cb (glTemplateDesigner *dlg)
+{
+       gchar   *page_size_name;
+       glPaper *paper;
+       
+
+       page_size_name =
+               gtk_editable_get_chars (GTK_EDITABLE(dlg->priv->pg_size_entry), 0, -1);
+
+       if (page_size_name && strlen(page_size_name)) {
+
+               paper = gl_paper_from_name (page_size_name);
+       
+
+               if ( g_strcasecmp (paper->id, "Other") == 0 ) {
+                       gtk_widget_set_sensitive (GTK_WIDGET(dlg->priv->pg_w_spin), TRUE);
+                       gtk_widget_set_sensitive (GTK_WIDGET(dlg->priv->pg_h_spin), TRUE);
+                       gtk_widget_set_sensitive (GTK_WIDGET(dlg->priv->pg_w_units_label),
+                                                 TRUE);
+                       gtk_widget_set_sensitive (GTK_WIDGET(dlg->priv->pg_h_units_label),
+                                                 TRUE);
+
+               } else {
+                       gtk_widget_set_sensitive (GTK_WIDGET(dlg->priv->pg_w_spin), FALSE);
+                       gtk_widget_set_sensitive (GTK_WIDGET(dlg->priv->pg_h_spin), FALSE);
+                       gtk_widget_set_sensitive (GTK_WIDGET(dlg->priv->pg_w_units_label),
+                                                 FALSE);
+                       gtk_widget_set_sensitive (GTK_WIDGET(dlg->priv->pg_h_units_label),
+                                                 FALSE);
+
+                       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->pg_w_spin),
+                                                  paper->width * dlg->priv->units_per_point);
+                       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->pg_h_spin),
+                                                  paper->height * dlg->priv->units_per_point);
+               }
+
+               gl_paper_free (&paper);
+       }
+
+       g_free (page_size_name);
+
+}
+                                                                               
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Prepare rectangular size page.                                 */
+/*--------------------------------------------------------------------------*/
+static void
+rect_size_page_prepare_cb (glTemplateDesigner *dlg)
+{
+       gdouble max_w, max_h;
+       gdouble w, h, r, waste;
+
+       /* Limit label size based on already chosen page size. */
+       max_w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->pg_w_spin));
+       max_h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->pg_h_spin));
+
+       w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->rect_w_spin));
+       h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->rect_h_spin));
+       r = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->rect_r_spin));
+       waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->rect_waste_spin));
+
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->rect_w_spin),
+                                   dlg->priv->climb_rate, max_w);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->rect_h_spin),
+                                   dlg->priv->climb_rate, max_h);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->rect_r_spin),
+                                   0.0, MIN(max_w, max_h)/2.0);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->rect_waste_spin),
+                                   0.0, MIN(max_w, max_h)/2.0);
+
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->rect_w_spin), w);
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->rect_h_spin), h);
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->rect_r_spin), r);
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->rect_waste_spin), waste);
+
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Prepare round size page.                                       */
+/*--------------------------------------------------------------------------*/
+static void
+round_size_page_prepare_cb (glTemplateDesigner *dlg)
+{
+       gdouble max_w, max_h;
+       gdouble r, waste;
+
+       /* Limit label size based on already chosen page size. */
+       max_w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->pg_w_spin));
+       max_h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->pg_h_spin));
+
+       r = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->round_r_spin));
+       waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->round_waste_spin));
+
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->round_r_spin),
+                                   dlg->priv->climb_rate, MIN(max_w, max_h)/2.0);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->round_waste_spin),
+                                   0.0, MIN(max_w, max_h)/2.0);
+
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->round_r_spin), r);
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->round_waste_spin), waste);
+
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Prepare cd/dvd size page.                                      */
+/*--------------------------------------------------------------------------*/
+static void
+cd_size_page_prepare_cb (glTemplateDesigner *dlg)
+{
+       gdouble max_w, max_h;
+       gdouble radius, hole, w, h, waste;
+
+       /* Limit label size based on already chosen page size. */
+       max_w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->pg_w_spin));
+       max_h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->pg_h_spin));
+
+       radius = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->cd_radius_spin));
+       hole = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->cd_hole_spin));
+       w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->cd_w_spin));
+       h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->cd_h_spin));
+       waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->cd_waste_spin));
+
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->cd_radius_spin),
+                                   dlg->priv->climb_rate, MIN(max_w, max_h)/2.0);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->cd_hole_spin),
+                                   dlg->priv->climb_rate, MIN(max_w, max_h)/2.0);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->cd_w_spin),
+                                   0.0, max_w);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->cd_h_spin),
+                                   0.0, max_h);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->cd_waste_spin),
+                                   0.0, MIN(max_w, max_h)/2.0);
+
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->cd_radius_spin), radius);
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->cd_hole_spin), hole);
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->cd_w_spin), w);
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->cd_h_spin), h);
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->cd_waste_spin), waste);
+
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Layout page widget changed cb.                                 */
+/*--------------------------------------------------------------------------*/
+static void
+layout_page_prepare_cb (glTemplateDesigner *dlg)
+{
+       gdouble min_x, min_y;
+       gdouble max_x, max_y;
+       gint    max_nx, max_ny;
+       gint    nlayouts;
+       gdouble nx_1, ny_1, x0_1, y0_1, dx_1, dy_1;
+       gdouble nx_2, ny_2, x0_2, y0_2, dx_2, dy_2;
+
+       g_signal_handlers_block_by_func (G_OBJECT(dlg->priv->layout1_nx_spin),
+                                        G_CALLBACK(layout_page_changed_cb),
+                                        G_OBJECT(dlg));
+       g_signal_handlers_block_by_func (G_OBJECT(dlg->priv->layout1_ny_spin),
+                                        G_CALLBACK(layout_page_changed_cb),
+                                        G_OBJECT(dlg));
+       g_signal_handlers_block_by_func (G_OBJECT(dlg->priv->layout1_x0_spin),
+                                        G_CALLBACK(layout_page_changed_cb),
+                                        G_OBJECT(dlg));
+       g_signal_handlers_block_by_func (G_OBJECT(dlg->priv->layout1_y0_spin),
+                                        G_CALLBACK(layout_page_changed_cb),
+                                        G_OBJECT(dlg));
+       g_signal_handlers_block_by_func (G_OBJECT(dlg->priv->layout1_dx_spin),
+                                        G_CALLBACK(layout_page_changed_cb),
+                                        G_OBJECT(dlg));
+       g_signal_handlers_block_by_func (G_OBJECT(dlg->priv->layout1_dy_spin),
+                                        G_CALLBACK(layout_page_changed_cb),
+                                        G_OBJECT(dlg));
+       g_signal_handlers_block_by_func (G_OBJECT(dlg->priv->layout2_nx_spin),
+                                        G_CALLBACK(layout_page_changed_cb),
+                                        G_OBJECT(dlg));
+       g_signal_handlers_block_by_func (G_OBJECT(dlg->priv->layout2_ny_spin),
+                                        G_CALLBACK(layout_page_changed_cb),
+                                        G_OBJECT(dlg));
+       g_signal_handlers_block_by_func (G_OBJECT(dlg->priv->layout2_x0_spin),
+                                        G_CALLBACK(layout_page_changed_cb),
+                                        G_OBJECT(dlg));
+       g_signal_handlers_block_by_func (G_OBJECT(dlg->priv->layout2_y0_spin),
+                                        G_CALLBACK(layout_page_changed_cb),
+                                        G_OBJECT(dlg));
+       g_signal_handlers_block_by_func (G_OBJECT(dlg->priv->layout2_dx_spin),
+                                        G_CALLBACK(layout_page_changed_cb),
+                                        G_OBJECT(dlg));
+       g_signal_handlers_block_by_func (G_OBJECT(dlg->priv->layout2_dy_spin),
+                                        G_CALLBACK(layout_page_changed_cb),
+                                        G_OBJECT(dlg));
+
+       /* Limit ranges based on already chosen page and label sizes. */
+       if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dlg->priv->shape_rect_radio))) {
+               min_x = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->rect_w_spin));
+               min_y = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->rect_h_spin));
+       }
+       if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dlg->priv->shape_round_radio))) {
+               min_x = 2*gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->round_r_spin));
+               min_y = 2*min_x;
+       }
+       if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dlg->priv->shape_cd_radio))) {
+               min_x = 2*gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->cd_radius_spin));
+               min_y = 2*min_x;
+       }
+       max_x = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->pg_w_spin));
+       max_y = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->pg_h_spin));
+       max_nx = MAX (floor (max_x/min_x + DELTA), 1.0);
+       max_ny = MAX (floor (max_y/min_y + DELTA), 1.0);
+
+       nx_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout1_nx_spin));
+       ny_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout1_ny_spin));
+       x0_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout1_x0_spin));
+       y0_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout1_y0_spin));
+       dx_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout1_dx_spin));
+       dy_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout1_dy_spin));
+       nx_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout2_nx_spin));
+       ny_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout2_ny_spin));
+       x0_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout2_x0_spin));
+       y0_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout2_y0_spin));
+       dx_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout2_dx_spin));
+       dy_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout2_dy_spin));
+
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->layout1_nx_spin),
+                                   1, max_nx);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->layout1_ny_spin),
+                                   1, max_ny);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->layout1_x0_spin),
+                                   0.0, max_x-min_x);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->layout1_y0_spin),
+                                   0.0, max_y-min_y);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->layout1_dx_spin),
+                                   min_x, max_x);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->layout1_dy_spin),
+                                   min_y, max_y);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->layout2_nx_spin),
+                                   1, max_nx);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->layout2_ny_spin),
+                                   1, max_ny);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->layout2_x0_spin),
+                                   0.0, max_x-min_x);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->layout2_y0_spin),
+                                   0.0, max_y-min_y);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->layout2_dx_spin),
+                                   min_x, max_x);
+       gtk_spin_button_set_range (GTK_SPIN_BUTTON (dlg->priv->layout2_dy_spin),
+                                   min_y, max_y);
+
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->layout1_nx_spin), nx_1);
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->layout1_ny_spin), ny_1);
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->layout1_x0_spin), x0_1);
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->layout1_y0_spin), y0_1);
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->layout1_dx_spin), dx_1);
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->layout1_dy_spin), dy_1);
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->layout2_nx_spin), nx_2);
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->layout2_ny_spin), ny_2);
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->layout2_x0_spin), x0_2);
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->layout2_y0_spin), y0_2);
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->layout2_dx_spin), dx_2);
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(dlg->priv->layout2_dy_spin), dy_2);
+
+       /* Set visibility of layout2 widgets as appropriate. */
+       nlayouts = gtk_spin_button_get_value (GTK_SPIN_BUTTON (dlg->priv->nlayouts_spin));
+       if ( nlayouts == 1 ) {
+
+               gtk_widget_hide (dlg->priv->layout1_head_label);
+               gtk_widget_hide (dlg->priv->layout2_head_label);
+               gtk_widget_hide (dlg->priv->layout2_nx_spin);
+               gtk_widget_hide (dlg->priv->layout2_ny_spin);
+               gtk_widget_hide (dlg->priv->layout2_x0_spin);
+               gtk_widget_hide (dlg->priv->layout2_y0_spin);
+               gtk_widget_hide (dlg->priv->layout2_dx_spin);
+               gtk_widget_hide (dlg->priv->layout2_dy_spin);
+
+       } else {
+
+               gtk_widget_show (dlg->priv->layout1_head_label);
+               gtk_widget_show (dlg->priv->layout2_head_label);
+               gtk_widget_show (dlg->priv->layout2_nx_spin);
+               gtk_widget_show (dlg->priv->layout2_ny_spin);
+               gtk_widget_show (dlg->priv->layout2_x0_spin);
+               gtk_widget_show (dlg->priv->layout2_y0_spin);
+               gtk_widget_show (dlg->priv->layout2_dx_spin);
+               gtk_widget_show (dlg->priv->layout2_dy_spin);
+
+       }
+
+       g_signal_handlers_unblock_by_func (G_OBJECT(dlg->priv->layout1_nx_spin),
+                                          G_CALLBACK(layout_page_changed_cb),
+                                          G_OBJECT(dlg));
+       g_signal_handlers_unblock_by_func (G_OBJECT(dlg->priv->layout1_ny_spin),
+                                          G_CALLBACK(layout_page_changed_cb),
+                                          G_OBJECT(dlg));
+       g_signal_handlers_unblock_by_func (G_OBJECT(dlg->priv->layout1_x0_spin),
+                                          G_CALLBACK(layout_page_changed_cb),
+                                          G_OBJECT(dlg));
+       g_signal_handlers_unblock_by_func (G_OBJECT(dlg->priv->layout1_y0_spin),
+                                          G_CALLBACK(layout_page_changed_cb),
+                                          G_OBJECT(dlg));
+       g_signal_handlers_unblock_by_func (G_OBJECT(dlg->priv->layout1_dx_spin),
+                                          G_CALLBACK(layout_page_changed_cb),
+                                          G_OBJECT(dlg));
+       g_signal_handlers_unblock_by_func (G_OBJECT(dlg->priv->layout1_dy_spin),
+                                          G_CALLBACK(layout_page_changed_cb),
+                                          G_OBJECT(dlg));
+       g_signal_handlers_unblock_by_func (G_OBJECT(dlg->priv->layout2_nx_spin),
+                                          G_CALLBACK(layout_page_changed_cb),
+                                          G_OBJECT(dlg));
+       g_signal_handlers_unblock_by_func (G_OBJECT(dlg->priv->layout2_ny_spin),
+                                          G_CALLBACK(layout_page_changed_cb),
+                                          G_OBJECT(dlg));
+       g_signal_handlers_unblock_by_func (G_OBJECT(dlg->priv->layout2_x0_spin),
+                                          G_CALLBACK(layout_page_changed_cb),
+                                          G_OBJECT(dlg));
+       g_signal_handlers_unblock_by_func (G_OBJECT(dlg->priv->layout2_y0_spin),
+                                          G_CALLBACK(layout_page_changed_cb),
+                                          G_OBJECT(dlg));
+       g_signal_handlers_unblock_by_func (G_OBJECT(dlg->priv->layout2_dx_spin),
+                                          G_CALLBACK(layout_page_changed_cb),
+                                          G_OBJECT(dlg));
+       g_signal_handlers_unblock_by_func (G_OBJECT(dlg->priv->layout2_dy_spin),
+                                          G_CALLBACK(layout_page_changed_cb),
+                                          G_OBJECT(dlg));
+
+       layout_page_changed_cb (dlg);
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Layout page widget changed cb.                                 */
+/*--------------------------------------------------------------------------*/
+static void
+layout_page_changed_cb (glTemplateDesigner *dlg)
+{
+       glTemplate *template;
+
+       template = build_template (dlg);
+
+       gl_wdgt_mini_preview_set_template (GL_WDGT_MINI_PREVIEW(dlg->priv->layout_mini_preview),
+                                          template);
+
+       gl_template_free (&template);
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Print test sheet callback.                                     */
+/*--------------------------------------------------------------------------*/
+static void
+print_test_cb (glTemplateDesigner      *dlg)
+{
+       GObject    *label;
+       glTemplate *template;
+       GtkWidget  *print_dialog;
+
+       label = gl_label_new ();
+
+       template = build_template (dlg);
+       gl_label_set_template (GL_LABEL(label), template);
+
+       print_dialog = gl_print_dialog_new (GL_LABEL(label), NULL);
+       gl_print_dialog_force_outline_flag (GL_PRINT_DIALOG(print_dialog));
+       gtk_widget_show (print_dialog);
+
+       gl_template_free (&template);
+       g_object_unref (G_OBJECT(label));
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Finish druid.                                                  */
+/*--------------------------------------------------------------------------*/
+static void
+finish_cb (glTemplateDesigner *dlg)
+{
+       glTemplate *template;
+       
+       template = build_template (dlg);
+       gl_template_register (template);
+                                                                               
+       gtk_widget_destroy (GTK_WIDGET(dlg));
+
+}
+                         
+/*--------------------------------------------------------------------------*/
+/* Build a template based on current druid settings.                        */
+/*--------------------------------------------------------------------------*/
+static glTemplate *
+build_template (glTemplateDesigner      *dlg)
+{
+       gchar                *brand, *part_num, *desc;
+       gchar                *page_size_name;
+       glPaper              *paper;
+       glTemplateLabelStyle  shape;
+       gdouble               w, h, r, radius, hole, waste;
+       gint                  nlayouts;
+       gdouble               nx_1, ny_1, x0_1, y0_1, dx_1, dy_1;
+       gdouble               nx_2, ny_2, x0_2, y0_2, dx_2, dy_2;
+       glTemplate           *template;
+
+       brand    = gtk_editable_get_chars (GTK_EDITABLE(dlg->priv->brand_entry), 0, -1);
+       part_num = gtk_editable_get_chars (GTK_EDITABLE(dlg->priv->part_num_entry), 0, -1);
+       desc     = gtk_editable_get_chars (GTK_EDITABLE(dlg->priv->description_entry), 0, -1);
+
+       page_size_name =
+               gtk_editable_get_chars (GTK_EDITABLE(dlg->priv->pg_size_entry), 0, -1);
+       paper = gl_paper_from_name (page_size_name);
+       if ( g_strcasecmp (paper->id, "Other") == 0 ) {
+               paper->width =
+                       gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->pg_w_spin))
+                       / dlg->priv->units_per_point;
+               paper->height =
+                       gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->pg_h_spin))
+                        / dlg->priv->units_per_point;
+       }
+
+       if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dlg->priv->shape_rect_radio))) {
+               shape = GL_TEMPLATE_STYLE_RECT;
+               w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->rect_w_spin));
+               h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->rect_h_spin));
+               r = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->rect_r_spin));
+               waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->rect_waste_spin));
+       }
+
+       if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dlg->priv->shape_round_radio))) {
+               shape = GL_TEMPLATE_STYLE_ROUND;
+               r = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->round_r_spin));
+               waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->round_waste_spin));
+       }
+
+       if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dlg->priv->shape_cd_radio))) {
+               shape = GL_TEMPLATE_STYLE_CD;
+               radius = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->cd_radius_spin));
+               hole = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->cd_hole_spin));
+               w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->cd_w_spin));
+               h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->cd_h_spin));
+               waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->cd_waste_spin));
+       }
+
+       nlayouts = gtk_spin_button_get_value (GTK_SPIN_BUTTON (dlg->priv->nlayouts_spin));
+       nx_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout1_nx_spin));
+       ny_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout1_ny_spin));
+       x0_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout1_x0_spin));
+       y0_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout1_y0_spin));
+       dx_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout1_dx_spin));
+       dy_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout1_dy_spin));
+       nx_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout2_nx_spin));
+       ny_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout2_ny_spin));
+       x0_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout2_x0_spin));
+       y0_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout2_y0_spin));
+       dx_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout2_dx_spin));
+       dy_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dlg->priv->layout2_dy_spin));
+
+       template = g_new0 (glTemplate, 1);
+
+       template->name = g_strdup_printf ("%s %s", brand, part_num);
+       template->alias = g_list_append (template->alias, g_strdup (template->name));
+       template->page_size = g_strdup (paper->id);
+       template->page_width = paper->width;
+       template->page_height = paper->height;
+       template->description = g_strdup (desc);
+
+       template->label.style = shape;
+       switch (shape) {
+       case GL_TEMPLATE_STYLE_RECT:
+               template->label.rect.w = w / dlg->priv->units_per_point;
+               template->label.rect.h = h / dlg->priv->units_per_point;
+               template->label.rect.r = r / dlg->priv->units_per_point;
+               template->label.rect.waste = waste / dlg->priv->units_per_point;
+               break;
+       case GL_TEMPLATE_STYLE_ROUND:
+               template->label.round.r = r / dlg->priv->units_per_point;
+               template->label.round.waste = waste / dlg->priv->units_per_point;
+               break;
+       case GL_TEMPLATE_STYLE_CD:
+               template->label.cd.r1 = radius / dlg->priv->units_per_point;
+               template->label.cd.r2 = hole / dlg->priv->units_per_point;
+               template->label.cd.w = w / dlg->priv->units_per_point;
+               template->label.cd.h = h / dlg->priv->units_per_point;
+               template->label.cd.waste = waste / dlg->priv->units_per_point;
+               break;
+       }
+       template->label.any.layouts =
+               g_list_append (template->label.any.layouts,
+                              gl_template_layout_new (nx_1, ny_1,
+                                                      x0_1 / dlg->priv->units_per_point,
+                                                      y0_1 / dlg->priv->units_per_point,
+                                                      dx_1 / dlg->priv->units_per_point,
+                                                      dy_1 / dlg->priv->units_per_point));
+       if (nlayouts > 1) {
+               template->label.any.layouts =
+                       g_list_append (template->label.any.layouts,
+                                      gl_template_layout_new (nx_2, ny_2,
+                                                              x0_2 / dlg->priv->units_per_point,
+                                                              y0_2 / dlg->priv->units_per_point,
+                                                              dx_2 / dlg->priv->units_per_point,
+                                                              dy_2 / dlg->priv->units_per_point));
+       }
+
+       g_free (brand);
+       g_free (part_num);
+       g_free (desc);
+
+       g_free (page_size_name);
+       gl_paper_free (&paper);
+
+       return template;
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Handle non-linear forward traversal.                           */
+/*--------------------------------------------------------------------------*/
+static gboolean
+next_cb (GnomeDruidPage     *druidpage,
+        GtkWidget          *widget,
+        glTemplateDesigner *dlg)
+{
+
+       if ( GTK_WIDGET(druidpage) == dlg->priv->shape_page ) {
+
+               if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dlg->priv->shape_rect_radio))) {
+                       gnome_druid_set_page (GNOME_DRUID(dlg->priv->druid),
+                                             GNOME_DRUID_PAGE(dlg->priv->rect_size_page));
+                       return TRUE;
+               }
+
+               if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dlg->priv->shape_round_radio))) {
+                       gnome_druid_set_page (GNOME_DRUID(dlg->priv->druid),
+                                             GNOME_DRUID_PAGE(dlg->priv->round_size_page));
+                       return TRUE;
+               }
+
+               if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dlg->priv->shape_cd_radio))) {
+                       gnome_druid_set_page (GNOME_DRUID(dlg->priv->druid),
+                                             GNOME_DRUID_PAGE(dlg->priv->cd_size_page));
+                       return TRUE;
+               }
+
+       }
+
+       if ( GTK_WIDGET(druidpage) == dlg->priv->rect_size_page ) {
+
+               gnome_druid_set_page (GNOME_DRUID(dlg->priv->druid),
+                                     GNOME_DRUID_PAGE(dlg->priv->nlayouts_page));
+               return TRUE;
+
+       }
+
+       if ( GTK_WIDGET(druidpage) == dlg->priv->round_size_page ) {
+
+               gnome_druid_set_page (GNOME_DRUID(dlg->priv->druid),
+                                     GNOME_DRUID_PAGE(dlg->priv->nlayouts_page));
+               return TRUE;
+
+       }
+
+       if ( GTK_WIDGET(druidpage) == dlg->priv->cd_size_page ) {
+
+               gnome_druid_set_page (GNOME_DRUID(dlg->priv->druid),
+                                     GNOME_DRUID_PAGE(dlg->priv->nlayouts_page));
+               return TRUE;
+
+       }
+
+       /* Default case is linear. */
+       return FALSE;
+}
+
+/*--------------------------------------------------------------------------*/
+/* PRIVATE.  Handle non-linear reverse traversal.                           */
+/*--------------------------------------------------------------------------*/
+static gboolean
+back_cb (GnomeDruidPage     *druidpage,
+        GtkWidget          *widget,
+        glTemplateDesigner *dlg)
+{
+
+       if ( GTK_WIDGET(druidpage) == dlg->priv->rect_size_page ) {
+
+               gnome_druid_set_page (GNOME_DRUID(dlg->priv->druid),
+                                     GNOME_DRUID_PAGE(dlg->priv->shape_page));
+               return TRUE;
+
+       }
+
+       if ( GTK_WIDGET(druidpage) == dlg->priv->round_size_page ) {
+
+               gnome_druid_set_page (GNOME_DRUID(dlg->priv->druid),
+                                     GNOME_DRUID_PAGE(dlg->priv->shape_page));
+               return TRUE;
+
+       }
+
+       if ( GTK_WIDGET(druidpage) == dlg->priv->cd_size_page ) {
+
+               gnome_druid_set_page (GNOME_DRUID(dlg->priv->druid),
+                                     GNOME_DRUID_PAGE(dlg->priv->shape_page));
+               return TRUE;
+
+       }
+
+       if ( GTK_WIDGET(druidpage) == dlg->priv->nlayouts_page ) {
+
+               if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dlg->priv->shape_rect_radio))) {
+                       gnome_druid_set_page (GNOME_DRUID(dlg->priv->druid),
+                                             GNOME_DRUID_PAGE(dlg->priv->rect_size_page));
+                       return TRUE;
+               }
+
+               if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dlg->priv->shape_round_radio))) {
+                       gnome_druid_set_page (GNOME_DRUID(dlg->priv->druid),
+                                             GNOME_DRUID_PAGE(dlg->priv->round_size_page));
+                       return TRUE;
+               }
+
+               if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dlg->priv->shape_cd_radio))) {
+                       gnome_druid_set_page (GNOME_DRUID(dlg->priv->druid),
+                                             GNOME_DRUID_PAGE(dlg->priv->cd_size_page));
+                       return TRUE;
+               }
+
+       }
+
+       /* Default case is linear. */
+       return FALSE;
+}
+
+/*****************************************************************************/
+/* Construct mini preview widget.                                            */
+/*****************************************************************************/
+GtkWidget *
+gl_template_designer_construct_mini_preview (gchar *name,
+                                            gchar *string1,
+                                            gchar *string2,
+                                            gint   int1,
+                                            gint   int2)
+{
+       gint width  = int1;
+       gint height = int2;
+
+       return gl_wdgt_mini_preview_new (height, width);
+}
+
diff --git a/glabels2/src/template-designer.glade b/glabels2/src/template-designer.glade
new file mode 100644 (file)
index 0000000..3d08546
--- /dev/null
@@ -0,0 +1,2731 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+<requires lib="gnome"/>
+
+<widget class="GtkWindow" id="window">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">gLabels Template Designer</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+
+  <child>
+    <widget class="GnomeDruid" id="druid">
+      <property name="border_width">4</property>
+      <property name="visible">True</property>
+      <property name="show_help">False</property>
+
+      <child>
+       <widget class="GnomeDruidPageEdge" id="start_page">
+         <property name="visible">True</property>
+         <property name="position">GNOME_EDGE_START</property>
+         <property name="title" translatable="yes">gLabels Template Designer</property>
+         <property name="text" translatable="yes">Welcome to the gLabels Template Designer.
+
+This dialog will assist you in the creation of a custom gLabels template.</property>
+         <property name="background_color">#44436463acac</property>
+         <property name="logo">glabels-icon.png</property>
+       </widget>
+      </child>
+
+      <child>
+       <widget class="GnomeDruidPageStandard" id="name_page">
+         <property name="visible">True</property>
+         <property name="title" translatable="yes">Name and Description</property>
+
+         <child internal-child="vbox">
+           <widget class="GtkVBox" id="druid-vbox1">
+             <property name="border_width">16</property>
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">6</property>
+
+             <child>
+               <widget class="GtkVBox" id="vbox1">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">24</property>
+
+                 <child>
+                   <widget class="GtkLabel" id="label1">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Please enter the following identifying information about the template stationery.</property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">False</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkTable" id="table2">
+                     <property name="visible">True</property>
+                     <property name="n_rows">4</property>
+                     <property name="n_columns">2</property>
+                     <property name="homogeneous">False</property>
+                     <property name="row_spacing">12</property>
+                     <property name="column_spacing">12</property>
+
+                     <child>
+                       <widget class="GtkLabel" id="label72">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">Brand/Manufacturer:</property>
+                         <property name="use_underline">False</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</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_options">fill</property>
+                         <property name="y_options"></property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkLabel" id="label73">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">Part #:</property>
+                         <property name="use_underline">False</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</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_options">fill</property>
+                         <property name="y_options"></property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkHBox" id="hbox34">
+                         <property name="visible">True</property>
+                         <property name="homogeneous">False</property>
+                         <property name="spacing">12</property>
+
+                         <child>
+                           <widget class="GtkEntry" id="part_num_entry">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="editable">True</property>
+                             <property name="visibility">True</property>
+                             <property name="max_length">0</property>
+                             <property name="text" translatable="yes"></property>
+                             <property name="has_frame">True</property>
+                             <property name="invisible_char" translatable="yes">*</property>
+                             <property name="activates_default">False</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label76">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">(e.g., 8163A)</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </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_options">fill</property>
+                         <property name="y_options">fill</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkHBox" id="hbox33">
+                         <property name="visible">True</property>
+                         <property name="homogeneous">False</property>
+                         <property name="spacing">12</property>
+
+                         <child>
+                           <widget class="GtkEntry" id="brand_entry">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="editable">True</property>
+                             <property name="visibility">True</property>
+                             <property name="max_length">0</property>
+                             <property name="text" translatable="yes"></property>
+                             <property name="has_frame">True</property>
+                             <property name="invisible_char" translatable="yes">*</property>
+                             <property name="activates_default">False</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label75">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">(e.g., Avery, Acme, ...)</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </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_options">fill</property>
+                         <property name="y_options">fill</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkLabel" id="label74">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">Description:</property>
+                         <property name="use_underline">False</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0</property>
+                         <property name="yalign">0</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                       </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_options">fill</property>
+                         <property name="y_options"></property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkEntry" id="description_entry">
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="editable">True</property>
+                         <property name="visibility">True</property>
+                         <property name="max_length">0</property>
+                         <property name="text" translatable="yes"></property>
+                         <property name="has_frame">True</property>
+                         <property name="invisible_char" translatable="yes">*</property>
+                         <property name="activates_default">False</property>
+                       </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="y_options"></property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkLabel" id="label77">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">(e.g., &quot;Mailing Labels,&quot; &quot;Business Cards,&quot; ...)</property>
+                         <property name="use_underline">False</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0</property>
+                         <property name="yalign">0</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</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_options">fill</property>
+                         <property name="y_options"></property>
+                       </packing>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">True</property>
+                     <property name="fill">True</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+           </widget>
+         </child>
+       </widget>
+      </child>
+
+      <child>
+       <widget class="GnomeDruidPageStandard" id="pg_size_page">
+         <property name="visible">True</property>
+         <property name="title" translatable="yes">Page Size</property>
+
+         <child internal-child="vbox">
+           <widget class="GtkVBox" id="druid-vbox2">
+             <property name="border_width">16</property>
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">6</property>
+
+             <child>
+               <widget class="GtkVBox" id="vbox14">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">24</property>
+
+                 <child>
+                   <widget class="GtkLabel" id="label43">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Please select the page size of the template stationery.</property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">False</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkTable" id="table3">
+                     <property name="visible">True</property>
+                     <property name="n_rows">3</property>
+                     <property name="n_columns">2</property>
+                     <property name="homogeneous">False</property>
+                     <property name="row_spacing">12</property>
+                     <property name="column_spacing">12</property>
+
+                     <child>
+                       <widget class="GtkLabel" id="label78">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">Page size:</property>
+                         <property name="use_underline">False</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</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_options">fill</property>
+                         <property name="y_options"></property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkLabel" id="label79">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">Width:</property>
+                         <property name="use_underline">False</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</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_options">fill</property>
+                         <property name="y_options"></property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkLabel" id="label80">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">Height:</property>
+                         <property name="use_underline">False</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                       </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_options">fill</property>
+                         <property name="y_options"></property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkHBox" id="hbox35">
+                         <property name="visible">True</property>
+                         <property name="homogeneous">False</property>
+                         <property name="spacing">0</property>
+
+                         <child>
+                           <widget class="GtkCombo" id="pg_size_combo">
+                             <property name="visible">True</property>
+                             <property name="value_in_list">False</property>
+                             <property name="allow_empty">True</property>
+                             <property name="case_sensitive">False</property>
+                             <property name="enable_arrow_keys">True</property>
+                             <property name="enable_arrows_always">False</property>
+
+                             <child internal-child="entry">
+                               <widget class="GtkEntry" id="pg_size_entry">
+                                 <property name="visible">True</property>
+                                 <property name="can_focus">True</property>
+                                 <property name="editable">False</property>
+                                 <property name="visibility">True</property>
+                                 <property name="max_length">0</property>
+                                 <property name="text" translatable="yes"></property>
+                                 <property name="has_frame">True</property>
+                                 <property name="invisible_char" translatable="yes">*</property>
+                                 <property name="activates_default">False</property>
+                               </widget>
+                             </child>
+
+                             <child internal-child="list">
+                               <widget class="GtkList" id="combo-list1">
+                                 <property name="visible">True</property>
+                                 <property name="selection_mode">GTK_SELECTION_BROWSE</property>
+                               </widget>
+                             </child>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <placeholder/>
+                         </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="y_options">fill</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkHBox" id="hbox36">
+                         <property name="visible">True</property>
+                         <property name="homogeneous">False</property>
+                         <property name="spacing">12</property>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="pg_w_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">1 0 100 1 10 10</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="pg_w_units_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">inches</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </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_options">fill</property>
+                         <property name="y_options">fill</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkHBox" id="hbox37">
+                         <property name="visible">True</property>
+                         <property name="homogeneous">False</property>
+                         <property name="spacing">12</property>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="pg_h_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">1 0 100 1 10 10</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="pg_h_units_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">inches</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </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_options">fill</property>
+                         <property name="y_options">fill</property>
+                       </packing>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+           </widget>
+         </child>
+       </widget>
+      </child>
+
+      <child>
+       <widget class="GnomeDruidPageStandard" id="shape_page">
+         <property name="visible">True</property>
+         <property name="title" translatable="yes">Label or Card Shape</property>
+
+         <child internal-child="vbox">
+           <widget class="GtkVBox" id="druid-vbox3">
+             <property name="border_width">16</property>
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">6</property>
+
+             <child>
+               <widget class="GtkVBox" id="vbox6">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">24</property>
+
+                 <child>
+                   <widget class="GtkLabel" id="label13">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Please select the basic shape of the labels or cards.</property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">False</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkVBox" id="vbox7">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">6</property>
+
+                     <child>
+                       <widget class="GtkRadioButton" id="shape_rect_radio">
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="label" translatable="yes">Rectangular or square (can have rounded corners)</property>
+                         <property name="use_underline">True</property>
+                         <property name="relief">GTK_RELIEF_NORMAL</property>
+                         <property name="active">False</property>
+                         <property name="inconsistent">False</property>
+                         <property name="draw_indicator">True</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkRadioButton" id="shape_round_radio">
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="label" translatable="yes">Round</property>
+                         <property name="use_underline">True</property>
+                         <property name="relief">GTK_RELIEF_NORMAL</property>
+                         <property name="active">False</property>
+                         <property name="inconsistent">False</property>
+                         <property name="draw_indicator">True</property>
+                         <property name="group">shape_rect_radio</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkRadioButton" id="shape_cd_radio">
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="label" translatable="yes">CD/DVD (including credit card CDs)</property>
+                         <property name="use_underline">True</property>
+                         <property name="relief">GTK_RELIEF_NORMAL</property>
+                         <property name="active">False</property>
+                         <property name="inconsistent">False</property>
+                         <property name="draw_indicator">True</property>
+                         <property name="group">shape_rect_radio</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">True</property>
+                     <property name="fill">True</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+           </widget>
+         </child>
+       </widget>
+      </child>
+
+      <child>
+       <widget class="GnomeDruidPageStandard" id="rect_size_page">
+         <property name="visible">True</property>
+         <property name="title" translatable="yes">Label or Card Size (Rectangular)</property>
+
+         <child internal-child="vbox">
+           <widget class="GtkVBox" id="druid-vbox4">
+             <property name="border_width">16</property>
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">6</property>
+
+             <child>
+               <widget class="GtkVBox" id="vbox8">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">24</property>
+
+                 <child>
+                   <widget class="GtkLabel" id="label14">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Please enter the following size parameters of a single label or card in your template.</property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">False</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox7">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">12</property>
+
+                     <child>
+                       <widget class="GtkTable" id="table4">
+                         <property name="visible">True</property>
+                         <property name="n_rows">4</property>
+                         <property name="n_columns">3</property>
+                         <property name="homogeneous">False</property>
+                         <property name="row_spacing">12</property>
+                         <property name="column_spacing">12</property>
+
+                         <child>
+                           <widget class="GtkLabel" id="label83">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Width:</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label84">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Height:</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label85">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Round (radius of corner):</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label86">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Waste (overprint allowed):</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="rect_w_units_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">inches</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="rect_h_units_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">inches</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="rect_r_units_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">inches</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                           <packing>
+                             <property name="left_attach">2</property>
+                             <property name="right_attach">3</property>
+                             <property name="top_attach">2</property>
+                             <property name="bottom_attach">3</property>
+                             <property name="x_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="rect_waste_units_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">inches</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="rect_w_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">0 0 100 1 10 10</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="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="rect_h_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">0 0 100 1 10 10</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="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="rect_r_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">0 0 100 1 10 10</property>
+                           </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="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="rect_waste_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">0 0 100 1 10 10</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="y_options"></property>
+                           </packing>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkImage" id="rect_image">
+                         <property name="visible">True</property>
+                         <property name="xalign">1</property>
+                         <property name="yalign">0</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">True</property>
+                       </packing>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+           </widget>
+         </child>
+       </widget>
+      </child>
+
+      <child>
+       <widget class="GnomeDruidPageStandard" id="round_size_page">
+         <property name="visible">True</property>
+         <property name="title" translatable="yes">Label Size (Round)</property>
+
+         <child internal-child="vbox">
+           <widget class="GtkVBox" id="druid-vbox5">
+             <property name="border_width">16</property>
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">6</property>
+
+             <child>
+               <widget class="GtkVBox" id="vbox10">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">24</property>
+
+                 <child>
+                   <widget class="GtkLabel" id="label23">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Please enter the following size parameters of a single label in your template.</property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">False</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox12">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">12</property>
+
+                     <child>
+                       <widget class="GtkTable" id="table8">
+                         <property name="visible">True</property>
+                         <property name="n_rows">2</property>
+                         <property name="n_columns">3</property>
+                         <property name="homogeneous">False</property>
+                         <property name="row_spacing">12</property>
+                         <property name="column_spacing">12</property>
+
+                         <child>
+                           <widget class="GtkLabel" id="label91">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Radius:</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label92">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Waste (overprint allowed):</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="round_r_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">0 0 100 1 10 10</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="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="round_waste_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">0 0 100 1 10 10</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="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="round_r_units_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">inches</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="round_waste_units_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">inches</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkImage" id="round_image">
+                         <property name="visible">True</property>
+                         <property name="xalign">1</property>
+                         <property name="yalign">0</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">True</property>
+                       </packing>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+           </widget>
+         </child>
+       </widget>
+      </child>
+
+      <child>
+       <widget class="GnomeDruidPageStandard" id="cd_size_page">
+         <property name="visible">True</property>
+         <property name="title" translatable="yes">Label Size (CD/DVD)</property>
+
+         <child internal-child="vbox">
+           <widget class="GtkVBox" id="druid-vbox6">
+             <property name="border_width">16</property>
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">6</property>
+
+             <child>
+               <widget class="GtkVBox" id="vbox12">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">24</property>
+
+                 <child>
+                   <widget class="GtkLabel" id="label32">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Please enter the following size parameters of a single label in your template.</property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">False</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox17">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">12</property>
+
+                     <child>
+                       <widget class="GtkTable" id="table7">
+                         <property name="visible">True</property>
+                         <property name="n_rows">5</property>
+                         <property name="n_columns">3</property>
+                         <property name="homogeneous">False</property>
+                         <property name="row_spacing">12</property>
+                         <property name="column_spacing">12</property>
+
+                         <child>
+                           <widget class="GtkLabel" id="label95">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Outer radius:</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label96">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Inner radius:</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label97">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Clipping width:</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label98">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Clipping height:</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label99">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Waste (overprint allowed):</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="cd_radius_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">0 0 100 1 10 10</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="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="cd_hole_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">0 0 100 1 10 10</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="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="cd_w_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">0 0 100 1 10 10</property>
+                           </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="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="cd_h_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">0 0 100 1 10 10</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="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="cd_waste_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">0 0 100 1 10 10</property>
+                           </widget>
+                           <packing>
+                             <property name="left_attach">1</property>
+                             <property name="right_attach">2</property>
+                             <property name="top_attach">4</property>
+                             <property name="bottom_attach">5</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="cd_radius_units_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">inches</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="cd_hole_units_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">inches</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="cd_w_units_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">inches</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                           <packing>
+                             <property name="left_attach">2</property>
+                             <property name="right_attach">3</property>
+                             <property name="top_attach">2</property>
+                             <property name="bottom_attach">3</property>
+                             <property name="x_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="cd_h_units_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">inches</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="cd_waste_units_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">inches</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                           <packing>
+                             <property name="left_attach">2</property>
+                             <property name="right_attach">3</property>
+                             <property name="top_attach">4</property>
+                             <property name="bottom_attach">5</property>
+                             <property name="x_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkImage" id="cd_image">
+                         <property name="visible">True</property>
+                         <property name="xalign">1</property>
+                         <property name="yalign">0</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">True</property>
+                       </packing>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+           </widget>
+         </child>
+       </widget>
+      </child>
+
+      <child>
+       <widget class="GnomeDruidPageStandard" id="nlayouts_page">
+         <property name="visible">True</property>
+         <property name="title" translatable="yes">Number of Layouts</property>
+
+         <child internal-child="vbox">
+           <widget class="GtkVBox" id="druid-vbox9">
+             <property name="border_width">16</property>
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">6</property>
+
+             <child>
+               <widget class="GtkVBox" id="vbox3">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">24</property>
+
+                 <child>
+                   <widget class="GtkLabel" id="label9">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">How many layouts will your template contain? 
+
+A layout is a set of labels or cards that can be arranged in a simple grid.
+Most templates only need one layout, as in the first example.
+The second example illustrates when two layouts are needed.</property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">False</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox5">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">12</property>
+
+                     <child>
+                       <widget class="GtkVBox" id="vbox4">
+                         <property name="visible">True</property>
+                         <property name="homogeneous">False</property>
+                         <property name="spacing">0</property>
+
+                         <child>
+                           <widget class="GtkImage" id="nlayouts_image1">
+                             <property name="visible">True</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">True</property>
+                             <property name="fill">True</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label10">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Templates needing only
+one layout.</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_CENTER</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">True</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkVBox" id="vbox5">
+                         <property name="visible">True</property>
+                         <property name="homogeneous">False</property>
+                         <property name="spacing">0</property>
+
+                         <child>
+                           <widget class="GtkImage" id="nlayouts_image2">
+                             <property name="visible">True</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">True</property>
+                             <property name="fill">True</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label11">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Templates needing
+two layouts.</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_CENTER</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">True</property>
+                       </packing>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox6">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">12</property>
+
+                     <child>
+                       <widget class="GtkLabel" id="label12">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">Number of layouts:</property>
+                         <property name="use_underline">False</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkSpinButton" id="nlayouts_spin">
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="climb_rate">0.1</property>
+                         <property name="digits">0</property>
+                         <property name="numeric">False</property>
+                         <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                         <property name="snap_to_ticks">False</property>
+                         <property name="wrap">False</property>
+                         <property name="adjustment">1 1 2 1 1 1</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+           </widget>
+         </child>
+       </widget>
+      </child>
+
+      <child>
+       <widget class="GnomeDruidPageStandard" id="layout_page">
+         <property name="visible">True</property>
+         <property name="title" translatable="yes">Layout(s)</property>
+
+         <child internal-child="vbox">
+           <widget class="GtkVBox" id="druid-vbox8">
+             <property name="border_width">16</property>
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">6</property>
+
+             <child>
+               <widget class="GtkVBox" id="vbox15">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">12</property>
+
+                 <child>
+                   <widget class="GtkLabel" id="label48">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Please enter the following layout information.</property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">False</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox25">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">18</property>
+
+                     <child>
+                       <widget class="GtkTable" id="table1">
+                         <property name="visible">True</property>
+                         <property name="n_rows">7</property>
+                         <property name="n_columns">4</property>
+                         <property name="homogeneous">False</property>
+                         <property name="row_spacing">6</property>
+                         <property name="column_spacing">12</property>
+
+                         <child>
+                           <widget class="GtkLabel" id="layout1_head_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Layout #1</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="layout2_head_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Layout #2</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label62">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Number across (nx):</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label63">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Number down (ny):</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label64">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Distance from left edge (x0):</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label65">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Distance from top edge (y0):</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label66">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Horizontal pitch (dx):</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                           <packing>
+                             <property name="left_attach">0</property>
+                             <property name="right_attach">1</property>
+                             <property name="top_attach">5</property>
+                             <property name="bottom_attach">6</property>
+                             <property name="x_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="label67">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Vertical pitch (dy):</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                           <packing>
+                             <property name="left_attach">0</property>
+                             <property name="right_attach">1</property>
+                             <property name="top_attach">6</property>
+                             <property name="bottom_attach">7</property>
+                             <property name="x_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="layout_x0_units_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">inches</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </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_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="layout_y0_units_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">inches</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                           <packing>
+                             <property name="left_attach">3</property>
+                             <property name="right_attach">4</property>
+                             <property name="top_attach">4</property>
+                             <property name="bottom_attach">5</property>
+                             <property name="x_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="layout_dx_units_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">inches</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                           <packing>
+                             <property name="left_attach">3</property>
+                             <property name="right_attach">4</property>
+                             <property name="top_attach">5</property>
+                             <property name="bottom_attach">6</property>
+                             <property name="x_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkLabel" id="layout_dy_units_label">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">inches</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                           <packing>
+                             <property name="left_attach">3</property>
+                             <property name="right_attach">4</property>
+                             <property name="top_attach">6</property>
+                             <property name="bottom_attach">7</property>
+                             <property name="x_options">fill</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="layout1_nx_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">1 1 100 1 10 10</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="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="layout1_ny_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">1 1 100 1 10 10</property>
+                           </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="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="layout2_nx_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">1 1 100 1 10 10</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="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="layout2_ny_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">1 1 100 1 10 10</property>
+                           </widget>
+                           <packing>
+                             <property name="left_attach">2</property>
+                             <property name="right_attach">3</property>
+                             <property name="top_attach">2</property>
+                             <property name="bottom_attach">3</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="layout1_x0_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">0 0 100 1 10 10</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="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="layout2_x0_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">0 0 100 1 10 10</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="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="layout1_y0_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">0 0 100 1 10 10</property>
+                           </widget>
+                           <packing>
+                             <property name="left_attach">1</property>
+                             <property name="right_attach">2</property>
+                             <property name="top_attach">4</property>
+                             <property name="bottom_attach">5</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="layout2_y0_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">0 0 100 1 10 10</property>
+                           </widget>
+                           <packing>
+                             <property name="left_attach">2</property>
+                             <property name="right_attach">3</property>
+                             <property name="top_attach">4</property>
+                             <property name="bottom_attach">5</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="layout1_dx_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">0 0 100 1 10 10</property>
+                           </widget>
+                           <packing>
+                             <property name="left_attach">1</property>
+                             <property name="right_attach">2</property>
+                             <property name="top_attach">5</property>
+                             <property name="bottom_attach">6</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="layout2_dx_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">0 0 100 1 10 10</property>
+                           </widget>
+                           <packing>
+                             <property name="left_attach">2</property>
+                             <property name="right_attach">3</property>
+                             <property name="top_attach">5</property>
+                             <property name="bottom_attach">6</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="layout1_dy_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">0 0 100 1 10 10</property>
+                           </widget>
+                           <packing>
+                             <property name="left_attach">1</property>
+                             <property name="right_attach">2</property>
+                             <property name="top_attach">6</property>
+                             <property name="bottom_attach">7</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkSpinButton" id="layout2_dy_spin">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="climb_rate">0.01</property>
+                             <property name="digits">0</property>
+                             <property name="numeric">False</property>
+                             <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                             <property name="snap_to_ticks">False</property>
+                             <property name="wrap">False</property>
+                             <property name="adjustment">0 0 100 1 10 10</property>
+                           </widget>
+                           <packing>
+                             <property name="left_attach">2</property>
+                             <property name="right_attach">3</property>
+                             <property name="top_attach">6</property>
+                             <property name="bottom_attach">7</property>
+                             <property name="y_options"></property>
+                           </packing>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkHBox" id="hbox38">
+                         <property name="visible">True</property>
+                         <property name="homogeneous">False</property>
+                         <property name="spacing">0</property>
+
+                         <child>
+                           <widget class="GtkLabel" id="label100">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">  </property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">True</property>
+                             <property name="fill">True</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkVBox" id="vbox15">
+                             <property name="visible">True</property>
+                             <property name="homogeneous">False</property>
+                             <property name="spacing">6</property>
+
+                             <child>
+                               <widget class="Custom" id="layout_mini_preview">
+                                 <property name="visible">True</property>
+                                 <property name="creation_function">gl_template_designer_construct_mini_preview</property>
+                                 <property name="int1">175</property>
+                                 <property name="int2">200</property>
+                                 <property name="last_modification_time">Mon, 29 Dec 2003 21:27:10 GMT</property>
+                               </widget>
+                               <packing>
+                                 <property name="padding">0</property>
+                                 <property name="expand">True</property>
+                                 <property name="fill">True</property>
+                               </packing>
+                             </child>
+
+                             <child>
+                               <widget class="GtkButton" id="layout_test_button">
+                                 <property name="border_width">6</property>
+                                 <property name="visible">True</property>
+                                 <property name="can_focus">True</property>
+                                 <property name="label" translatable="yes">Print test sheet</property>
+                                 <property name="use_underline">True</property>
+                                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                               </widget>
+                               <packing>
+                                 <property name="padding">0</property>
+                                 <property name="expand">False</property>
+                                 <property name="fill">False</property>
+                               </packing>
+                             </child>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">True</property>
+                       </packing>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">False</property>
+                 <property name="fill">False</property>
+               </packing>
+             </child>
+           </widget>
+         </child>
+       </widget>
+      </child>
+
+      <child>
+       <widget class="GnomeDruidPageEdge" id="finish_page">
+         <property name="visible">True</property>
+         <property name="position">GNOME_EDGE_FINISH</property>
+         <property name="title" translatable="yes">Design Completed</property>
+         <property name="text" translatable="yes">Congratulations!
+
+You have completed the gLabels Template Designer.
+If you wish to accept and save your design, click &quot;Apply.&quot;
+
+Otherwise, you may click &quot;Cancel&quot; to abandon your design
+or &quot;Back&quot; to continue editing this design.</property>
+       </widget>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/glabels2/src/template-designer.h b/glabels2/src/template-designer.h
new file mode 100644 (file)
index 0000000..7e1bc3d
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ *  (GLABELS) Label and Business Card Creation program for GNOME
+ *
+ *  template-designer.h:  Template designer module header file
+ *
+ *  Copyright (C) 2003  Jim Evins <evins@snaught.com>.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  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 program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ */
+
+#ifndef __TEMPLATE_DESIGNER_H__
+#define __TEMPLATE_DESIGNER_H__
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define GL_TYPE_TEMPLATE_DESIGNER            (gl_template_designer_get_type ())
+#define GL_TEMPLATE_DESIGNER(obj)            (GTK_CHECK_CAST ((obj), GL_TYPE_TEMPLATE_DESIGNER, glTemplateDesigner))
+#define GL_TEMPLATE_DESIGNER_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_TEMPLATE_DESIGNER, glTemplateDesignerClass))
+#define GL_IS_TEMPLATE_DESIGNER(obj)         (GTK_CHECK_TYPE ((obj), GL_TYPE_TEMPLATE_DESIGNER))
+#define GL_IS_TEMPLATE_DESIGNER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_TEMPLATE_DESIGNER))
+#define GL_TEMPLATE_DESIGNER_GET_CLASS(obj)  (GTK_CHECK_GET_CLASS ((obj), GL_TYPE_TEMPLATE_DESIGNER, glTemplateDesignerClass))
+
+
+typedef struct _glTemplateDesigner              glTemplateDesigner;
+typedef struct _glTemplateDesignerClass         glTemplateDesignerClass;
+
+typedef struct _glTemplateDesignerPrivate       glTemplateDesignerPrivate;
+
+struct _glTemplateDesigner
+{
+       GtkWindow                  parent_instance;
+
+       glTemplateDesignerPrivate *priv;
+
+};
+
+struct  _glTemplateDesignerClass
+{
+       GtkWindowClass             parent_class;
+};
+
+GtkType        gl_template_designer_get_type               (void) G_GNUC_CONST;
+
+GtkWidget      *gl_template_designer_new                   (GtkWindow *parent);
+
+/* Semi-public, for use by libglade: */
+GtkWidget      *gl_template_designer_construct_mini_preview (gchar *name,
+                                                            gchar *string1,
+                                                            gchar *string2,
+                                                            gint   int1,
+                                                            gint   int2);
+
+
+G_END_DECLS
+
+#endif /* __TEMPLATE_DESIGNER_H__ */
index 789616264135bdcd5f86cab94d5c0de14d67f961..4f37d78f8192bd0a0b3ede5f23764526b51fd0fe 100644 (file)
@@ -52,6 +52,7 @@
 static BonoboUIVerb gl_ui_verbs [] = {
        BONOBO_UI_VERB ("FileNew",               gl_cmd_file_new),
        BONOBO_UI_VERB ("FileProperties",        gl_cmd_file_properties),
+       BONOBO_UI_VERB ("FileTemplateDesigner",  gl_cmd_file_template_designer),
        BONOBO_UI_VERB ("FileOpen",              gl_cmd_file_open),
        BONOBO_UI_VERB ("FileSave",              gl_cmd_file_save),
        BONOBO_UI_VERB ("FileSaveAs",            gl_cmd_file_save_as),
index 210d6841182c5652b391cf8267437c8b67cf6d52..bb46cc09d331b9b49fe732c18dfde8751004f4b1 100644 (file)
@@ -299,6 +299,7 @@ void gl_wdgt_mini_preview_set_template (glWdgtMiniPreview *preview,
        gchar      *page_size;
        gdouble     canvas_scale;
        gdouble     w, h;
+       gdouble     offset_x, offset_y;
        gdouble     shadow_x, shadow_y;
 
        gl_debug (DEBUG_MINI_PREVIEW, "START");
@@ -316,16 +317,13 @@ void gl_wdgt_mini_preview_set_template (glWdgtMiniPreview *preview,
        }
        gnome_canvas_set_pixels_per_unit (GNOME_CANVAS (preview->canvas),
                                          canvas_scale);
-#if 0
-       gnome_canvas_set_scroll_region (GNOME_CANVAS (preview->canvas),
-                                       0.0, 0.0,
-                                       template->page_width, template->page_height);
-#else
+       offset_x = (preview->width/canvas_scale - template->page_width) / 2.0;
+       offset_y = (preview->height/canvas_scale - template->page_height) / 2.0;
+
        gnome_canvas_set_scroll_region (GNOME_CANVAS (preview->canvas),
-                                       0.0, 0.0,
-                                       preview->width/canvas_scale,
-                                       preview->height/canvas_scale);
-#endif
+                                       -offset_x, -offset_y,
+                                       preview->width/canvas_scale - offset_x,
+                                       preview->height/canvas_scale - offset_y);
 
        /* update shadow */
        shadow_x = SHADOW_X_OFFSET/canvas_scale;
@@ -734,3 +732,17 @@ cdbc_item (GnomeCanvasGroup *group,
        return item;
 }
 
+/****************************************************************************/
+/* Change/set background color of preview.                                  */
+/****************************************************************************/
+void
+gl_wdgt_mini_preview_set_bg_color (glWdgtMiniPreview *preview,
+                                  guint              color)
+{
+       GdkColor *gdk_color;
+
+       gdk_color = gl_color_to_gdk_color (color);
+       gtk_widget_modify_bg (GTK_WIDGET(preview->canvas), GTK_STATE_NORMAL, gdk_color);
+       g_free (gdk_color);
+}
+
index 3e61b8710ec4d04f04cf1f193722f8b44544b30d..d6049c0e645742d2f3b7cbec264efd24a5738539 100644 (file)
@@ -85,6 +85,10 @@ void       gl_wdgt_mini_preview_set_template      (glWdgtMiniPreview *preview,
 void       gl_wdgt_mini_preview_highlight_range   (glWdgtMiniPreview *preview,
                                                   gint               first_label,
                                                   gint               last_label);
+
+void       gl_wdgt_mini_preview_set_bg_color      (glWdgtMiniPreview *preview,
+                                                  guint              color);
+
 G_END_DECLS
 
 #endif