mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 13:48:09 +00:00
Implement bis, long due!
This commit is contained in:
parent
0848c79e92
commit
fd985d9ef3
4 changed files with 25 additions and 9 deletions
|
|
@ -255,7 +255,7 @@
|
|||
<action selector="onBackClick:" destination="-1" eventType="touchUpInside" id="233"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" adjustsImageWhenDisabled="NO" lineBreakMode="middleTruncation" id="224" userLabel="callButton" customClass="UICallButton">
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" adjustsImageWhenDisabled="NO" lineBreakMode="middleTruncation" id="224" userLabel="callButton" customClass="UICallButton">
|
||||
<rect key="frame" x="106" y="0.0" width="108" height="69"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Call"/>
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@
|
|||
<action selector="onBackClick:" destination="-1" eventType="touchUpInside" id="68"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" adjustsImageWhenDisabled="NO" lineBreakMode="middleTruncation" id="21" userLabel="callButton" customClass="UICallButton">
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" adjustsImageWhenDisabled="NO" lineBreakMode="middleTruncation" id="21" userLabel="callButton" customClass="UICallButton">
|
||||
<rect key="frame" x="126" y="0.0" width="186" height="85"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Call"/>
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
LinphoneCall* call = linphone_core_get_current_call(lc);
|
||||
LinphoneCallState state = (call != NULL)?linphone_call_get_state(call): 0;
|
||||
[self callUpdate:call state:state];
|
||||
|
||||
|
||||
if([LinphoneManager runningOnIpad]) {
|
||||
if(linphone_core_video_enabled(lc) && linphone_core_video_preview_enabled(lc)) {
|
||||
linphone_core_set_native_preview_window_id(lc, (unsigned long)videoPreview);
|
||||
|
|
@ -344,13 +344,11 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
if([[addressField text] length] > 0) {
|
||||
[addContactButton setEnabled:TRUE];
|
||||
[eraseButton setEnabled:TRUE];
|
||||
[callButton setEnabled:TRUE];
|
||||
[addCallButton setEnabled:TRUE];
|
||||
[transferButton setEnabled:TRUE];
|
||||
} else {
|
||||
[addContactButton setEnabled:FALSE];
|
||||
[eraseButton setEnabled:FALSE];
|
||||
[callButton setEnabled:FALSE];
|
||||
[addCallButton setEnabled:FALSE];
|
||||
[transferButton setEnabled:FALSE];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,11 +69,29 @@
|
|||
- (void)touchUp:(id) sender {
|
||||
NSString *address = [addressField text];
|
||||
NSString *displayName = nil;
|
||||
ABRecordRef contact = [[[LinphoneManager instance] fastAddressBook] getContact:address];
|
||||
if(contact) {
|
||||
displayName = [FastAddressBook getContactDisplayName:contact];
|
||||
|
||||
if( [address length] == 0){
|
||||
const MSList* logs = linphone_core_get_call_logs([LinphoneManager getLc]);
|
||||
while( logs ){
|
||||
LinphoneCallLog* log = logs->data;
|
||||
if( linphone_call_log_get_dir(log) == LinphoneCallOutgoing ){
|
||||
LinphoneAddress* to = linphone_call_log_get_to(log);
|
||||
[addressField setText:[NSString stringWithUTF8String:linphone_address_as_string(to)]];
|
||||
address = [addressField text];
|
||||
// only fill thge address, let the user confirm the call by pressing again
|
||||
return;
|
||||
}
|
||||
logs = ms_list_next(logs);
|
||||
}
|
||||
}
|
||||
|
||||
if( [address length] > 0){
|
||||
ABRecordRef contact = [[[LinphoneManager instance] fastAddressBook] getContact:address];
|
||||
if(contact) {
|
||||
displayName = [FastAddressBook getContactDisplayName:contact];
|
||||
}
|
||||
[[LinphoneManager instance] call:address displayName:displayName transfer:FALSE];
|
||||
}
|
||||
[[LinphoneManager instance] call:address displayName:displayName transfer:FALSE];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue