Monotone-Parent: e55c7e9b0d4eff602ecb06071b3c60c6e2c19bf0

Monotone-Revision: 509b02f4f9f2961c7946b8a808d6fe29000b8cc9

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-08-11T19:23:51
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2010-08-11 19:23:51 +00:00
parent 3371a4712d
commit 39928c163d
3 changed files with 15 additions and 0 deletions

View File

@@ -1,5 +1,9 @@
2010-08-11 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/WORequest+SOGo.m (-isAddressBookApp): new
(hackish) test method to determine whether the client is Apple's
AddressBook.app.
* UI/Common/UIxPageFrame.m (_dictionaryWithKeys:fromSource:):
set an NSNull as value for keys which return no results, in order
to avoid an NSInvalidArgumentException.

View File

@@ -34,6 +34,7 @@
- (BOOL) isIPhone;
- (BOOL) isICal;
- (BOOL) isICal4;
- (BOOL) isAddressBookApp;
@end

View File

@@ -137,4 +137,14 @@
return [self isAppleDAVWithSubstring: @"iCal/4."];
}
- (BOOL) isAddressBookApp
{
WEClientCapabilities *cc;
cc = [self clientCapabilities];
return ([[cc userAgent] rangeOfString: @"CFNetwork"].location != NSNotFound
&& [[cc userAgent] rangeOfString: @"Darwin"].location != NSNotFound);
}
@end