diff --git a/Classes/LinphoneUI/Base.lproj/UIConfirmationDialog.xib b/Classes/LinphoneUI/Base.lproj/UIConfirmationDialog.xib index 231454a0a..659a15a68 100644 --- a/Classes/LinphoneUI/Base.lproj/UIConfirmationDialog.xib +++ b/Classes/LinphoneUI/Base.lproj/UIConfirmationDialog.xib @@ -1,9 +1,9 @@ - + - + @@ -11,8 +11,10 @@ + + @@ -25,27 +27,32 @@ - - + + - - - + + + + + + + + - diff --git a/Classes/LinphoneUI/StatusBarView.m b/Classes/LinphoneUI/StatusBarView.m index 9829887ec..63d7ca774 100644 --- a/Classes/LinphoneUI/StatusBarView.m +++ b/Classes/LinphoneUI/StatusBarView.m @@ -332,14 +332,9 @@ correspondantCode = [code substringToIndex:2]; myCode = [code substringFromIndex:2]; } - NSString *message = - [NSString stringWithFormat:NSLocalizedString(@"\nConfirmation security\n\n" - @"Say: %@\n" - @"Confirm that your interlocutor\n" - @"says: %@", - nil), - myCode.uppercaseString, correspondantCode.uppercaseString]; - + NSString *message = [NSString stringWithFormat:NSLocalizedString(@"\nCommunication security:\n\nTo raise the security level, you can check the following codes with your correspondent.\n\nSay: %1$@\n\nYour correspondent must say: %2$@", nil), + myCode.uppercaseString, correspondantCode.uppercaseString]; + if ([UIApplication sharedApplication].applicationState != UIApplicationStateActive && floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_9_x_Max) { UNMutableNotificationContent *content = [[UNMutableNotificationContent alloc] init]; @@ -371,14 +366,14 @@ UIFont *baseFont = [UIFont systemFontOfSize:21.0]; [attrString addAttribute:NSFontAttributeName value:baseFont range:NSMakeRange(0, length)]; UIFont *boldFont = [UIFont boldSystemFontOfSize:23.0]; - [attrString addAttribute:NSFontAttributeName value:boldFont range:[message rangeOfString:@"Confirmation security"]]; + [attrString addAttribute:NSFontAttributeName value:boldFont range:[message rangeOfString:@"Communication security"]]; UIColor *color = [UIColor colorWithRed:(150 / 255.0) green:(193 / 255.0) blue:(31 / 255.0) alpha:1.0]; [attrString addAttribute:NSForegroundColorAttributeName value:color range:[message rangeOfString:myCode.uppercaseString]]; [attrString addAttribute:NSForegroundColorAttributeName value:color range:[message rangeOfString:correspondantCode.uppercaseString]]; securityDialog = [UIConfirmationDialog ShowWithAttributedMessage:attrString - cancelMessage:NSLocalizedString(@"DENY", nil) - confirmMessage:NSLocalizedString(@"ACCEPT", nil) + cancelMessage:NSLocalizedString(@"Later", nil) + confirmMessage:NSLocalizedString(@"Correct", nil) onCancelClick:^() { if (linphone_core_get_current_call(LC) == call) { linphone_call_set_authentication_token_verified(call, NO); @@ -396,6 +391,7 @@ securityDialog.securityImage.hidden = FALSE; [securityDialog setSpecialColor]; + [securityDialog setWhiteCancel]; } } } diff --git a/Classes/LinphoneUI/UIConfirmationDialog.h b/Classes/LinphoneUI/UIConfirmationDialog.h index 4d1673e66..d026bdfe5 100644 --- a/Classes/LinphoneUI/UIConfirmationDialog.h +++ b/Classes/LinphoneUI/UIConfirmationDialog.h @@ -17,11 +17,14 @@ * along with this program. If not, see . */ -#include "UIRoundBorderedButton.h" +#import + +#import "UICompositeView.h" +#import "UIRoundBorderedButton.h" typedef void (^UIConfirmationBlock)(void); -@interface UIConfirmationDialog : UIViewController { +@interface UIConfirmationDialog : UIViewController { UIConfirmationBlock onCancelCb; UIConfirmationBlock onConfirmCb; } @@ -49,7 +52,9 @@ typedef void (^UIConfirmationBlock)(void); @property (weak, nonatomic) IBOutlet UIImageView *groupCallImage; @property(weak, nonatomic) IBOutlet UIRoundBorderedButton *confirmationButton; @property (weak, nonatomic) IBOutlet UIView *authView; +@property (weak, nonatomic) IBOutlet UIImageView *backgroundColor; @property(weak, nonatomic) IBOutlet UILabel *titleLabel; +@property(weak, nonatomic) IBOutlet UIView *firstView; @property (weak, nonatomic) IBOutlet UIButton *authButton; - (void)setSpecialColor; diff --git a/Classes/LinphoneUI/UIConfirmationDialog.m b/Classes/LinphoneUI/UIConfirmationDialog.m index 43d4955d3..327bb3f04 100644 --- a/Classes/LinphoneUI/UIConfirmationDialog.m +++ b/Classes/LinphoneUI/UIConfirmationDialog.m @@ -19,7 +19,7 @@ #import "UIConfirmationDialog.h" #import "PhoneMainView.h" -#import "linphoneapp-Swift.h"" +#import "linphoneapp-Swift.h" @implementation UIConfirmationDialog + (UIConfirmationDialog *)initDialog:(NSString *)cancel @@ -33,6 +33,8 @@ dialog.view.frame = PhoneMainView.instance.mainViewController.view.frame; [controller.view addSubview:dialog.view]; [controller addChildViewController:dialog]; + dialog.backgroundColor.layer.cornerRadius = 10; + dialog.backgroundColor.layer.masksToBounds = true; dialog->onCancelCb = onCancel; dialog->onConfirmCb = onConfirm; @@ -54,6 +56,15 @@ return dialog; } +- (void)viewDidLoad { + [super viewDidLoad]; + UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self + action:@selector(onCancelClick:)]; + tapGestureRecognizer.delegate = self; + [self.firstView addGestureRecognizer:tapGestureRecognizer]; +} + + + (UIConfirmationDialog *)ShowWithMessage:(NSString *)message cancelMessage:(NSString *)cancel confirmMessage:(NSString *)confirm diff --git a/Resources/ar.lproj/Localizable.strings b/Resources/ar.lproj/Localizable.strings index dee4fd811..a219b0987 100644 Binary files a/Resources/ar.lproj/Localizable.strings and b/Resources/ar.lproj/Localizable.strings differ diff --git a/Resources/de.lproj/Localizable.strings b/Resources/de.lproj/Localizable.strings index 9b8205ba4..290cfb820 100644 Binary files a/Resources/de.lproj/Localizable.strings and b/Resources/de.lproj/Localizable.strings differ diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings index 7d43918de..bd19a5cae 100644 Binary files a/Resources/en.lproj/Localizable.strings and b/Resources/en.lproj/Localizable.strings differ diff --git a/Resources/fr.lproj/Localizable.strings b/Resources/fr.lproj/Localizable.strings index f1cf0bdec..e66a6ad0b 100644 Binary files a/Resources/fr.lproj/Localizable.strings and b/Resources/fr.lproj/Localizable.strings differ diff --git a/Resources/ja.lproj/Localizable.strings b/Resources/ja.lproj/Localizable.strings index 7d2acb02c..df90fb03d 100644 Binary files a/Resources/ja.lproj/Localizable.strings and b/Resources/ja.lproj/Localizable.strings differ diff --git a/Resources/nl.lproj/Localizable.strings b/Resources/nl.lproj/Localizable.strings index c755c3f9a..b965827ef 100644 Binary files a/Resources/nl.lproj/Localizable.strings and b/Resources/nl.lproj/Localizable.strings differ diff --git a/Resources/ru.lproj/Localizable.strings b/Resources/ru.lproj/Localizable.strings index 70671d7d9..09e3d692b 100644 Binary files a/Resources/ru.lproj/Localizable.strings and b/Resources/ru.lproj/Localizable.strings differ