From b44b9c260f886db82d2f2a0bc8121b4f2cc38182 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 1 Nov 2006 20:37:02 +0000 Subject: [PATCH] Monotone-Parent: 59a124046afcb9738314976b76e1a3a8da551f0a Monotone-Revision: d3d79ac1c68a262bcbff0b8d511114a32e1671f3 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-11-01T20:37:02 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ UI/Contacts/UIxContactFoldersView.m | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/ChangeLog b/ChangeLog index 16d9c9b6f..83066144b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-11-01 Wolfgang Sourdeau + * UI/Contacts/UIxContactFoldersView.m ([UIxContactFoldersView + -updateAdditionalAddressBooksAction]): new method that updates the + user settings with the list of addressbook he has subscribed to. + * UI/Contacts/UIxContactsAddressBooksSelection.m: new component module for the address book selector. diff --git a/UI/Contacts/UIxContactFoldersView.m b/UI/Contacts/UIxContactFoldersView.m index 9996eaadd..e389d02d6 100644 --- a/UI/Contacts/UIxContactFoldersView.m +++ b/UI/Contacts/UIxContactFoldersView.m @@ -21,10 +21,12 @@ */ #import + #import #import #import +#import #import #import #import @@ -80,6 +82,10 @@ return [self _selectActionForApplication: @"calendars-contacts"]; } +- (id) selectForAddressBooksAction +{ + return [self _selectActionForApplication: @"addressbooks-contacts"]; +} - (NSArray *) _searchResults: (NSString *) contact { @@ -183,4 +189,20 @@ return result; } +- (id ) updateAdditionalAddressBooksAction +{ + WOResponse *response; + NSUserDefaults *ud; + + ud = [[context activeUser] userDefaults]; + [ud setObject: [self queryParameterForKey: @"ids"] + forKey: @"additionaladdressbooks"]; + [ud synchronize]; + response = [context response]; + [response setStatus: 200]; + [response setHeader: @"text/html; charset=\"utf-8\"" forKey: @"content-type"]; + + return response; +} + @end