mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-23 04:15:26 +00:00
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:
@@ -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].
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user