diff options
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/gui/print.c | 10 |
2 files changed, 14 insertions, 3 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 132d6bf2f3..5a227db79a 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2008-01-15 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #333695 + + * gui/print.c: (print_attendees): Print attendee name instead of email + address if available. + 2008-01-14 Milan Crha <mcrha@redhat.com> ** Fix for bug #333695 diff --git a/calendar/gui/print.c b/calendar/gui/print.c index 08056f7947..c3685e6c88 100644 --- a/calendar/gui/print.c +++ b/calendar/gui/print.c @@ -1015,9 +1015,13 @@ print_attendees (GtkPrintContext *context, PangoFontDescription *font, cairo_t * if (tmp) g_string_append (text, " "); - /* it's usually in form of "mailto:email@domain" */ - tmp = strchr (attendee->value, ':'); - g_string_append (text, tmp ? tmp + 1 : attendee->value); + if (attendee->cn && *attendee->cn) + g_string_append (text, attendee->cn); + else { + /* it's usually in form of "mailto:email@domain" */ + tmp = strchr (attendee->value, ':'); + g_string_append (text, tmp ? tmp + 1 : attendee->value); + } tmp = get_role_as_string (attendee->role); if (tmp) { |