mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-11 23:07:12 +00:00
Monotone-Parent: a93dd2767c4f017932c6339f82394fd558ef304f
Monotone-Revision: 7e63e5fdd760a91e91ec6f1759064a5e5c2f267f Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-10-23T15:35:20 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
1 parent
94e1d60312
commit
b6201ae20a
10 files changed
+33
-20
No files matched your search
@@ -47,18 +47,14 @@
|
||||
|
||||
accounts = [[context activeUser] mailAccounts];
|
||||
|
||||
return [accounts objectsForKey: @"name"];
|
||||
return [accounts objectsForKey: @"name" notFoundMarker: nil];
|
||||
}
|
||||
|
||||
/* name lookup */
|
||||
|
||||
- (BOOL) isValidMailAccountName: (NSString *) _key
|
||||
{
|
||||
NSArray *accounts;
|
||||
|
||||
accounts = [[context activeUser] mailAccounts];
|
||||
|
||||
return [[accounts objectsForKey: @"name"] containsObject: _key];
|
||||
return [[self toManyRelationshipKeys] containsObject: _key];
|
||||
}
|
||||
|
||||
// - (id) mailAccountWithName: (NSString *) _key
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
if ([keys count])
|
||||
{
|
||||
types = [keys objectsForKey: @"mimeType"];
|
||||
types = [keys objectsForKey: @"mimeType" notFoundMarker: @""];
|
||||
index = [types indexOfObject: @"text/plain"];
|
||||
if (index == NSNotFound)
|
||||
{
|
||||
|
||||
@@ -604,10 +604,11 @@ static BOOL debugSoParts = NO;
|
||||
id result;
|
||||
|
||||
[self debugWithFormat: @"fetch keys: %@", _fetchKeys];
|
||||
|
||||
result = [self fetchParts: [_fetchKeys objectsForKey: @"key"]];
|
||||
|
||||
result = [self fetchParts: [_fetchKeys objectsForKey: @"key"
|
||||
notFoundMarker: nil]];
|
||||
result = [result valueForKey: @"RawResponse"]; // hackish
|
||||
|
||||
|
||||
// Note: -valueForKey: doesn't work!
|
||||
result = [(NSDictionary *)result objectForKey: @"fetch"];
|
||||
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
|
||||
- (NSArray *) stringsWithFormat: (NSString *) format;
|
||||
- (NSArray *) keysWithFormat: (NSString *) format;
|
||||
- (NSArray *) objectsForKey: (NSString *) key;
|
||||
- (NSArray *) objectsForKey: (NSString *) key
|
||||
notFoundMarker: (id) marker;
|
||||
- (NSArray *) flattenedArray;
|
||||
|
||||
- (NSArray *) uniqueObjects;
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
}
|
||||
|
||||
- (NSArray *) objectsForKey: (NSString *) key
|
||||
notFoundMarker: (id) marker
|
||||
{
|
||||
NSMutableArray *objectsForKey;
|
||||
unsigned int count, max;
|
||||
@@ -96,7 +97,10 @@
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
value = [[self objectAtIndex: count] objectForKey: key];
|
||||
[objectsForKey addObject: value];
|
||||
if (value)
|
||||
[objectsForKey addObject: value];
|
||||
else if (marker)
|
||||
[objectsForKey addObject: marker];
|
||||
}
|
||||
|
||||
return objectsForKey;
|
||||
|
||||
@@ -467,7 +467,7 @@ static NSArray *childRecordFields = nil;
|
||||
return records;
|
||||
|
||||
[childRecords release];
|
||||
names = [records objectsForKey: @"c_name"];
|
||||
names = [records objectsForKey: @"c_name" notFoundMarker: nil];
|
||||
childRecords = [[NSMutableDictionary alloc] initWithObjects: records
|
||||
forKeys: names];
|
||||
|
||||
|
||||
@@ -751,8 +751,8 @@ _timeValue (NSString *key)
|
||||
{
|
||||
NSArray *identities;
|
||||
|
||||
[self mailAccounts];
|
||||
identities = [mailAccounts objectsForKey: @"identities"];
|
||||
identities = [[self mailAccounts] objectsForKey: @"identities"
|
||||
notFoundMarker: nil];
|
||||
|
||||
return [identities flattenedArray];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user