Monotone-Parent: e705fe92d77e84f110a9afc8e89c7bd0fe76b58c

Monotone-Revision: 844f1f631a8e5c8bd991267dca0d6ec51a256f21

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-08-30T22:57:18
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2006-08-30 22:57:18 +00:00
parent 39fd16a59f
commit ef89c28110
2 changed files with 27 additions and 50 deletions

View File

@ -1,5 +1,14 @@
2006-08-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Contacts/UIxContactSelector.m ([UIxContactSelector
-initialContactsAsString]): renamed implementation of
initialParticipants.
([UIxContactSelector -currentContactId])
([UIxContactSelector -currentContactName]): new methods used when
listing the initial contacts in the widget. Currently, both return
the person's cn but the latter should ultimately return a user
fullname.
* UI/Contacts/UIxContactSelector.h: separated interface from
UIxContactSelector.m.

View File

@ -20,41 +20,15 @@
*/
// $Id: UIxContactSelector.m 394 2004-10-14 08:47:35Z znek $
#import <NGExtensions/NGExtensions.h>
#import <SOGoUI/UIxComponent.h>
#import <SOGo/AgenorUserManager.h>
#import <Scheduler/iCalPerson+UIx.h>
@interface UIxContactSelector : UIxComponent
{
NSString *title;
NSString *windowId;
NSString *selectorId;
NSString *callback;
#import "common.h"
NSArray *contacts;
}
- (void)setTitle:(NSString *)_title;
- (NSString *)title;
- (void)setWindowId:(NSString *)_winId;
- (NSString *)windowId;
- (void)setSelectorId:(NSString *)_selId;
- (NSString *)selectorId;
- (void)setCallback:(NSString *)_callback;
- (NSString *)callback;
- (void) setContacts: (NSArray *) _contacts;
- (NSArray *) contacts;
- (NSString *)relativeContactsPath;
- (NSString *)jsFunctionName;
- (NSString *)jsFunctionHref;
- (NSString *)jsCode;
@end
#include "common.h"
#include <NGExtensions/NGExtensions.h>
#import "UIxContactSelector.h"
@implementation UIxContactSelector
@ -189,32 +163,16 @@
NSLog (@"go no attendees!");
}
- (NSString *) initialParticipantIds
- (void) setCurrentContact: (iCalPerson *) aContact
{
NSMutableArray *uids;
NSEnumerator *persons;
iCalPerson *person;
AgenorUserManager *um;
um = [AgenorUserManager sharedUserManager];
uids = [NSMutableArray arrayWithCapacity: [contacts count]];
persons = [contacts objectEnumerator];
person = [persons nextObject];
while (person)
{
[uids addObject: [um getUIDForICalPerson: person]];
person = [persons nextObject];
}
return [uids componentsJoinedByString: @","];
currentContact = aContact;
}
- (NSString *) initialParticipants
- (NSString *) initialContactsAsString
{
NSMutableArray *participants;
NSEnumerator *persons;
iCalPerson *person;
NSMutableArray *participants;
participants = [NSMutableArray arrayWithCapacity: [contacts count]];
persons = [contacts objectEnumerator];
@ -228,4 +186,14 @@
return [participants componentsJoinedByString: @","];
}
- (NSString *) currentContactId
{
return [currentContact cn];
}
- (NSString *) currentContactName
{
return [currentContact cn];
}
@end /* UIxContactSelector */