From 9862306af9b5019372cbcb6693b5ae1d56297776 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Mon, 12 Feb 2007 06:11:14 +0000 Subject: Print migration updates from Ebby Wiselyn. svn path=/trunk/; revision=33201 --- widgets/misc/ChangeLog | 8 ++++++++ widgets/misc/e-printable.c | 7 ++++--- widgets/misc/e-printable.h | 13 +++++++------ widgets/table/ChangeLog | 7 +++++++ widgets/table/e-cell-text.c | 2 +- widgets/table/e-cell-toggle.c | 14 +++++++------- 6 files changed, 34 insertions(+), 17 deletions(-) (limited to 'widgets') diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 635a24c065..7763bc034a 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,11 @@ +2007-02-12 Srinivasa Ragavan + + ** Print migration updates from Ebby Wiselyn + + * e-printable.c: (e_printable_print_page), (e_printable_height), + (e_printable_will_fit): + * e-printable.h: + 2007-01-08 Harish Krishnaswamy * e-filter-bar.c: (build_items): Initialize ESearchBarItem diff --git a/widgets/misc/e-printable.c b/widgets/misc/e-printable.c index ed12c9e488..b9d9221404 100644 --- a/widgets/misc/e-printable.c +++ b/widgets/misc/e-printable.c @@ -31,6 +31,7 @@ #include "e-printable.h" + #define EP_CLASS(e) ((EPrintableClass *)((GtkObject *)e)->klass) #define PARENT_TYPE GTK_TYPE_OBJECT @@ -126,7 +127,7 @@ e_printable_new(void) void e_printable_print_page (EPrintable *e_printable, - GnomePrintContext *context, + GtkPrintContext *context, gdouble width, gdouble height, gboolean quantized) @@ -169,7 +170,7 @@ e_printable_reset (EPrintable *e_printable) gdouble e_printable_height (EPrintable *e_printable, - GnomePrintContext *context, + GtkPrintContext *context, gdouble width, gdouble max_height, gboolean quantized) @@ -192,7 +193,7 @@ e_printable_height (EPrintable *e_printable, gboolean e_printable_will_fit (EPrintable *e_printable, - GnomePrintContext *context, + GtkPrintContext *context, gdouble width, gdouble max_height, gboolean quantized) diff --git a/widgets/misc/e-printable.h b/widgets/misc/e-printable.h index 0c665f89c2..2d3140c99f 100644 --- a/widgets/misc/e-printable.h +++ b/widgets/misc/e-printable.h @@ -26,6 +26,7 @@ #include #include +#include G_BEGIN_DECLS @@ -46,10 +47,10 @@ typedef struct { * Signals */ - void (*print_page) (EPrintable *etm, GnomePrintContext *context, gdouble width, gdouble height, gboolean quantized); + void (*print_page) (EPrintable *etm, GtkPrintContext *context, gdouble width, gdouble height, gboolean quantized); gboolean (*data_left) (EPrintable *etm); void (*reset) (EPrintable *etm); - gdouble (*height) (EPrintable *etm, GnomePrintContext *context, gdouble width, gdouble max_height, gboolean quantized); + gdouble (*height) (EPrintable *etm, GtkPrintContext *context, gdouble width, gdouble max_height, gboolean quantized); /* e_printable_will_fit (ep, ...) should be equal in value to * (e_printable_print_page (ep, ...), @@ -58,7 +59,7 @@ typedef struct { * position of the printable. */ - gboolean (*will_fit) (EPrintable *etm, GnomePrintContext *context, gdouble width, gdouble max_height, gboolean quantized); + gboolean (*will_fit) (EPrintable *etm, GtkPrintContext *context, gdouble width, gdouble max_height, gboolean quantized); } EPrintableClass; GtkType e_printable_get_type (void); @@ -68,19 +69,19 @@ EPrintable *e_printable_new (void); /* * Routines for emitting signals on the e_table */ void e_printable_print_page (EPrintable *e_printable, - GnomePrintContext *context, + GtkPrintContext *context, gdouble width, gdouble height, gboolean quantized); gboolean e_printable_data_left (EPrintable *e_printable); void e_printable_reset (EPrintable *e_printable); gdouble e_printable_height (EPrintable *e_printable, - GnomePrintContext *context, + GtkPrintContext *context, gdouble width, gdouble max_height, gboolean quantized); gboolean e_printable_will_fit (EPrintable *e_printable, - GnomePrintContext *context, + GtkPrintContext *context, gdouble width, gdouble max_height, gboolean quantized); diff --git a/widgets/table/ChangeLog b/widgets/table/ChangeLog index ed89bd823e..50319c8bd3 100644 --- a/widgets/table/ChangeLog +++ b/widgets/table/ChangeLog @@ -1,3 +1,10 @@ +2007-02-12 Srinivasa Ragavan + + ** Print migration updates from Ebby Wiselyn + + * e-cell-toggle.c: + * e-cell-text.c: + 2007-02-08 Matthew Barnes ** Fixes bug #357216 diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c index 88dd215636..8df67aca24 100644 --- a/widgets/table/e-cell-text.c +++ b/widgets/table/e-cell-text.c @@ -1380,7 +1380,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, cairo_line_to (cr, MIN (2 + text_width, width - 2), ly + text_height + 6); } cairo_set_line_width (cr, (double)pango_font_metrics_get_underline_thickness (font_metrics)/(double)PANGO_SCALE); - cairo_stroke (cr); + cairo_stroke (cr); } if (strikeout) { diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c index dda87efcae..1ee06c15ea 100644 --- a/widgets/table/e-cell-toggle.c +++ b/widgets/table/e-cell-toggle.c @@ -295,25 +295,25 @@ etog_print (ECellView *ecell_view, GtkPrintContext *context, GdkPixbuf *image; double image_width, image_height; const int value = GPOINTER_TO_INT ( - e_table_model_value_at (ecell_view->e_table_model, model_col, row)); + e_table_model_value_at (ecell_view->e_table_model, model_col, row)); cairo_t *cr; - if (value >= toggle->n_states){ + if (value >= toggle->n_states){ g_warning ("Value from the table model is %d, the states we support are [0..%d)\n", - value, toggle->n_states); + value, toggle->n_states); return; } cr = gtk_print_context_get_cairo_context (context); cairo_save(cr); - image = toggle->images[value]; + image = toggle->images[value]; cairo_translate (cr, 0 , 0); image = gdk_pixbuf_add_alpha (image, TRUE, 255, 255, 255); - image_width = (double)gdk_pixbuf_get_width (image); + image_width = (double)gdk_pixbuf_get_width (image); image_height = (double)gdk_pixbuf_get_height (image); cairo_rectangle (cr, image_width / 7, image_height / 3, - image_width - image_width / 4, - image_width - image_height / 7); + image_width - image_width / 4, + image_width - image_height / 7); cairo_clip (cr); gdk_cairo_set_source_pixbuf (cr, image, 0, image_height / 4); cairo_paint (cr); -- cgit v1.2.3