Monotone-Parent: f157da7ef6dd1cbbd794a190a33ba4d9f47aff68

Monotone-Revision: d718bf9c6341fc32a67a496c0427cbfe18d0cfae

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-11-01T20:38:57
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2006-11-01 20:38:57 +00:00
parent 42b6e29453
commit 69ddfaae62
3 changed files with 46 additions and 0 deletions

View File

@@ -1,5 +1,12 @@
2006-11-01 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Contacts/UIxContactsListViewContainer.m ([UIxContactsListViewContainer -additionalAddressBooks])
([UIxContactsListViewContainer -additionalFolders])
([UIxContactsListViewContainer -setCurrentAdditionalFolder:newCurrentAdditionalFolder])
([UIxContactsListViewContainer -currentAdditionalFolder]): new
methods to handle the external addressbooks a user has subscribed
too, by retriving them from his preferences.
* UI/Contacts/UIxContactFoldersView.m ([UIxContactFoldersView
-updateAdditionalAddressBooksAction]): new method that updates the
user settings with the list of addressbook he has subscribed to.

View File

@@ -26,12 +26,14 @@
#import <SOGoUI/UIxComponent.h>
@class NSArray;
@class NSString;
@class SOGoContactFolder;
@interface UIxContactsListViewContainer : UIxComponent
{
NSString *foldersPrefix;
NSString *selectorComponentClass;
NSString *currentAdditionalFolder;
id currentFolder;
}
@@ -45,6 +47,12 @@
- (NSString *) currentContactFolderId;
- (NSString *) currentContactFolderName;
- (NSString *) additionalAddressBooks;
- (NSArray *) additionalFolders;
- (void) setCurrentAdditionalFolder: (NSString *) newCurrentAdditionalFolder;
- (NSString *) currentAdditionalFolder;
@end
#endif /* UIXCONTACTSLISTVIEWCONTAINERBASE_H */

View File

@@ -24,7 +24,9 @@
#import <Foundation/NSString.h>
#import <NGObjWeb/SoObjects.h>
#import <NGExtensions/NSObject+Values.h>
#import <SoObjects/SOGo/SOGoUser.h>
#import <SoObjects/Contacts/SOGoContactFolder.h>
#import "UIxContactsListViewContainer.h"
@@ -132,9 +134,38 @@
return [[self currentContactFolderId] isEqualToString: [self contactFolderId]];
}
- (NSString *) additionalAddressBooks
{
NSUserDefaults *ud;
ud = [[context activeUser] userDefaults];
return [ud objectForKey: @"additionaladdressbooks"];
}
- (NSArray *) additionalFolders
{
return [[self additionalAddressBooks] componentsSeparatedByString: @","];
}
- (void) setCurrentAdditionalFolder: (NSString *) newCurrentAdditionalFolder
{
currentAdditionalFolder = newCurrentAdditionalFolder;
}
- (NSString *) currentAdditionalFolder
{
return currentAdditionalFolder;
}
- (BOOL) hasContactSelectionButtons
{
return (selectorComponentClass != nil);
}
- (BOOL) isPopup
{
return [[self queryParameterForKey: @"popup"] boolValue];
}
@end