commit d66ca41368cb96b68141daa70d7bc1b77d045c58
Author: Carlos Martín Nieto <carlos@cmartin.tk>
Date:   Mon Oct 4 18:55:23 2010 +0100

    Initial support for work week printing
    
    Only prints work hours properly.
    
    No titles are printed and it prints inconsitent day times when
    there are appointments outside of work hours.

diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index a3e9af3..039691d 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -2174,6 +2174,32 @@ print_day_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date)
 }
 
 static void
+print_work_week_view (GtkPrintContext *context, GnomeCalendar *gcal,
+		      time_t date)
+{
+  GtkPageSetup *setup;
+  icaltimezone *zone = calendar_config_get_icaltimezone ();
+  gint i, days = 5;
+  gdouble todo, l;
+  gchar buff[100];
+  gdouble width, height, width_each;
+  time_t start, end;
+
+  setup = gtk_print_context_get_page_setup (context);
+
+  width = gtk_page_setup_get_page_width (setup, GTK_UNIT_POINTS);
+  height = gtk_page_setup_get_page_height (setup, GTK_UNIT_POINTS);
+
+  width_each = width / days;
+
+  for (i = 0; i < days; ++i){
+    print_day_details (context, gcal, date, width_each * i,
+		       width_each * (i + 1), 0.0, height);
+    date = time_add_day_with_zone (date, 1, zone);
+  }
+}
+
+static void
 print_week_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date)
 {
 	GtkPageSetup *setup;
@@ -2446,6 +2472,8 @@ print_calendar_draw_page (GtkPrintOperation *operation,
 			print_day_view (context, pcali->gcal, pcali->start);
 			break;
 		case GNOME_CAL_WORK_WEEK_VIEW:
+		  print_work_week_view (context, pcali->gcal, pcali->start);
+		  break;
 		case GNOME_CAL_WEEK_VIEW:
 			print_week_view (context, pcali->gcal, pcali->start);
 			break;
