mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-27 16:09:20 +00:00
Don't play dtmf on light/door buttons
This commit is contained in:
parent
d02fdbc4cc
commit
b001cc1b40
4 changed files with 11 additions and 2 deletions
|
|
@ -94,8 +94,12 @@
|
|||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
[openDoorButton setPlay:FALSE];
|
||||
[openDoorButton setDigit:'1'];
|
||||
|
||||
[lightsButton setPlay:FALSE];
|
||||
[lightsButton setDigit:'2'];
|
||||
|
||||
[microButton setImage:[UIImage imageNamed:@"bj_mute_off.png"] forState:UIControlStateHighlighted | UIControlStateSelected];
|
||||
|
||||
/* init gradients */
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@
|
|||
}
|
||||
|
||||
- (void)update {
|
||||
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"date" ascending:NO];
|
||||
NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"date" ascending:NO];
|
||||
NSArray *sortDescriptors = [NSArray arrayWithObjects:sortDescriptor, nil];
|
||||
|
||||
[tableController setHistory:[[LinphoneManager instance].configuration.history sortedArrayUsingDescriptors:sortDescriptors]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,6 @@
|
|||
@property (nonatomic, retain) IBOutlet UITextField* addressField;
|
||||
@property char digit;
|
||||
@property bool dtmf;
|
||||
@property bool play;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
@implementation UIDigitButton
|
||||
|
||||
@synthesize dtmf;
|
||||
@synthesize play;
|
||||
@synthesize digit;
|
||||
@synthesize addressField;
|
||||
@synthesize chatRoom;
|
||||
|
|
@ -33,6 +34,7 @@
|
|||
|
||||
- (void)initUIDigitButton {
|
||||
dtmf = FALSE;
|
||||
play = TRUE;
|
||||
chatRoom = NULL;
|
||||
[self addTarget:self action:@selector(touchDown:) forControlEvents:UIControlEventTouchDown];
|
||||
[self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside|UIControlEventTouchUpOutside];
|
||||
|
|
@ -85,7 +87,9 @@
|
|||
} else {
|
||||
linphone_chat_room_send_message(chatRoom, [[NSString stringWithFormat:@"%c", digit] UTF8String]);
|
||||
}
|
||||
linphone_core_play_dtmf([LinphoneManager getLc], digit, 100);
|
||||
if(play) {
|
||||
linphone_core_play_dtmf([LinphoneManager getLc], digit, 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue