From 1efd76a60c8686a5ebe615a0886d7ed4cbceabd1 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Fri, 10 Aug 2012 10:42:18 +0200 Subject: [PATCH] Optimization + fix previous commit --- Classes/ContactsTableViewController.m | 4 +--- Classes/DialerViewController.m | 5 +++++ Classes/DialerViewController.xib | 1 - Classes/InCallViewController.m | 4 ++-- submodules/linphone | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Classes/ContactsTableViewController.m b/Classes/ContactsTableViewController.m index acf33fe4d..32afdc3c7 100644 --- a/Classes/ContactsTableViewController.m +++ b/Classes/ContactsTableViewController.m @@ -56,9 +56,7 @@ - (void)dealloc { ABAddressBookUnregisterExternalChangeCallback(addressBook, sync_address_book, self); CFRelease(addressBook); - [addressBookMap removeAllObjects]; [addressBookMap release]; - [avatarMap removeAllObjects]; [avatarMap release]; [super dealloc]; } @@ -72,7 +70,6 @@ // Reset Address book [addressBookMap removeAllObjects]; - [avatarMap removeAllObjects]; NSArray *lContacts = (NSArray *)ABAddressBookCopyArrayOfAllPeople(addressBook); for (id lPerson in lContacts) { @@ -142,6 +139,7 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef info, void *context) { ContactsTableViewController* controller = (ContactsTableViewController*)context; ABAddressBookRevert(addressBook); + [controller->avatarMap removeAllObjects]; [controller loadData]; } diff --git a/Classes/DialerViewController.m b/Classes/DialerViewController.m index 61c77c9ca..a37075a8e 100644 --- a/Classes/DialerViewController.m +++ b/Classes/DialerViewController.m @@ -220,6 +220,11 @@ static UICompositeViewDescription *compositeDescription = nil; #pragma mark - UITextFieldDelegate Functions +- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { + //[textField performSelector:@selector() withObject:nil afterDelay:0]; + return YES; +} + - (BOOL)textFieldShouldReturn:(UITextField *)textField { if (textField == addressField) { [addressField resignFirstResponder]; diff --git a/Classes/DialerViewController.xib b/Classes/DialerViewController.xib index 0b5f30409..d2f01509d 100644 --- a/Classes/DialerViewController.xib +++ b/Classes/DialerViewController.xib @@ -606,7 +606,6 @@ {{214, 0}, {106, 69}} - _NS:9 NO IBCocoaTouchFramework diff --git a/Classes/InCallViewController.m b/Classes/InCallViewController.m index 2a3bbe6bd..18aaf67ea 100644 --- a/Classes/InCallViewController.m +++ b/Classes/InCallViewController.m @@ -174,7 +174,7 @@ static UICompositeViewDescription *compositeDescription = nil; UITapGestureRecognizer* singleFingerTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showControls:)]; [singleFingerTap setNumberOfTapsRequired:1]; [singleFingerTap setCancelsTouchesInView: FALSE]; - [[[UIApplication sharedApplication].delegate window] addGestureRecognizer:singleFingerTap]; + [[PhoneMainView instance].view addGestureRecognizer:singleFingerTap]; [singleFingerTap release]; videoZoomHandler = [[VideoZoomHandler alloc] init]; @@ -516,7 +516,7 @@ static void hideSpinner(LinphoneCall* call, void* user_data) { otherButtonTitles:nil]; visibleActionSheet.actionSheetStyle = UIActionSheetStyleDefault; - [visibleActionSheet showInView:[[UIApplication sharedApplication].delegate window]]; + [visibleActionSheet showInView:[PhoneMainView instance].view]; /* start cancel timer */ cd.timeout = [NSTimer scheduledTimerWithTimeInterval:30 target:self selector:@selector(dismissActionSheet:) userInfo:nil repeats:NO]; diff --git a/submodules/linphone b/submodules/linphone index e93d9096f..c97efee37 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit e93d9096ff433d3195c177e4c767881406e71d88 +Subproject commit c97efee37aea1ccae3c476a108e988e47f38faa4