From c88779f9178aba845827bf79f3a640d0547bcb44 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Thu, 31 Jan 2013 10:20:26 +0100 Subject: [PATCH 1/6] Fix decline video (outside of the action sheet) on ipad --- Classes/ChatRoomViewController.m | 4 ++-- Classes/InCallViewController.m | 8 ++++++-- Classes/LinphoneUI/UIContactDetailsHeader.m | 2 +- Classes/PhoneMainView.m | 2 +- Classes/Utils/DTFoundation/DTActionSheet.h | 3 ++- Classes/Utils/DTFoundation/DTActionSheet.m | 4 ++-- linphone.xcodeproj/project.pbxproj | 4 ++-- 7 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Classes/ChatRoomViewController.m b/Classes/ChatRoomViewController.m index a776b2622..f2cdc2df4 100644 --- a/Classes/ChatRoomViewController.m +++ b/Classes/ChatRoomViewController.m @@ -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]; } diff --git a/Classes/InCallViewController.m b/Classes/InCallViewController.m index 41eb4ab11..fe54143e8 100644 --- a/Classes/InCallViewController.m +++ b/Classes/InCallViewController.m @@ -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]; } diff --git a/Classes/LinphoneUI/UIContactDetailsHeader.m b/Classes/LinphoneUI/UIContactDetailsHeader.m index f9db45aa5..71538cffa 100644 --- a/Classes/LinphoneUI/UIContactDetailsHeader.m +++ b/Classes/LinphoneUI/UIContactDetailsHeader.m @@ -281,7 +281,7 @@ [self update]; }]; } - [sheet addCancelButtonWithTitle:NSLocalizedString(@"Cancel",nil)]; + [sheet addCancelButtonWithTitle:NSLocalizedString(@"Cancel",nil) block:nil]; [sheet showInView:[PhoneMainView instance].view]; } diff --git a/Classes/PhoneMainView.m b/Classes/PhoneMainView.m index 128e7bb79..88f4b0324 100644 --- a/Classes/PhoneMainView.m +++ b/Classes/PhoneMainView.m @@ -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 diff --git a/Classes/Utils/DTFoundation/DTActionSheet.h b/Classes/Utils/DTFoundation/DTActionSheet.h index 2c2a8b23d..71ab47650 100755 --- a/Classes/Utils/DTFoundation/DTActionSheet.h +++ b/Classes/Utils/DTFoundation/DTActionSheet.h @@ -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 diff --git a/Classes/Utils/DTFoundation/DTActionSheet.m b/Classes/Utils/DTFoundation/DTActionSheet.m index eeb2161bc..070d974de 100755 --- a/Classes/Utils/DTFoundation/DTActionSheet.m +++ b/Classes/Utils/DTFoundation/DTActionSheet.m @@ -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; diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index 79dcf85cd..47d44ea1f 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -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"; From 1244f527a625e21e5e5197beb03a7fd32b49f2b7 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Thu, 31 Jan 2013 10:24:13 +0100 Subject: [PATCH 2/6] Add translation for missed call --- Classes/LinphoneManager.m | 2 +- Resources/en.lproj/Localizable.strings | Bin 19098 -> 19260 bytes Resources/fr.lproj/Localizable.strings | Bin 19742 -> 19908 bytes Resources/ru.lproj/Localizable.strings | Bin 19604 -> 19746 bytes linphone.ldb/Contents.plist | 469 ++++++------------ .../Localizable/1/Localizable.strings | Bin 19098 -> 19260 bytes 6 files changed, 151 insertions(+), 320 deletions(-) diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 0a034aee1..e19f7f3e8 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -478,7 +478,7 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char if(log == NULL || log->status == LinphoneCallMissed) { UILocalNotification *notification = [[UILocalNotification alloc] init]; notification.repeatInterval = 0; - notification.alertBody = [NSString stringWithFormat:@"You miss %@ call", address]; + notification.alertBody = [NSString stringWithFormat:NSLocalizedString(@"You miss %@ call", nil), address]; notification.alertAction = NSLocalizedString(@"Show", nil); notification.userInfo = [NSDictionary dictionaryWithObject:[NSString stringWithUTF8String:log->call_id] forKey:@"callLog"]; [[UIApplication sharedApplication] presentLocalNotificationNow:notification]; diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings index 21d963ac76080f81ba39f8454000f01dfda2b65a..67d48ef40bdb220a283d0e2b5555d152ffdb7b98 100644 GIT binary patch delta 56 zcmbO=m2uBB#ti|k+?fo;K&Zf=%HS|r&_Pr*k|Cd=6v)qIK$bb^ki6N=HG~xan$Qj6 delta 14 Wcmdlpjd9jg#ti|kn?JdFu>t@vb_N0f diff --git a/Resources/fr.lproj/Localizable.strings b/Resources/fr.lproj/Localizable.strings index 02099c4d8f11c853a6278be10cd2bf6d108b8721..6285eaeb2e3013c0af6d1493147a518dd073c266 100644 GIT binary patch delta 49 zcmbO?i}A>8#tmoOxicAxflz@#mBC?hqlzMTE<++i9z!8RDZ|Uj6P2YWPVm}%$UTM? E0Dh($ delta 14 WcmX>yn{nPO#tmoOHy3#Xu>t@y4hA6r diff --git a/Resources/ru.lproj/Localizable.strings b/Resources/ru.lproj/Localizable.strings index 68d063fc59b2c52fdf0ee390941b8c6f601187a5..7712490f2bf12e4852a29dca5103117203410789 100644 GIT binary patch delta 108 zcmbO-lX1~3#tlY_liw)VZEjKABR+Y8qSxdzmQ|A-Ec-T3vO2+IpUF@RgbEC*3=Tjt mnIVxO2MCpbY+E2!Vu)nOXD9`-av89yoZP4wxjDeyg%tn*9UKn; delta 120 zcmZ29i*d?K#tlY_{&Fl%ELJQIEZ#ucj>VKkfx()^g2fHUvSl#`vh0AgEmX!4NE@?Q zvly^=faNW~>fIUq7(y8o7{VBg7!)Qyw2j<+OfgM-@(0Vl$rY9rlMUFtHrH64;@SMd H-HH_eJIflz diff --git a/linphone.ldb/Contents.plist b/linphone.ldb/Contents.plist index 6a29c6e67..7118d73ee 100644 --- a/linphone.ldb/Contents.plist +++ b/linphone.ldb/Contents.plist @@ -13347,9 +13347,7 @@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLBundleObject errors @@ -13371,19 +13369,17 @@ change date - 2013-01-14T12:21:14Z + 2013-01-31T09:22:07Z changed values - - ru - + class BLStringsFileObject errors flags - 1 + 0 hash - 84262943eea3c4fe4997634207e98892 + c4921474ff8db02fd506855aebd2092b name Localizable.strings @@ -13393,9 +13389,7 @@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -13422,9 +13416,7 @@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -13451,9 +13443,7 @@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -13480,9 +13470,7 @@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -13513,9 +13501,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -13542,9 +13528,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -13571,9 +13555,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -13600,9 +13582,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -13629,9 +13609,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -13658,9 +13636,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -13687,9 +13663,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -13716,9 +13690,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -13745,9 +13717,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -13774,9 +13744,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -13803,9 +13771,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -13832,9 +13798,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -13861,9 +13825,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -13890,9 +13852,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -13919,9 +13879,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -13948,9 +13906,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -13977,9 +13933,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14006,9 +13960,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14035,9 +13987,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14064,9 +14014,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14093,9 +14041,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14122,9 +14068,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14151,9 +14095,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14180,9 +14122,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14209,9 +14149,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14238,9 +14176,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14267,9 +14203,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14300,9 +14234,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14329,9 +14261,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14358,9 +14288,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14387,9 +14315,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14416,9 +14342,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14445,9 +14369,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14474,9 +14396,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14503,9 +14423,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14532,9 +14450,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14561,9 +14477,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14590,9 +14504,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14665,9 +14577,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14694,9 +14604,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14723,9 +14631,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14752,9 +14658,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14781,9 +14685,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14810,9 +14712,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14839,9 +14739,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14868,9 +14766,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14897,9 +14793,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14926,9 +14820,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14955,9 +14847,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -14984,9 +14874,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15013,9 +14901,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15042,9 +14928,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15071,9 +14955,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15100,9 +14982,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15129,9 +15009,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15158,9 +15036,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15187,9 +15063,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15216,9 +15090,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15245,9 +15117,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15274,9 +15144,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15303,9 +15171,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15336,9 +15202,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15369,9 +15233,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15398,9 +15260,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15427,9 +15287,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15456,9 +15314,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15485,9 +15341,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15514,9 +15368,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15543,9 +15395,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15572,9 +15422,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15601,9 +15449,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15630,38 +15476,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - - class - BLStringKeyObject - comment - No comment provided by engineer. - errors - flags - 0 - key - Settings - localizations - - en - Settings - fr - Options - ru - Настройки - - snapshots - - - - change date - 2001-01-01T00:00:00Z - changed values - - ru - class BLStringKeyObject comment @@ -15688,9 +15503,34 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + + class + BLStringKeyObject + comment + No comment provided by engineer. + errors + + flags + 0 + key + Settings + localizations + + en + Settings + fr + Options + ru + Настройки + + snapshots + + + + change date + 2001-01-01T00:00:00Z + changed values + class BLStringKeyObject comment @@ -15717,9 +15557,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15746,9 +15584,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15775,9 +15611,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15804,9 +15638,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15833,9 +15665,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15865,9 +15695,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15897,9 +15725,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15929,9 +15755,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15961,9 +15785,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -15990,9 +15812,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -16019,9 +15839,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -16048,9 +15866,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -16077,9 +15893,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -16106,9 +15920,7 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -16135,9 +15947,32 @@ La cause était: %2$@ change date 2001-01-01T00:00:00Z changed values - - ru - + + class + BLStringKeyObject + comment + No comment provided by engineer. + errors + + flags + 0 + key + You miss %@ call + localizations + + en + You miss %@ call + fr + Appel manqué de %@ + + snapshots + + + + change date + 2001-01-01T00:00:00Z + changed values + class BLStringKeyObject comment @@ -16168,9 +16003,7 @@ Activer l'application dans Réglages > Confidentialité > Contactschange date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment @@ -16197,9 +16030,7 @@ Activer l'application dans Réglages > Confidentialité > Contactschange date 2001-01-01T00:00:00Z changed values - - ru - + class BLStringKeyObject comment diff --git a/linphone.ldb/Resources/Resources/Localizable/1/Localizable.strings b/linphone.ldb/Resources/Resources/Localizable/1/Localizable.strings index 21d963ac76080f81ba39f8454000f01dfda2b65a..67d48ef40bdb220a283d0e2b5555d152ffdb7b98 100644 GIT binary patch delta 56 zcmbO=m2uBB#ti|k+?fo;K&Zf=%HS|r&_Pr*k|Cd=6v)qIK$bb^ki6N=HG~xan$Qj6 delta 14 Wcmdlpjd9jg#ti|kn?JdFu>t@vb_N0f From 70594da3cbfc64666378e5883b82857c6e38ff04 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 31 Jan 2013 11:41:34 +0100 Subject: [PATCH 3/6] update exosip --- submodules/externals/exosip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/externals/exosip b/submodules/externals/exosip index 80eaf27de..c76a9d434 160000 --- a/submodules/externals/exosip +++ b/submodules/externals/exosip @@ -1 +1 @@ -Subproject commit 80eaf27dea428effe7a176d6d2032c1b3d2eea5e +Subproject commit c76a9d4340f436d2f61f8b031d46bc511776b136 From 402ff3da1b45d32d70d9d4cbf027be8045b26dc7 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Thu, 31 Jan 2013 11:43:46 +0100 Subject: [PATCH 4/6] Go to history details on missed call notification --- Classes/LinphoneAppDelegate.m | 20 ++++++++++++++++++++ Classes/LinphoneManager.m | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index d2846823d..03910325c 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -226,6 +226,26 @@ if(controller != nil) { [controller setRemoteAddress:remoteContact]; } + } else if([notification.userInfo objectForKey:@"callLog"] != nil) { + NSString *callLog = (NSString*)[notification.userInfo objectForKey:@"callLog"]; + LinphoneCallLog* theLog = NULL; + const MSList * logs = linphone_core_get_call_logs([LinphoneManager getLc]); + while(logs != NULL) { + LinphoneCallLog* log = (LinphoneCallLog *) logs->data; + if([callLog isEqualToString:[NSString stringWithUTF8String:log->call_id]]) { + theLog = log; + break; + } + logs = logs->next; + } + if(theLog != NULL) { + // Go to HistoryDetails view + [[PhoneMainView instance] changeCurrentView:[HistoryViewController compositeViewDescription]]; + HistoryDetailsViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[HistoryDetailsViewController compositeViewDescription] push:TRUE], HistoryDetailsViewController); + if(controller != nil) { + [controller setCallLog:theLog]; + } + } } } diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index e19f7f3e8..0fe37be17 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -480,7 +480,7 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char notification.repeatInterval = 0; notification.alertBody = [NSString stringWithFormat:NSLocalizedString(@"You miss %@ call", nil), address]; notification.alertAction = NSLocalizedString(@"Show", nil); - notification.userInfo = [NSDictionary dictionaryWithObject:[NSString stringWithUTF8String:log->call_id] forKey:@"callLog"]; + notification.userInfo = [NSDictionary dictionaryWithObject:[NSString stringWithUTF8String:log->call_id] forKey:@"callLog"]; [[UIApplication sharedApplication] presentLocalNotificationNow:notification]; [notification release]; } From 5a8f48fa5b66792873052830f55e540983bf4ca7 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 8 Feb 2013 17:34:44 +0100 Subject: [PATCH 5/6] update exosip and linphone, and use new call log apis. --- Classes/HistoryDetailsViewController.m | 36 +++++++------------------- Classes/HistoryTableViewController.m | 8 +++--- Classes/LinphoneAppDelegate.m | 2 +- Classes/LinphoneManager.m | 14 ++++++---- Classes/LinphoneUI/UIHistoryCell.m | 8 +++--- Classes/PhoneMainView.m | 2 +- submodules/externals/exosip | 2 +- submodules/linphone | 2 +- 8 files changed, 31 insertions(+), 43 deletions(-) diff --git a/Classes/HistoryDetailsViewController.m b/Classes/HistoryDetailsViewController.m index 553f8e38c..d2a0c1fb6 100644 --- a/Classes/HistoryDetailsViewController.m +++ b/Classes/HistoryDetailsViewController.m @@ -166,12 +166,7 @@ static UICompositeViewDescription *compositeDescription = nil; return; } - LinphoneAddress* addr = NULL; - if (callLog->dir == LinphoneCallIncoming) { - addr = callLog->from; - } else { - addr = callLog->to; - } + LinphoneAddress* addr =linphone_call_log_get_remote_address(callLog); UIImage *image = nil; NSString* address = nil; @@ -220,12 +215,12 @@ static UICompositeViewDescription *compositeDescription = nil; // State NSMutableString *state = [NSMutableString string]; - if (callLog->dir == LinphoneCallIncoming) { + if (linphone_call_log_get_dir(callLog) == LinphoneCallIncoming) { [state setString:NSLocalizedString(@"Incoming call", nil)]; } else { [state setString:NSLocalizedString(@"Outgoing call", nil)]; } - switch (callLog->status) { + switch (linphone_call_log_get_status(callLog)) { case LinphoneCallSuccess: break; case LinphoneCallAborted: @@ -241,11 +236,11 @@ static UICompositeViewDescription *compositeDescription = nil; [typeLabel setText:state]; // Date - NSDate *startData = [NSDate dateWithTimeIntervalSince1970:callLog->start_date_time]; + NSDate *startData = [NSDate dateWithTimeIntervalSince1970:linphone_call_log_get_start_date(callLog)]; [dateLabel setText:[dateFormatter stringFromDate:startData]]; // Duration - int duration = callLog->duration; + int duration = linphone_call_log_get_duration(callLog); [durationLabel setText:[NSString stringWithFormat:@"%02i:%02i", (duration/60), duration - 60 * (duration / 60), nil]]; // contact name @@ -288,12 +283,9 @@ static UICompositeViewDescription *compositeDescription = nil; } - (IBAction)onAddContactClick:(id)event { - LinphoneAddress* addr = NULL; - if (callLog->dir == LinphoneCallIncoming) { - addr = callLog->from; - } else { - addr = callLog->to; - } + LinphoneAddress* addr; + + addr=linphone_call_log_get_remote_address(callLog); if (addr != NULL) { char* lAddress = linphone_address_as_string_uri_only(addr); if(lAddress != NULL) { @@ -311,11 +303,7 @@ static UICompositeViewDescription *compositeDescription = nil; - (IBAction)onCallClick:(id)event { LinphoneAddress* addr; - if (callLog->dir == LinphoneCallIncoming) { - addr = callLog->from; - } else { - addr = callLog->to; - } + addr=linphone_call_log_get_remote_address(callLog); char* lAddress = linphone_address_as_string_uri_only(addr); if(lAddress == NULL) @@ -347,11 +335,7 @@ static UICompositeViewDescription *compositeDescription = nil; - (IBAction)onMessageClick:(id)event { LinphoneAddress* addr; - if (callLog->dir == LinphoneCallIncoming) { - addr = callLog->from; - } else { - addr = callLog->to; - } + addr=linphone_call_log_get_remote_address(callLog); char* lAddress = linphone_address_as_string_uri_only(addr); if(lAddress == NULL) diff --git a/Classes/HistoryTableViewController.m b/Classes/HistoryTableViewController.m index 7bf6de6a7..a87b89bf1 100644 --- a/Classes/HistoryTableViewController.m +++ b/Classes/HistoryTableViewController.m @@ -85,7 +85,7 @@ while(logs != NULL) { LinphoneCallLog* log = (LinphoneCallLog *) logs->data; if(missedFilter) { - if (log->status == LinphoneCallMissed) { + if (linphone_call_log_get_status(log) == LinphoneCallMissed) { [callLogs addObject:[NSValue valueWithPointer: log]]; } } else { @@ -129,10 +129,10 @@ LinphoneCallLog *callLog = [[callLogs objectAtIndex:[indexPath row]] pointerValue]; LinphoneAddress* addr; - if (callLog->dir == LinphoneCallIncoming) { - addr = callLog->from; + if (linphone_call_log_get_dir(callLog) == LinphoneCallIncoming) { + addr = linphone_call_log_get_from(callLog); } else { - addr = callLog->to; + addr = linphone_call_log_get_to(callLog); } NSString* displayName = nil; diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index 03910325c..2a584c733 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -232,7 +232,7 @@ const MSList * logs = linphone_core_get_call_logs([LinphoneManager getLc]); while(logs != NULL) { LinphoneCallLog* log = (LinphoneCallLog *) logs->data; - if([callLog isEqualToString:[NSString stringWithUTF8String:log->call_id]]) { + if([callLog isEqualToString:[NSString stringWithUTF8String:linphone_call_log_get_call_id(log)]]) { theLog = log; break; } diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 0fe37be17..4664c5460 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -420,7 +420,11 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char /*should we reject this call ?*/ if ([lCTCallCenter currentCalls]!=nil) { - [LinphoneLogger logc:LinphoneLoggerLog format:"Mobile call ongoing... rejecting call from [%s]",linphone_address_get_username(linphone_call_get_call_log(call)->from)]; + char *tmp=linphone_call_get_remote_address_as_string(call); + if (tmp) { + [LinphoneLogger logc:LinphoneLoggerLog format:"Mobile call ongoing... rejecting call from [%s]",tmp]; + ms_free(tmp); + } linphone_core_decline_call(theLinphoneCore, call,LinphoneReasonBusy); [lCTCallCenter release]; return; @@ -431,7 +435,7 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char && [UIApplication sharedApplication].applicationState != UIApplicationStateActive) { LinphoneCallLog* callLog=linphone_call_get_call_log(call); - NSString* callId=[NSString stringWithUTF8String:callLog->call_id]; + NSString* callId=[NSString stringWithUTF8String:linphone_call_log_get_call_id(callLog)]; if (![[LinphoneManager instance] shouldAutoAcceptCallForCallId:callId]){ // case where a remote notification is not already received @@ -475,12 +479,12 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char [data->notification release]; data->notification = nil; - if(log == NULL || log->status == LinphoneCallMissed) { + if(log == NULL || linphone_call_log_get_status(log) == LinphoneCallMissed) { UILocalNotification *notification = [[UILocalNotification alloc] init]; notification.repeatInterval = 0; notification.alertBody = [NSString stringWithFormat:NSLocalizedString(@"You miss %@ call", nil), address]; notification.alertAction = NSLocalizedString(@"Show", nil); - notification.userInfo = [NSDictionary dictionaryWithObject:[NSString stringWithUTF8String:log->call_id] forKey:@"callLog"]; + notification.userInfo = [NSDictionary dictionaryWithObject:[NSString stringWithUTF8String:linphone_call_log_get_call_id(log)] forKey:@"callLog"]; [[UIApplication sharedApplication] presentLocalNotificationNow:notification]; [notification release]; } @@ -936,7 +940,7 @@ static LinphoneCoreVTable linphonec_vtable = { } static int comp_call_id(const LinphoneCall* call , const char *callid) { - return strcmp(linphone_call_get_call_log(call)->call_id, callid); + return strcmp(linphone_call_log_get_call_id(linphone_call_get_call_log(call)), callid); } - (void)acceptCallForCallId:(NSString*)callid { diff --git a/Classes/LinphoneUI/UIHistoryCell.m b/Classes/LinphoneUI/UIHistoryCell.m index 4f7387b44..4591fee7a 100644 --- a/Classes/LinphoneUI/UIHistoryCell.m +++ b/Classes/LinphoneUI/UIHistoryCell.m @@ -102,16 +102,16 @@ // Set up the cell... LinphoneAddress* addr; UIImage *image; - if (callLog->dir == LinphoneCallIncoming) { - if (callLog->status != LinphoneCallMissed) { + if (linphone_call_log_get_dir(callLog) == LinphoneCallIncoming) { + if (linphone_call_log_get_status(callLog) != LinphoneCallMissed) { image = [UIImage imageNamed:@"call_status_incoming.png"]; } else { image = [UIImage imageNamed:@"call_status_missed.png"]; } - addr = callLog->from; + addr = linphone_call_log_get_from(callLog); } else { image = [UIImage imageNamed:@"call_status_outgoing.png"]; - addr = callLog->to; + addr = linphone_call_log_get_to(callLog); } NSString* address = nil; diff --git a/Classes/PhoneMainView.m b/Classes/PhoneMainView.m index 88f4b0324..50fd131d6 100644 --- a/Classes/PhoneMainView.m +++ b/Classes/PhoneMainView.m @@ -553,7 +553,7 @@ static PhoneMainView* phoneMainViewInstance=nil; - (void)displayIncomingCall:(LinphoneCall*) call{ LinphoneCallLog* callLog=linphone_call_get_call_log(call); - NSString* callId=[NSString stringWithUTF8String:callLog->call_id]; + NSString* callId=[NSString stringWithUTF8String:linphone_call_log_get_call_id(callLog)]; if (![[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)] || [UIApplication sharedApplication].applicationState == UIApplicationStateActive) { diff --git a/submodules/externals/exosip b/submodules/externals/exosip index c76a9d434..ea5d69281 160000 --- a/submodules/externals/exosip +++ b/submodules/externals/exosip @@ -1 +1 @@ -Subproject commit c76a9d4340f436d2f61f8b031d46bc511776b136 +Subproject commit ea5d692816953ac506464a53238f2103cda8cfee diff --git a/submodules/linphone b/submodules/linphone index 3b722ada2..2584c08c3 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 3b722ada225c8adfcb19a0784f05288f8abfcada +Subproject commit 2584c08c313799871cdef3926f311e9a673674e4 From abfa99d3d8fa9fd9f74c93af2e9786821d26157f Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Fri, 15 Feb 2013 10:55:23 +0100 Subject: [PATCH 6/6] Fix issue with speaker and headset(disabled speaker) --- Classes/LinphoneManager.h | 2 ++ Classes/LinphoneManager.m | 19 ++++++++++++++++++- Classes/LinphoneUI/UISpeakerButton.m | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Classes/LinphoneManager.h b/Classes/LinphoneManager.h index f3c38d984..5b4e8f741 100644 --- a/Classes/LinphoneManager.h +++ b/Classes/LinphoneManager.h @@ -132,6 +132,8 @@ typedef struct _LinphoneManagerSounds { - (void)refreshRegisters; +- (bool)allowSpeaker; + + (BOOL)copyFile:(NSString*)src destination:(NSString*)dst override:(BOOL)override; + (NSString*)bundleFile:(NSString*)file; + (NSString*)documentFile:(NSString*)file; diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 4664c5460..96217b332 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -1115,6 +1115,23 @@ static int comp_call_state_paused (const LinphoneCall* call, const void* param) #pragma mark - Speaker Functions +- (bool)allowSpeaker { + bool notallow = false; + CFStringRef lNewRoute = CFSTR("Unknown"); + UInt32 lNewRouteSize = sizeof(lNewRoute); + OSStatus lStatus = AudioSessionGetProperty(kAudioSessionProperty_AudioRoute, &lNewRouteSize, &lNewRoute); + if (!lStatus && lNewRouteSize > 0) { + NSString *route = (NSString *) lNewRoute; + notallow = [route isEqualToString: @"Headset"] || + [route isEqualToString: @"Headphone"] || + [route isEqualToString: @"HeadphonesAndMicrophone"] || + [route isEqualToString: @"HeadsetInOut"] || + [route isEqualToString: @"Lineout"]; + CFRelease(lNewRoute); + } + return !notallow; +} + static void audioRouteChangeListenerCallback ( void *inUserData, // 1 AudioSessionPropertyID inPropertyID, // 2 @@ -1142,7 +1159,7 @@ static void audioRouteChangeListenerCallback ( - (void)setSpeakerEnabled:(BOOL)enable { speakerEnabled = enable; - if(enable) { + if(enable && [self allowSpeaker]) { UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker; AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute , sizeof (audioRouteOverride) diff --git a/Classes/LinphoneUI/UISpeakerButton.m b/Classes/LinphoneUI/UISpeakerButton.m index 474bd6f8c..0cf70b561 100644 --- a/Classes/LinphoneUI/UISpeakerButton.m +++ b/Classes/LinphoneUI/UISpeakerButton.m @@ -92,6 +92,7 @@ static void audioRouteChangeListenerCallback ( } - (bool)onUpdate { + [self setEnabled:[[LinphoneManager instance] allowSpeaker]]; return [[LinphoneManager instance] speakerEnabled]; }