aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/tasks-control.c
diff options
context:
space:
mode:
authorHans Petter Jansson <hpj@ximian.com>2003-06-24 04:27:31 +0800
committerHans Petter <hansp@src.gnome.org>2003-06-24 04:27:31 +0800
commitbd71a378e45c2cd83592bc29453947234e40cd2b (patch)
treedc44712409cf641ef2ea0f07a1507666cbbaf399 /calendar/gui/tasks-control.c
parent796730a1a1f5b1221971360f95b57b69ef8699d2 (diff)
downloadgsoc2013-evolution-bd71a378e45c2cd83592bc29453947234e40cd2b.tar.gz
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/gui/tasks-control.c')
-rw-r--r--calendar/gui/tasks-control.c10
1 files changed, 10 insertions, 0 deletions
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;