aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog4
-rw-r--r--calendar/gui/print.c66
2 files changed, 29 insertions, 41 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 3cd487cb5e..1f21e9dd78 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,7 @@
+2001-06-21 JP Rosevear <jpr@ximian.com>
+
+ * gui/print.c (print_comp_item): print description text
+
2001-06-21 Rodrigo Moya <rodrigo@ximian.com>
* cal-client/cal-client.[ch]:
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index f0e1b89fce..e32c27207d 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -2255,56 +2255,40 @@ print_date_label (GnomePrintContext *pc, CalComponent *comp,
}
static void
-print_event (GnomePrintContext *pc, CalComponent *comp,
- double left, double right, double top, double bottom)
-{
- CalComponentText text;
- GSList *desc, *l;
-
- /* Summary */
- cal_component_get_summary (comp, &text);
- print_text_size (pc, 18, text.value, ALIGN_LEFT,
- left+3, right, top-3, top - 21);
- top -= 21;
-
- /* Date information */
- print_date_label (pc, comp, left+3, right, top-3, top - 15);
- top -= 15;
-
- /* Description */
- cal_component_get_description_list (comp, &desc);
- for (l = desc; l != NULL; l = l->next) {
- CalComponentText *text = l->data;
-
- }
- cal_component_free_text_list (desc);
-}
-
-static void
-print_task (GnomePrintContext *pc, CalComponent *comp,
- double left, double right, double top, double bottom)
-{
- CalComponentText text;
-
- cal_component_get_summary (comp, &text);
- print_text_size (pc, 24, text.value, ALIGN_CENTER,
- left+3, right, top-3, top - 27);
-}
-
-static void
print_comp_item (GnomePrintContext *pc, CalComponent *comp,
double left, double right, double top, double bottom)
{
+ GnomeFont *font;
CalComponentVType vtype;
+ CalComponentText text;
+ GSList *desc, *l;
vtype = cal_component_get_vtype (comp);
+
switch (vtype) {
case CAL_COMPONENT_EVENT:
- print_event (pc, comp, left, right, top, bottom);
- break;
-
case CAL_COMPONENT_TODO:
- print_task (pc, comp, left, right, top, bottom);
+ /* Summary */
+ cal_component_get_summary (comp, &text);
+ print_text_size (pc, 18, text.value, ALIGN_LEFT,
+ left+3, right, top-3, top - 21);
+ top -= 21;
+
+ /* Date information */
+ print_date_label (pc, comp, left+3, right, top-3, top - 15);
+ top -= 30;
+
+ /* Description */
+ font = gnome_font_new_closest ("Times", GNOME_FONT_BOOK, FALSE, 12);
+ cal_component_get_description_list (comp, &desc);
+ for (l = desc; l != NULL; l = l->next) {
+ CalComponentText *text = l->data;
+
+ if (text->value != NULL)
+ top = bound_text (pc, font, text->value, left, right, top-3, bottom, 3);
+ }
+ cal_component_free_text_list (desc);
+
break;
default:
}