}
- (void)dealloc {
- [self->tz release];
- [self->privateTitle release];
+ [self->tz release];
+ [self->privateTitle release];
+ [self->titlePlaceholder release];
[super dealloc];
}
return self->privateTitle;
}
+- (void)setTitlePlaceholder:(NSString *)_titlePlaceholder {
+ ASSIGN(self->titlePlaceholder, _titlePlaceholder);
+}
+- (NSString *)titlePlaceholder {
+ return self->titlePlaceholder;
+}
+
- (void)setOmitsEndDate {
self->omitsEndDate = YES;
}
}
- (NSString *)titleForApt:(id)_apt :(NSCalendarDate *)_refDate {
- return [_apt valueForKey:@"title"];
+ NSString *title;
+
+ title = [_apt valueForKey:@"title"];
+ if (![title isNotEmpty])
+ title = [self titlePlaceholder];
+ return title;
}
- (NSString *)shortTitleForApt:(id)_apt :(NSCalendarDate *)_refDate {
if ((s = [_apt valueForKey:@"location"]) != nil) {
[aptDescr appendFormat:@"; (%@)", s];
}
- if ((s = [_apt valueForKey:@"title"]) != nil)
- [aptDescr appendFormat:@"; %@", [self titleForApt:_apt :_refDate]];
+ if ((s = [self titleForApt:_apt :_refDate]) != nil)
+ [aptDescr appendFormat:@"; %@", s];
return aptDescr;
}
s = [[s substringToIndex:11] stringByAppendingString:@"..."];
[aptDescr appendFormat:@" (%@)", s];
}
- if ((s = [_apt valueForKey:@"title"]) != nil)
- [aptDescr appendFormat:@"<br />%@", [self shortTitleForApt:_apt :_refDate]];
+ if ((s = [self shortTitleForApt:_apt :_refDate]) != nil)
+ [aptDescr appendFormat:@"<br />%@", s];
return aptDescr;
}
[self appendTimeInfoFromApt:_apt
usingReferenceDate:_refDate
toBuffer:aptDescr];
- if ((s = [_apt valueForKey:@"title"]) != nil)
+ if ((s = [self titleForApt:_apt :_refDate]) != nil)
[aptDescr appendFormat:@"\n%@", s];
if ((s = [_apt valueForKey:@"location"]) != nil)
[aptDescr appendFormat:@"\n%@", s];
+2005-07-18 Marcus Mueller <znek@mulle-kybernetik.com>
+
+ * UIxCalView.m: provide label "empty title" as -titlePlaceholder for
+ appointment formatters to enable display of appointments whose
+ title has not been set (v0.9.136)
+
2005-07-15 Helge Hess <helge.hess@opengroupware.org>
* UIxCalScheduleOverview.m, UIxAppointmentView.m,
[self->aptTooltipFormatter setTooltip];
[self->privateAptFormatter setPrivateDetails];
[self->privateAptTooltipFormatter setPrivateTooltip];
-
+
+ title = [self labelForKey:@"empty title"];
+ [self->aptFormatter setTitlePlaceholder:title];
+ [self->aptTooltipFormatter setTitlePlaceholder:title];
+
title = [self labelForKey:@"private appointment"];
[self->privateAptFormatter setPrivateTitle:title];
[self->privateAptTooltipFormatter setPrivateTitle:title];