Monotone-Parent: 648006b4eaaf4d9129f55629de21c0cfb36a0e58

Monotone-Revision: 50485da98a8b2535a5e2511ba4e1bd8025373815

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-12-19T17:03:41
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2006-12-19 17:03:41 +00:00
parent 6c3f727227
commit 87c7e33e16
3 changed files with 16 additions and 1 deletions

View File

@@ -1,5 +1,9 @@
2006-12-19 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/SOGoObject.m ([SOGoObject -setOwner:newOwner]):
new method that sets a customOwner, which can be returned with
ownerInContext it set.
* SoObjects/Appointments/SOGoAppointmentFolder.m
([SOGoAppointmentFolder
-fetchFields:_fieldsfromFolder:_folderfrom:_startDateto:_endDatecomponent:_component]): no longer set the owner of elements here.

View File

@@ -47,6 +47,7 @@
NSString *nameInContainer;
id container;
NSTimeZone *userTimeZone;
NSString *customOwner;
}
+ (id) objectWithName: (NSString *)_name inContainer:(id)_container;

View File

@@ -401,6 +401,7 @@ static NSTimeZone *serverTimeZone = nil;
container =
[self doesRetainContainer] ? [_container retain] : _container;
userTimeZone = nil;
customOwner = nil;
}
return self;
}
@@ -410,6 +411,8 @@ static NSTimeZone *serverTimeZone = nil;
}
- (void)dealloc {
if (customOwner)
[customOwner release];
if ([self doesRetainContainer])
[container release];
if (userTimeZone)
@@ -429,8 +432,15 @@ static NSTimeZone *serverTimeZone = nil;
/* ownership */
- (void) setOwner: (NSString *) newOwner
{
ASSIGN (customOwner, newOwner);
}
- (NSString *)ownerInContext:(id)_ctx {
return [[self container] ownerInContext:_ctx];
return ((customOwner)
? customOwner
: [[self container] ownerInContext:_ctx]);
}
/* hierarchy */