(feat) now properties dialog for addressbooks

Now also possible to set the EAS sync flag for addressbooks
This commit is contained in:
Ludovic Marcotte
2015-11-04 10:38:24 -05:00
parent 39601a9cf9
commit 12863f1d2f
8 changed files with 230 additions and 7 deletions
+10 -1
View File
@@ -296,7 +296,7 @@ Class SOGoContactSourceFolderK, SOGoGCSFolderK;
NSDictionary *folderAttrs;
id currentFolder;
BOOL objectCreator, objectEditor, objectEraser;
BOOL objectCreator, objectEditor, objectEraser, synchronize;
int max, i;
userLogin = [[context activeUser] login];
@@ -333,11 +333,20 @@ Class SOGoContactSourceFolderK, SOGoGCSFolderK;
[NSNumber numberWithBool: objectEditor], @"objectEditor",
[NSNumber numberWithBool: objectEraser], @"objectEraser", nil];
if ([currentFolder isKindOfClass: SOGoGCSFolderK])
synchronize = [currentFolder synchronize];
else
synchronize = NO;
if ([[currentFolder nameInContainer] isEqualToString: @"personal"])
synchronize = YES;
// NOTE: keep urls as the last key/value here, to avoid chopping the dictionary
// if it is not a GCS folder
folderAttrs = [NSDictionary dictionaryWithObjectsAndKeys:
[NSString stringWithFormat: @"%@", [currentFolder nameInContainer]], @"id",
[currentFolder displayName], @"name",
[NSNumber numberWithBool: synchronize], @"synchronize",
owner, @"owner",
[NSNumber numberWithBool: [currentFolder isKindOfClass: SOGoGCSFolderK]], @"isEditable",
[NSNumber numberWithBool: [currentFolder isKindOfClass: SOGoContactSourceFolderK]