From ef89c281101386a3abb9f464efa8b78bd06fcd32 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 30 Aug 2006 22:57:18 +0000 Subject: [PATCH] Monotone-Parent: e705fe92d77e84f110a9afc8e89c7bd0fe76b58c Monotone-Revision: 844f1f631a8e5c8bd991267dca0d6ec51a256f21 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-08-30T22:57:18 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 9 +++++ UI/Contacts/UIxContactSelector.m | 68 +++++++++----------------------- 2 files changed, 27 insertions(+), 50 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9cac9db94..d800b096a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2006-08-30 Wolfgang Sourdeau + * 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. diff --git a/UI/Contacts/UIxContactSelector.m b/UI/Contacts/UIxContactSelector.m index a852674fd..ce1fee914 100644 --- a/UI/Contacts/UIxContactSelector.m +++ b/UI/Contacts/UIxContactSelector.m @@ -20,41 +20,15 @@ */ // $Id: UIxContactSelector.m 394 2004-10-14 08:47:35Z znek $ +#import + #import #import #import -@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 +#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 */