2005-07-30 Helge Hess <helge.hess@opengroupware.org>
+
+ * v0.9.20
+
+ * UIxMailPartViewer.m: added ability to use a fallback string encoding
+ in case the default one or the one specified in the content-type did
+ fail (this can happen with Outlook iCal mails ...).
+ * UIxMailPartICalViewer.m: hardened against missing content data, use
+ Latin-1 as a fallback encoding in case the part encoding didn't work
+ out.
+
+ * prepared MIME part viewers for Kolab XML types
+
* UIxMailRenderingContext.m: prepared some support for Kolab types in
IMAP4 (v0.9.19)
-
+
2005-07-27 Helge Hess <helge.hess@opengroupware.org>
-
+
* English.lproj/Localizable.strings: added a missing semicolon
(v0.9.18)
-
+
2005-07-23 Helge Hess <helge.hess@opengroupware.org>
* UIxMailPartICalViewer.m: fixed include path for new hierarchy
UIxMailPartHTMLViewer.m \
\
UIxMailPartICalAction.m \
+ \
+ UIxKolabPartViewer.m \
+ UIxKolabPartContactViewer.m \
+ UIxKolabPartEventViewer.m \
+ UIxKolabPartTaskViewer.m \
MailPartViewers_RESOURCE_FILES += \
Version \
--- /dev/null
+/*
+ Copyright (C) 2005 SKYRIX Software AG
+
+ This file is part of OpenGroupware.org.
+
+ OGo is free software; you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with OGo; see the file COPYING. If not, write to the
+ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+*/
+
+#include "UIxKolabPartViewer.h"
+
+/*
+ UIxKolabPartContactViewer
+
+ Show application/x-vnd.kolab.contact types. (Kolab XML content)
+*/
+
+@interface UIxKolabPartContactViewer : UIxKolabPartViewer
+@end
+
+#include "common.h"
+
+@implementation UIxKolabPartContactViewer
+@end /* UIxKolabPartContactViewer */
--- /dev/null
+/*
+ Copyright (C) 2005 SKYRIX Software AG
+
+ This file is part of OpenGroupware.org.
+
+ OGo is free software; you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with OGo; see the file COPYING. If not, write to the
+ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+*/
+
+#include "UIxKolabPartViewer.h"
+
+/*
+ UIxKolabPartEventViewer
+
+ Show application/x-vnd.kolab.event types. (Kolab XML content)
+*/
+
+@interface UIxKolabPartEventViewer : UIxKolabPartViewer
+@end
+
+#include "common.h"
+
+@implementation UIxKolabPartEventViewer
+@end /* UIxKolabPartEventViewer */
--- /dev/null
+/*
+ Copyright (C) 2005 SKYRIX Software AG
+
+ This file is part of OpenGroupware.org.
+
+ OGo is free software; you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with OGo; see the file COPYING. If not, write to the
+ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+*/
+
+#include "UIxKolabPartViewer.h"
+
+/*
+ UIxKolabPartTaskViewer
+
+ Show application/x-vnd.kolab.task types. (Kolab XML content)
+*/
+
+@interface UIxKolabPartTaskViewer : UIxKolabPartViewer
+@end
+
+#include "common.h"
+
+@implementation UIxKolabPartTaskViewer
+@end /* UIxKolabPartTaskViewer */
--- /dev/null
+/*
+ Copyright (C) 2005 SKYRIX Software AG
+
+ This file is part of OpenGroupware.org.
+
+ OGo is free software; you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with OGo; see the file COPYING. If not, write to the
+ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+*/
+
+#ifndef __Mailer_UIxKolabPartViewer_H__
+#define __Mailer_UIxKolabPartViewer_H__
+
+#include "UIxMailPartViewer.h"
+
+/*
+ UIxKolabPartContactViewer
+
+ Superclass for viewers which show the application/x-vnd.* XML documents.
+*/
+
+@interface UIxKolabPartViewer : UIxMailPartViewer
+{
+}
+
+@end
+
+#endif /* __Mailer_UIxKolabPartViewer_H__ */
--- /dev/null
+/*
+ Copyright (C) 2005 SKYRIX Software AG
+
+ This file is part of OpenGroupware.org.
+
+ OGo is free software; you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with OGo; see the file COPYING. If not, write to the
+ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+*/
+
+#include "UIxKolabPartViewer.h"
+#include "common.h"
+#include <DOM/DOMBuilderFactory.h>
+
+@implementation UIxKolabPartViewer
+
+static id<DOMBuilder> domBuilder = nil;
+
++ (void)initialize {
+ DOMBuilderFactory *factory
+ = [DOMBuilderFactory standardDOMBuilderFactory];
+
+ domBuilder = [[factory createDOMBuilderForMimeType:@"text/xml"] retain];
+ NSLog(@"Note(%@): using DOM builder: %@",
+ NSStringFromClass(self), domBuilder);
+}
+
+- (id<DOMDocument>)domDocument {
+ /*
+ Note: this ignores the charset MIME header and will rely on proper
+ encoding header in the XML.
+ */
+ return [domBuilder buildFromSource:[self decodedFlatContent]
+ systemId:@"Kolab Mail Object"];
+}
+
+@end /* UIxKolabPartViewer */
[self->item release]; self->item = nil;
}
+/* raw content handling */
+
+- (NSStringEncoding)fallbackStringEncoding {
+ /*
+ iCalendar invitations sent by Outlook 2002 have the annoying bug that the
+ mail states an UTF-8 content encoding but the actual iCalendar content is
+ encoding in Latin-1 (or Windows Western?).
+
+ As a result the content decoding will fail (TODO: always?). In this case we
+ try to decode with Latin-1.
+
+ Note: we could check for the Outlook x-mailer, but it was considered better
+ to try Latin-1 as a fallback in any case (be tolerant).
+ */
+ return NSISOLatin1StringEncoding;
+}
+
/* accessors */
- (iCalCalendar *)inCalendar {
if (self->inCalendar != nil)
return [self->inCalendar isNotNull] ? self->inCalendar : nil;
- iCalString = [self flatContentAsString];
+ if ((iCalString = [self flatContentAsString]) == nil) {
+ [self errorWithFormat:@"Could not retrieve content string for part!"];
+ self->inCalendar = [[NSNull null] retain];
+ return nil;
+ }
self->inCalendar =
[[iCalCalendar parseCalendarFromSource:iCalString] retain];
Since part-viewers can be reused for multiple parts, you need to be careful
in subclass to properly reset your specific state by overriding
- resetPathCaches
+
+ The part viewers have access to the rendering state using the
+
+ [[self context] mailRenderingContext]
+
+ object. This class provides several convenience methods to access mailpart
+ content.
*/
@class NSData, NSArray, NSFormatter;
return [self flatContent];
}
+- (NSStringEncoding)fallbackStringEncoding {
+ return 0;
+}
- (NSString *)flatContentAsString {
/* Note: we even have the line count in the body-info! */
NSString *charset;
s = [[NSString alloc] initWithData:content encoding:NSUTF8StringEncoding];
s = [s autorelease];
}
+
if (s == nil) {
+ /*
+ Note: this can happend with iCalendar invitations sent by Outlook 2002.
+ It will mark the content as UTF-8 but actually deliver it as
+ Latin-1 (or Windows encoding?).
+ */
[self errorWithFormat:@"could not convert content to text, charset: '%@'",
charset];
+ if ([self fallbackStringEncoding] > 0) {
+ s = [[NSString alloc] initWithData:content
+ encoding:[self fallbackStringEncoding]];
+ s = [s autorelease];
+
+ if (s == nil) {
+ [self errorWithFormat:
+ @" an attempt to use fallback encoding failed to."];
+ }
+ }
}
return s;
}
/* Kolab viewers */
- (WOComponent *)kolabContactViewer {
- return [self linkViewer];
+ return [self->viewer pageWithName:@"UIxKolabPartContactViewer"];
}
- (WOComponent *)kolabEventViewer {
- return [self linkViewer];
+ return [self->viewer pageWithName:@"UIxKolabPartEventViewer"];
}
- (WOComponent *)kolabTodoViewer {
- return [self linkViewer];
+ return [self->viewer pageWithName:@"UIxKolabPartTodoViewer"];
}
+
- (WOComponent *)kolabNoteViewer {
- return [self linkViewer];
+ return [self textViewer]; // TODO
}
- (WOComponent *)kolabJournalViewer {
- return [self linkViewer];
+ return [self textViewer]; // TODO
}
- (WOComponent *)kolabDistributionListViewer {
- return [self linkViewer];
+ return [self textViewer]; // TODO
}
/* main viewer selection */
# version file
-SUBMINOR_VERSION:=19
+SUBMINOR_VERSION:=20
# v0.9.0 requires libNGiCal v4.5.53
# v0.9.1 requires libNGMime v4.5.213
2005-07-30 Helge Hess <helge.hess@opengroupware.org>
-
+
+ * MailerUI/UIxMailView.wox: do not show mail header when accessing a
+ Kolab mail object
+
* MailPartViewers/UIxMailPartImageViewer.wox: fixed 'title' attribute
of image tag (now displays filename)
-
+
* MailerUI/UIxMailMainFrame.wox: use 'view' instead of 'tb.view' to
activate links
-
+
2005-07-26 Helge Hess <helge.hess@opengroupware.org>
-
+
* ContactsUI/UIxContactEditor.wox: removed copy-from-anais button
-
+
* UIxAppointmentProposal.wox, UIxAppointmentEditor.wox: do not try to
use Anais attendee selector (must be replaced)
-
+
* MailerUI: use proper _wosid instead of 'sidinurl' in <form> tags
-
+
2005-07-22 Marcus Mueller <znek@mulle-kybernetik.com>
-
+
* UIxMailPanelFrame.wox: added MailerUI.SOGo strings table for error
messages
-
+
* UIxMailEditor.wox: added inclusion of layout2or3_xlib.js and added
a new id to compose_table
-
+
2005-07-21 Marcus Mueller <znek@mulle-kybernetik.com>
-
+
* UIxCalDayOverview.wox, UIxCalDayChartview.wox, UIxCalDayListview.wox,
UIxCalMonthOverview.wox: reworked the style bindings
--- /dev/null
+# GNUstep makefile
+
+validate-wox:
+ xmllint --noout *.wox
+
+all :: validate-wox
+
+install :: all
+
+clean ::
+
+distclean :: clean
--- /dev/null
+<?xml version="1.0" standalone="yes"?>
+<div xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:var="http://www.skyrix.com/od/binding"
+ xmlns:label="OGo:label"
+ xmlns:const="http://www.skyrix.com/od/constant"
+ xmlns:rsrc="OGo:url"
+ class="linked_attachment_frame"
+>
+ <fieldset>
+ <legend>
+ <var:string label:value="Kolab Contact" />:
+ <var:string value="domDocument./name/full-name.textValue" />
+ (ID: <var:string value="domDocument./uid.textValue" />)
+ </legend>
+
+ <div class="linked_attachment_meta" style="background-color: white;">
+ <table border="0" class="linked_attachment_meta">
+ <tr>
+ <td><var:string label:value="Name"/>:</td>
+ <td><var:string value="domDocument./name/full-name.textValue" /></td>
+ </tr>
+ <tr>
+ <td><var:string label:value="Categories"/>:</td>
+ <td><var:string value="domDocument./categories.textValue" /></td>
+ </tr>
+ <tr>
+ <td><var:string label:value="Sensitivity"/>:</td>
+ <td><var:string value="domDocument./sensitivity.textValue" /></td>
+ </tr>
+ <tr>
+ <td><var:string label:value="Organization"/>:</td>
+ <td><var:string value="domDocument./organization.textValue" /></td>
+ </tr>
+ <tr>
+ <td><var:string label:value="Web"/>:</td>
+ <td><var:string value="domDocument./web-page.textValue" /></td>
+ </tr>
+ <tr>
+ <td><var:string label:value="IM"/>:</td>
+ <td><var:string value="domDocument./im-address.textValue" /></td>
+ </tr>
+ <tr>
+ <td><var:string label:value="Department"/>:</td>
+ <td><var:string value="domDocument./department.textValue" /></td>
+ </tr>
+ <tr>
+ <td><var:string label:value="Office"/>:</td>
+ <td><var:string value="domDocument./office-location.textValue"/></td>
+ </tr>
+ <tr>
+ <td><var:string label:value="Profession"/>:</td>
+ <td><var:string value="domDocument./profession.textValue" /></td>
+ </tr>
+ <tr>
+ <td><var:string label:value="Job Title"/>:</td>
+ <td><var:string value="domDocument./job-title.textValue" /></td>
+ </tr>
+ <tr>
+ <td><var:string label:value="Manager"/>:</td>
+ <td><var:string value="domDocument./manager-name.textValue" /></td>
+ </tr>
+ <tr>
+ <td><var:string label:value="Assistant"/>:</td>
+ <td><var:string value="domDocument./assistant.textValue" /></td>
+ </tr>
+ <tr>
+ <td><var:string label:value="Job Title"/>:</td>
+ <td><var:string value="domDocument./job-title.textValue" /></td>
+ </tr>
+<!--
+creation-date
+last-modification-date
+nick-name
+spouse-name
+birthday
+anniversary
+picture
+x-logo
+phone [ type, number]
+email [ display-name, smtp-address ]
+address [ type, street, locality, region, postal-code, country ]
+preferred-address (type: home)
+latitude
+longitude
+x-custom [ @value, @app, @name ]
+ -->
+ </table>
+ </div>
+
+<!--
+DOC: <var:string value="domDocument" /><br />
+DOCEL: <var:string value="domDocument.documentElement" /><br />
+UID: <var:string value="domDocument./uid.textValue" /><br />
+phone: <var:string value="domDocument./phone" /><br />
+address: <var:string value="domDocument./address" /><br />
+-->
+
+ </fieldset>
+ <pre style="display: none;"><var:string value="flatContentAsString" /></pre>
+</div>
--- /dev/null
+<?xml version="1.0" standalone="yes"?>
+<div xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:var="http://www.skyrix.com/od/binding"
+ xmlns:label="OGo:label"
+ xmlns:const="http://www.skyrix.com/od/constant"
+ xmlns:rsrc="OGo:url"
+ class="linked_attachment_frame"
+>
+ <fieldset>
+ <legend>
+ Kolab Event
+ </legend>
+
+ <pre><var:string value="flatContentAsString" /></pre>
+ </fieldset>
+</div>
--- /dev/null
+<?xml version="1.0" standalone="yes"?>
+<div xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:var="http://www.skyrix.com/od/binding"
+ xmlns:label="OGo:label"
+ xmlns:const="http://www.skyrix.com/od/constant"
+ xmlns:rsrc="OGo:url"
+ class="linked_attachment_frame"
+>
+ <fieldset>
+ <legend>
+ Kolab Task
+ </legend>
+
+ <pre><var:string value="flatContentAsString" /></pre>
+ </fieldset>
+</div>
>
<!-- TODO: add iMIP actions -->
+ <var:if condition="couldParseCalendar" const:negate="1">
+ <fieldset>
+ <legend>Parsing Error</legend>
+
+ The SOGo/SOPE iCalendar parser could not parse the body of this MIME part.
+
+ <pre><var:string value="flatContentAsString" /></pre>
+ </fieldset>
+ </var:if>
+
+ <var:if condition="couldParseCalendar">
<fieldset>
<legend>
<var:string label:value="Appointment"/>:
</table>
</div>
</fieldset>
+ </var:if><!-- could parse -->
<!--
<var:string value="appointment" />
>
<!-- TODO: refactor address rendering into an own component(/element) -->
+ <!-- TODO: can we create own clientObject's for Kolab entities? Probably
+ not (since we would always need to fetch the header during
+ lookup). It would work for 'annotated' folders though.
+ TODO: for Kolab we need a completely different viewer with a different
+ toolbar etc. And for Kolab we would need a different list viewer
+ as well ...
+ -->
+ <var:if condition="clientObject.isKolabObject" const:negate="1">
<!--
Note: We cannot make this section static (like the toolbar) because the CC
list has a dynamic height (would require some tricky JavaScript).
-->
</var:if>
</table>
+ </var:if><!-- !Kolab -->
<div class="mailer_mailcontent">
<var:component value="contentViewerComponent"