|
-- Tambet Ingo <tambet ximian com> |
? ChangeLog.11
? autom4te-2.53.cache
? fontconfig.diff
? libgnomeprint.diff
? stamp-h1
? tests/fonts
? tests/fonts.c
Index: libgnomeprint/gnome-print-master-private.h
===================================================================
RCS file: /cvs/gnome/libgnomeprint/libgnomeprint/gnome-print-master-private.h,v
retrieving revision 1.3
diff -u -r1.3 gnome-print-master-private.h
--- libgnomeprint/gnome-print-master-private.h 14 Dec 2001 04:14:32 -0000 1.3
+++ libgnomeprint/gnome-print-master-private.h 31 Oct 2002 18:16:18 -0000
@@ -31,7 +31,7 @@
#include "gnome-print-master.h"
-struct _GnomePrintMaster {
+struct _GnomePrintJob {
GObject object;
GnomePrintConfig *config;
@@ -41,7 +41,7 @@
gpointer priv;
};
-struct _GnomePrintMasterClass {
+struct _GnomePrintJobClass {
GObjectClass parent_class;
};
Index: libgnomeprint/gnome-print-master.c
===================================================================
RCS file: /cvs/gnome/libgnomeprint/libgnomeprint/gnome-print-master.c,v
retrieving revision 1.43
diff -u -r1.43 gnome-print-master.c
--- libgnomeprint/gnome-print-master.c 15 Sep 2002 01:01:32 -0000 1.43
+++ libgnomeprint/gnome-print-master.c 31 Oct 2002 18:16:18 -0000
@@ -67,51 +67,51 @@
GList *LY_LIST;
};
-#define GNOME_PRINT_MASTER_CLOSED(m) (((GPMPrivate *) (m)->priv)->closed)
+#define GNOME_PRINT_JOB_CLOSED(m) (((GPMPrivate *) (m)->priv)->closed)
-static void gnome_print_master_class_init (GnomePrintMasterClass *klass);
-static void gnome_print_master_init (GnomePrintMaster *gpm);
-static void gnome_print_master_finalize (GObject *object);
-
-static void gpm_update_layout_data (GnomePrintMaster *gpm);
-static void gpm_parse_config_data (GnomePrintMaster *gpm);
-static void gpm_clear_config_data (GnomePrintMaster *gpm);
+static void gnome_print_job_class_init (GnomePrintJobClass *klass);
+static void gnome_print_job_init (GnomePrintJob *gpm);
+static void gnome_print_job_finalize (GObject *object);
+
+static void gpm_update_layout_data (GnomePrintJob *gpm);
+static void gpm_parse_config_data (GnomePrintJob *gpm);
+static void gpm_clear_config_data (GnomePrintJob *gpm);
static gboolean gpm_parse_transform (guchar *str, gdouble *transform);
static GObjectClass *parent_class;
GType
-gnome_print_master_get_type (void)
+gnome_print_job_get_type (void)
{
static GType type = 0;
if (!type) {
static const GTypeInfo info = {
- sizeof (GnomePrintMasterClass),
+ sizeof (GnomePrintJobClass),
NULL, NULL,
- (GClassInitFunc) gnome_print_master_class_init,
+ (GClassInitFunc) gnome_print_job_class_init,
NULL, NULL,
- sizeof (GnomePrintMaster),
+ sizeof (GnomePrintJob),
0,
- (GInstanceInitFunc) gnome_print_master_init
+ (GInstanceInitFunc) gnome_print_job_init
};
- type = g_type_register_static (G_TYPE_OBJECT, "GnomePrintMaster", &info, 0);
+ type = g_type_register_static (G_TYPE_OBJECT, "GnomePrintJob", &info, 0);
}
return type;
}
static void
-gnome_print_master_class_init (GnomePrintMasterClass *klass)
+gnome_print_job_class_init (GnomePrintJobClass *klass)
{
GObjectClass *object_class;
object_class = (GObjectClass *) klass;
parent_class = g_type_class_peek_parent (klass);
- object_class->finalize = gnome_print_master_finalize;
+ object_class->finalize = gnome_print_job_finalize;
}
static void
-gnome_print_master_init (GnomePrintMaster *gpm)
+gnome_print_job_init (GnomePrintJob *gpm)
{
gpm->config = NULL;
@@ -122,11 +122,11 @@
}
static void
-gnome_print_master_finalize (GObject *object)
+gnome_print_job_finalize (GObject *object)
{
- GnomePrintMaster *gpm;
+ GnomePrintJob *gpm;
- gpm = GNOME_PRINT_MASTER(object);
+ gpm = GNOME_PRINT_JOB(object);
if (gpm->config) {
gnome_print_config_unref (gpm->config);
@@ -146,56 +146,37 @@
}
/**
- * gnome_print_master_new:
- *
- * Create a new GnomePrintMaster. All values are initialised
- * to sensible defaults.
- *
- * Return value: A new GnomePrintMaster.
- **/
-
-GnomePrintMaster *
-gnome_print_master_new (void)
-{
- GnomePrintMaster *gpm;
-
- gpm = g_object_new (GNOME_TYPE_PRINT_MASTER, NULL);
-
- gpm->config = gnome_print_config_default ();
-
- return gpm;
-}
-
-/**
- * gnome_print_master_new_from_dialog:
+ * gnome_print_job_new:
* @dialog: %A GnomePrintDialog
*
- * Create a new GnomePrintMaster based on the values in the
+ * Create a new GnomePrintJob based on the values in the
* %GnomePrintDialog. Range values are initialised to sensible
* defaults. Other values are initialised from the given dialog.
+ * Pass NULL to get have default default values.
*
- * Return value: A new GnomePrintMaster.
+ * Return value: A new GnomePrintJob.
**/
-GnomePrintMaster *
-gnome_print_master_new_from_config (GnomePrintConfig *config)
+GnomePrintJob *
+gnome_print_job_new (GnomePrintConfig *config)
{
- GnomePrintMaster *gpm;
+ GnomePrintJob *gpm;
- g_return_val_if_fail (config != NULL, NULL);
-
- gpm = g_object_new (GNOME_TYPE_PRINT_MASTER, NULL);
+ gpm = g_object_new (GNOME_TYPE_PRINT_JOB, NULL);
- gpm->config = gnome_print_config_ref (config);
+ if (config)
+ gpm->config = gnome_print_config_ref (config);
+ else
+ gpm->config = gnome_print_config_default ();
return gpm;
}
GnomePrintConfig *
-gnome_print_master_get_config (GnomePrintMaster *gpm)
+gnome_print_job_get_config (GnomePrintJob *gpm)
{
g_return_val_if_fail (gpm != NULL, NULL);
- g_return_val_if_fail (GNOME_IS_PRINT_MASTER (gpm), NULL);
+ g_return_val_if_fail (GNOME_IS_PRINT_JOB (gpm), NULL);
if (gpm->config)
gnome_print_config_ref (gpm->config);
@@ -204,8 +185,8 @@
}
/**
- * gnome_print_master_get_context:
- * @gpm: An initialised GnomePrintMaster.
+ * gnome_print_job_get_context:
+ * @gpm: An initialised GnomePrintJob.
*
* Retrieve the GnomePrintContext which applications
* print to.
@@ -214,10 +195,10 @@
**/
GnomePrintContext *
-gnome_print_master_get_context (GnomePrintMaster *gpm)
+gnome_print_job_get_context (GnomePrintJob *gpm)
{
g_return_val_if_fail (gpm != NULL, NULL);
- g_return_val_if_fail (GNOME_IS_PRINT_MASTER (gpm), NULL);
+ g_return_val_if_fail (GNOME_IS_PRINT_JOB (gpm), NULL);
if (gpm->meta)
g_object_ref (G_OBJECT (gpm->meta));
@@ -226,26 +207,26 @@
}
/**
- * gnome_print_master_get_pages:
- * @gpm: An initialised and closed GnomePrintMaster.
+ * gnome_print_job_get_pages:
+ * @gpm: An initialised and closed GnomePrintJob.
*
* Find the number of pages stored in a completed printout.
*
* Return value: If @gpm has not been closed using
- * gnome_print_master_close(), then 0, otherwise the number
+ * gnome_print_job_close(), then 0, otherwise the number
* of pages created by the application.
**/
int
-gnome_print_master_get_pages (GnomePrintMaster *gpm)
+gnome_print_job_get_pages (GnomePrintJob *gpm)
{
GPMPrivate *pp;
gint mp;
g_return_val_if_fail (gpm != NULL, 0);
- g_return_val_if_fail (GNOME_IS_PRINT_MASTER (gpm), 0);
+ g_return_val_if_fail (GNOME_IS_PRINT_JOB (gpm), 0);
- if (!GNOME_PRINT_MASTER_CLOSED (gpm))
+ if (!GNOME_PRINT_JOB_CLOSED (gpm))
return 0;
gpm_update_layout_data (gpm);
@@ -263,17 +244,17 @@
/* fixme: (Lauris) */
/* Get imaging area size available to application (TRUE sucess, FALSE error) */
-/* This takes config for argument, as you may not want to create master yet */
+/* This takes config for argument, as you may not want to create job yet */
/* Sizes are given in PS points (GNOME_PRINT_PS_UNIT) */
gboolean
-gnome_print_master_get_page_size_from_config (GnomePrintConfig *config, gdouble *width, gdouble *height)
+gnome_print_job_get_page_size_from_config (GnomePrintConfig *config, gdouble *width, gdouble *height)
{
- GnomePrintMaster *gpm;
+ GnomePrintJob *gpm;
GPMPrivate *pp;
g_return_val_if_fail (config != NULL, FALSE);
- gpm = gnome_print_master_new_from_config (config);
+ gpm = gnome_print_job_new (config);
pp = gpm->priv;
@@ -296,20 +277,20 @@
}
/**
- * gnome_print_master_close:
- * @gpm: A GnomePrintMaster which has had printing performed
+ * gnome_print_job_close:
+ * @gpm: A GnomePrintJob which has had printing performed
*
- * * Closes the GnomePrintMaster @gpm, ready for printing or previewing.
+ * * Closes the GnomePrintJob @gpm, ready for printing or previewing.
*
* Return Value:
**/
gint
-gnome_print_master_close (GnomePrintMaster *gpm)
+gnome_print_job_close (GnomePrintJob *gpm)
{
GPMPrivate *pp;
g_return_val_if_fail (gpm != NULL, GNOME_PRINT_ERROR_UNKNOWN);
- g_return_val_if_fail (GNOME_IS_PRINT_MASTER (gpm), GNOME_PRINT_ERROR_UNKNOWN);
+ g_return_val_if_fail (GNOME_IS_PRINT_JOB (gpm), GNOME_PRINT_ERROR_UNKNOWN);
pp = gpm->priv;
@@ -322,10 +303,10 @@
}
/**
- * gnome_print_master_print:
- * @gpm: A completed GnomePrintMaster.
+ * gnome_print_job_print:
+ * @gpm: A completed GnomePrintJob.
*
- * Print the pages stored in the GnomePrintMaster to
+ * Print the pages stored in the GnomePrintJob to
* the phyisical printing device.
*
* If no printer has been set, then a dialogue is presented,
@@ -335,7 +316,7 @@
**/
gint
-gnome_print_master_print (GnomePrintMaster *gpm)
+gnome_print_job_print (GnomePrintJob *gpm)
{
GPMPrivate *pp;
GnomePrintContext *ctx;
@@ -347,7 +328,7 @@
gint ret;
g_return_val_if_fail (gpm != NULL, GNOME_PRINT_ERROR_UNKNOWN);
- g_return_val_if_fail (GNOME_IS_PRINT_MASTER (gpm), GNOME_PRINT_ERROR_UNKNOWN);
+ g_return_val_if_fail (GNOME_IS_PRINT_JOB (gpm), GNOME_PRINT_ERROR_UNKNOWN);
g_return_val_if_fail (gpm->priv, GNOME_PRINT_ERROR_UNKNOWN);
pp = gpm->priv;
@@ -419,7 +400,7 @@
/* Renders printout to specified context */
gint
-gnome_print_master_render (GnomePrintMaster *gpm, GnomePrintContext *ctx)
+gnome_print_job_render (GnomePrintJob *gpm, GnomePrintContext *ctx)
{
GPMPrivate *pp;
const guchar *data;
@@ -427,7 +408,7 @@
gint ret;
g_return_val_if_fail (gpm != NULL, GNOME_PRINT_ERROR_UNKNOWN);
- g_return_val_if_fail (GNOME_IS_PRINT_MASTER (gpm), GNOME_PRINT_ERROR_UNKNOWN);
+ g_return_val_if_fail (GNOME_IS_PRINT_JOB (gpm), GNOME_PRINT_ERROR_UNKNOWN);
g_return_val_if_fail (ctx != NULL, GNOME_PRINT_ERROR_UNKNOWN);
g_return_val_if_fail (GNOME_IS_PRINT_CONTEXT (ctx), GNOME_PRINT_ERROR_UNKNOWN);
g_return_val_if_fail (gpm->priv, GNOME_PRINT_ERROR_UNKNOWN);
@@ -455,7 +436,7 @@
/* Renders specified page */
gint
-gnome_print_master_render_page (GnomePrintMaster *gpm, GnomePrintContext *ctx, gint page, gboolean pageops)
+gnome_print_job_render_page (GnomePrintJob *gpm, GnomePrintContext *ctx, gint page, gboolean pageops)
{
GPMPrivate *pp;
const guchar *data;
@@ -463,7 +444,7 @@
gint ret;
g_return_val_if_fail (gpm != NULL, GNOME_PRINT_ERROR_UNKNOWN);
- g_return_val_if_fail (GNOME_IS_PRINT_MASTER (gpm), GNOME_PRINT_ERROR_UNKNOWN);
+ g_return_val_if_fail (GNOME_IS_PRINT_JOB (gpm), GNOME_PRINT_ERROR_UNKNOWN);
g_return_val_if_fail (ctx != NULL, GNOME_PRINT_ERROR_UNKNOWN);
g_return_val_if_fail (GNOME_IS_PRINT_CONTEXT (ctx), GNOME_PRINT_ERROR_UNKNOWN);
g_return_val_if_fail (gpm->priv, GNOME_PRINT_ERROR_UNKNOWN);
@@ -486,7 +467,7 @@
/* Create wrapper multipage */
mp = gnome_print_multipage_new (meta, pp->LY_LIST);
start = page * pp->num_affines;
- /* Render master pages */
+ /* Render job pages */
for (p = start; (p < pages) && (p < start + pp->num_affines); p++) {
gnome_print_meta_render_data_page (mp, data, len, p, TRUE);
}
@@ -540,7 +521,7 @@
#endif
static void
-gpm_update_layout_data (GnomePrintMaster *gpm)
+gpm_update_layout_data (GnomePrintJob *gpm)
{
GPMPrivate *pp;
ArtDRect area, r;
@@ -646,7 +627,7 @@
}
static void
-gpm_parse_config_data (GnomePrintMaster *gpm)
+gpm_parse_config_data (GnomePrintJob *gpm)
{
GPMPrivate *pp;
const GnomePrintUnit *unit;
@@ -731,7 +712,7 @@
#define A4_HEIGHT (297 * 72 / 25.4)
static void
-gpm_clear_config_data (GnomePrintMaster *gpm)
+gpm_clear_config_data (GnomePrintJob *gpm)
{
GPMPrivate *pp;
@@ -1069,7 +1050,7 @@
/**
- * gnome_print_master_set_print_to_file:
+ * gnome_print_job_set_print_to_file:
* @gmp: job
* @output: output file, if NULL sets print to file to FALSE
*
@@ -1078,7 +1059,7 @@
* Return Value:
**/
gint
-gnome_print_master_print_to_file (GnomePrintMaster *gpm, gchar *output)
+gnome_print_job_print_to_file (GnomePrintJob *gpm, gchar *output)
{
if (output) {
gnome_print_config_set (gpm->config, "Settings.Transport.Backend", "file");
Index: libgnomeprint/gnome-print-master.h
===================================================================
RCS file: /cvs/gnome/libgnomeprint/libgnomeprint/gnome-print-master.h,v
retrieving revision 1.13
diff -u -r1.13 gnome-print-master.h
--- libgnomeprint/gnome-print-master.h 2 Jun 2002 02:35:00 -0000 1.13
+++ libgnomeprint/gnome-print-master.h 31 Oct 2002 18:16:18 -0000
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * gnome-print-master.c: A system print interface.
+ * gnome-print-master.h: A system print interface.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License
@@ -31,69 +31,68 @@
G_BEGIN_DECLS
/*
- * GnomePrintMaster is frontend to GnomePrintContext creation and
- * printing. Unlike contexts themselves, master cares about layout,
+ * GnomePrintJob is frontend to GnomePrintContext creation and
+ * printing. Unlike contexts themselves, job cares about layout,
* number of copies and collate values. So it is usually safe bet to
* use it always.
*
- * Notice, that page number(s) used by master are already adjusted
+ * Notice, that page number(s) used by job are already adjusted
* to layout. I.e. if you print 2 pages per sheet, and invoke
- * beginpage/showpage 4 times, gnome_print_master_get_pages gives
+ * beginpage/showpage 4 times, gnome_print_job_get_pages gives
* you value 2.
*
* Also, if you wonder, what page dimensions you should be using in
- * your application, use gnome_print_master_get_page_size_from_config.
+ * your application, use gnome_print_job_get_page_size_from_config.
*
*/
-#define GNOME_TYPE_PRINT_MASTER (gnome_print_master_get_type ())
-#define GNOME_PRINT_MASTER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNOME_TYPE_PRINT_MASTER, GnomePrintMaster))
-#define GNOME_PRINT_MASTER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNOME_TYPE_PRINT_MASTER, GnomePrintMasterClass))
-#define GNOME_IS_PRINT_MASTER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNOME_TYPE_PRINT_MASTER))
-#define GNOME_IS_PRINT_MASTER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNOME_TYPE_PRINT_MASTER))
-#define GNOME_PRINT_MASTER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GNOME_TYPE_PRINT_MASTER, GnomePrintMasterClass))
+#define GNOME_TYPE_PRINT_JOB (gnome_print_job_get_type ())
+#define GNOME_PRINT_JOB(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNOME_TYPE_PRINT_JOB, GnomePrintJob))
+#define GNOME_PRINT_JOB_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNOME_TYPE_PRINT_JOB, GnomePrintJobClass))
+#define GNOME_IS_PRINT_JOB(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNOME_TYPE_PRINT_JOB))
+#define GNOME_IS_PRINT_JOB_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNOME_TYPE_PRINT_JOB))
+#define GNOME_PRINT_JOB_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GNOME_TYPE_PRINT_JOB, GnomePrintJobClass))
-typedef struct _GnomePrintMaster GnomePrintMaster;
-typedef struct _GnomePrintMasterClass GnomePrintMasterClass;
+typedef struct _GnomePrintJob GnomePrintJob;
+typedef struct _GnomePrintJobClass GnomePrintJobClass;
#include <libgnomeprint/gnome-print.h>
-GType gnome_print_master_get_type (void);
+GType gnome_print_job_get_type (void);
-/* Creates new GnomePrintMaster */
+/* Creates new GnomePrintJob */
-GnomePrintMaster *gnome_print_master_new (void);
-GnomePrintMaster *gnome_print_master_new_from_config (GnomePrintConfig *config);
+GnomePrintJob *gnome_print_job_new (GnomePrintConfig *config);
/* Get REFERENCED configuration */
-GnomePrintConfig *gnome_print_master_get_config (GnomePrintMaster *gpm);
+GnomePrintConfig *gnome_print_job_get_config (GnomePrintJob *gpm);
/* Get REFERNCED context for actual printing */
-GnomePrintContext *gnome_print_master_get_context (GnomePrintMaster *gpm);
+GnomePrintContext *gnome_print_job_get_context (GnomePrintJob *gpm);
-/* Signal GnomePrintMaster, that application has finished job */
-/* You should not close context given you by master, but use this instead */
-gint gnome_print_master_close (GnomePrintMaster *gpm);
+/* Signal GnomePrintJob, that application has finished job */
+/* You should not close context given you by job, but use this instead */
+gint gnome_print_job_close (GnomePrintJob *gpm);
/* Send printout to printer, as defined by config */
-gint gnome_print_master_print (GnomePrintMaster *gpm);
+gint gnome_print_job_print (GnomePrintJob *gpm);
/* Renders printout to specified context (with layout, ignoring copies) */
-gint gnome_print_master_render (GnomePrintMaster *gpm, GnomePrintContext *ctx);
+gint gnome_print_job_render (GnomePrintJob *gpm, GnomePrintContext *ctx);
/* Renders specified page (with layout) */
-gint gnome_print_master_render_page (GnomePrintMaster *gpm, GnomePrintContext *ctx, gint page, gboolean pageops);
+gint gnome_print_job_render_page (GnomePrintJob *gpm, GnomePrintContext *ctx, gint page, gboolean pageops);
-/* Get number of real output pages (0 if master is not closed) */
-gint gnome_print_master_get_pages (GnomePrintMaster *gpm);
+/* Get number of real output pages (0 if job is not closed) */
+gint gnome_print_job_get_pages (GnomePrintJob *gpm);
/* Get imaging area size available to application (TRUE sucess, FALSE error) */
-/* This takes config for argument, as you may not want to create master yet */
+/* This takes config for argument, as you may not want to create job yet */
/* Sizes are given in PS points (GNOME_PRINT_PS_UNIT) */
-gboolean gnome_print_master_get_page_size_from_config (GnomePrintConfig *config, gdouble *width, gdouble *height);
+gboolean gnome_print_job_get_page_size_from_config (GnomePrintConfig *config, gdouble *width, gdouble *height);
/* This are convenience functions for common stuff that could be accomplished with gnome_print_config
* calls but will require deeper knowledge when GnomePrintConfig trees get complex */
-gint gnome_print_master_print_to_file (GnomePrintMaster *gpm, gchar *output);
+gint gnome_print_job_print_to_file (GnomePrintJob *gpm, gchar *output);
G_END_DECLS
Index: tests/generate.c
===================================================================
RCS file: /cvs/gnome/libgnomeprint/tests/generate.c,v
retrieving revision 1.14
diff -u -r1.14 generate.c
--- tests/generate.c 15 Jul 2002 14:08:34 -0000 1.14
+++ tests/generate.c 31 Oct 2002 18:16:18 -0000
@@ -401,7 +401,7 @@
{
GnomePrintContext *gpc;
- GnomePrintMaster *gpm;
+ GnomePrintJob *gpm;
GnomePrintConfig *config;
BackendType backend;
@@ -419,15 +419,15 @@
g_type_init ();
- gpm = gnome_print_master_new ();
+ gpm = gnome_print_job_new (NULL);
if (!gpm)
- my_error ("Print master new");
- gpc = gnome_print_master_get_context (gpm);
+ my_error ("Print job new");
+ gpc = gnome_print_job_get_context (gpm);
if (!gpc)
- my_error ("Print master get context");
- config = gnome_print_master_get_config (gpm);
+ my_error ("Print job get context");
+ config = gnome_print_job_get_config (gpm);
if (!config)
- my_error ("Print master get config");
+ my_error ("Print job get config");
/* Set backend */
switch (backend) {
@@ -469,8 +469,8 @@
}
/* We always print to file */
- if (gnome_print_master_print_to_file (gpm, output) != GNOME_PRINT_OK)
- my_error ("print_master_print_to_file");
+ if (gnome_print_job_print_to_file (gpm, output) != GNOME_PRINT_OK)
+ my_error ("print_job_print_to_file");
if (replay_str)
ret += my_replay (gpc, replay_str);
@@ -479,10 +479,10 @@
if (ret > 0)
my_error ("drawing functions");
- if (gnome_print_master_close (gpm) != GNOME_PRINT_OK)
- my_error ("gnome_print_master_close");
- if (gnome_print_master_print (gpm) != GNOME_PRINT_OK)
- my_error ("gnome_print_master_print");
+ if (gnome_print_job_close (gpm) != GNOME_PRINT_OK)
+ my_error ("gnome_print_job_close");
+ if (gnome_print_job_print (gpm) != GNOME_PRINT_OK)
+ my_error ("gnome_print_job_print");
clean_and_exit:
Index: tests/testprint.c
===================================================================
RCS file: /cvs/gnome/libgnomeprint/tests/testprint.c,v
retrieving revision 1.28
diff -u -r1.28 testprint.c
--- tests/testprint.c 1 Jun 2002 10:06:13 -0000 1.28
+++ tests/testprint.c 31 Oct 2002 18:16:18 -0000
@@ -60,7 +60,7 @@
static gchar *textfile = NULL;
static gchar *dumpfile = NULL;
static gchar *metafile = NULL;
-static gboolean master = FALSE;
+static gboolean job = FALSE;
static gboolean bonobo = FALSE;
static gboolean papers = FALSE;
static gboolean gpa = FALSE;
@@ -69,7 +69,7 @@
{ "papers", 'p', POPT_ARG_NONE, &papers, 0, N_("Print Paper database"), NULL},
{ "gpa", 'g', POPT_ARG_NONE, &gpa, 0, N_("Describe GPA Tree"), NULL},
{ "text", 't', POPT_ARG_STRING, &textfile, 0, N_("Print text file"), N_("PATH")},
- { "master", 'm', POPT_ARG_NONE, &master, 0, N_("Use GnomePrintMaster for printing"), NULL},
+ { "job", 'j', POPT_ARG_NONE, &job, 0, N_("Use GnomePrintJob for printing"), NULL},
{ "dump", 'd', POPT_ARG_STRING, &dumpfile, 0, N_("Dump printout to metafile ('-' for stdout)"), N_("PATH")},
{ "bonobo", 'b', POPT_ARG_NONE, &bonobo, 0, N_("Split job between bonobo"), NULL},
{ "metafile", 'm', POPT_ARG_STRING, &metafile, 0, N_("Render from metafile"), N_("PATH")},
@@ -331,7 +331,7 @@
{
GnomePrintConfig *config;
GnomePrintContext *pctx;
- GnomePrintMaster *gpm;
+ GnomePrintJob *gpm;
poptContext ctx;
char **args;
int ret;
@@ -429,13 +429,13 @@
/* Now set up output target */
- if (master) {
- /* Create GnomePrintMaster */
- gpm = gnome_print_master_new_from_config (config);
+ if (job) {
+ /* Create GnomePrintJob */
+ gpm = gnome_print_job_new (config);
if (!gpm) {
- g_error ("Cannot create GnomePrintMaster");
+ g_error ("Cannot create GnomePrintJob");
}
- pctx = gnome_print_master_get_context (gpm);
+ pctx = gnome_print_job_get_context (gpm);
} else if (dumpfile) {
/* Create metafile to be dumped */
pctx = gnome_print_meta_new ();
@@ -497,13 +497,13 @@
}
}
- /* Close and unref output (if we have master/metafile, it is still referenced) */
+ /* Close and unref output (if we have job/metafile, it is still referenced) */
gnome_print_context_close (pctx);
g_object_unref (G_OBJECT (pctx));
- if (master) {
- gnome_print_master_close (gpm);
- gnome_print_master_print (gpm);
+ if (job) {
+ gnome_print_job_close (gpm);
+ gnome_print_job_print (gpm);
g_object_unref (G_OBJECT (gpm));
} else if (dumpfile) {
const guchar *buf;
@@ -664,7 +664,7 @@
pw = A4_WIDTH;
ph = A4_HEIGHT;
- gnome_print_master_get_page_size_from_config (config, &pw, &ph);
+ gnome_print_job_get_page_size_from_config (config, &pw, &ph);
ml = CM(1);
mr = CM(1);
? autom4te-2.53.cache
? stamp-h1
? doc/libgnomeprintui-scan.c
? libgnomeprintui/gnome-print-preview.c.modified
Index: examples/example_01.c
===================================================================
RCS file: /cvs/gnome/libgnomeprintui/examples/example_01.c,v
retrieving revision 1.3
diff -u -r1.3 example_01.c
--- examples/example_01.c 27 May 2002 14:03:01 -0000 1.3
+++ examples/example_01.c 31 Oct 2002 18:12:59 -0000
@@ -45,16 +45,16 @@
static void
my_print (void)
{
- GnomePrintMaster *gpm;
+ GnomePrintJob *gpm;
GnomePrintContext *gpc;
- gpm = gnome_print_master_new ();
- gpc = gnome_print_master_get_context (gpm);
+ gpm = gnome_print_job_new (NULL);
+ gpc = gnome_print_job_get_context (gpm);
my_draw (gpc);
- gnome_print_master_close (gpm);
- gnome_print_master_print (gpm);
+ gnome_print_job_close (gpm);
+ gnome_print_job_print (gpm);
}
int
Index: examples/example_02.c
===================================================================
RCS file: /cvs/gnome/libgnomeprintui/examples/example_02.c,v
retrieving revision 1.3
diff -u -r1.3 example_02.c
--- examples/example_02.c 27 May 2002 14:03:01 -0000 1.3
+++ examples/example_02.c 31 Oct 2002 18:13:00 -0000
@@ -120,16 +120,16 @@
static void
my_print (void)
{
- GnomePrintMaster *gpm;
+ GnomePrintJob *gpm;
GnomePrintContext *gpc;
- gpm = gnome_print_master_new ();
- gpc = gnome_print_master_get_context (gpm);
+ gpm = gnome_print_job_new (NULL);
+ gpc = gnome_print_job_get_context (gpm);
my_draw (gpc);
- gnome_print_master_close (gpm);
- gnome_print_master_print (gpm);
+ gnome_print_job_close (gpm);
+ gnome_print_job_print (gpm);
}
int
Index: examples/example_03.c
===================================================================
RCS file: /cvs/gnome/libgnomeprintui/examples/example_03.c,v
retrieving revision 1.3
diff -u -r1.3 example_03.c
--- examples/example_03.c 27 May 2002 14:03:01 -0000 1.3
+++ examples/example_03.c 31 Oct 2002 18:13:00 -0000
@@ -49,16 +49,16 @@
static void
my_print (void)
{
- GnomePrintMaster *gpm;
+ GnomePrintJob *gpm;
GnomePrintContext *gpc;
- gpm = gnome_print_master_new ();
- gpc = gnome_print_master_get_context (gpm);
+ gpm = gnome_print_job_new (NULL);
+ gpc = gnome_print_job_get_context (gpm);
my_draw (gpc);
- gnome_print_master_close (gpm);
- gnome_print_master_print (gpm);
+ gnome_print_job_close (gpm);
+ gnome_print_job_print (gpm);
}
int
Index: examples/example_04.c
===================================================================
RCS file: /cvs/gnome/libgnomeprintui/examples/example_04.c,v
retrieving revision 1.3
diff -u -r1.3 example_04.c
--- examples/example_04.c 27 May 2002 00:06:36 -0000 1.3
+++ examples/example_04.c 31 Oct 2002 18:13:00 -0000
@@ -84,16 +84,16 @@
static void
my_print (void)
{
- GnomePrintMaster *gpm;
+ GnomePrintJob *gpm;
GnomePrintContext *gpc;
- gpm = gnome_print_master_new ();
- gpc = gnome_print_master_get_context (gpm);
+ gpm = gnome_print_job_new (NULL);
+ gpc = gnome_print_job_get_context (gpm);
my_draw (gpc);
- gnome_print_master_close (gpm);
- gnome_print_master_print (gpm);
+ gnome_print_job_close (gpm);
+ gnome_print_job_print (gpm);
}
int
Index: examples/example_05.c
===================================================================
RCS file: /cvs/gnome/libgnomeprintui/examples/example_05.c,v
retrieving revision 1.4
diff -u -r1.4 example_05.c
--- examples/example_05.c 6 Sep 2002 06:01:27 -0000 1.4
+++ examples/example_05.c 31 Oct 2002 18:13:00 -0000
@@ -45,13 +45,13 @@
}
static void
-my_set_names (GnomePrintMaster *gpm)
+my_set_names (GnomePrintJob *gpm)
{
GnomePrintConfig *config;
gchar *printer;
gchar *output_filename;
- config = gnome_print_master_get_config (gpm);
+ config = gnome_print_job_get_config (gpm);
/* Set the printer */
gnome_print_config_set (config, "Printer", "GENERIC");
@@ -72,12 +72,12 @@
}
static void
-my_dump_orientation (GnomePrintMaster *gpm)
+my_dump_orientation (GnomePrintJob *gpm)
{
GnomePrintConfig *config;
gchar *orientation;
- config = gnome_print_master_get_config (gpm);
+ config = gnome_print_job_get_config (gpm);
orientation = gnome_print_config_get (config, GNOME_PRINT_KEY_ORIENTATION);
g_print ("Orientation is: %s\n", orientation);
@@ -88,19 +88,19 @@
static void
my_print (void)
{
- GnomePrintMaster *gpm;
+ GnomePrintJob *gpm;
GnomePrintContext *gpc;
- gpm = gnome_print_master_new ();
- gpc = gnome_print_master_get_context (gpm);
+ gpm = gnome_print_job_new (NULL);
+ gpc = gnome_print_job_get_context (gpm);
my_set_names (gpm);
my_dump_orientation (gpm);
my_draw (gpc);
- gnome_print_master_close (gpm);
- gnome_print_master_print (gpm);
+ gnome_print_job_close (gpm);
+ gnome_print_job_print (gpm);
}
int
Index: examples/example_06.c
===================================================================
RCS file: /cvs/gnome/libgnomeprintui/examples/example_06.c,v
retrieving revision 1.1
diff -u -r1.1 example_06.c
--- examples/example_06.c 27 May 2002 00:06:36 -0000 1.1
+++ examples/example_06.c 31 Oct 2002 18:13:00 -0000
@@ -50,14 +50,14 @@
my_print (void)
{
GnomePrintContext *gpc;
- GnomePrintMaster *gpm;
+ GnomePrintJob *gpm;
GtkWidget *dialog;
gint response;
/* Create the objects */
- gpm = gnome_print_master_new ();
- dialog = gnome_print_dialog_new_from_master (gpm, "Sample print dialog", 0);
- gpc = gnome_print_master_get_context (gpm);
+ gpm = gnome_print_job_new (NULL);
+ dialog = gnome_print_dialog_new (gpm, "Sample print dialog", 0);
+ gpc = gnome_print_job_get_context (gpm);
/* Run the dialog */
gtk_widget_show (dialog);
@@ -70,8 +70,8 @@
/* Draw & print */
g_print ("Printing ...\n");
my_draw (gpc);
- gnome_print_master_close (gpm);
- gnome_print_master_print (gpm);
+ gnome_print_job_close (gpm);
+ gnome_print_job_print (gpm);
}
int
Index: examples/example_08.c
===================================================================
RCS file: /cvs/gnome/libgnomeprintui/examples/example_08.c,v
retrieving revision 1.1
diff -u -r1.1 example_08.c
--- examples/example_08.c 27 May 2002 16:29:47 -0000 1.1
+++ examples/example_08.c 31 Oct 2002 18:13:00 -0000
@@ -50,16 +50,16 @@
my_print (void)
{
GnomePrintContext *gpc;
- GnomePrintMaster *gpm;
+ GnomePrintJob *gpm;
GnomePrintConfig *config;
GtkWidget *dialog;
gint response;
/* Create the objects */
- gpm = gnome_print_master_new ();
- dialog = gnome_print_dialog_new_from_master (gpm, "Sample print dialog", 0);
- gpc = gnome_print_master_get_context (gpm);
- config = gnome_print_master_get_config (gpm);
+ gpm = gnome_print_job_new (NULL);
+ dialog = gnome_print_dialog_new (gpm, "Sample print dialog", 0);
+ gpc = gnome_print_job_get_context (gpm);
+ config = gnome_print_job_get_config (gpm);
/* Run the dialog */
gtk_widget_show (dialog);
@@ -72,7 +72,7 @@
/* Draw & print */
my_draw (gpc);
gnome_print_config_dump (config);
- gnome_print_master_close (gpm);
+ gnome_print_job_close (gpm);
/* We don't print, we only dump the info */
}
Index: examples/example_09.c
===================================================================
RCS file: /cvs/gnome/libgnomeprintui/examples/example_09.c,v
retrieving revision 1.3
diff -u -r1.3 example_09.c
--- examples/example_09.c 27 May 2002 00:06:36 -0000 1.3
+++ examples/example_09.c 31 Oct 2002 18:13:00 -0000
@@ -50,7 +50,7 @@
static void
my_print (void)
{
- GnomePrintMaster *gpm;
+ GnomePrintJob *gpm;
GnomePrintContext *gpc;
GnomePrintConfig *config;
GtkWidget *dialog;
@@ -67,13 +67,13 @@
return;
}
- gpm = gnome_print_master_new_from_config (config);
- gpc = gnome_print_master_get_context (gpm);
+ gpm = gnome_print_job_new (config);
+ gpc = gnome_print_job_get_context (gpm);
my_draw (gpc);
- gnome_print_master_close (gpm);
- gnome_print_master_print (gpm);
+ gnome_print_job_close (gpm);
+ gnome_print_job_print (gpm);
gnome_print_config_save_to_file (gpc, EXAMPLE_07_CONFIG_FILE);
}
Index: examples/example_10.c
===================================================================
RCS file: /cvs/gnome/libgnomeprintui/examples/example_10.c,v
retrieving revision 1.10
diff -u -r1.10 example_10.c
--- examples/example_10.c 7 Sep 2002 10:15:39 -0000 1.10
+++ examples/example_10.c 31 Oct 2002 18:13:00 -0000
@@ -128,36 +128,35 @@
static void
-my_print (GnomePrintMaster *gpm, gboolean preview)
+my_print (GnomePrintJob *gpm, gboolean preview)
{
GnomePrintContext *gpc;
- gpc = gnome_print_master_get_context (gpm);
+ gpc = gnome_print_job_get_context (gpm);
my_draw (gpc);
g_object_unref (G_OBJECT (gpc));
- gnome_print_master_close (gpm);
+ gnome_print_job_close (gpm);
if (!preview) {
my_status_bar_print ("Printing ...");
- gnome_print_master_print (gpm);
+ gnome_print_job_print (gpm);
} else {
my_status_bar_print ("Print previewing ...");
- gtk_widget_show (gnome_print_master_preview_new (gpm,
- "Title goes here"));
+ gtk_widget_show (gnome_print_job_preview_new (gpm, "Title goes here"));
}
}
static void
my_print_cb (void)
{
- GnomePrintMaster *gpm;
+ GnomePrintJob *gpm;
GtkWidget *dialog;
gint response;
/* Create the objects */
g_assert (app->active_doc);
- gpm = gnome_print_master_new_from_config (app->active_doc->config);
- dialog = gnome_print_dialog_new_from_master (gpm, "Sample print dialog", 0);
+ gpm = gnome_print_job_new (app->active_doc->config);
+ dialog = gnome_print_dialog_new (gpm, "Sample print dialog", 0);
/* Run the dialog */
response = gtk_dialog_run (GTK_DIALOG (dialog));
@@ -179,9 +178,9 @@
static void
my_print_preview_cb (void)
{
- GnomePrintMaster *gpm;
+ GnomePrintJob *gpm;
- gpm = gnome_print_master_new_from_config (app->active_doc->config);
+ gpm = gnome_print_job_new (app->active_doc->config);
my_print (gpm, TRUE);
g_object_unref (G_OBJECT (gpm));
}
Index: libgnomeprintui/gnome-canvas-hacktext.c
===================================================================
RCS file: /cvs/gnome/libgnomeprintui/libgnomeprintui/gnome-canvas-hacktext.c,v
retrieving revision 1.32
diff -u -r1.32 gnome-canvas-hacktext.c
--- libgnomeprintui/gnome-canvas-hacktext.c 6 Sep 2002 06:01:28 -0000 1.32
+++ libgnomeprintui/gnome-canvas-hacktext.c 31 Oct 2002 18:13:00 -0000
@@ -40,16 +40,17 @@
#include <libgnomeprint/gnome-rfont.h>
#include "gnome-canvas-hacktext.h"
+#include "gnome-print-i18n.h"
enum {
- ARG_0,
- ARG_TEXT,
- ARG_GLYPHLIST,
- ARG_FILL_COLOR,
- ARG_FILL_COLOR_RGBA,
- ARG_FONT,
- ARG_X,
- ARG_Y
+ PROP_0,
+ PROP_TEXT,
+ PROP_GLYPHLIST,
+ PROP_FILL_COLOR,
+ PROP_FILL_COLOR_RGBA,
+ PROP_FONT,
+ PROP_X,
+ PROP_Y
};
@@ -120,20 +121,57 @@
gobject_class->set_property = gnome_canvas_hacktext_set_property;
gobject_class->get_property = gnome_canvas_hacktext_get_property;
- /* FIXME: finish port (Chema) */
-#if 0
- /* When this gets checked into libgnomeui, change the
- * GTK_TYPE_POINTER to GTK_TYPE_GNOME_CANVAS_HACKTEXT, and add an
- * entry to gnome-boxed.defs
- */
- gtk_object_add_arg_type ("GnomeCanvasHacktext::text", GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_TEXT);
- gtk_object_add_arg_type ("GnomeCanvasHacktext::glyphlist", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_GLYPHLIST);
- gtk_object_add_arg_type ("GnomeCanvasHacktext::fill_color", GTK_TYPE_STRING, GTK_ARG_WRITABLE, ARG_FILL_COLOR);
- gtk_object_add_arg_type ("GnomeCanvasHacktext::fill_color_rgba", GTK_TYPE_UINT, GTK_ARG_READWRITE, ARG_FILL_COLOR_RGBA);
- gtk_object_add_arg_type ("GnomeCanvasHacktext::font", GTK_TYPE_OBJECT, GTK_ARG_READWRITE, ARG_FONT);
- gtk_object_add_arg_type ("GnomeCanvasHacktext::x", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X);
- gtk_object_add_arg_type ("GnomeCanvasHacktext::y", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y);
-#endif
+ g_object_class_install_property
+ (gobject_class,
+ PROP_TEXT,
+ g_param_spec_string ("text",
+ _("Text"),
+ _("Text to render"),
+ NULL,
+ G_PARAM_READABLE | G_PARAM_WRITABLE));
+ g_object_class_install_property
+ (gobject_class,
+ PROP_X,
+ g_param_spec_double ("x", NULL, NULL,
+ -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
+ (G_PARAM_READABLE | G_PARAM_WRITABLE)));
+ g_object_class_install_property
+ (gobject_class,
+ PROP_Y,
+ g_param_spec_double ("y", NULL, NULL,
+ -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
+ (G_PARAM_READABLE | G_PARAM_WRITABLE)));
+ g_object_class_install_property
+ (gobject_class,
+ PROP_GLYPHLIST,
+ g_param_spec_pointer ("glyphlist",
+ _("Glyphlist"),
+ _("Glyphlist"),
+ (G_PARAM_READABLE | G_PARAM_WRITABLE)));
+ g_object_class_install_property
+ (gobject_class,
+ PROP_FILL_COLOR,
+ g_param_spec_string ("fill_color",
+ _("Color"),
+ _("Text color, as string"),
+ NULL,
+ G_PARAM_WRITABLE));
+ g_object_class_install_property
+ (gobject_class,
+ PROP_FILL_COLOR_RGBA,
+ g_param_spec_uint ("fill_color_rgba",
+ _("Color"),
+ _("Text color, as an R/G/B/A combined integer"),
+ 0, G_MAXUINT, 0,
+ (G_PARAM_READABLE | G_PARAM_WRITABLE)));
+ g_object_class_install_property
+ (gobject_class,
+ PROP_FONT,
+ g_param_spec_object ("font",
+ _("Font"),
+ _("Font as a GnomeFont struct"),
+ GNOME_TYPE_FONT,
+ (G_PARAM_READABLE | G_PARAM_WRITABLE)));
object_class->destroy = gnome_canvas_hacktext_destroy;
@@ -245,13 +283,8 @@
const GValue *value,
GParamSpec *pspec)
{
-
- g_assert_not_reached ();
-/* FIMXE: Finish port to 2.0 (Chema) */
-#if 0
GnomeCanvasItem *item;
GnomeCanvasHacktext *bp;
- char *text;
GnomeGlyphList * gl;
GdkColor color;
GnomeFont * font;
@@ -259,10 +292,8 @@
item = GNOME_CANVAS_ITEM (object);
bp = GNOME_CANVAS_HACKTEXT (object);
- switch (arg_id) {
- case ARG_TEXT:
- text = GTK_VALUE_POINTER (*arg);
-
+ switch (param_id) {
+ case PROP_TEXT:
if (bp->text) {
g_free (bp->text);
bp->text = NULL;
@@ -273,14 +304,13 @@
bp->priv->glyphlist = NULL;
}
- if (text)
- bp->text = g_strdup (text);
+ bp->text = g_value_dup_string (value);
gnome_canvas_item_request_update (item);
break;
- case ARG_GLYPHLIST:
- gl = GTK_VALUE_POINTER (*arg);
+ case PROP_GLYPHLIST:
+ gl = g_value_get_pointer (value);
if (bp->text) {
g_free (bp->text);
@@ -302,8 +332,8 @@
break;
- case ARG_FILL_COLOR:
- if (gnome_canvas_get_color (item->canvas, GTK_VALUE_STRING (*arg), &color)) {
+ case PROP_FILL_COLOR:
+ if (gnome_canvas_get_color (item->canvas, g_value_get_string (value), &color)) {
bp->fill_set = TRUE;
bp->fill_pixel = color.pixel;
bp->fill_rgba =
@@ -319,17 +349,17 @@
gnome_canvas_item_request_update (item);
break;
- case ARG_FILL_COLOR_RGBA:
+ case PROP_FILL_COLOR_RGBA:
bp->fill_set = TRUE;
- bp->fill_rgba = GTK_VALUE_UINT (*arg);
+ bp->fill_rgba = g_value_get_uint (value);
/* should probably request repaint on the fill_svp */
gnome_canvas_item_request_update (item);
break;
- case ARG_FONT:
- font = GTK_VALUE_POINTER (*arg);
+ case PROP_FONT:
+ font = g_value_get_object (value);
if (font)
gnome_font_ref (font);
if (bp->priv->font)
@@ -339,20 +369,19 @@
gnome_canvas_item_request_update (item);
break;
- case ARG_X:
- bp->x = GTK_VALUE_DOUBLE (*arg);
+ case PROP_X:
+ bp->x = g_value_get_double (value);
gnome_canvas_item_request_update (item);
break;
- case ARG_Y:
- bp->y = GTK_VALUE_DOUBLE (*arg);
+ case PROP_Y:
+ bp->y = g_value_get_double (value);
gnome_canvas_item_request_update (item);
break;
default:
break;
}
-#endif
}
static void
@@ -361,40 +390,35 @@
GValue *value,
GParamSpec *pspec)
{
-/* FIXME: Finish port to 2.0 (Chema) */
-#if 0
GnomeCanvasHacktext *bp;
bp = GNOME_CANVAS_HACKTEXT (object);
- switch (arg_id) {
- case ARG_TEXT:
- if (bp->text) {
- GTK_VALUE_POINTER (*arg) = g_strdup (bp->text);
- } else
- GTK_VALUE_POINTER (*arg) = NULL;
+ switch (param_id) {
+ case PROP_TEXT:
+ g_value_set_string (value, bp->text);
break;
- case ARG_FILL_COLOR_RGBA:
- GTK_VALUE_UINT (*arg) = bp->fill_color;
+
+ case PROP_FILL_COLOR_RGBA:
+ g_value_set_uint (value, bp->fill_color);
break;
- case ARG_FONT:
- GTK_VALUE_POINTER (*arg) = bp->priv->font;
+ case PROP_FONT:
+ g_value_set_object (value, bp->priv->font);
break;
- case ARG_X:
- GTK_VALUE_DOUBLE (*arg) = bp->x;
+ case PROP_X:
+ g_value_set_double (value, bp->x);
break;
- case ARG_Y:
- GTK_VALUE_DOUBLE (*arg) = bp->y;
+ case PROP_Y:
+ g_value_set_double (value, bp->y);
break;
default:
- arg->type = GTK_TYPE_INVALID;
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
break;
}
-#endif
}
static void
Index: libgnomeprintui/gnome-print-copies.c
===================================================================
RCS file: /cvs/gnome/libgnomeprintui/libgnomeprintui/gnome-print-copies.c,v
retrieving revision 1.26
diff -u -r1.26 gnome-print-copies.c
--- libgnomeprintui/gnome-print-copies.c 21 Sep 2002 06:08:14 -0000 1.26
+++ libgnomeprintui/gnome-print-copies.c 31 Oct 2002 18:13:00 -0000
@@ -52,9 +52,9 @@
void (* copies_set) (GnomePrintCopiesSelection * gpc, gint copies, gboolean collate);
};
-static void gnome_print_copies_selection_class_init (GnomePrintCopiesSelectionClass *class);
-static void gnome_print_copies_selection_init (GnomePrintCopiesSelection *gspaper);
-static void gnome_print_copies_selection_destroy (GtkObject *object);
+static void gnome_print_copies_selector_class_init (GnomePrintCopiesSelectionClass *class);
+static void gnome_print_copies_selector_init (GnomePrintCopiesSelection *gspaper);
+static void gnome_print_copies_selector_destroy (GtkObject *object);
/* again, these images may be here temporarily */
@@ -153,18 +153,18 @@
static guint gpc_signals[LAST_SIGNAL] = {0};
GType
-gnome_print_copies_selection_get_type (void)
+gnome_print_copies_selector_get_type (void)
{
static GType type = 0;
if (!type) {
static const GTypeInfo info = {
sizeof (GnomePrintCopiesSelectionClass),
NULL, NULL,
- (GClassInitFunc) gnome_print_copies_selection_class_init,
+ (GClassInitFunc) gnome_print_copies_selector_class_init,
NULL, NULL,
sizeof (GnomePrintCopiesSelection),
0,
- (GInstanceInitFunc) gnome_print_copies_selection_init,
+ (GInstanceInitFunc) gnome_print_copies_selector_init,
NULL,
};
type = g_type_register_static (GTK_TYPE_VBOX, "GnomePrintCopiesSelection", &info, 0);
@@ -173,7 +173,7 @@
}
static void
-gnome_print_copies_selection_class_init (GnomePrintCopiesSelectionClass *klass)
+gnome_print_copies_selector_class_init (GnomePrintCopiesSelectionClass *klass)
{
GtkObjectClass *gtk_object_class;
GObjectClass *object_class;
@@ -193,7 +193,7 @@
2,
G_TYPE_INT, G_TYPE_BOOLEAN);
- gtk_object_class->destroy = gnome_print_copies_selection_destroy;
+ gtk_object_class->destroy = gnome_print_copies_selector_destroy;
}
static void
@@ -232,7 +232,7 @@
}
static void
-gnome_print_copies_selection_init (GnomePrintCopiesSelection *gpc)
+gnome_print_copies_selector_init (GnomePrintCopiesSelection *gpc)
{
GtkWidget *table, *label, *frame;
GtkAdjustment *adj;
@@ -294,7 +294,7 @@
}
/**
- * gnome_print_copies_selection_new:
+ * gnome_print_copies_selector_new:
*
* Create a new GnomePrintCopies widget.
*
@@ -302,17 +302,17 @@
**/
GtkWidget *
-gnome_print_copies_selection_new (void)
+gnome_print_copies_selector_new (void)
{
return GTK_WIDGET (g_object_new (GNOME_TYPE_PRINT_COPIES_SELECTION, NULL));
}
static void
-gnome_print_copies_selection_destroy (GtkObject *object)
+gnome_print_copies_selector_destroy (GtkObject *object)
{
GnomePrintCopiesSelection *gpc;
- gpc = GNOME_PRINT_COPIES_SELECTION (object);
+ gpc = GNOME_PRINT_COPIES_SELECTOR (object);
if (GTK_OBJECT_CLASS (parent_class)->destroy)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
@@ -328,7 +328,7 @@
**/
void
-gnome_print_copies_selection_set_copies (GnomePrintCopiesSelection *gpc, gint copies, gint collate)
+gnome_print_copies_selector_set_copies (GnomePrintCopiesSelection *gpc, gint copies, gint collate)
{
g_return_if_fail (gpc != NULL);
g_return_if_fail (GNOME_IS_PRINT_COPIES_SELECTION (gpc));
@@ -352,7 +352,7 @@
**/
gint
-gnome_print_copies_selection_get_copies (GnomePrintCopiesSelection *gpc)
+gnome_print_copies_selector_get_copies (GnomePrintCopiesSelection *gpc)
{
g_return_val_if_fail (gpc != NULL, 0);
g_return_val_if_fail (GNOME_IS_PRINT_COPIES_SELECTION (gpc), 0);
@@ -370,7 +370,7 @@
**/
gboolean
-gnome_print_copies_selection_get_collate (GnomePrintCopiesSelection *gpc)
+gnome_print_copies_selector_get_collate (GnomePrintCopiesSelection *gpc)
{
g_return_val_if_fail (gpc != NULL, FALSE);
g_return_val_if_fail (GNOME_IS_PRINT_COPIES_SELECTION (gpc), FALSE);
Index: libgnomeprintui/gnome-print-copies.h
===================================================================
RCS file: /cvs/gnome/libgnomeprintui/libgnomeprintui/gnome-print-copies.h,v
retrieving revision 1.11
diff -u -r1.11 gnome-print-copies.h
--- libgnomeprintui/gnome-print-copies.h 21 Sep 2002 06:08:14 -0000 1.11
+++ libgnomeprintui/gnome-print-copies.h 31 Oct 2002 18:13:00 -0000
@@ -32,12 +32,12 @@
G_BEGIN_DECLS
-#define GNOME_TYPE_PRINT_COPIES_SELECTION (gnome_print_copies_selection_get_type ())
-#define GNOME_PRINT_COPIES_SELECTION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNOME_TYPE_PRINT_COPIES_SELECTION, GnomePrintCopiesSelection))
-#define GNOME_PRINT_COPIES_SELECTION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNOME_TYPE_PRINT_COPIES_SELECTION, GnomePrintCopiesSelectionClass))
+#define GNOME_TYPE_PRINT_COPIES_SELECTION (gnome_print_copies_selector_get_type ())
+#define GNOME_PRINT_COPIES_SELECTOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNOME_TYPE_PRINT_COPIES_SELECTION, GnomePrintCopiesSelection))
+#define GNOME_PRINT_COPIES_SELECTOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNOME_TYPE_PRINT_COPIES_SELECTION, GnomePrintCopiesSelectionClass))
#define GNOME_IS_PRINT_COPIES_SELECTION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNOME_TYPE_PRINT_COPIES_SELECTION))
#define GNOME_IS_PRINT_COPIES_SELECTION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNOME_TYPE_PRINT_COPIES_SELECTION))
-#define GNOME_PRINT_COPIES_SELECTION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GNOME_TYPE_PRINT_COPIES_SELECTION, GnomePrintCopiesSelectionClass))
+#define GNOME_PRINT_COPIES_SELECTOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GNOME_TYPE_PRINT_COPIES_SELECTION, GnomePrintCopiesSelectionClass))
typedef struct _GnomePrintCopiesSelection GnomePrintCopiesSelection;
typedef struct _GnomePrintCopiesSelectionClass GnomePrintCopiesSelectionClass;
@@ -55,12 +55,12 @@
*
*/
-GtkType gnome_print_copies_selection_get_type (void);
+GtkType gnome_print_copies_selector_get_type (void);
-GtkWidget * gnome_print_copies_selection_new (void);
-void gnome_print_copies_selection_set_copies (GnomePrintCopiesSelection *gpc, gint copies, gboolean collate);
-gint gnome_print_copies_selection_get_copies (GnomePrintCopiesSelection *gpc);
-gboolean gnome_print_copies_selection_get_collate (GnomePrintCopiesSelection *gpc);
+GtkWidget * gnome_print_copies_selector_new (void);
+void gnome_print_copies_selector_set_copies (GnomePrintCopiesSelection *gpc, gint copies, gboolean collate);
+gint gnome_print_copies_selector_get_copies (GnomePrintCopiesSelection *gpc);
+gboolean gnome_print_copies_selector_get_collate (GnomePrintCopiesSelection *gpc);
G_END_DECLS
Index: libgnomeprintui/gnome-print-dialog.c
===================================================================
RCS file: /cvs/gnome/libgnomeprintui/libgnomeprintui/gnome-print-dialog.c,v
retrieving revision 1.42
diff -u -r1.42 gnome-print-dialog.c
--- libgnomeprintui/gnome-print-dialog.c 21 Sep 2002 06:08:14 -0000 1.42
+++ libgnomeprintui/gnome-print-dialog.c 31 Oct 2002 18:13:00 -0000
@@ -165,7 +165,7 @@
gtk_box_pack_start (GTK_BOX (vb), f, FALSE, FALSE, 0);
g_object_set_data (G_OBJECT (hb), "range", f);
- c = gnome_print_copies_selection_new ();
+ c = gnome_print_copies_selector_new ();
if (gpd)
g_signal_connect (G_OBJECT (c), "copies_set", (GCallback) gpd_copies_set, gpd);
gtk_widget_hide (c);
@@ -234,8 +234,8 @@
}
/**
- * gnome_print_dialog_new_from_master:
- * @gpm: GnomePrintMaster
+ * gnome_print_dialog_new:
+ * @gpm: GnomePrintJob
* @title: Title of window.
* @flags: Options for created widget.
*
@@ -250,7 +250,7 @@
* Return value: A newly created and initialised widget.
**/
GtkWidget *
-gnome_print_dialog_new_from_master (GnomePrintMaster *gpm, const guchar *title, gint flags)
+gnome_print_dialog_new (GnomePrintJob *gpj, const guchar *title, gint flags)
{
GnomePrintConfig *gpc = NULL;
GnomePrintDialog *gpd;
@@ -258,8 +258,8 @@
gpd = GNOME_PRINT_DIALOG (g_object_new (GNOME_TYPE_PRINT_DIALOG, NULL));
if (gpd) {
- if (gpm)
- gpc = gnome_print_master_get_config (gpm);
+ if (gpj)
+ gpc = gnome_print_job_get_config (gpj);
if (gpc == NULL)
gpc = gnome_print_config_default ();
gpd->config = gpc;
@@ -270,28 +270,6 @@
}
/**
- * gnome_print_dialog_new:
- * @title: Title of window.
- * @flags: Options for created widget.
- *
- * Create a new gnome-print-dialog window.
- *
- * The following options flags are available:
- * GNOME_PRINT_DIALOG_RANGE: A range widget container will be created.
- * A range widget must be created separately, using one of the
- * gnome_print_dialog_construct_* functions.
- * GNOME_PRINT_DIALOG_COPIES: A copies widget will be created.
- *
- * Return value: A newly created and initialised widget.
- *
- */
-GtkWidget *
-gnome_print_dialog_new (const guchar *title, gint flags)
-{
- return gnome_print_dialog_new_from_master (NULL, title, flags);
-}
-
-/**
* gnome_print_dialog_construct:
* @gpd: A created GnomePrintDialog.
* @title: Title of the window.
@@ -669,9 +647,9 @@
c = g_object_get_data (G_OBJECT (gpd->job), "copies");
if (c && GNOME_IS_PRINT_COPIES_SELECTION (c)) {
if (copies)
- *copies = gnome_print_copies_selection_get_copies (c);
+ *copies = gnome_print_copies_selector_get_copies (c);
if (collate)
- *collate = gnome_print_copies_selection_get_collate (c);
+ *collate = gnome_print_copies_selector_get_collate (c);
}
}
}
@@ -695,7 +673,7 @@
c = g_object_get_data (G_OBJECT (gpd->job), "copies");
g_return_if_fail (c && GNOME_IS_PRINT_COPIES_SELECTION (c));
- gnome_print_copies_selection_set_copies (c, copies, collate);
+ gnome_print_copies_selector_set_copies (c, copies, collate);
}
/**
Index: libgnomeprintui/gnome-print-dialog.h
===================================================================
RCS file: /cvs/gnome/libgnomeprintui/libgnomeprintui/gnome-print-dialog.h,v
retrieving revision 1.19
diff -u -r1.19 gnome-print-dialog.h
--- libgnomeprintui/gnome-print-dialog.h 21 Sep 2002 06:08:14 -0000 1.19
+++ libgnomeprintui/gnome-print-dialog.h 31 Oct 2002 18:13:00 -0000
@@ -88,9 +88,7 @@
GType gnome_print_dialog_get_type (void);
-GtkWidget * gnome_print_dialog_new (const guchar *title, gint flags);
-GtkWidget * gnome_print_dialog_new_from_master (GnomePrintMaster *gpm,
- const guchar *title, gint flags);
+GtkWidget * gnome_print_dialog_new (GnomePrintJob *gpj, const guchar *title, gint flags);
/* For language bindings */
void gnome_print_dialog_construct (GnomePrintDialog *gpd, const guchar *title, gint flags);
Index: libgnomeprintui/gnome-print-master-preview.c
===================================================================
RCS file: /cvs/gnome/libgnomeprintui/libgnomeprintui/gnome-print-master-preview.c,v
retrieving revision 1.42
diff -u -r1.42 gnome-print-master-preview.c
--- libgnomeprintui/gnome-print-master-preview.c 6 Sep 2002 06:01:28 -0000 1.42
+++ libgnomeprintui/gnome-print-master-preview.c 31 Oct 2002 18:13:00 -0000
@@ -49,14 +49,14 @@
#define TOOLBAR_BUTTON_BASE 5
#define MOVE_INDEX 5
-struct _GnomePrintMasterPreview {
+struct _GnomePrintJobPreview {
GtkWindow window;
/* Main VBox */
GtkWidget *vbox;
/* Some interesting buttons */
GtkWidget *bpf, *bpp, *bpn, *bpl;
GtkWidget *bz1, *bzf, *bzi, *bzo;
- /* Number of pages master has */
+ /* Number of pages job has */
gint pages;
/* Zoom factor */
gdouble zoom;
@@ -74,15 +74,15 @@
gpointer priv;
};
-struct _GnomePrintMasterPreviewClass {
+struct _GnomePrintJobPreviewClass {
GtkWindowClass parent_class;
};
typedef struct _GPMPPrivate GPMPPrivate;
struct _GPMPPrivate {
- /* Our GnomePrintMaster */
- GnomePrintMaster *master;
+ /* Our GnomePrintJob */
+ GnomePrintJob *job;
/* Our GnomePrintPreview */
GnomePrintContext *preview;
@@ -96,7 +96,7 @@
};
-static void gpmp_parse_layout (GnomePrintMasterPreview *mp);
+static void gpmp_parse_layout (GnomePrintJobPreview *mp);
/*
* Padding in points around the simulated page
@@ -105,7 +105,7 @@
#define PAGE_PAD 4
static gint
-render_page (GnomePrintMasterPreview *mp, gint page)
+render_page (GnomePrintJobPreview *mp, gint page)
{
GPMPPrivate *priv;
GnomePrintConfig *config;
@@ -133,17 +133,17 @@
region.x1 = mp->paw + PAGE_PAD;
region.y1 = mp->pah + PAGE_PAD;
- config = gnome_print_master_get_config (priv->master);
+ config = gnome_print_job_get_config (priv->job);
priv->preview = gnome_print_preview_new_full (config, priv->canvas, transform, ®ion);
gnome_print_config_unref (config);
- gnome_print_master_render_page (priv->master, priv->preview, page, TRUE);
+ gnome_print_job_render_page (priv->job, priv->preview, page, TRUE);
return GNOME_PRINT_OK;
}
static gint
-goto_page (GnomePrintMasterPreview *mp, gint page)
+goto_page (GnomePrintJobPreview *mp, gint page)
{
GPMPPrivate *priv;
guchar c[32];
@@ -167,7 +167,7 @@
}
static gint
-change_page_cmd (GtkEntry *entry, GnomePrintMasterPreview *pmp)
+change_page_cmd (GtkEntry *entry, GnomePrintJobPreview *pmp)
{
GPMPPrivate *priv;
const gchar *text;
@@ -185,7 +185,7 @@
#define CLOSE_ENOUGH(a,b) (fabs (a - b) < 1e-6)
static void
-gpmp_zoom (GnomePrintMasterPreview *mp, gdouble factor, gboolean relative)
+gpmp_zoom (GnomePrintJobPreview *mp, gdouble factor, gboolean relative)
{
GPMPPrivate *priv;
gdouble zoom;
@@ -210,7 +210,7 @@
/* Button press handler for the print preview canvas */
static gint
-preview_canvas_button_press (GtkWidget *widget, GdkEventButton *event, GnomePrintMasterPreview *mp)
+preview_canvas_button_press (GtkWidget *widget, GdkEventButton *event, GnomePrintJobPreview *mp)
{
gint retval;
@@ -241,7 +241,7 @@
/* Motion notify handler for the print preview canvas */
static gint
-preview_canvas_motion (GtkWidget *widget, GdkEventMotion *event, GnomePrintMasterPreview *mp)
+preview_canvas_motion (GtkWidget *widget, GdkEventMotion *event, GnomePrintJobPreview *mp)
{
GdkModifierType mod;
gint retval;
@@ -277,7 +277,7 @@
/* Button release handler for the print preview canvas */
static gint
-preview_canvas_button_release (GtkWidget *widget, GdkEventButton *event, GnomePrintMasterPreview *mp)
+preview_canvas_button_release (GtkWidget *widget, GdkEventButton *event, GnomePrintJobPreview *mp)
{
gint retval;
@@ -294,13 +294,13 @@
static void
-preview_close_cmd (gpointer unused, GnomePrintMasterPreview *mp)
+preview_close_cmd (gpointer unused, GnomePrintJobPreview *mp)
{
gtk_widget_destroy (GTK_WIDGET (mp));
}
static gboolean
-preview_delete_event (gpointer unused, GdkEventAny *event, GnomePrintMasterPreview *mp)
+preview_delete_event (gpointer unused, GdkEventAny *event, GnomePrintJobPreview *mp)
{
gtk_widget_destroy (GTK_WIDGET (mp));
@@ -308,25 +308,25 @@
}
static void
-preview_file_print_cmd (void *unused, GnomePrintMasterPreview *pmp)
+preview_file_print_cmd (void *unused, GnomePrintJobPreview *pmp)
{
GPMPPrivate *priv;
priv = (GPMPPrivate *) pmp->priv;
- gnome_print_master_print (priv->master);
+ gnome_print_job_print (priv->job);
/* fixme: should we clean ourselves up now? */
}
static void
-preview_first_page_cmd (void *unused, GnomePrintMasterPreview *pmp)
+preview_first_page_cmd (void *unused, GnomePrintJobPreview *pmp)
{
goto_page (pmp, 0);
}
static void
-preview_next_page_cmd (void *unused, GnomePrintMasterPreview *pmp)
+preview_next_page_cmd (void *unused, GnomePrintJobPreview *pmp)
{
GPMPPrivate *priv;
@@ -338,7 +338,7 @@
}
static void
-preview_prev_page_cmd (void *unused, GnomePrintMasterPreview *pmp)
+preview_prev_page_cmd (void *unused, GnomePrintJobPreview *pmp)
{
GPMPPrivate *priv;
@@ -350,7 +350,7 @@
}
static void
-preview_last_page_cmd (void *unused, GnomePrintMasterPreview *pmp)
+preview_last_page_cmd (void *unused, GnomePrintJobPreview *pmp)
{
GPMPPrivate *priv;
@@ -360,19 +360,19 @@
}
static void
-gpmp_zoom_in_cmd (GtkToggleButton *t, GnomePrintMasterPreview *pmp)
+gpmp_zoom_in_cmd (GtkToggleButton *t, GnomePrintJobPreview *pmp)
{
gpmp_zoom (pmp, GPMP_ZOOM_IN_FACTOR, TRUE);
}
static void
-gpmp_zoom_out_cmd (GtkToggleButton *t, GnomePrintMasterPreview *pmp)
+gpmp_zoom_out_cmd (GtkToggleButton *t, GnomePrintJobPreview *pmp)
{
gpmp_zoom (pmp, GPMP_ZOOM_OUT_FACTOR, TRUE);
}
static void
-preview_zoom_fit_cmd (GtkToggleButton *t, GnomePrintMasterPreview *mp)
+preview_zoom_fit_cmd (GtkToggleButton *t, GnomePrintJobPreview *mp)
{
GPMPPrivate *priv;
gdouble zoomx, zoomy;
@@ -390,7 +390,7 @@
}
static void
-preview_zoom_100_cmd (GtkToggleButton *t, GnomePrintMasterPreview *mp)
+preview_zoom_100_cmd (GtkToggleButton *t, GnomePrintJobPreview *mp)
{
gpmp_zoom (mp, 1.0, FALSE);
}
@@ -398,13 +398,13 @@
static gint
preview_canvas_key (GtkWidget *widget, GdkEventKey *event, gpointer data)
{
- GnomePrintMasterPreview *pmp;
+ GnomePrintJobPreview *pmp;
GPMPPrivate *priv;
gint x,y;
gint height, width;
gint domove = 0;
- pmp = (GnomePrintMasterPreview *) data;
+ pmp = (GnomePrintJobPreview *) data;
priv = (GPMPPrivate *) pmp->priv;
@@ -514,7 +514,7 @@
}
static void
-create_preview_canvas (GnomePrintMasterPreview *mp)
+create_preview_canvas (GnomePrintJobPreview *mp)
{
GnomePrintConfig *config;
GnomeCanvasItem *item;
@@ -548,7 +548,7 @@
gtk_container_add (GTK_CONTAINER (priv->scrolled_window), GTK_WIDGET (priv->canvas));
- config = gnome_print_master_get_config (priv->master);
+ config = gnome_print_job_get_config (priv->job);
priv->preview = gnome_print_preview_new (config, priv->canvas);
gnome_print_config_unref (config);
@@ -619,7 +619,7 @@
#endif
static void
-create_toplevel (GnomePrintMasterPreview *mp)
+create_toplevel (GnomePrintJobPreview *mp)
{
GPMPPrivate *priv;
GtkWidget *tb;
@@ -675,38 +675,38 @@
}
/*
- The GnomePrintMasterPreview object
+ The GnomePrintJobPreview object
*/
-static void gnome_print_master_preview_class_init (GnomePrintMasterPreviewClass *klass);
-static void gnome_print_master_preview_init (GnomePrintMasterPreview *pmp);
+static void gnome_print_job_preview_class_init (GnomePrintJobPreviewClass *klass);
+static void gnome_print_job_preview_init (GnomePrintJobPreview *pmp);
static GtkWindowClass *parent_class;
GType
-gnome_print_master_preview_get_type (void)
+gnome_print_job_preview_get_type (void)
{
static GType type;
if (!type) {
static const GTypeInfo info = {
- sizeof (GnomePrintMasterPreviewClass),
+ sizeof (GnomePrintJobPreviewClass),
NULL, NULL,
- (GClassInitFunc) gnome_print_master_preview_class_init,
+ (GClassInitFunc) gnome_print_job_preview_class_init,
NULL, NULL,
- sizeof (GnomePrintMasterPreview),
+ sizeof (GnomePrintJobPreview),
0,
- (GInstanceInitFunc) gnome_print_master_preview_init,
+ (GInstanceInitFunc) gnome_print_job_preview_init,
NULL
};
- type = g_type_register_static (GTK_TYPE_WINDOW, "GnomePrintMasterPreview", &info, 0);
+ type = g_type_register_static (GTK_TYPE_WINDOW, "GnomePrintJobPreview", &info, 0);
}
return type;
}
static void
-gnome_print_master_preview_destroy (GtkObject *object)
+gnome_print_job_preview_destroy (GtkObject *object)
{
- GnomePrintMasterPreview *pmp = GNOME_PRINT_MASTER_PREVIEW (object);
+ GnomePrintJobPreview *pmp = GNOME_PRINT_JOB_PREVIEW (object);
GPMPPrivate *priv = pmp->priv;
if (priv->preview != NULL) {
@@ -714,21 +714,21 @@
priv->preview = NULL;
}
- if (priv->master != NULL) {
- g_object_unref (G_OBJECT (priv->master));
- priv->master = NULL;
+ if (priv->job != NULL) {
+ g_object_unref (G_OBJECT (priv->job));
+ priv->job = NULL;
}
GTK_OBJECT_CLASS (parent_class)->destroy (object);
}
static void
-gnome_print_master_preview_finalize (GObject *object)
+gnome_print_job_preview_finalize (GObject *object)
{
- GnomePrintMasterPreview *pmp;
+ GnomePrintJobPreview *pmp;
GPMPPrivate *priv;
- pmp = GNOME_PRINT_MASTER_PREVIEW (object);
+ pmp = GNOME_PRINT_JOB_PREVIEW (object);
priv = pmp->priv;
if (priv) {
@@ -740,7 +740,7 @@
}
static void
-gnome_print_master_preview_class_init (GnomePrintMasterPreviewClass *klass)
+gnome_print_job_preview_class_init (GnomePrintJobPreviewClass *klass)
{
GtkObjectClass *object_class;
@@ -748,12 +748,12 @@
parent_class = gtk_type_class (GTK_TYPE_WINDOW);
- object_class->destroy = gnome_print_master_preview_destroy;
- G_OBJECT_CLASS (object_class)->finalize = gnome_print_master_preview_finalize;
+ object_class->destroy = gnome_print_job_preview_destroy;
+ G_OBJECT_CLASS (object_class)->finalize = gnome_print_job_preview_finalize;
}
static void
-gnome_print_master_preview_init (GnomePrintMasterPreview *mp)
+gnome_print_job_preview_init (GnomePrintJobPreview *mp)
{
GPMPPrivate *priv;
@@ -769,26 +769,26 @@
}
GtkWidget *
-gnome_print_master_preview_new (GnomePrintMaster *gpm, const guchar *title)
+gnome_print_job_preview_new (GnomePrintJob *gpm, const guchar *title)
{
- GnomePrintMasterPreview *gpmp;
+ GnomePrintJobPreview *gpmp;
GPMPPrivate *priv;
gchar *text;
g_return_val_if_fail (gpm != NULL, NULL);
- g_return_val_if_fail (GNOME_IS_PRINT_MASTER (gpm), NULL);
+ g_return_val_if_fail (GNOME_IS_PRINT_JOB (gpm), NULL);
if (!title)
title = _("Gnome Print Preview");
- gpmp = g_object_new (GNOME_TYPE_PRINT_MASTER_PREVIEW, NULL);
+ gpmp = g_object_new (GNOME_TYPE_PRINT_JOB_PREVIEW, NULL);
g_signal_connect (G_OBJECT (gpmp), "delete_event",
(GCallback) preview_delete_event, gpmp);
gtk_window_set_title (GTK_WINDOW (gpmp), title);
priv = (GPMPPrivate *) gpmp->priv;
- priv->master = gpm;
+ priv->job = gpm;
g_object_ref (G_OBJECT (gpm));
gpmp_parse_layout (gpmp);
@@ -799,7 +799,7 @@
g_signal_connect (G_OBJECT (priv->canvas), "realize",
(GCallback) preview_zoom_fit_cmd, gpmp);
- priv->pagecount = gpmp->pages = gnome_print_master_get_pages (gpm);
+ priv->pagecount = gpmp->pages = gnome_print_job_get_pages (gpm);
goto_page (gpmp, 0);
if (priv->pagecount == 0) {
@@ -816,7 +816,7 @@
}
static void
-gpmp_parse_layout (GnomePrintMasterPreview *mp)
+gpmp_parse_layout (GnomePrintJobPreview *mp)
{
GPMPPrivate *priv;
GnomePrintConfig *config;
@@ -828,7 +828,7 @@
mp->paw = GPMP_A4_WIDTH;
mp->pah = GPMP_A4_HEIGHT;
art_affine_identity (mp->pa2ly);
- config = gnome_print_master_get_config (priv->master);
+ config = gnome_print_job_get_config (priv->job);
lyd = gnome_print_config_get_layout_data (config, NULL, NULL, NULL, NULL);
gnome_print_config_unref (config);
if (lyd) {
@@ -880,7 +880,7 @@
mp->pa2ly[4] -= tp.x0;
mp->pa2ly[5] -= tp.y0;
PRINT_AFFINE ("pa2ly:", &mp->pa2ly[0]);
- /* Now, if master does PA2LY LY2PA concat it ends with scaled identity */
+ /* Now, if job does PA2LY LY2PA concat it ends with scaled identity */
gnome_print_layout_free (ly);
}
gnome_print_layout_data_free (lyd);
Index: libgnomeprintui/gnome-print-master-preview.h
===================================================================
RCS file: /cvs/gnome/libgnomeprintui/libgnomeprintui/gnome-print-master-preview.h,v
retrieving revision 1.12
diff -u -r1.12 gnome-print-master-preview.h
--- libgnomeprintui/gnome-print-master-preview.h 2 Sep 2002 06:12:37 -0000 1.12
+++ libgnomeprintui/gnome-print-master-preview.h 31 Oct 2002 18:13:00 -0000
@@ -30,22 +30,22 @@
G_BEGIN_DECLS
-#define GNOME_TYPE_PRINT_MASTER_PREVIEW (gnome_print_master_preview_get_type ())
-#define GNOME_PRINT_MASTER_PREVIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNOME_TYPE_PRINT_MASTER_PREVIEW, GnomePrintMasterPreview))
-#define GNOME_PRINT_MASTER_PREVIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNOME_TYPE_PRINT_MASTER_PREVIEW, GnomePrintMasterPreviewClass))
-#define GNOME_IS_PRINT_MASTER_PREVIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNOME_TYPE_PRINT_MASTER_PREVIEW))
-#define GNOME_IS_PRINT_MASTER_PREVIEW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNOME_TYPE_PRINT_MASTER_PREVIEW))
-#define GNOME_PRINT_MASTER_PREVIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GNOME_TYPE_PRINT_MASTER_PREVIEW, GnomePrintMasterPreviewClass))
+#define GNOME_TYPE_PRINT_JOB_PREVIEW (gnome_print_job_preview_get_type ())
+#define GNOME_PRINT_JOB_PREVIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNOME_TYPE_PRINT_JOB_PREVIEW, GnomePrintJobPreview))
+#define GNOME_PRINT_JOB_PREVIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNOME_TYPE_PRINT_JOB_PREVIEW, GnomePrintJobPreviewClass))
+#define GNOME_IS_PRINT_JOB_PREVIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNOME_TYPE_PRINT_JOB_PREVIEW))
+#define GNOME_IS_PRINT_JOB_PREVIEW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNOME_TYPE_PRINT_JOB_PREVIEW))
+#define GNOME_PRINT_JOB_PREVIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GNOME_TYPE_PRINT_JOB_PREVIEW, GnomePrintJobPreviewClass))
-typedef struct _GnomePrintMasterPreview GnomePrintMasterPreview;
-typedef struct _GnomePrintMasterPreviewClass GnomePrintMasterPreviewClass;
+typedef struct _GnomePrintJobPreview GnomePrintJobPreview;
+typedef struct _GnomePrintJobPreviewClass GnomePrintJobPreviewClass;
#include <gtk/gtkwindow.h>
#include <libgnomeprint/gnome-print-master.h>
#include <libgnomeprintui/gnome-print-preview.h>
-GtkType gnome_print_master_preview_get_type (void);
-GtkWidget * gnome_print_master_preview_new (GnomePrintMaster *gpm, const guchar *title);
+GtkType gnome_print_job_preview_get_type (void);
+GtkWidget * gnome_print_job_preview_new (GnomePrintJob *gpm, const guchar *title);
G_END_DECLS
Index: tests/test-dialog.c
===================================================================
RCS file: /cvs/gnome/libgnomeprintui/tests/test-dialog.c,v
retrieving revision 1.5
diff -u -r1.5 test-dialog.c
--- tests/test-dialog.c 21 Sep 2002 06:08:15 -0000 1.5
+++ tests/test-dialog.c 31 Oct 2002 18:13:01 -0000
@@ -145,12 +145,12 @@
static GtkWidget *
test_dialog_show_all_pages (GnomePrintConfig *config)
{
- GnomePrintMaster *master;
+ GnomePrintJob *job;
GtkWidget *dialog;
- master = gnome_print_master_new_from_config (config);
- dialog = gnome_print_dialog_new_from_master (master, "Sample Print Dialog",
- GNOME_PRINT_DIALOG_RANGE | GNOME_PRINT_DIALOG_COPIES);
+ job = gnome_print_job_new (config);
+ dialog = gnome_print_dialog_new (job, "Sample Print Dialog",
+ GNOME_PRINT_DIALOG_RANGE | GNOME_PRINT_DIALOG_COPIES);
gtk_widget_show (dialog);
test_pos_window (dialog);
if (test_dialog_get_num_pages (dialog) != 3) {
@@ -158,9 +158,9 @@
exit (TEST_RETVAL_ERROR);
}
- master = gnome_print_master_new_from_config (config);
- dialog = gnome_print_dialog_new_from_master (master, "Sample Print Dialog",
- GNOME_PRINT_DIALOG_RANGE | GNOME_PRINT_DIALOG_COPIES);
+ job = gnome_print_job_new (config);
+ dialog = gnome_print_dialog_new (job, "Sample Print Dialog",
+ GNOME_PRINT_DIALOG_RANGE | GNOME_PRINT_DIALOG_COPIES);
gtk_widget_show (dialog);
test_dialog_show_page (dialog, 1);
test_pos_window (dialog);
@@ -169,9 +169,9 @@
exit (TEST_RETVAL_ERROR);
}
- master = gnome_print_master_new_from_config (config);
- dialog = gnome_print_dialog_new_from_master (master, "Sample Print Dialog",
- GNOME_PRINT_DIALOG_RANGE | GNOME_PRINT_DIALOG_COPIES);
+ job = gnome_print_job_new (config);
+ dialog = gnome_print_dialog_new (job, "Sample Print Dialog",
+ GNOME_PRINT_DIALOG_RANGE | GNOME_PRINT_DIALOG_COPIES);
gtk_widget_show (dialog);
test_pos_window (dialog);
test_dialog_show_page (dialog, 2);
@@ -347,30 +347,30 @@
test_dialog_flags (void)
{
GnomePrintConfig *config;
- GnomePrintMaster *master;
+ GnomePrintJob *job;
GtkWidget *dialog;
config = gnome_print_config_default ();
- master = gnome_print_master_new_from_config (config);
- dialog = gnome_print_dialog_new_from_master (master, "Sample Print Dialog",
+ job = gnome_print_job_new (config);
+ dialog = gnome_print_dialog_new (job, "Sample Print Dialog",
0);
gtk_widget_show (dialog);
test_pos_window (dialog);
if (test_dialog_get_num_pages (dialog) != 2)
return TEST_RETVAL_ERROR;
- master = gnome_print_master_new_from_config (config);
- dialog = gnome_print_dialog_new_from_master (master, "Sample Print Dialog",
- GNOME_PRINT_DIALOG_RANGE);
+ job = gnome_print_job_new (config);
+ dialog = gnome_print_dialog_new (job, "Sample Print Dialog",
+ GNOME_PRINT_DIALOG_RANGE);
gtk_widget_show (dialog);
test_pos_window (dialog);
if (test_dialog_get_num_pages (dialog) != 3)
return TEST_RETVAL_ERROR;
- master = gnome_print_master_new_from_config (config);
- dialog = gnome_print_dialog_new_from_master (master, "Sample Print Dialog",
- GNOME_PRINT_DIALOG_COPIES);
+ job = gnome_print_job_new (config);
+ dialog = gnome_print_dialog_new (job, "Sample Print Dialog",
+ GNOME_PRINT_DIALOG_COPIES);
gtk_widget_show (dialog);
test_pos_window (dialog);
if (test_dialog_get_num_pages (dialog) != 3)
@@ -388,7 +388,7 @@
{
GtkWidget *dialog;
- dialog = gnome_print_dialog_new ("Sample Print Dialog", 0);
+ dialog = gnome_print_dialog_new (NULL, "Sample Print Dialog", 0);
gtk_widget_show (dialog);
@@ -400,7 +400,7 @@
static TestRetval
test_multiple (void)
{
- GnomePrintMaster *master;
+ GnomePrintJob *job;
GnomePrintConfig *config;
GtkWidget *dialog;
gint i;
@@ -408,17 +408,17 @@
config = gnome_print_config_default ();
if (!config)
return TEST_RETVAL_ERROR;
- master = gnome_print_master_new ();
- if (!master)
+ job = gnome_print_job_new (NULL);
+ if (!job)
return TEST_RETVAL_ERROR;
- master = gnome_print_master_new_from_config (config);
- if (!master)
+ job = gnome_print_job_new (config);
+ if (!job)
return TEST_RETVAL_ERROR;
- dialog = gnome_print_dialog_new ("Sample Print Dialog", 0);
+ dialog = gnome_print_dialog_new (NULL, "Sample Print Dialog", 0);
if (!dialog)
return TEST_RETVAL_ERROR;
- dialog = gnome_print_dialog_new_from_master (master, "Sample Print Dialog", 0);
+ dialog = gnome_print_dialog_new (job, "Sample Print Dialog", 0);
if (!dialog)
return TEST_RETVAL_ERROR;
gtk_widget_show (dialog);
@@ -433,11 +433,11 @@
g_print ("c\n");
#if 1
config = gnome_print_config_default ();
- master = gnome_print_master_new_from_config (config);
+ job = gnome_print_job_new (config);
#endif
g_print ("d\n");
- dialog = gnome_print_dialog_new_from_master (master, "Sample Print Dialog", 0);
+ dialog = gnome_print_dialog_new (job, "Sample Print Dialog", 0);
if (!dialog)
return TEST_RETVAL_ERROR;
@@ -466,7 +466,7 @@
for (i = 0; i < 15; i++) {
gtk_widget_destroy (dialog);
- dialog = gnome_print_dialog_new_from_master (master, "Sample Print Dialog", 0);
+ dialog = gnome_print_dialog_new (job, "Sample Print Dialog", 0);
if (!dialog)
return TEST_RETVAL_ERROR;
gtk_widget_show (dialog);
@@ -481,20 +481,20 @@
static TestRetval
test_simple (void)
{
- GnomePrintMaster *master;
+ GnomePrintJob *job;
GnomePrintConfig *config;
GtkWidget *dialog;
config = gnome_print_config_default ();
if (!config)
return TEST_RETVAL_ERROR;
- master = gnome_print_master_new ();
- if (!master)
+ job = gnome_print_job_new (NULL);
+ if (!job)
return TEST_RETVAL_ERROR;
- master = gnome_print_master_new_from_config (config);
- if (!master)
+ job = gnome_print_job_new (config);
+ if (!job)
return TEST_RETVAL_ERROR;
- dialog = gnome_print_dialog_new ("Sample Print Dialog", 0);
+ dialog = gnome_print_dialog_new (NULL, "Sample Print Dialog", 0);
if (!dialog)
return TEST_RETVAL_ERROR;