diff --git a/Classes/Base.lproj/ChatViewController.xib b/Classes/Base.lproj/ChatViewController.xib index 7e96402e3..9a4a3be0c 100644 --- a/Classes/Base.lproj/ChatViewController.xib +++ b/Classes/Base.lproj/ChatViewController.xib @@ -28,7 +28,7 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -95,7 +425,48 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Classes/LinphoneUI/Base.lproj/UICallBar.strings b/Classes/LinphoneUI/Base.lproj/UICallBar.strings deleted file mode 100644 index dd9323ebd..000000000 Binary files a/Classes/LinphoneUI/Base.lproj/UICallBar.strings and /dev/null differ diff --git a/Classes/LinphoneUI/Base.lproj/UICallBar.xib b/Classes/LinphoneUI/Base.lproj/UICallBar.xib deleted file mode 100644 index 3a77686e8..000000000 --- a/Classes/LinphoneUI/Base.lproj/UICallBar.xib +++ /dev/null @@ -1,437 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Classes/LinphoneUI/Base.lproj/UICallBar~ipad.strings b/Classes/LinphoneUI/Base.lproj/UICallBar~ipad.strings deleted file mode 100644 index 934dcf894..000000000 Binary files a/Classes/LinphoneUI/Base.lproj/UICallBar~ipad.strings and /dev/null differ diff --git a/Classes/LinphoneUI/Base.lproj/UICallBar~ipad.xib b/Classes/LinphoneUI/Base.lproj/UICallBar~ipad.xib deleted file mode 100644 index ceb7256d2..000000000 --- a/Classes/LinphoneUI/Base.lproj/UICallBar~ipad.xib +++ /dev/null @@ -1,813 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Classes/LinphoneUI/UICallBar.h b/Classes/LinphoneUI/UICallBar.h deleted file mode 100644 index 862286c74..000000000 --- a/Classes/LinphoneUI/UICallBar.h +++ /dev/null @@ -1,78 +0,0 @@ -/* UICallBar.h - * - * Copyright (C) 2012 Belledonne Comunications, Grenoble, France - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#import - -#import "UIMicroButton.h" -#import "UIPauseButton.h" -#import "UISpeakerButton.h" -#import "UIVideoButton.h" -#import "UIHangUpButton.h" -#import "UIDigitButton.h" -#import "TPMultiLayoutViewController.h" - -@interface UICallBar: TPMultiLayoutViewController { -} - -@property (nonatomic, strong) IBOutlet UIPauseButton* pauseButton; -@property (nonatomic, strong) IBOutlet UIButton* conferenceButton; -@property (nonatomic, strong) IBOutlet UIVideoButton* videoButton; -@property (nonatomic, strong) IBOutlet UIMicroButton* microButton; -@property (nonatomic, strong) IBOutlet UISpeakerButton* speakerButton; -@property (nonatomic, strong) IBOutlet UIToggleButton* routesButton; -@property(nonatomic, strong) IBOutlet UIToggleButton *optionsButton; -@property (nonatomic, strong) IBOutlet UIHangUpButton* hangupButton; -@property (nonatomic, strong) IBOutlet UIView* padView; -@property (nonatomic, strong) IBOutlet UIView* routesView; -@property (nonatomic, strong) IBOutlet UIView* optionsView; -@property (nonatomic, strong) IBOutlet UIButton* routesReceiverButton; -@property (nonatomic, strong) IBOutlet UIButton* routesSpeakerButton; -@property (nonatomic, strong) IBOutlet UIButton* routesBluetoothButton; -@property (nonatomic, strong) IBOutlet UIButton* optionsAddButton; -@property (nonatomic, strong) IBOutlet UIButton* optionsTransferButton; -@property (nonatomic, strong) IBOutlet UIToggleButton* dialerButton; - -@property (nonatomic, strong) IBOutlet UIImageView* leftPadding; -@property (nonatomic, strong) IBOutlet UIImageView* rightPadding; - - -@property (nonatomic, strong) IBOutlet UIDigitButton* oneButton; -@property (nonatomic, strong) IBOutlet UIDigitButton* twoButton; -@property (nonatomic, strong) IBOutlet UIDigitButton* threeButton; -@property (nonatomic, strong) IBOutlet UIDigitButton* fourButton; -@property (nonatomic, strong) IBOutlet UIDigitButton* fiveButton; -@property (nonatomic, strong) IBOutlet UIDigitButton* sixButton; -@property (nonatomic, strong) IBOutlet UIDigitButton* sevenButton; -@property (nonatomic, strong) IBOutlet UIDigitButton* eightButton; -@property (nonatomic, strong) IBOutlet UIDigitButton* nineButton; -@property (nonatomic, strong) IBOutlet UIDigitButton* starButton; -@property (nonatomic, strong) IBOutlet UIDigitButton* zeroButton; -@property (nonatomic, strong) IBOutlet UIDigitButton* sharpButton; - -- (IBAction)onRoutesClick:(id)sender; -- (IBAction)onRoutesBluetoothClick:(id)sender; -- (IBAction)onRoutesReceiverClick:(id)sender; -- (IBAction)onRoutesSpeakerClick:(id)sender; -- (IBAction)onOptionsClick:(id)sender; -- (IBAction)onOptionsTransferClick:(id)sender; -- (IBAction)onOptionsAddClick:(id)sender; -- (IBAction)onConferenceClick:(id)sender; -- (IBAction)onPadClick:(id)sender; - -@end diff --git a/Classes/LinphoneUI/UICallBar.m b/Classes/LinphoneUI/UICallBar.m deleted file mode 100644 index 7a341c403..000000000 --- a/Classes/LinphoneUI/UICallBar.m +++ /dev/null @@ -1,588 +0,0 @@ -/* UICallBar.m - * - * Copyright (C) 2012 Belledonne Comunications, Grenoble, France - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#import "UICallBar.h" -#import "LinphoneManager.h" -#import "PhoneMainView.h" -#import "Utils.h" -#import "CAAnimation+Blocks.h" - -#include "linphone/linphonecore.h" - -@implementation UICallBar - -@synthesize pauseButton; -@synthesize conferenceButton; -@synthesize videoButton; -@synthesize microButton; -@synthesize speakerButton; -@synthesize routesButton; -@synthesize optionsButton; -@synthesize hangupButton; -@synthesize routesBluetoothButton; -@synthesize routesReceiverButton; -@synthesize routesSpeakerButton; -@synthesize optionsAddButton; -@synthesize optionsTransferButton; -@synthesize dialerButton; - -@synthesize padView; -@synthesize routesView; -@synthesize optionsView; - -@synthesize oneButton; -@synthesize twoButton; -@synthesize threeButton; -@synthesize fourButton; -@synthesize fiveButton; -@synthesize sixButton; -@synthesize sevenButton; -@synthesize eightButton; -@synthesize nineButton; -@synthesize starButton; -@synthesize zeroButton; -@synthesize sharpButton; - -#pragma mark - Lifecycle Functions - -- (id)init { - return [super initWithNibName:@"UICallBar" bundle:[NSBundle mainBundle]]; -} - -- (void)dealloc { - - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - -#pragma mark - ViewController Functions - -- (void)viewDidLoad { - [pauseButton setType:UIPauseButtonType_CurrentCall call:nil]; - - [zeroButton setDigit:'0']; - [zeroButton setDtmf:true]; - [oneButton setDigit:'1']; - [oneButton setDtmf:true]; - [twoButton setDigit:'2']; - [twoButton setDtmf:true]; - [threeButton setDigit:'3']; - [threeButton setDtmf:true]; - [fourButton setDigit:'4']; - [fourButton setDtmf:true]; - [fiveButton setDigit:'5']; - [fiveButton setDtmf:true]; - [sixButton setDigit:'6']; - [sixButton setDtmf:true]; - [sevenButton setDigit:'7']; - [sevenButton setDtmf:true]; - [eightButton setDigit:'8']; - [eightButton setDtmf:true]; - [nineButton setDigit:'9']; - [nineButton setDtmf:true]; - [starButton setDigit:'*']; - [starButton setDtmf:true]; - [sharpButton setDigit:'#']; - [sharpButton setDtmf:true]; - - { - UIButton *videoButtonLandscape = (UIButton *)[landscapeView viewWithTag:[videoButton tag]]; - // Set selected+disabled background: IB lack ! - [videoButton setBackgroundImage:[UIImage imageNamed:@"video_on_disabled.png"] - forState:(UIControlStateDisabled | UIControlStateSelected)]; - [videoButtonLandscape setBackgroundImage:[UIImage imageNamed:@"video_on_disabled_landscape.png"] - forState:(UIControlStateDisabled | UIControlStateSelected)]; - - // Set selected+over background: IB lack ! - [videoButton setBackgroundImage:[UIImage imageNamed:@"video_on_over.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - [videoButtonLandscape setBackgroundImage:[UIImage imageNamed:@"video_on_over_landscape.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - - [LinphoneUtils buttonFixStates:videoButton]; - [LinphoneUtils buttonFixStates:videoButtonLandscape]; - } - - { - UIImageView *leftPaddingLandscape = (UIImageView *)[landscapeView viewWithTag:self.leftPadding.tag]; - leftPaddingLandscape.image = [UIImage imageNamed:@"incall_padding_left_landscape.png"]; - } - { - UIImageView *rightPaddingLandscape = (UIImageView *)[landscapeView viewWithTag:self.rightPadding.tag]; - rightPaddingLandscape.image = [UIImage imageNamed:@"incall_padding_right_landscape.png"]; - } - - { - UIButton *speakerButtonLandscape = (UIButton *)[landscapeView viewWithTag:[speakerButton tag]]; - // Set selected+disabled background: IB lack ! - [speakerButton setBackgroundImage:[UIImage imageNamed:@"speaker_on_disabled.png"] - forState:(UIControlStateDisabled | UIControlStateSelected)]; - [speakerButtonLandscape setBackgroundImage:[UIImage imageNamed:@"speaker_on_disabled_landscape.png"] - forState:(UIControlStateDisabled | UIControlStateSelected)]; - - // Set selected+over background: IB lack ! - [speakerButton setBackgroundImage:[UIImage imageNamed:@"speaker_on_over.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - [speakerButtonLandscape setBackgroundImage:[UIImage imageNamed:@"speaker_on_over_landscape.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - - [LinphoneUtils buttonFixStates:speakerButton]; - [LinphoneUtils buttonFixStates:speakerButtonLandscape]; - } - - if (![LinphoneManager runningOnIpad]) { - UIButton *routesButtonLandscape = (UIButton *)[landscapeView viewWithTag:[routesButton tag]]; - // Set selected+over background: IB lack ! - [routesButton setBackgroundImage:[UIImage imageNamed:@"routes_over.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - [routesButtonLandscape setBackgroundImage:[UIImage imageNamed:@"routes_over_landscape.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - - [LinphoneUtils buttonFixStates:routesButton]; - [LinphoneUtils buttonFixStates:routesButtonLandscape]; - } - - { - UIButton *microButtonLandscape = (UIButton *)[landscapeView viewWithTag:[microButton tag]]; - // Set selected+disabled background: IB lack ! - [microButton setBackgroundImage:[UIImage imageNamed:@"micro_on_disabled.png"] - forState:(UIControlStateDisabled | UIControlStateSelected)]; - [microButtonLandscape setBackgroundImage:[UIImage imageNamed:@"micro_on_disabled_landscape.png"] - forState:(UIControlStateDisabled | UIControlStateSelected)]; - - // Set selected+over background: IB lack ! - [microButton setBackgroundImage:[UIImage imageNamed:@"micro_on_over.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - [microButtonLandscape setBackgroundImage:[UIImage imageNamed:@"micro_on_over_landscape.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - - [LinphoneUtils buttonFixStates:microButton]; - [LinphoneUtils buttonFixStates:microButtonLandscape]; - } - - { - UIButton *optionsButtonLandscape = (UIButton *)[landscapeView viewWithTag:[optionsButton tag]]; - // Set selected+disabled background: IB lack ! - [optionsButton setBackgroundImage:[UIImage imageNamed:@"options_disabled.png"] - forState:(UIControlStateDisabled | UIControlStateSelected)]; - [optionsButtonLandscape setBackgroundImage:[UIImage imageNamed:@"options_disabled_landscape.png"] - forState:(UIControlStateDisabled | UIControlStateSelected)]; - - // Set selected+over background: IB lack ! - [optionsButton setBackgroundImage:[UIImage imageNamed:@"options_over.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - [optionsButtonLandscape setBackgroundImage:[UIImage imageNamed:@"options_over_landscape.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - [LinphoneUtils buttonFixStates:optionsButton]; - [LinphoneUtils buttonFixStates:optionsButtonLandscape]; - } - - { - UIButton *pauseButtonLandscape = (UIButton *)[landscapeView viewWithTag:[pauseButton tag]]; - // Set selected+over background: IB lack ! - [pauseButton setBackgroundImage:[UIImage imageNamed:@"pause_on_over.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - [pauseButtonLandscape setBackgroundImage:[UIImage imageNamed:@"pause_on_over_landscape.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - - [LinphoneUtils buttonFixStates:pauseButton]; - [LinphoneUtils buttonFixStates:pauseButtonLandscape]; - } - - { - UIButton *dialerButtonLandscape = (UIButton *)[landscapeView viewWithTag:[dialerButton tag]]; - // Set selected+over background: IB lack ! - [dialerButton setBackgroundImage:[UIImage imageNamed:@"dialer_alt_back_over.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - [dialerButtonLandscape setBackgroundImage:[UIImage imageNamed:@"dialer_alt_back_over_landscape.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - - [LinphoneUtils buttonFixStates:dialerButton]; - [LinphoneUtils buttonFixStates:dialerButtonLandscape]; - } - - [super viewDidLoad]; -} - -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(callUpdateEvent:) - name:kLinphoneCallUpdate - object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(bluetoothAvailabilityUpdateEvent:) - name:kLinphoneBluetoothAvailabilityUpdate - object:nil]; - // Update on show - LinphoneCall *call = linphone_core_get_current_call([LinphoneManager getLc]); - LinphoneCallState state = (call != NULL) ? linphone_call_get_state(call) : 0; - [self callUpdate:call state:state]; - [self hideRoutes:FALSE]; - [self hideOptions:FALSE]; - [self hidePad:FALSE]; - [self showSpeaker]; -} - -- (void)viewWillDisappear:(BOOL)animated { - [super viewWillDisappear:animated]; - - [[NSNotificationCenter defaultCenter] removeObserver:self name:kLinphoneCallUpdate object:nil]; - if (linphone_core_get_calls_nb([LinphoneManager getLc]) == 0) { - // reseting speaker button because no more call - speakerButton.selected = FALSE; - } -} - -#pragma mark - Event Functions - -- (void)callUpdateEvent:(NSNotification *)notif { - LinphoneCall *call = [[notif.userInfo objectForKey:@"call"] pointerValue]; - LinphoneCallState state = [[notif.userInfo objectForKey:@"state"] intValue]; - [self callUpdate:call state:state]; -} - -- (void)bluetoothAvailabilityUpdateEvent:(NSNotification *)notif { - bool available = [[notif.userInfo objectForKey:@"available"] intValue]; - [self bluetoothAvailabilityUpdate:available]; -} - -#pragma mark - - -- (void)callUpdate:(LinphoneCall *)call state:(LinphoneCallState)state { - LinphoneCore *lc = [LinphoneManager getLc]; - - [speakerButton update]; - [microButton update]; - [pauseButton update]; - [videoButton update]; - [hangupButton update]; - - optionsButton.enabled = - (state == LinphoneCallPaused || state == LinphoneCallPausing || state == LinphoneCallStreamsRunning); - - // Show Pause/Conference button following call count - if (linphone_core_get_calls_nb(lc) > 1) { - if (![pauseButton isHidden]) { - [pauseButton setHidden:true]; - [conferenceButton setHidden:false]; - } - bool enabled = true; - const MSList *list = linphone_core_get_calls(lc); - while (list != NULL) { - LinphoneCall *call = (LinphoneCall *)list->data; - LinphoneCallState state = linphone_call_get_state(call); - if (state == LinphoneCallIncomingReceived || state == LinphoneCallOutgoingInit || - state == LinphoneCallOutgoingProgress || state == LinphoneCallOutgoingRinging || - state == LinphoneCallOutgoingEarlyMedia || state == LinphoneCallConnected) { - enabled = false; - } - list = list->next; - } - [conferenceButton setEnabled:enabled]; - } else { - if ([pauseButton isHidden]) { - [pauseButton setHidden:false]; - [conferenceButton setHidden:true]; - } - } - - // Disable transfert in conference - if (linphone_core_get_current_call(lc) == NULL) { - [optionsTransferButton setEnabled:FALSE]; - } else { - [optionsTransferButton setEnabled:TRUE]; - } - - switch (state) { - case LinphoneCallEnd: - case LinphoneCallError: - case LinphoneCallIncoming: - case LinphoneCallOutgoing: - [self hidePad:TRUE]; - [self hideOptions:TRUE]; - [self hideRoutes:TRUE]; - default: - break; - } -} - -- (void)bluetoothAvailabilityUpdate:(bool)available { - if (available) { - [self hideSpeaker]; - } else { - [self showSpeaker]; - } -} - -#pragma mark - - -- (void)showAnimation:(NSString *)animationID target:(UIView *)target completion:(void (^)(BOOL finished))completion { - CGRect frame = [target frame]; - int original_y = frame.origin.y; - frame.origin.y = [[self view] frame].size.height; - [target setFrame:frame]; - [target setHidden:FALSE]; - [UIView animateWithDuration:0.5 - delay:0.0 - options:UIViewAnimationOptionCurveEaseOut - animations:^{ - CGRect frame = [target frame]; - frame.origin.y = original_y; - [target setFrame:frame]; - } - completion:^(BOOL finished) { - CGRect frame = [target frame]; - frame.origin.y = original_y; - [target setFrame:frame]; - completion(finished); - }]; -} - -- (void)hideAnimation:(NSString *)animationID target:(UIView *)target completion:(void (^)(BOOL finished))completion { - CGRect frame = [target frame]; - int original_y = frame.origin.y; - [UIView animateWithDuration:0.5 - delay:0.0 - options:UIViewAnimationOptionCurveEaseIn - animations:^{ - CGRect frame = [target frame]; - frame.origin.y = [[self view] frame].size.height; - [target setFrame:frame]; - } - completion:^(BOOL finished) { - CGRect frame = [target frame]; - frame.origin.y = original_y; - [target setHidden:TRUE]; - [target setFrame:frame]; - completion(finished); - }]; -} - -- (void)showPad:(BOOL)animated { - [dialerButton setOn]; - if ([padView isHidden]) { - if (animated) { - [self showAnimation:@"show" - target:padView - completion:^(BOOL finished){ - }]; - } else { - [padView setHidden:FALSE]; - } - } -} - -- (void)hidePad:(BOOL)animated { - [dialerButton setOff]; - if (![padView isHidden]) { - if (animated) { - [self hideAnimation:@"hide" - target:padView - completion:^(BOOL finished){ - }]; - } else { - [padView setHidden:TRUE]; - } - } -} - -- (void)showRoutes:(BOOL)animated { - if (![LinphoneManager runningOnIpad]) { - [routesButton setOn]; - [routesBluetoothButton setSelected:[[LinphoneManager instance] bluetoothEnabled]]; - [routesSpeakerButton setSelected:[[LinphoneManager instance] speakerEnabled]]; - [routesReceiverButton setSelected:!([[LinphoneManager instance] bluetoothEnabled] || - [[LinphoneManager instance] speakerEnabled])]; - if ([routesView isHidden]) { - if (animated) { - [self showAnimation:@"show" - target:routesView - completion:^(BOOL finished){ - }]; - } else { - [routesView setHidden:FALSE]; - } - } - } -} - -- (void)hideRoutes:(BOOL)animated { - if (![LinphoneManager runningOnIpad]) { - [routesButton setOff]; - if (![routesView isHidden]) { - if (animated) { - [self hideAnimation:@"hide" - target:routesView - completion:^(BOOL finished){ - }]; - } else { - [routesView setHidden:TRUE]; - } - } - } -} - -- (void)showOptions:(BOOL)animated { - [optionsButton setOn]; - if ([optionsView isHidden]) { - if (animated) { - [self showAnimation:@"show" - target:optionsView - completion:^(BOOL finished){ - }]; - } else { - [optionsView setHidden:FALSE]; - } - } -} - -- (void)hideOptions:(BOOL)animated { - [optionsButton setOff]; - if (![optionsView isHidden]) { - if (animated) { - [self hideAnimation:@"hide" - target:optionsView - completion:^(BOOL finished){ - }]; - } else { - [optionsView setHidden:TRUE]; - } - } -} - -- (void)showSpeaker { - if (![LinphoneManager runningOnIpad]) { - [speakerButton setHidden:FALSE]; - [routesButton setHidden:TRUE]; - } -} - -- (void)hideSpeaker { - if (![LinphoneManager runningOnIpad]) { - [speakerButton setHidden:TRUE]; - [routesButton setHidden:FALSE]; - } -} - -#pragma mark - Action Functions - -- (IBAction)onPadClick:(id)sender { - if ([padView isHidden]) { - [self showPad:[[LinphoneManager instance] lpConfigBoolForKey:@"animations_preference"]]; - } else { - [self hidePad:[[LinphoneManager instance] lpConfigBoolForKey:@"animations_preference"]]; - } -} - -- (IBAction)onRoutesBluetoothClick:(id)sender { - [self hideRoutes:TRUE]; - [[LinphoneManager instance] setBluetoothEnabled:TRUE]; -} - -- (IBAction)onRoutesReceiverClick:(id)sender { - [self hideRoutes:TRUE]; - [[LinphoneManager instance] setSpeakerEnabled:FALSE]; - [[LinphoneManager instance] setBluetoothEnabled:FALSE]; -} - -- (IBAction)onRoutesSpeakerClick:(id)sender { - [self hideRoutes:TRUE]; - [[LinphoneManager instance] setSpeakerEnabled:TRUE]; -} - -- (IBAction)onRoutesClick:(id)sender { - if ([routesView isHidden]) { - [self showRoutes:[[LinphoneManager instance] lpConfigBoolForKey:@"animations_preference"]]; - } else { - [self hideRoutes:[[LinphoneManager instance] lpConfigBoolForKey:@"animations_preference"]]; - } -} - -- (IBAction)onOptionsTransferClick:(id)sender { - [self hideOptions:TRUE]; - // Go to dialer view - DialerViewController *controller = - DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[DialerViewController compositeViewDescription]], - DialerViewController); - if (controller != nil) { - [controller setAddress:@""]; - [controller setTransferMode:TRUE]; - } -} - -- (IBAction)onOptionsAddClick:(id)sender { - [self hideOptions:TRUE]; - // Go to dialer view - DialerViewController *controller = - DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[DialerViewController compositeViewDescription]], - DialerViewController); - if (controller != nil) { - [controller setAddress:@""]; - [controller setTransferMode:FALSE]; - } -} - -- (IBAction)onOptionsClick:(id)sender { - if ([optionsView isHidden]) { - [self showOptions:[[LinphoneManager instance] lpConfigBoolForKey:@"animations_preference"]]; - } else { - [self hideOptions:[[LinphoneManager instance] lpConfigBoolForKey:@"animations_preference"]]; - } -} - -- (IBAction)onConferenceClick:(id)sender { - linphone_core_add_all_to_conference([LinphoneManager getLc]); -} - -#pragma mark - TPMultiLayoutViewController Functions - -- (NSDictionary *)attributesForView:(UIView *)view { - NSMutableDictionary *attributes = [NSMutableDictionary dictionary]; - - [attributes setObject:[NSValue valueWithCGRect:view.frame] forKey:@"frame"]; - [attributes setObject:[NSValue valueWithCGRect:view.bounds] forKey:@"bounds"]; - if ([view isKindOfClass:[UIButton class]]) { - UIButton *button = (UIButton *)view; - [LinphoneUtils buttonMultiViewAddAttributes:attributes button:button]; - } else if (view.tag == self.leftPadding.tag || view.tag == self.rightPadding.tag) { - UIImage *image = [(UIImageView *)view image]; - if (image) { - [attributes setObject:image forKey:@"image"]; - } - } - [attributes setObject:[NSNumber numberWithInteger:view.autoresizingMask] forKey:@"autoresizingMask"]; - - return attributes; -} - -- (void)applyAttributes:(NSDictionary *)attributes toView:(UIView *)view { - view.frame = [[attributes objectForKey:@"frame"] CGRectValue]; - view.bounds = [[attributes objectForKey:@"bounds"] CGRectValue]; - if ([view isKindOfClass:[UIButton class]]) { - UIButton *button = (UIButton *)view; - [LinphoneUtils buttonMultiViewApplyAttributes:attributes button:button]; - } else if (view.tag == self.leftPadding.tag || view.tag == self.rightPadding.tag) { - - [(UIImageView *)view setImage:[attributes objectForKey:@"image"]]; - } - view.autoresizingMask = [[attributes objectForKey:@"autoresizingMask"] integerValue]; -} - -@end diff --git a/Classes/LinphoneUI/ar.lproj/UICallBar.strings b/Classes/LinphoneUI/ar.lproj/UICallBar.strings deleted file mode 100644 index 9c1db682e..000000000 Binary files a/Classes/LinphoneUI/ar.lproj/UICallBar.strings and /dev/null differ diff --git a/Classes/LinphoneUI/ar.lproj/UICallBar.strings2 b/Classes/LinphoneUI/ar.lproj/UICallBar.strings2 deleted file mode 100644 index 5dcac01dc..000000000 Binary files a/Classes/LinphoneUI/ar.lproj/UICallBar.strings2 and /dev/null differ diff --git a/Classes/LinphoneUI/ar.lproj/UICallBar~ipad.strings b/Classes/LinphoneUI/ar.lproj/UICallBar~ipad.strings deleted file mode 100644 index 4ab2b45a9..000000000 Binary files a/Classes/LinphoneUI/ar.lproj/UICallBar~ipad.strings and /dev/null differ diff --git a/Classes/LinphoneUI/de.lproj/UICallBar.strings b/Classes/LinphoneUI/de.lproj/UICallBar.strings deleted file mode 100644 index 2f3fddeb7..000000000 Binary files a/Classes/LinphoneUI/de.lproj/UICallBar.strings and /dev/null differ diff --git a/Classes/LinphoneUI/de.lproj/UICallBar~ipad.strings b/Classes/LinphoneUI/de.lproj/UICallBar~ipad.strings deleted file mode 100644 index b403e5d70..000000000 Binary files a/Classes/LinphoneUI/de.lproj/UICallBar~ipad.strings and /dev/null differ diff --git a/Classes/LinphoneUI/fr.lproj/UICallBar.strings b/Classes/LinphoneUI/fr.lproj/UICallBar.strings deleted file mode 100644 index 182689de0..000000000 Binary files a/Classes/LinphoneUI/fr.lproj/UICallBar.strings and /dev/null differ diff --git a/Classes/LinphoneUI/fr.lproj/UICallBar~ipad.strings b/Classes/LinphoneUI/fr.lproj/UICallBar~ipad.strings deleted file mode 100644 index 42c0b2b87..000000000 Binary files a/Classes/LinphoneUI/fr.lproj/UICallBar~ipad.strings and /dev/null differ diff --git a/Classes/LinphoneUI/ja.lproj/UICallBar.strings b/Classes/LinphoneUI/ja.lproj/UICallBar.strings deleted file mode 100644 index 81acfa1bd..000000000 Binary files a/Classes/LinphoneUI/ja.lproj/UICallBar.strings and /dev/null differ diff --git a/Classes/LinphoneUI/ja.lproj/UICallBar~ipad.strings b/Classes/LinphoneUI/ja.lproj/UICallBar~ipad.strings deleted file mode 100644 index 95ff4bce6..000000000 Binary files a/Classes/LinphoneUI/ja.lproj/UICallBar~ipad.strings and /dev/null differ diff --git a/Classes/LinphoneUI/nl.lproj/UICallBar.strings b/Classes/LinphoneUI/nl.lproj/UICallBar.strings deleted file mode 100644 index f5947a0d0..000000000 Binary files a/Classes/LinphoneUI/nl.lproj/UICallBar.strings and /dev/null differ diff --git a/Classes/LinphoneUI/nl.lproj/UICallBar~ipad.strings b/Classes/LinphoneUI/nl.lproj/UICallBar~ipad.strings deleted file mode 100644 index 4350fa72f..000000000 Binary files a/Classes/LinphoneUI/nl.lproj/UICallBar~ipad.strings and /dev/null differ diff --git a/Classes/LinphoneUI/ru.lproj/UICallBar.strings b/Classes/LinphoneUI/ru.lproj/UICallBar.strings deleted file mode 100644 index b045150ba..000000000 Binary files a/Classes/LinphoneUI/ru.lproj/UICallBar.strings and /dev/null differ diff --git a/Classes/LinphoneUI/ru.lproj/UICallBar~ipad.strings b/Classes/LinphoneUI/ru.lproj/UICallBar~ipad.strings deleted file mode 100644 index 1f684f7da..000000000 Binary files a/Classes/LinphoneUI/ru.lproj/UICallBar~ipad.strings and /dev/null differ diff --git a/Classes/LinphoneUI/zh_TW.lproj/UICallBar.strings b/Classes/LinphoneUI/zh_TW.lproj/UICallBar.strings deleted file mode 100644 index 69ca13bd8..000000000 Binary files a/Classes/LinphoneUI/zh_TW.lproj/UICallBar.strings and /dev/null differ diff --git a/Classes/LinphoneUI/zh_TW.lproj/UICallBar~ipad.strings b/Classes/LinphoneUI/zh_TW.lproj/UICallBar~ipad.strings deleted file mode 100644 index a3ff84fd6..000000000 Binary files a/Classes/LinphoneUI/zh_TW.lproj/UICallBar~ipad.strings and /dev/null differ diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index eec0e8a2c..834dae78d 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -321,7 +321,6 @@ D3211BB0159C4EF10098460B /* UIConferenceHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = D3211BAE159C4EF00098460B /* UIConferenceHeader.m */; }; D32460E6159D9AAD00BA7F3A /* UITransparentView.m in Sources */ = {isa = PBXBuildFile; fileRef = D32460E5159D9AAD00BA7F3A /* UITransparentView.m */; }; D326483815887D5200930C67 /* OrderedDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = D326483715887D5200930C67 /* OrderedDictionary.m */; }; - D326483E1588950F00930C67 /* UICallBar.m in Sources */ = {isa = PBXBuildFile; fileRef = D326483C1588950F00930C67 /* UICallBar.m */; }; D32648441588F6FC00930C67 /* UIToggleButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D32648431588F6FB00930C67 /* UIToggleButton.m */; }; D32B6E2915A5BC440033019F /* ChatRoomTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D32B6E2815A5BC430033019F /* ChatRoomTableViewController.m */; }; D32B6E2F15A5C0AC0033019F /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D32B6E2E15A5C0AC0033019F /* libsqlite3.dylib */; }; @@ -378,8 +377,6 @@ D38187D115FE346B00C3EDCA /* HistoryViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D38187D415FE346B00C3EDCA /* HistoryViewController.xib */; }; D38187D915FE347700C3EDCA /* IncomingCallViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D38187DC15FE347700C3EDCA /* IncomingCallViewController.xib */; }; D38187DD15FE348A00C3EDCA /* WizardViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D38187E015FE348A00C3EDCA /* WizardViewController.xib */; }; - D38187E115FE349700C3EDCA /* UICallBar.xib in Resources */ = {isa = PBXBuildFile; fileRef = D38187E415FE349700C3EDCA /* UICallBar.xib */; }; - D38187E515FE349D00C3EDCA /* UICallBar~ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = D38187E815FE349D00C3EDCA /* UICallBar~ipad.xib */; }; D38187F015FE354000C3EDCA /* UIConferenceHeader.xib in Resources */ = {isa = PBXBuildFile; fileRef = D38187F315FE354000C3EDCA /* UIConferenceHeader.xib */; }; D38187F815FE355D00C3EDCA /* UIMainBar.xib in Resources */ = {isa = PBXBuildFile; fileRef = D38187FB15FE355D00C3EDCA /* UIMainBar.xib */; }; D381881115FE3F0B00C3EDCA /* UICallCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = D381881415FE3F0B00C3EDCA /* UICallCell.xib */; }; @@ -948,8 +945,6 @@ D32460E5159D9AAD00BA7F3A /* UITransparentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UITransparentView.m; sourceTree = ""; }; D326483615887D5200930C67 /* OrderedDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OrderedDictionary.h; path = Utils/OrderedDictionary.h; sourceTree = ""; }; D326483715887D5200930C67 /* OrderedDictionary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OrderedDictionary.m; path = Utils/OrderedDictionary.m; sourceTree = ""; }; - D326483B1588950F00930C67 /* UICallBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICallBar.h; sourceTree = ""; }; - D326483C1588950F00930C67 /* UICallBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICallBar.m; sourceTree = ""; }; D32648421588F6FA00930C67 /* UIToggleButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIToggleButton.h; sourceTree = ""; }; D32648431588F6FB00930C67 /* UIToggleButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIToggleButton.m; sourceTree = ""; }; D32B6E2715A5BC430033019F /* ChatRoomTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatRoomTableViewController.h; sourceTree = ""; }; @@ -1095,8 +1090,6 @@ F09548231883F15400E8A69B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/InCallViewController.xib; sourceTree = ""; }; F09548241883F15400E8A69B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/IncomingCallViewController.xib; sourceTree = ""; }; F09548251883F15400E8A69B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = "Base.lproj/IncomingCallViewController~ipad.xib"; sourceTree = ""; }; - F09548261883F15400E8A69B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/UICallBar.xib; sourceTree = ""; }; - F09548271883F15400E8A69B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = "Base.lproj/UICallBar~ipad.xib"; sourceTree = ""; }; F09548281883F15400E8A69B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/UICallCell.xib; sourceTree = ""; }; F09548291883F15400E8A69B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/UIConferenceHeader.xib; sourceTree = ""; }; F095482C1883F15400E8A69B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/UIMainBar.xib; sourceTree = ""; }; @@ -1129,10 +1122,6 @@ F09548481883F55800E8A69B /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/IncomingCallViewController.strings; sourceTree = ""; }; F09548491883F56A00E8A69B /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = "fr.lproj/IncomingCallViewController~ipad.strings"; sourceTree = ""; }; F095484A1883F56E00E8A69B /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = "ru.lproj/IncomingCallViewController~ipad.strings"; sourceTree = ""; }; - F095484B1883F58E00E8A69B /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/UICallBar.strings; sourceTree = ""; }; - F095484C1883F59200E8A69B /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/UICallBar.strings; sourceTree = ""; }; - F095484D1883F5AF00E8A69B /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = "fr.lproj/UICallBar~ipad.strings"; sourceTree = ""; }; - F095484E1883F5B300E8A69B /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = "ru.lproj/UICallBar~ipad.strings"; sourceTree = ""; }; F095484F1883F5D500E8A69B /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/UIConferenceHeader.strings; sourceTree = ""; }; F09548501883F5D900E8A69B /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/UIConferenceHeader.strings; sourceTree = ""; }; F09548551883F61300E8A69B /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/UIMainBar.strings; sourceTree = ""; }; @@ -1158,8 +1147,6 @@ F0AF06FC1A24BA770086C9C1 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/InCallViewController.strings; sourceTree = ""; }; F0AF06FD1A24BA770086C9C1 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/IncomingCallViewController.strings; sourceTree = ""; }; F0AF06FE1A24BA770086C9C1 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = "ar.lproj/IncomingCallViewController~ipad.strings"; sourceTree = ""; }; - F0AF06FF1A24BA770086C9C1 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/UICallBar.strings; sourceTree = ""; }; - F0AF07001A24BA770086C9C1 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = "ar.lproj/UICallBar~ipad.strings"; sourceTree = ""; }; F0AF07011A24BA770086C9C1 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/UICallCell.strings; sourceTree = ""; }; F0AF07021A24BA770086C9C1 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/UIChatCell.strings; sourceTree = ""; }; F0AF07031A24BA770086C9C1 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/UIChatRoomCell.strings; sourceTree = ""; }; @@ -1434,10 +1421,6 @@ children = ( 22C7555E1317E59C007BC101 /* UIBluetoothButton.h */, 22C7555F1317E59C007BC101 /* UIBluetoothButton.m */, - D326483B1588950F00930C67 /* UICallBar.h */, - D326483C1588950F00930C67 /* UICallBar.m */, - D38187E415FE349700C3EDCA /* UICallBar.xib */, - D38187E815FE349D00C3EDCA /* UICallBar~ipad.xib */, 2214EB7812F846B1002A5394 /* UICallButton.h */, 2214EB7912F846B1002A5394 /* UICallButton.m */, D36C43C4158F2E5A0048BA40 /* UICallCell.h */, @@ -2366,7 +2349,6 @@ 63AADBFB1B6A0FF200AA16FD /* ring.caf in Resources */, 634CEDF71B6630DB00D7A921 /* pause_big_over_selected.png in Resources */, 634CEDEA1B6630DB00D7A921 /* numpad_6.png in Resources */, - D38187E115FE349700C3EDCA /* UICallBar.xib in Resources */, 639CEB001A1DF4E4004DE38F /* UIHistoryCell.xib in Resources */, 634CEDCC1B6630DB00D7A921 /* dialer_back.png in Resources */, 634CEDED1B6630DB00D7A921 /* numpad_9.png in Resources */, @@ -2454,7 +2436,6 @@ 634CEDBC1B6630DB00D7A921 /* chat_start_body_over.png in Resources */, 63AADC021B6A0FF200AA16FD /* wizard_remote.rc in Resources */, D38187C515FE345F00C3EDCA /* DialerViewController~ipad.xib in Resources */, - D38187E515FE349D00C3EDCA /* UICallBar~ipad.xib in Resources */, 634CEE121B6630DB00D7A921 /* status_busy_phone.png in Resources */, 634CEDFB1B6630DB00D7A921 /* quit_default.png in Resources */, 63158FAD1B468E0E00969917 /* ImageOptim.sh in Resources */, @@ -2654,7 +2635,6 @@ D35498211587716B000081D8 /* UIStateBar.m in Sources */, D3A55FBC15877E5E003FD403 /* UIContactCell.m in Sources */, D326483815887D5200930C67 /* OrderedDictionary.m in Sources */, - D326483E1588950F00930C67 /* UICallBar.m in Sources */, D32648441588F6FC00930C67 /* UIToggleButton.m in Sources */, D36FB2D51589EF7C0036F6F2 /* UIPauseButton.m in Sources */, D31C9C98158A1CDF00756B45 /* UIHistoryCell.m in Sources */, @@ -3081,28 +3061,6 @@ name = WizardViewController.xib; sourceTree = ""; }; - D38187E415FE349700C3EDCA /* UICallBar.xib */ = { - isa = PBXVariantGroup; - children = ( - F09548261883F15400E8A69B /* Base */, - F095484B1883F58E00E8A69B /* fr */, - F095484C1883F59200E8A69B /* ru */, - F0AF06FF1A24BA770086C9C1 /* ar */, - ); - name = UICallBar.xib; - sourceTree = ""; - }; - D38187E815FE349D00C3EDCA /* UICallBar~ipad.xib */ = { - isa = PBXVariantGroup; - children = ( - F09548271883F15400E8A69B /* Base */, - F095484D1883F5AF00E8A69B /* fr */, - F095484E1883F5B300E8A69B /* ru */, - F0AF07001A24BA770086C9C1 /* ar */, - ); - name = "UICallBar~ipad.xib"; - sourceTree = ""; - }; D38187F315FE354000C3EDCA /* UIConferenceHeader.xib */ = { isa = PBXVariantGroup; children = (