forked from mirrors/linphone-iphone
assistant: apply transport for external accounts
This commit is contained in:
parent
0ff3f52e93
commit
9bd5716371
4 changed files with 17 additions and 16 deletions
|
|
@ -70,6 +70,4 @@
|
|||
- (IBAction)onRemoteProvisioningLoginClick:(id)sender;
|
||||
- (IBAction)onRemoteProvisioningDownloadClick:(id)sender;
|
||||
|
||||
- (IBAction)onTransportChange:(id)sender;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -225,6 +225,16 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
}
|
||||
}
|
||||
|
||||
// set transport
|
||||
UISegmentedControl *transports = (UISegmentedControl *)[self findView:ViewElement_Transport
|
||||
inView:self.contentView
|
||||
ofType:UISegmentedControl.class];
|
||||
if (transports) {
|
||||
NSString *type = [transports titleForSegmentAtIndex:[transports selectedSegmentIndex]];
|
||||
linphone_account_creator_set_transport(account_creator,
|
||||
linphone_transport_parse(type.lowercaseString.UTF8String));
|
||||
}
|
||||
|
||||
new_config = linphone_account_creator_configure(account_creator);
|
||||
|
||||
if (new_config) {
|
||||
|
|
@ -477,9 +487,11 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
UIAssistantTextField *displayName = [self findTextField:ViewElement_DisplayName];
|
||||
[displayName showError:[AssistantView errorForStatus:LinphoneAccountCreatorDisplayNameInvalid]
|
||||
when:^BOOL(NSString *inputEntry) {
|
||||
LinphoneAccountCreatorStatus s =
|
||||
linphone_account_creator_set_display_name(account_creator, inputEntry.UTF8String);
|
||||
displayName.errorLabel.text = [AssistantView errorForStatus:s];
|
||||
LinphoneAccountCreatorStatus s = LinphoneAccountCreatorOK;
|
||||
if (inputEntry.length > 0) {
|
||||
s = linphone_account_creator_set_display_name(account_creator, inputEntry.UTF8String);
|
||||
displayName.errorLabel.text = [AssistantView errorForStatus:s];
|
||||
}
|
||||
return s != LinphoneAccountCreatorOK;
|
||||
}];
|
||||
|
||||
|
|
@ -728,12 +740,6 @@ void assistant_validation_tested(LinphoneAccountCreator *creator, LinphoneAccoun
|
|||
[self resetLiblinphone];
|
||||
}
|
||||
|
||||
- (IBAction)onTransportChange:(id)sender {
|
||||
UISegmentedControl *transports = sender;
|
||||
NSString *type = [transports titleForSegmentAtIndex:[transports selectedSegmentIndex]];
|
||||
linphone_account_creator_set_transport(account_creator, linphone_transport_parse(type.lowercaseString.UTF8String));
|
||||
}
|
||||
|
||||
- (IBAction)onBackClick:(id)sender {
|
||||
if ([historyViews count] > 0) {
|
||||
UIView *view = [historyViews lastObject];
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
|
||||
|
|
@ -577,9 +577,6 @@ Once it is done, come back here and click on the button.</string>
|
|||
<segment title="TLS"/>
|
||||
</segments>
|
||||
<color key="tintColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<connections>
|
||||
<action selector="onTransportChange:" destination="-1" eventType="valueChanged" id="l9Y-fd-ja8"/>
|
||||
</connections>
|
||||
</segmentedControl>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="DISPLAY NAME (OPTIONAL)" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="F0s-Da-L59" userLabel="displayNameLabel">
|
||||
<rect key="frame" x="38" y="356" width="299" height="14"/>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 45207ae94fcd5c805be24528929cf4f6b7b1a526
|
||||
Subproject commit 9c4bdf946aa0829533d8a656fca89b0e3ad3d14f
|
||||
Loading…
Add table
Reference in a new issue