diff options
author | Hans Petter Jansson <hpj@ximian.com> | 2003-06-24 04:27:31 +0800 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2003-06-24 04:27:31 +0800 |
commit | bd71a378e45c2cd83592bc29453947234e40cd2b (patch) | |
tree | dc44712409cf641ef2ea0f07a1507666cbbaf399 /calendar | |
parent | 796730a1a1f5b1221971360f95b57b69ef8699d2 (diff) | |
download | gsoc2013-evolution-bd71a378e45c2cd83592bc29453947234e40cd2b.tar gsoc2013-evolution-bd71a378e45c2cd83592bc29453947234e40cd2b.tar.gz gsoc2013-evolution-bd71a378e45c2cd83592bc29453947234e40cd2b.tar.bz2 gsoc2013-evolution-bd71a378e45c2cd83592bc29453947234e40cd2b.tar.lz gsoc2013-evolution-bd71a378e45c2cd83592bc29453947234e40cd2b.tar.xz gsoc2013-evolution-bd71a378e45c2cd83592bc29453947234e40cd2b.tar.zst gsoc2013-evolution-bd71a378e45c2cd83592bc29453947234e40cd2b.zip |
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
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/gui/print.c | 2 | ||||
-rw-r--r-- | calendar/gui/tasks-control.c | 10 |
3 files changed, 17 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 8c1c07ac80..e22a493141 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -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 diff --git a/calendar/gui/print.c b/calendar/gui/print.c index f078fb367a..e61e8465e2 100644 --- a/calendar/gui/print.c +++ b/calendar/gui/print.c @@ -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); diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c index 847e5a689b..8d798768f3 100644 --- a/calendar/gui/tasks-control.c +++ b/calendar/gui/tasks-control.c @@ -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; |