mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-27 12:16:23 +00:00
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:
@@ -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.
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user