From 89c039935b042d0076e3cdb0f6679cb0417425dc Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Wed, 4 Apr 2012 12:01:29 +0200 Subject: [PATCH] Fixes for ipad transfer and video rotation --- Classes/InCallViewController-ipad.xib | 17 ++++++++--------- Classes/IncallViewController.m | 7 +++++-- Classes/MainScreenWithVideoPreview.m | 4 ++++ linphonerc-ipad | 1 + 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/Classes/InCallViewController-ipad.xib b/Classes/InCallViewController-ipad.xib index c9752f961..b040469f2 100644 --- a/Classes/InCallViewController-ipad.xib +++ b/Classes/InCallViewController-ipad.xib @@ -180,7 +180,6 @@ {{0, 1}, {320, 66}} - 1 MSAwIDAuMDgyMzIwMjU5MDQgMC4xOAA @@ -373,16 +372,16 @@ MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA - + NSImage clavier-01-160px.png - + - -2147483356 + 292 {{160, 70}, {80, 66}} @@ -401,7 +400,7 @@ MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA - + @@ -481,7 +480,7 @@ {{80, 70}, {80, 66}} - + NO NO @@ -1128,7 +1127,7 @@ transfer - + 170 @@ -1248,7 +1247,7 @@ - + controls @@ -1449,7 +1448,7 @@ 169 - + transfer diff --git a/Classes/IncallViewController.m b/Classes/IncallViewController.m index f5ba66ade..c6e6bcad9 100644 --- a/Classes/IncallViewController.m +++ b/Classes/IncallViewController.m @@ -464,7 +464,7 @@ void addAnimationFadeTransition(UIView* view, float duration) { NSString* title = NSLocalizedString(@"Transfer call to:",nil); visibleActionSheet = [[UIActionSheet alloc] initWithTitle:title delegate:cd - cancelButtonTitle:NSLocalizedString(@"Cancel",nil) + cancelButtonTitle:[LinphoneManager runningOnIpad] ? nil : NSLocalizedString(@"Cancel",nil) destructiveButtonTitle:NSLocalizedString(@"A new call",nil) otherButtonTitles:nil]; @@ -484,7 +484,10 @@ void addAnimationFadeTransition(UIView* view, float duration) { } visibleActionSheet.actionSheetStyle = UIActionSheetStyleDefault; - [visibleActionSheet showInView:self.view]; + if ([LinphoneManager runningOnIpad]) + [visibleActionSheet showFromRect:transfer.bounds inView:transfer animated:NO]; + else + [visibleActionSheet showInView:self.view]; } -(void) addCallPressed { diff --git a/Classes/MainScreenWithVideoPreview.m b/Classes/MainScreenWithVideoPreview.m index a9629a990..220c9bd73 100644 --- a/Classes/MainScreenWithVideoPreview.m +++ b/Classes/MainScreenWithVideoPreview.m @@ -93,6 +93,10 @@ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc]init]; NSArray* array = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]; + if ( [array count] == 0) { + ms_warning("No camera available (running on simulator ?"); + return; + } currentCamera = camIndex % [array count]; AVCaptureDevice* device = (AVCaptureDevice*) [array objectAtIndex:currentCamera]; input = [[AVCaptureDeviceInput deviceInputWithDevice:device diff --git a/linphonerc-ipad b/linphonerc-ipad index 402f17b15..f537c1ee1 100644 --- a/linphonerc-ipad +++ b/linphonerc-ipad @@ -44,4 +44,5 @@ capture=1 show_local=0 enabled=1 size=vga +display_filter_auto_rotate=1