diff --git a/ChangeLog b/ChangeLog index 0b19d82d4..2a7a4f01c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2006-10-13 Wolfgang Sourdeau + * UI/Contacts/UIxContactSelector.m ([UIxContactSelector -setCheckedBoxes:boxes]) + ([UIxContactSelector -setHasCheckBoxes:aBool]) + ([UIxContactSelector -isCheckBoxChecked]): new accessors method to + permit the drawing of checkboxes instead of card icons. + * UI/Scheduler/UIxCalCalendarsListView.m: new component class that wrap a selector the the "Calendars" tab. diff --git a/UI/Contacts/UIxContactSelector.h b/UI/Contacts/UIxContactSelector.h index 4162b0356..38fa4191d 100644 --- a/UI/Contacts/UIxContactSelector.h +++ b/UI/Contacts/UIxContactSelector.h @@ -30,9 +30,18 @@ NSString *callback; NSArray *contacts; + NSArray *checkedBoxes; iCalPerson *currentContact; + + BOOL hasCheckBoxes; + NSString *checkBoxOnChange; } +- (void) setHasCheckBoxes: (BOOL) aBool; +- (BOOL) hasCheckBoxes; +- (void) setCheckBoxOnChange: (NSString *) aString; +- (NSString *) checkBoxOnChange; + - (void)setTitle:(NSString *)_title; - (NSString *)title; - (void)setWindowId:(NSString *)_winId; diff --git a/UI/Contacts/UIxContactSelector.m b/UI/Contacts/UIxContactSelector.m index ff083785d..2073f6489 100644 --- a/UI/Contacts/UIxContactSelector.m +++ b/UI/Contacts/UIxContactSelector.m @@ -37,6 +37,7 @@ [self setTitle:@"UIxContacts"]; [self setWindowId:@"UIxContacts"]; [self setCallback:@"undefined"]; + checkedBoxes = nil; } return self; } @@ -199,4 +200,35 @@ return [currentContact cn]; } +- (void) setCheckedBoxes: (NSArray *) boxes +{ + checkedBoxes = boxes; +} + +- (void) setHasCheckBoxes: (BOOL) aBool +{ + hasCheckBoxes = aBool; +} + +- (BOOL) hasCheckBoxes +{ + return hasCheckBoxes; +} + +- (BOOL) isCheckBoxChecked +{ + return (checkedBoxes != nil + && [checkedBoxes containsObject: currentContact]); +} + +- (void) setCheckBoxOnChange: (NSString *) aString +{ + checkBoxOnChange = aString; +} + +- (NSString *) checkBoxOnChange +{ + return checkBoxOnChange; +} + @end /* UIxContactSelector */