Remove debug output.
2003-06-22 Hans Petter Jansson <hpj@ximian.com> * gui/print.c (get_font_for_size): Remove debug output. * gui/tasks-control.c (print_tasks): Ref and sink the printable. Use fixed (5%) margins instead of what gnome-print gives us. svn path=/trunk/; revision=21518
This commit is contained in:
committed by
Hans Petter
parent
796730a1a1
commit
bd71a378e4
@ -1,3 +1,10 @@
|
||||
2003-06-22 Hans Petter Jansson <hpj@ximian.com>
|
||||
|
||||
* gui/print.c (get_font_for_size): Remove debug output.
|
||||
|
||||
* gui/tasks-control.c (print_tasks): Ref and sink the printable.
|
||||
Use fixed (5%) margins instead of what gnome-print gives us.
|
||||
|
||||
2003-06-19 Dan Winship <danw@ximian.com>
|
||||
|
||||
* pcs/cal-backend.c (cal_backend_finalize): don't leak the
|
||||
|
||||
@ -283,8 +283,6 @@ get_font_for_size (double h, GnomeFontWeight weight, gboolean italic)
|
||||
desc = abs (gnome_font_face_get_descender (face));
|
||||
size = h * 1000 / (asc + desc);
|
||||
|
||||
g_print ("Print Info: %f, %f, %f\n", asc, desc, size);
|
||||
|
||||
/* This function is broken in gnome-print (it doesn't find a suitable font).
|
||||
* font = gnome_font_find_closest_from_weight_slant (DEFAULT_FONT, weight, italic, size); */
|
||||
font = gnome_font_find_closest (font_name, size);
|
||||
|
||||
@ -52,6 +52,7 @@
|
||||
|
||||
#define TASKS_CONTROL_PROPERTY_URI "folder_uri"
|
||||
#define TASKS_CONTROL_PROPERTY_URI_IDX 1
|
||||
#define FIXED_MARGIN .05
|
||||
|
||||
|
||||
static void tasks_control_properties_init (BonoboControl *control,
|
||||
@ -530,6 +531,8 @@ print_tasks (ETasks *tasks, gboolean preview)
|
||||
cal_table = e_tasks_get_calendar_table (tasks);
|
||||
etable = e_calendar_table_get_table (E_CALENDAR_TABLE (cal_table));
|
||||
printable = e_table_get_printable (etable);
|
||||
g_object_ref (printable);
|
||||
gtk_object_sink (GTK_OBJECT (printable));
|
||||
e_printable_reset (printable);
|
||||
|
||||
gpm = gnome_print_job_new (print_config);
|
||||
@ -537,12 +540,19 @@ print_tasks (ETasks *tasks, gboolean preview)
|
||||
|
||||
gnome_print_config_get_page_size (print_config, &r, &t);
|
||||
|
||||
#if 0
|
||||
gnome_print_config_get_double (print_config, GNOME_PRINT_KEY_PAGE_MARGIN_TOP, &temp_d);
|
||||
t -= temp_d;
|
||||
gnome_print_config_get_double (print_config, GNOME_PRINT_KEY_PAGE_MARGIN_RIGHT, &temp_d);
|
||||
r -= temp_d;
|
||||
gnome_print_config_get_double (print_config, GNOME_PRINT_KEY_PAGE_MARGIN_BOTTOM, &b);
|
||||
gnome_print_config_get_double (print_config, GNOME_PRINT_KEY_PAGE_MARGIN_LEFT, &l);
|
||||
#endif
|
||||
|
||||
b = t * FIXED_MARGIN;
|
||||
l = r * FIXED_MARGIN;
|
||||
t *= (1.0 - FIXED_MARGIN);
|
||||
r *= (1.0 - FIXED_MARGIN);
|
||||
|
||||
page_width = r - l;
|
||||
page_height = t - b;
|
||||
|
||||
Reference in New Issue
Block a user