Monotone-Parent: 2742aed8d5c18d0bc31698e3e361fe9979243fa1

Monotone-Revision: 12e535603dd09ceb52e98c9e06e74080d1a1eaff

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-11-03T19:38:08
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2006-11-03 19:38:08 +00:00
parent a551930f2c
commit c286a1935e
4 changed files with 75 additions and 39 deletions

View File

@@ -1,3 +1,13 @@
2006-11-03 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor
-loadValuesFromComponent:component]): handles access class
(privacy) and status.
* UI/Contacts/UIxContactsListViewContainer.m
([UIxContactsListViewContainer -additionalFolders]): return nil if
[self additionalAddressBooks] returns an empty string.
2006-11-02 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Scheduler/UIxCalMonthView.m ([UIxCalMonthView

View File

@@ -230,9 +230,11 @@
[_appointment setLocation: [self location]];
[_appointment setComment: [self comment]];
[_appointment setPriority:[self priority]];
[_appointment setAccessClass: [self privacy]];
[_appointment setStatus: [self status]];
[_appointment setCategories: [[self categories] componentsJoinedByString: @","]];
[_appointment setAccessClass: [self accessClass]];
[_appointment setTransparency: [self transparency]];
#if 0

View File

@@ -53,7 +53,7 @@
{
if ((self = [super init]))
{
[self setIsPrivate: NO];
[self setPrivacy: @"PUBLIC"];
[self setCheckForConflicts: NO];
[self setIsCycleEndNever];
componentOwner = @"";
@@ -77,7 +77,6 @@
[resources release];
[priority release];
[categories release];
[accessClass release];
[cycle release];
[cycleEnd release];
[url release];
@@ -87,31 +86,6 @@
/* accessors */
- (void) setAccessClass: (NSString *) _class
{
ASSIGN(accessClass, _class);
}
- (NSString *) accessClass
{
return accessClass;
}
- (void) setIsPrivate: (BOOL) _yn
{
if (_yn)
[self setAccessClass:@"PRIVATE"];
else
[self setAccessClass:@"PUBLIC"];
isPrivate = _yn;
}
- (BOOL) isPrivate
{
return isPrivate;
}
- (void) setItem: (id) _item
{
ASSIGN(item, _item);
@@ -127,6 +101,16 @@
return [self labelForKey: [NSString stringWithFormat: @"prio_%@", item]];
}
- (NSString *) itemPrivacyText
{
return [self labelForKey: [NSString stringWithFormat: @"privacy_%@", item]];
}
- (NSString *) itemStatusText
{
return [self labelForKey: [NSString stringWithFormat: @"status_%@", item]];
}
- (void) setErrorText: (NSString *) _txt
{
ASSIGNCOPY(errorText, _txt);
@@ -264,6 +248,52 @@
return priority;
}
- (NSArray *) privacyClasses
{
static NSArray *priorities = nil;
if (!priorities)
{
priorities = [NSArray arrayWithObjects: @"PUBLIC", @"PRIVATE", @"CONFIDENTIAL", nil];
[priorities retain];
}
return priorities;
}
- (void) setPrivacy: (NSString *) _privacy
{
ASSIGN(privacy, _privacy);
}
- (NSString *) privacy
{
return privacy;
}
- (NSArray *) statusTypes
{
static NSArray *priorities = nil;
if (!priorities)
{
priorities = [NSArray arrayWithObjects: @"", @"TENTATIVE", @"CONFIRMED", @"CANCELLED", nil];
[priorities retain];
}
return priorities;
}
- (void) setStatus: (NSString *) _status
{
ASSIGN(status, _status);
}
- (NSString *) status
{
return status;
}
- (void) setParticipants: (NSArray *) _parts
{
ASSIGN(participants, _parts);
@@ -568,7 +598,6 @@
/* subclasses */
- (void) loadValuesFromComponent: (iCalRepeatableEntityObject *) component
{
NSString *s;
iCalRecurrenceRule *rrule;
NSTimeZone *uTZ;
SOGoObject *co;
@@ -590,20 +619,14 @@
location = [[component location] copy];
comment = [[component comment] copy];
url = [[[component url] absoluteString] copy];
privacy = [[component accessClass] copy];
priority = [[component priority] copy];
status = [[component status] copy];
categories = [[[component categories] commaSeparatedValues] retain];
organizer = [[component organizer] retain];
participants = [[component participants] retain];
resources = [[component resources] retain];
// NSLog (@"summary éàè: '%@'", title);
s = [component accessClass];
if (!s || [s isEqualToString: @"PUBLIC"])
[self setIsPrivate:NO];
else
[self setIsPrivate:YES]; /* we're possibly loosing information here */
/* cycles */
if ([component isRecurrent])
{

View File

@@ -207,10 +207,11 @@
[_task setLocation: [self location]];
[_task setComment: [self comment]];
[_task setPriority:[self priority]];
[_task setAccessClass: [self privacy]];
[_task setStatus: [self status]];
[_task setCategories: [[self categories] componentsJoinedByString: @","]];
[_task setAccessClass:[self accessClass]];
#if 0
/*
Note: bad, bad, bad!