Fix prefix and label stuff for castel

This commit is contained in:
Yann Diorcet 2012-08-07 18:11:56 +02:00
parent 1234944627
commit e578019a9c
4 changed files with 11 additions and 11 deletions

View file

@ -663,16 +663,16 @@
ABRecordSetValue(contact, kABPersonPhoneProperty, lMap, nil);
CFRelease(lMap);
} else if([path section] == 1) {
/* MODIFICATION prefix with sip: */
value = [FastAddressBook normalizeSipURI:value];
[textField setText:value];
/**/
ABMultiValueRef lcMap = ABRecordCopyValue(contact, kABPersonInstantMessageProperty);
ABMutableMultiValueRef lMap = ABMultiValueCreateMutableCopy(lcMap);
CFRelease(lcMap);
int index = ABMultiValueGetIndexForIdentifier(lMap, [entry identifier]);
CFStringRef keys[] = { kABPersonInstantMessageUsernameKey, kABPersonInstantMessageServiceKey};
/* MODIFICATION prefix with sip:
CFTypeRef values[] = { [value copy], CONTACT_SIP_FIELD };
*/
CFTypeRef values[] = { [FastAddressBook normalizeSipURI:value], CONTACT_SIP_FIELD };
/**/
CFDictionaryRef lDict = CFDictionaryCreate(NULL, (const void **)&keys, (const void **)&values, 2, NULL, NULL);
ABMultiValueReplaceValueAtIndex(lMap, lDict, index);
CFRelease(lDict);

View file

@ -227,6 +227,10 @@ static UICompositeViewDescription *compositeDescription = nil;
return YES;
}
- (BOOL)textFieldShouldEndEditing:(UITextField *)textField {
[textField setText:[FastAddressBook normalizeSipURI:[textField text]]];
return YES;
}
#pragma mark - Action Functions

View file

@ -77,7 +77,7 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentVerticalAlignment">0</int>
<string key="IBUIText"/>
<string key="IBUIPlaceholder">Enter sip address or phone number...</string>
<string key="IBUIPlaceholder">sip:</string>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1296</int>
<int key="IBDocument.SystemTarget">1280</int>
<string key="IBDocument.SystemVersion">11E53</string>
<string key="IBDocument.InterfaceBuilderVersion">2549</string>
<string key="IBDocument.AppKitVersion">1138.47</string>
@ -72,7 +72,7 @@
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<int key="IBUIContentVerticalAlignment">0</int>
<string key="IBUIText"/>
<string key="IBUIPlaceholder">Enter sip address or phone number...</string>
<string key="IBUIPlaceholder">sip:</string>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
@ -1460,10 +1460,6 @@
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<real value="1296" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">