mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-23 04:15:26 +00:00
Monotone-Parent: 9831fe16221b26d01357cd8dc0a4a0a9d3f418ed
Monotone-Revision: ebba4da6ea34dfe0e2ef6576595708fef8f31a5a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-08-20T12:50:47 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
2010-08-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Contacts/SOGoContactFolders.m (-appendSystemSources):
|
||||
append nothing if used from an iPhone.
|
||||
|
||||
* SoObjects/SOGo/SOGoParentFolder.m (-appendPersonalSources): we
|
||||
now that "owner" is always set properly from the init methods, no
|
||||
need to invoke ownerInContext: anymore.
|
||||
|
||||
@@ -61,28 +61,33 @@
|
||||
SOGoContactSourceFolder *currentFolder;
|
||||
SOGoUser *currentUser;
|
||||
|
||||
currentUser = [context activeUser];
|
||||
if (activeUserIsOwner
|
||||
|| [[currentUser login]
|
||||
isEqualToString: [self ownerInContext: context]])
|
||||
if (![[context request] isIPhoneAddressBookApp])
|
||||
{
|
||||
domain = [currentUser domain];
|
||||
um = [SOGoUserManager sharedUserManager];
|
||||
sourceIDs = [[um addressBookSourceIDsInDomain: domain] objectEnumerator];
|
||||
while ((currentSourceID = [sourceIDs nextObject]))
|
||||
currentUser = [context activeUser];
|
||||
if (activeUserIsOwner
|
||||
|| [[currentUser login] isEqualToString: owner])
|
||||
{
|
||||
srcDisplayName = [um displayNameForSourceWithID: currentSourceID];
|
||||
currentFolder = [SOGoContactSourceFolder folderWithName: currentSourceID
|
||||
andDisplayName: srcDisplayName
|
||||
inContainer: self];
|
||||
[currentFolder setSource: [um sourceWithID: currentSourceID]];
|
||||
[subFolders setObject: currentFolder forKey: currentSourceID];
|
||||
domain = [currentUser domain];
|
||||
um = [SOGoUserManager sharedUserManager];
|
||||
sourceIDs = [[um addressBookSourceIDsInDomain: domain]
|
||||
objectEnumerator];
|
||||
while ((currentSourceID = [sourceIDs nextObject]))
|
||||
{
|
||||
srcDisplayName
|
||||
= [um displayNameForSourceWithID: currentSourceID];
|
||||
currentFolder = [SOGoContactSourceFolder
|
||||
folderWithName: currentSourceID
|
||||
andDisplayName: srcDisplayName
|
||||
inContainer: self];
|
||||
[currentFolder setSource: [um sourceWithID: currentSourceID]];
|
||||
[subFolders setObject: currentFolder forKey: currentSourceID];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
- (NSString *) defaultFolderName
|
||||
{
|
||||
return [self labelForKey: @"Personal Address Book"];
|
||||
@@ -92,7 +97,7 @@
|
||||
{
|
||||
NSMutableArray *keys;
|
||||
|
||||
if ([[context request] isAddressBookApp])
|
||||
if ([[context request] isMacOSXAddressBookApp])
|
||||
keys = [NSMutableArray arrayWithObject: @"personal"];
|
||||
else
|
||||
keys = (NSMutableArray *) [super toManyRelationshipKeys];
|
||||
|
||||
Reference in New Issue
Block a user