From a37197a32a1e04b2d6f49355dafcf0b1ef129185 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Tue, 17 Apr 2012 16:09:11 +0200 Subject: [PATCH] Various ipad UI fixes --- Classes/ConferenceCallDetailView.m | 2 ++ Classes/ConsoleViewController.m | 1 + Classes/InCallViewController-ipad.xib | 2 +- Classes/MainScreenWithVideoPreview.m | 7 +++++++ Classes/PhoneViewController-ipad.xib | 1 - Classes/PhoneViewController.m | 4 ++++ 6 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Classes/ConferenceCallDetailView.m b/Classes/ConferenceCallDetailView.m index 6ec3bf877..231fcb4ce 100644 --- a/Classes/ConferenceCallDetailView.m +++ b/Classes/ConferenceCallDetailView.m @@ -88,9 +88,11 @@ NSTimer *callQualityRefresher; [mute reset]; [speaker reset]; [[UIApplication sharedApplication] setIdleTimerDisabled:YES]; + [super viewWillAppear:animated]; } -(void) viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; callQualityRefresher = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(updateCallQuality) diff --git a/Classes/ConsoleViewController.m b/Classes/ConsoleViewController.m index c2ee28379..246ced0eb 100644 --- a/Classes/ConsoleViewController.m +++ b/Classes/ConsoleViewController.m @@ -58,6 +58,7 @@ NSMutableString* MoreViewController_logs; */ -(void) viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; [logs setText:MoreViewController_logs]; } diff --git a/Classes/InCallViewController-ipad.xib b/Classes/InCallViewController-ipad.xib index b040469f2..51b1dfa66 100644 --- a/Classes/InCallViewController-ipad.xib +++ b/Classes/InCallViewController-ipad.xib @@ -180,6 +180,7 @@ {{0, 1}, {320, 66}} + 1 MSAwIDAuMDgyMzIwMjU5MDQgMC4xOAA @@ -392,7 +393,6 @@ IBIPadFramework 0 0 - 1 transfer diff --git a/Classes/MainScreenWithVideoPreview.m b/Classes/MainScreenWithVideoPreview.m index 220c9bd73..4252d06bb 100644 --- a/Classes/MainScreenWithVideoPreview.m +++ b/Classes/MainScreenWithVideoPreview.m @@ -18,6 +18,7 @@ */ #import "MainScreenWithVideoPreview.h" #import +#import "LinphoneUI/LinphoneManager.h" @implementation MainScreenWithVideoPreview @synthesize window; @@ -115,6 +116,11 @@ bool enableVideo = [[NSUserDefaults standardUserDefaults] boolForKey:@"enable_video_preference"]; if (enableVideo) { + LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]); + if (show && call && linphone_call_params_video_enabled(linphone_call_get_current_params(call))) { + return; + } + if (session == nil) { [self initVideoPreview]; } @@ -135,6 +141,7 @@ } -(void) viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; [phoneMainView.switchCamera addTarget:self action:@selector(switchCameraPressed) forControlEvents:UIControlEventTouchUpInside]; } diff --git a/Classes/PhoneViewController-ipad.xib b/Classes/PhoneViewController-ipad.xib index 824edbf14..fc15c4af0 100644 --- a/Classes/PhoneViewController-ipad.xib +++ b/Classes/PhoneViewController-ipad.xib @@ -163,7 +163,6 @@ IBIPadFramework 0 0 - 1 Back diff --git a/Classes/PhoneViewController.m b/Classes/PhoneViewController.m index 091e04901..9229aafd1 100644 --- a/Classes/PhoneViewController.m +++ b/Classes/PhoneViewController.m @@ -103,6 +103,7 @@ bool zeroCall = (linphone_core_get_calls_nb([LinphoneManager getLc]) == 0); [LinphoneManager set:callLarge hidden:!zeroCall withName:"CALL_LARGE button" andReason:__FUNCTION__]; + [LinphoneManager set:switchCamera hidden:!zeroCall withName:"SWITCH_CAM button" andReason:__FUNCTION__]; [LinphoneManager set:callShort hidden:zeroCall withName:"CALL_SHORT button" andReason:__FUNCTION__]; [LinphoneManager set:backToCallView hidden:zeroCall withName:"BACK button" andReason:__FUNCTION__]; @@ -122,6 +123,7 @@ - (void)viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enable_first_login_view_preference"] == true) { myFirstLoginViewController = [[FirstLoginViewController alloc] initWithNibName:@"FirstLoginViewController" bundle:[NSBundle mainBundle]]; @@ -197,6 +199,7 @@ -(void)viewWillAppear:(BOOL)animated { [self updateCallAndBackButtons]; + [super viewWillAppear:animated]; } -(void) displayDialerFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName { @@ -324,6 +327,7 @@ withDisplayName:displayName]; [LinphoneManager set:callLarge hidden:YES withName:"CALL_LARGE button" andReason:__FUNCTION__]; + [LinphoneManager set:switchCamera hidden:YES withName:"SWITCH_CAMERA button" andReason:__FUNCTION__]; [LinphoneManager set:callShort hidden:NO withName:"CALL_SHORT button" andReason:__FUNCTION__]; [LinphoneManager set:backToCallView hidden:NO withName:"CALL_BACK button" andReason:__FUNCTION__];