Monotone-Parent: c1dd559e8e0054841eb452f1efe0c0021af2c39c

Monotone-Revision: 487cdad3dbd4c7d9c8e79989636b26cefcde1b80

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-04-02T19:26:26
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-04-02 19:26:26 +00:00
parent 4b356b2f3c
commit 3e468870ac
3 changed files with 22 additions and 17 deletions
+4
View File
@@ -1,5 +1,9 @@
2007-04-02 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Scheduler/UIxCalendarSelector.m ([UIxCalendarSelector
-calendarFolders]): we now take the list of subscribed calendar
from the container.
* SoObjects/Appointments/SOGoAppointmentFolder.m
([SOGoAppointmentFolder -calendarFoldersInContext:context]): new
method derived from and replacing [UIxCalView calendarFolders].
+1 -1
View File
@@ -32,7 +32,6 @@
@interface UIxCalendarSelector : UIxComponent
{
NSMutableArray *calendarFolders;
NSMutableDictionary *colors;
NSDictionary *currentCalendarFolder;
@@ -40,6 +39,7 @@
}
- (NSArray *) calendarFolders;
- (void) setCurrentCalendarFolder: (NSDictionary *) newCurrentCalendarFolder;
- (NSDictionary *) currentCalendarFolder;
+17 -16
View File
@@ -31,6 +31,7 @@
#import <SOGo/AgenorUserManager.h>
#import <SOGo/SOGoUser.h>
#import <SOGoUI/UIxComponent.h>
#import <Appointments/SOGoAppointmentFolder.h>
#import "UIxCalendarSelector.h"
@@ -90,8 +91,7 @@ colorForNumber (unsigned int number)
{
if ((self = [super init]))
{
colors = [NSMutableDictionary new];
calendarFolders = nil;
colors = nil;
currentCalendarFolder = nil;
}
@@ -100,34 +100,35 @@ colorForNumber (unsigned int number)
- (void) dealloc
{
[calendarFolders release];
[currentCalendarFolder release];
[colors release];
[super dealloc];
}
- (void) setCalendarFolders: (NSArray *) newCalendarFolders
- (NSArray *) calendarFolders
{
NSArray *calendarFolders;
NSEnumerator *newFolders;
NSDictionary *currentFolder;
unsigned int count;
ASSIGN (calendarFolders, newCalendarFolders);
newFolders = [calendarFolders objectEnumerator];
currentFolder = [newFolders nextObject];
count = 0;
while (currentFolder)
calendarFolders
= [[self clientObject] calendarFoldersInContext: context];
if (!colors)
{
[colors setObject: colorForNumber (count)
forKey: [currentFolder objectForKey: @"folder"]];
count++;
colors = [NSMutableDictionary new];
count = 0;
newFolders = [calendarFolders objectEnumerator];
currentFolder = [newFolders nextObject];
while (currentFolder)
{
[colors setObject: colorForNumber (count)
forKey: [currentFolder objectForKey: @"folder"]];
count++;
currentFolder = [newFolders nextObject];
}
}
}
- (NSArray *) calendarFolders
{
return calendarFolders;
}