forked from mirrors/linphone-iphone
Fix decline video (outside of the action sheet) on ipad
This commit is contained in:
parent
0304772eff
commit
c88779f917
7 changed files with 16 additions and 11 deletions
|
|
@ -393,7 +393,7 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
[self saveAndSend:[UIImage imageWithData:data] url:url];
|
||||
}];
|
||||
}
|
||||
[sheet addCancelButtonWithTitle:NSLocalizedString(@"Cancel", nil)];
|
||||
[sheet addCancelButtonWithTitle:NSLocalizedString(@"Cancel", nil) block:nil];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[waitView setHidden:TRUE];
|
||||
[sheet showInView:[PhoneMainView instance].view];
|
||||
|
|
@ -549,7 +549,7 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
block(UIImagePickerControllerSourceTypePhotoLibrary);
|
||||
}];
|
||||
}
|
||||
[sheet addCancelButtonWithTitle:NSLocalizedString(@"Cancel",nil)];
|
||||
[sheet addCancelButtonWithTitle:NSLocalizedString(@"Cancel",nil) block:nil];
|
||||
|
||||
[sheet showInView:[PhoneMainView instance].view];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -491,13 +491,17 @@ static void hideSpinner(LinphoneCall* call, void* user_data) {
|
|||
linphone_call_params_destroy(paramsCopy);
|
||||
[timer invalidate];
|
||||
}];
|
||||
[sheet addDestructiveButtonWithTitle:NSLocalizedString(@"Decline", nil) block:^() {
|
||||
DTActionSheetBlock cancelBlock = ^() {
|
||||
[LinphoneLogger logc:LinphoneLoggerLog format:"User declined video proposal"];
|
||||
LinphoneCallParams* paramsCopy = linphone_call_params_copy(linphone_call_get_current_params(call));
|
||||
linphone_core_accept_call_update([LinphoneManager getLc], call, paramsCopy);
|
||||
linphone_call_params_destroy(paramsCopy);
|
||||
[timer invalidate];
|
||||
}];
|
||||
};
|
||||
[sheet addDestructiveButtonWithTitle:NSLocalizedString(@"Decline", nil) block:cancelBlock];
|
||||
if([LinphoneManager runningOnIpad]) {
|
||||
[sheet addCancelButtonWithTitle:NSLocalizedString(@"Decline", nil) block:cancelBlock];
|
||||
}
|
||||
[sheet showInView:[PhoneMainView instance].view];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@
|
|||
[self update];
|
||||
}];
|
||||
}
|
||||
[sheet addCancelButtonWithTitle:NSLocalizedString(@"Cancel",nil)];
|
||||
[sheet addCancelButtonWithTitle:NSLocalizedString(@"Cancel",nil) block:nil];
|
||||
|
||||
[sheet showInView:[PhoneMainView instance].view];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -583,7 +583,7 @@ static PhoneMainView* phoneMainViewInstance=nil;
|
|||
if (level <= 0.2f && !callData->batteryWarningShown) {
|
||||
[LinphoneLogger log:LinphoneLoggerLog format:@"Battery warning"];
|
||||
DTActionSheet *sheet = [[[DTActionSheet alloc] initWithTitle:NSLocalizedString(@"Battery is running low. Stop video ?",nil)] autorelease];
|
||||
[sheet addCancelButtonWithTitle:NSLocalizedString(@"Continue video", nil)];
|
||||
[sheet addCancelButtonWithTitle:NSLocalizedString(@"Continue video", nil) block:nil];
|
||||
[sheet addDestructiveButtonWithTitle:NSLocalizedString(@"Stop video", nil) block:^() {
|
||||
LinphoneCallParams* paramsCopy = linphone_call_params_copy(linphone_call_get_current_params(call));
|
||||
// stop video
|
||||
|
|
|
|||
|
|
@ -42,8 +42,9 @@ typedef void (^DTActionSheetBlock)(void);
|
|||
|
||||
Since there can only be one cancel button a previously marked cancel button becomes a normal button.
|
||||
@param title The title of the new button.
|
||||
@param block The block to execute when the button is tapped.
|
||||
@returns The index of the new button. Button indices start at 0 and increase in the order they are added.
|
||||
*/
|
||||
- (NSInteger)addCancelButtonWithTitle:(NSString *)title;
|
||||
- (NSInteger)addCancelButtonWithTitle:(NSString *)title block:(DTActionSheetBlock)block;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -74,9 +74,9 @@
|
|||
return retIndex;
|
||||
}
|
||||
|
||||
- (NSInteger)addCancelButtonWithTitle:(NSString *)title
|
||||
- (NSInteger)addCancelButtonWithTitle:(NSString *)title block:(DTActionSheetBlock)block
|
||||
{
|
||||
NSInteger retIndex = [self addButtonWithTitle:title];
|
||||
NSInteger retIndex = [self addButtonWithTitle:title block:block];
|
||||
[self setCancelButtonIndex:retIndex];
|
||||
|
||||
return retIndex;
|
||||
|
|
|
|||
|
|
@ -5673,7 +5673,7 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer: jehan monnier (E8MYPN2NXL)";
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
GCC_THUMB_SUPPORT = NO;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
|
|
@ -5681,7 +5681,7 @@
|
|||
HEADER_SEARCH_PATHS = "";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
|
||||
LIBRARY_SEARCH_PATHS = "";
|
||||
PROVISIONING_PROFILE = "2AC0DC11-4546-47B6-8B8A-453CCA80903C";
|
||||
PROVISIONING_PROFILE = "";
|
||||
SDKROOT = iphoneos;
|
||||
STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue