From ff2f40c00245b2d07e6484b1f74cde589a2604ed Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Fri, 29 Jan 2010 11:17:57 +0100 Subject: [PATCH] fix for: -tunnel button disable when phone number is empty -axtel button status not acurate -console windows cannot be cleared --- Classes/ConsoleViewController.h | 1 - Classes/ConsoleViewController.m | 9 +- Classes/ConsoleViewController.xib | 140 +++++++++++++++--------------- Classes/PhoneViewController.m | 10 +-- Classes/linphoneAppDelegate.m | 1 + 5 files changed, 78 insertions(+), 83 deletions(-) diff --git a/Classes/ConsoleViewController.h b/Classes/ConsoleViewController.h index a7181c721..090604fb0 100644 --- a/Classes/ConsoleViewController.h +++ b/Classes/ConsoleViewController.h @@ -26,7 +26,6 @@ } -(void) doAction; @property (nonatomic, retain) IBOutlet UITextView* logs; -@property (nonatomic, retain) IBOutlet UIButton* clear; @property (nonatomic, retain) IBOutlet UIView* logsView; diff --git a/Classes/ConsoleViewController.m b/Classes/ConsoleViewController.m index fe0274112..722b08289 100644 --- a/Classes/ConsoleViewController.m +++ b/Classes/ConsoleViewController.m @@ -34,10 +34,11 @@ NSMutableString* MoreViewController_logs; // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; - UIBarButtonItem* clear = [[UIBarButtonItem alloc] initWithCustomView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"bot_borrar1.png"]]]; - [clear setTarget:self]; - [clear setAction:@selector(doAction)]; - [self.navigationItem setRightBarButtonItem:clear]; + UIBarButtonItem* clear = [[UIBarButtonItem alloc] + initWithBarButtonSystemItem:UIBarButtonSystemItemTrash + target:self + action:@selector(doAction)]; + [self.navigationItem setRightBarButtonItem:clear]; } diff --git a/Classes/ConsoleViewController.xib b/Classes/ConsoleViewController.xib index 8087014af..16846dae6 100644 --- a/Classes/ConsoleViewController.xib +++ b/Classes/ConsoleViewController.xib @@ -8,7 +8,7 @@ 353.00 YES - + YES @@ -31,56 +31,44 @@ IBFirstResponder - - - 292 - - YES - - - 292 - - YES - - - 274 - {{0, 50}, {320, 450}} - - - 1 - MSAxIDEAA - - YES - YES - NO - NO - NO - NO - NO - - - 2 - + + + + 292 + + YES + + + 274 + {320, 450} + + + 1 + MSAxIDEAA + + YES + YES + NO + NO + NO + NO + NO + + + 2 - {320, 460} - - - 3 - MQA - - 2 - - - NO - - {320, 460} - - - 3 - MQA - + {320, 460} + + + 3 + MQA + + 2 + + + NO @@ -88,14 +76,6 @@ YES - - - view - - - - 3 - logs @@ -104,6 +84,22 @@ 9 + + + logsView + + + + 13 + + + + view + + + + 14 + @@ -116,15 +112,6 @@ - - 1 - - - YES - - - - -1 @@ -136,6 +123,15 @@ + + 10 + + + YES + + + + 4 @@ -143,7 +139,7 @@ YES - + logView @@ -159,8 +155,9 @@ YES -1.CustomClassName -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency + 10.CustomClassName + 10.IBEditorWindowLastContentRect + 10.IBPluginDependency 4.IBPluginDependency 7.IBPluginDependency @@ -168,7 +165,8 @@ YES ConsoleViewController UIResponder - {{556, 412}, {320, 480}} + ConsoleViewController + {{807, 300}, {320, 480}} com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -194,7 +192,7 @@ - 9 + 14 @@ -206,13 +204,11 @@ YES YES - clear logs logsView YES - UIButton UITextView UIView diff --git a/Classes/PhoneViewController.m b/Classes/PhoneViewController.m index c6ecb07e3..a9744aa65 100644 --- a/Classes/PhoneViewController.m +++ b/Classes/PhoneViewController.m @@ -71,10 +71,10 @@ //implements call/cancel button behavior -(IBAction) doAction:(id)sender { //1 normalize phone number - if ([address.text length] == 0) return; //just return if (sender == gsmCall || sender == call) { - + + if ([address.text length] == 0) return; //just return char normalizedUserName[256]; LinphoneProxyConfig* proxyCfg; //get default proxy @@ -342,10 +342,7 @@ // GSTATE_CALL_ERROR, // GSTATE_INVALID switch (state->new_state) { - case GSTATE_REG_FAILED: { - [self enableCall:false]; - break; - } + case GSTATE_REG_FAILED: case GSTATE_REG_OK: { LinphoneProxyConfig* proxyCfg; //get default proxy @@ -391,6 +388,7 @@ case GSTATE_CALL_END: { //end off call, just dismiss Incall view [self dismissIncallView]; + [myIncallViewController resetView]; displayName=@""; break; } diff --git a/Classes/linphoneAppDelegate.m b/Classes/linphoneAppDelegate.m index 183843e73..e724caa16 100644 --- a/Classes/linphoneAppDelegate.m +++ b/Classes/linphoneAppDelegate.m @@ -550,6 +550,7 @@ bool networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach -(void) doRegister { SCNetworkReachabilityFlags reachabilityFlags; + SCNetworkReachabilityGetFlags (proxyReachability,&reachabilityFlags); networkReachabilityCallBack(proxyReachability,reachabilityFlags,myLinphoneCore); } -(LinphoneCore*) getLinphoneCore {