mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 02:58:07 +00:00
Utils: update minor animation and fragment bugs
This commit is contained in:
parent
2a75f69ed2
commit
a58023b019
23 changed files with 77 additions and 74 deletions
|
|
@ -45,7 +45,7 @@
|
||||||
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"],
|
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"],
|
||||||
linphone_core_get_version()]];
|
linphone_core_get_version()]];
|
||||||
|
|
||||||
if (LinphoneManager.runningOnIpad) {
|
if (IPAD) {
|
||||||
[LinphoneUtils adjustFontSize:self.view mult:2.22f];
|
[LinphoneUtils adjustFontSize:self.view mult:2.22f];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -634,7 +634,7 @@
|
||||||
<action selector="onChatClick:" destination="-1" eventType="touchUpInside" id="Jdk-1s-UnN"/>
|
<action selector="onChatClick:" destination="-1" eventType="touchUpInside" id="Jdk-1s-UnN"/>
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<view autoresizesSubviews="NO" userInteractionEnabled="NO" tag="70" contentMode="scaleToFill" id="d9Y-2a-CDI" userLabel="chatNotificationView" customClass="UIBouncingView">
|
<view hidden="YES" autoresizesSubviews="NO" userInteractionEnabled="NO" tag="70" contentMode="scaleToFill" id="d9Y-2a-CDI" userLabel="chatNotificationView" customClass="UIBouncingView">
|
||||||
<rect key="frame" x="330" y="8" width="21" height="22"/>
|
<rect key="frame" x="330" y="8" width="21" height="22"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
|
|
@ -1227,7 +1227,7 @@
|
||||||
<action selector="onChatClick:" destination="-1" eventType="touchUpInside" id="PMo-F3-WMK"/>
|
<action selector="onChatClick:" destination="-1" eventType="touchUpInside" id="PMo-F3-WMK"/>
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<view autoresizesSubviews="NO" userInteractionEnabled="NO" tag="70" contentMode="scaleToFill" id="1pd-et-5dy" userLabel="chatNotificationView" customClass="UIBouncingView">
|
<view hidden="YES" autoresizesSubviews="NO" userInteractionEnabled="NO" tag="70" contentMode="scaleToFill" id="1pd-et-5dy" userLabel="chatNotificationView" customClass="UIBouncingView">
|
||||||
<rect key="frame" x="295" y="8" width="21" height="22"/>
|
<rect key="frame" x="295" y="8" width="21" height="22"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
|
|
|
||||||
|
|
@ -634,7 +634,7 @@
|
||||||
<action selector="onChatClick:" destination="-1" eventType="touchUpInside" id="Jdk-1s-UnN"/>
|
<action selector="onChatClick:" destination="-1" eventType="touchUpInside" id="Jdk-1s-UnN"/>
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<view autoresizesSubviews="NO" userInteractionEnabled="NO" tag="70" contentMode="scaleToFill" id="d9Y-2a-CDI" userLabel="chatNotificationView" customClass="UIBouncingView">
|
<view hidden="YES" autoresizesSubviews="NO" userInteractionEnabled="NO" tag="70" contentMode="scaleToFill" id="d9Y-2a-CDI" userLabel="chatNotificationView" customClass="UIBouncingView">
|
||||||
<rect key="frame" x="353" y="8" width="44" height="22"/>
|
<rect key="frame" x="353" y="8" width="44" height="22"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
|
|
@ -1227,7 +1227,7 @@
|
||||||
<action selector="onChatClick:" destination="-1" eventType="touchUpInside" id="PMo-F3-WMK"/>
|
<action selector="onChatClick:" destination="-1" eventType="touchUpInside" id="PMo-F3-WMK"/>
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<view autoresizesSubviews="NO" userInteractionEnabled="NO" tag="70" contentMode="scaleToFill" id="1pd-et-5dy" userLabel="chatNotificationView" customClass="UIBouncingView">
|
<view hidden="YES" autoresizesSubviews="NO" userInteractionEnabled="NO" tag="70" contentMode="scaleToFill" id="1pd-et-5dy" userLabel="chatNotificationView" customClass="UIBouncingView">
|
||||||
<rect key="frame" x="357" y="8" width="25" height="22"/>
|
<rect key="frame" x="357" y="8" width="25" height="22"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
|
|
||||||
// if we use fragments, remove back button
|
// if we use fragments, remove back button
|
||||||
if (LinphoneManager.runningOnIpad) {
|
if (IPAD) {
|
||||||
_backButton.hidden = YES;
|
_backButton.hidden = YES;
|
||||||
_backButton.alpha = 0;
|
_backButton.alpha = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -557,7 +557,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
||||||
|
|
||||||
- (void)imagePickerDelegateImage:(UIImage *)image info:(NSDictionary *)info {
|
- (void)imagePickerDelegateImage:(UIImage *)image info:(NSDictionary *)info {
|
||||||
// Dismiss popover on iPad
|
// Dismiss popover on iPad
|
||||||
if (LinphoneManager.runningOnIpad) {
|
if (IPAD) {
|
||||||
[VIEW(ImagePickerView).popoverController dismissPopoverAnimated:TRUE];
|
[VIEW(ImagePickerView).popoverController dismissPopoverAnimated:TRUE];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,7 @@ static void chatTable_free_chatrooms(void *data) {
|
||||||
data = [self sortChatRooms];
|
data = [self sortChatRooms];
|
||||||
[super loadData];
|
[super loadData];
|
||||||
|
|
||||||
|
if (IPAD) {
|
||||||
// reset conversation view since in fragment mode, conversations are relative to current data
|
// reset conversation view since in fragment mode, conversations are relative to current data
|
||||||
// select first conversation if any
|
// select first conversation if any
|
||||||
if ([self totalNumberOfItems] > 0) {
|
if ([self totalNumberOfItems] > 0) {
|
||||||
|
|
@ -119,6 +120,7 @@ static void chatTable_free_chatrooms(void *data) {
|
||||||
[PhoneMainView.instance changeCurrentView:ChatConversationCreateView.compositeViewDescription];
|
[PhoneMainView.instance changeCurrentView:ChatConversationCreateView.compositeViewDescription];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - UITableViewDataSource Functions
|
#pragma mark - UITableViewDataSource Functions
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -175,7 +175,7 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
|
|
||||||
// if we use fragments, remove back button
|
// if we use fragments, remove back button
|
||||||
if (LinphoneManager.runningOnIpad) {
|
if (IPAD) {
|
||||||
_backButton.hidden = YES;
|
_backButton.hidden = YES;
|
||||||
_backButton.alpha = 0;
|
_backButton.alpha = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -314,7 +314,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
||||||
|
|
||||||
- (void)imagePickerDelegateImage:(UIImage *)image info:(NSDictionary *)info {
|
- (void)imagePickerDelegateImage:(UIImage *)image info:(NSDictionary *)info {
|
||||||
// Dismiss popover on iPad
|
// Dismiss popover on iPad
|
||||||
if (LinphoneManager.runningOnIpad) {
|
if (IPAD) {
|
||||||
[VIEW(ImagePickerView).popoverController dismissPopoverAnimated:TRUE];
|
[VIEW(ImagePickerView).popoverController dismissPopoverAnimated:TRUE];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -144,13 +144,16 @@ static int ms_strcmpfuz(const char *fuzzy_word, const char *sentence) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[super loadData];
|
[super loadData];
|
||||||
|
if (IPAD) {
|
||||||
// reset details view since in fragment mode, details are relative to current data
|
// reset details view since in fragment mode, details are relative to current data
|
||||||
// select first contact if any
|
// select first contact if any
|
||||||
ABRecordRef contact =
|
ABRecordRef contact = ([self totalNumberOfItems] > 0)
|
||||||
([self totalNumberOfItems] > 0) ? [self contactForIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]] : nil;
|
? [self contactForIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]]
|
||||||
|
: nil;
|
||||||
ContactDetailsView *view = VIEW(ContactDetailsView);
|
ContactDetailsView *view = VIEW(ContactDetailsView);
|
||||||
[view setContact:contact];
|
[view setContact:contact];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info, void *context) {
|
static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info, void *context) {
|
||||||
ContactsListTableView *controller = (__bridge ContactsListTableView *)context;
|
ContactsListTableView *controller = (__bridge ContactsListTableView *)context;
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
||||||
LinphoneCallState state = (call != NULL) ? linphone_call_get_state(call) : 0;
|
LinphoneCallState state = (call != NULL) ? linphone_call_get_state(call) : 0;
|
||||||
[self callUpdate:call state:state];
|
[self callUpdate:call state:state];
|
||||||
|
|
||||||
if (LinphoneManager.runningOnIpad) {
|
if (IPAD) {
|
||||||
BOOL videoEnabled = linphone_core_video_display_enabled(lc);
|
BOOL videoEnabled = linphone_core_video_display_enabled(lc);
|
||||||
BOOL previewPref = [mgr lpConfigBoolForKey:@"preview_preference"];
|
BOOL previewPref = [mgr lpConfigBoolForKey:@"preview_preference"];
|
||||||
|
|
||||||
|
|
@ -176,7 +176,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
||||||
[[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(onOneLongClick:)];
|
[[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(onOneLongClick:)];
|
||||||
[oneButton addGestureRecognizer:oneLongGesture];
|
[oneButton addGestureRecognizer:oneLongGesture];
|
||||||
|
|
||||||
if (LinphoneManager.runningOnIpad) {
|
if (IPAD) {
|
||||||
if ([LinphoneManager instance].frontCamId != nil) {
|
if ([LinphoneManager instance].frontCamId != nil) {
|
||||||
// only show camera switch button if we have more than 1 camera
|
// only show camera switch button if we have more than 1 camera
|
||||||
[videoCameraSwitch setHidden:FALSE];
|
[videoCameraSwitch setHidden:FALSE];
|
||||||
|
|
@ -217,7 +217,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)coreUpdateEvent:(NSNotification *)notif {
|
- (void)coreUpdateEvent:(NSNotification *)notif {
|
||||||
if (LinphoneManager.runningOnIpad) {
|
if (IPAD) {
|
||||||
LinphoneCore *lc = [LinphoneManager getLc];
|
LinphoneCore *lc = [LinphoneManager getLc];
|
||||||
if (linphone_core_video_display_enabled(lc) && linphone_core_video_preview_enabled(lc)) {
|
if (linphone_core_video_display_enabled(lc) && linphone_core_video_preview_enabled(lc)) {
|
||||||
linphone_core_set_native_preview_window_id(lc, (__bridge void *)(videoPreview));
|
linphone_core_set_native_preview_window_id(lc, (__bridge void *)(videoPreview));
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
|
|
||||||
// if we use fragments, remove back button
|
// if we use fragments, remove back button
|
||||||
if (LinphoneManager.runningOnIpad) {
|
if (IPAD) {
|
||||||
_backButton.hidden = YES;
|
_backButton.hidden = YES;
|
||||||
_backButton.alpha = 0;
|
_backButton.alpha = 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,7 @@
|
||||||
|
|
||||||
[super loadData];
|
[super loadData];
|
||||||
|
|
||||||
|
if (IPAD) {
|
||||||
// reset details view since in fragment mode, details are relative to current data
|
// reset details view since in fragment mode, details are relative to current data
|
||||||
// select first log if any
|
// select first log if any
|
||||||
NSString *callId = nil;
|
NSString *callId = nil;
|
||||||
|
|
@ -155,6 +156,7 @@
|
||||||
HistoryDetailsView *view = VIEW(HistoryDetailsView);
|
HistoryDetailsView *view = VIEW(HistoryDetailsView);
|
||||||
[view setCallLogId:callId];
|
[view setCallLogId:callId];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void)computeSections {
|
- (void)computeSections {
|
||||||
NSArray *unsortedDays = [self.sections allKeys];
|
NSArray *unsortedDays = [self.sections allKeys];
|
||||||
|
|
@ -221,7 +223,7 @@
|
||||||
id log = [_sections objectForKey:_sortedDays[indexPath.section]][indexPath.row];
|
id log = [_sections objectForKey:_sortedDays[indexPath.section]][indexPath.row];
|
||||||
LinphoneCallLog *callLog = [log pointerValue];
|
LinphoneCallLog *callLog = [log pointerValue];
|
||||||
if (callLog != NULL && linphone_call_log_get_call_id(callLog) != NULL) {
|
if (callLog != NULL && linphone_call_log_get_call_id(callLog) != NULL) {
|
||||||
if (LinphoneManager.runningOnIpad) {
|
if (IPAD) {
|
||||||
UIHistoryCell *cell = (UIHistoryCell *)[self tableView:tableView cellForRowAtIndexPath:indexPath];
|
UIHistoryCell *cell = (UIHistoryCell *)[self tableView:tableView cellForRowAtIndexPath:indexPath];
|
||||||
[cell onDetails:self];
|
[cell onDetails:self];
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (self != nil) {
|
if (self != nil) {
|
||||||
pickerController = [[UIImagePickerController alloc] init];
|
pickerController = [[UIImagePickerController alloc] init];
|
||||||
if (LinphoneManager.runningOnIpad) {
|
if (IPAD) {
|
||||||
popoverController = [[UIPopoverController alloc] initWithContentViewController:pickerController];
|
popoverController = [[UIPopoverController alloc] initWithContentViewController:pickerController];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -172,7 +172,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
||||||
inView:(UIView *)ipadView {
|
inView:(UIView *)ipadView {
|
||||||
void (^block)(UIImagePickerControllerSourceType) = ^(UIImagePickerControllerSourceType type) {
|
void (^block)(UIImagePickerControllerSourceType) = ^(UIImagePickerControllerSourceType type) {
|
||||||
ImagePickerView *view = VIEW(ImagePickerView);
|
ImagePickerView *view = VIEW(ImagePickerView);
|
||||||
if (!(LinphoneManager.runningOnIpad && ipadView && ipadPopoverView)) {
|
if (!(IPAD && ipadView && ipadPopoverView)) {
|
||||||
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription push:TRUE];
|
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription push:TRUE];
|
||||||
}
|
}
|
||||||
view.sourceType = type;
|
view.sourceType = type;
|
||||||
|
|
@ -186,7 +186,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
||||||
view.allowsEditing = NO;
|
view.allowsEditing = NO;
|
||||||
view.imagePickerDelegate = delegate;
|
view.imagePickerDelegate = delegate;
|
||||||
|
|
||||||
if (LinphoneManager.runningOnIpad && ipadView && ipadPopoverView) {
|
if (IPAD && ipadView && ipadPopoverView) {
|
||||||
UIView *iterview = ipadPopoverView;
|
UIView *iterview = ipadPopoverView;
|
||||||
CGRect ipadPopoverPosition = iterview.frame;
|
CGRect ipadPopoverPosition = iterview.frame;
|
||||||
do {
|
do {
|
||||||
|
|
|
||||||
|
|
@ -1712,7 +1712,7 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) {
|
||||||
linphone_core_start_dtmf_stream(theLinphoneCore);
|
linphone_core_start_dtmf_stream(theLinphoneCore);
|
||||||
|
|
||||||
/*start the video preview in case we are in the main view*/
|
/*start the video preview in case we are in the main view*/
|
||||||
if (LinphoneManager.runningOnIpad && linphone_core_video_display_enabled(theLinphoneCore) &&
|
if (IPAD && linphone_core_video_display_enabled(theLinphoneCore) &&
|
||||||
[self lpConfigBoolForKey:@"preview_preference"]) {
|
[self lpConfigBoolForKey:@"preview_preference"]) {
|
||||||
linphone_core_enable_video_preview(theLinphoneCore, TRUE);
|
linphone_core_enable_video_preview(theLinphoneCore, TRUE);
|
||||||
}
|
}
|
||||||
|
|
@ -1770,7 +1770,7 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) {
|
||||||
- (void)copyDefaultSettings {
|
- (void)copyDefaultSettings {
|
||||||
NSString *src = [LinphoneManager bundleFile:@"linphonerc"];
|
NSString *src = [LinphoneManager bundleFile:@"linphonerc"];
|
||||||
NSString *srcIpad = [LinphoneManager bundleFile:@"linphonerc~ipad"];
|
NSString *srcIpad = [LinphoneManager bundleFile:@"linphonerc~ipad"];
|
||||||
if (LinphoneManager.runningOnIpad && [[NSFileManager defaultManager] fileExistsAtPath:srcIpad]) {
|
if (IPAD && [[NSFileManager defaultManager] fileExistsAtPath:srcIpad]) {
|
||||||
src = srcIpad;
|
src = srcIpad;
|
||||||
}
|
}
|
||||||
NSString *dst = [LinphoneManager documentFile:@"linphonerc"];
|
NSString *dst = [LinphoneManager documentFile:@"linphonerc"];
|
||||||
|
|
@ -1780,7 +1780,7 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) {
|
||||||
- (void)overrideDefaultSettings {
|
- (void)overrideDefaultSettings {
|
||||||
NSString *factory = [LinphoneManager bundleFile:@"linphonerc-factory"];
|
NSString *factory = [LinphoneManager bundleFile:@"linphonerc-factory"];
|
||||||
NSString *factoryIpad = [LinphoneManager bundleFile:@"linphonerc-factory~ipad"];
|
NSString *factoryIpad = [LinphoneManager bundleFile:@"linphonerc-factory~ipad"];
|
||||||
if (LinphoneManager.runningOnIpad && [[NSFileManager defaultManager] fileExistsAtPath:factoryIpad]) {
|
if (IPAD && [[NSFileManager defaultManager] fileExistsAtPath:factoryIpad]) {
|
||||||
factory = factoryIpad;
|
factory = factoryIpad;
|
||||||
}
|
}
|
||||||
NSString *confiFileName = [LinphoneManager documentFile:@"linphonerc"];
|
NSString *confiFileName = [LinphoneManager documentFile:@"linphonerc"];
|
||||||
|
|
@ -1797,7 +1797,7 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) {
|
||||||
NSString *route = (__bridge NSString *)lNewRoute;
|
NSString *route = (__bridge NSString *)lNewRoute;
|
||||||
notallow = [route isEqualToString:@"Headset"] || [route isEqualToString:@"Headphone"] ||
|
notallow = [route isEqualToString:@"Headset"] || [route isEqualToString:@"Headphone"] ||
|
||||||
[route isEqualToString:@"HeadphonesAndMicrophone"] || [route isEqualToString:@"HeadsetInOut"] ||
|
[route isEqualToString:@"HeadphonesAndMicrophone"] || [route isEqualToString:@"HeadsetInOut"] ||
|
||||||
[route isEqualToString:@"Lineout"] || LinphoneManager.runningOnIpad;
|
[route isEqualToString:@"Lineout"] || IPAD;
|
||||||
CFRelease(lNewRoute);
|
CFRelease(lNewRoute);
|
||||||
}
|
}
|
||||||
return !notallow;
|
return !notallow;
|
||||||
|
|
@ -1821,7 +1821,7 @@ static void audioRouteChangeListenerCallback(void *inUserData, // 1
|
||||||
LOGI(@"Current audio route is [%s]", [route UTF8String]);
|
LOGI(@"Current audio route is [%s]", [route UTF8String]);
|
||||||
|
|
||||||
speakerEnabled = [route isEqualToString:@"Speaker"] || [route isEqualToString:@"SpeakerAndMicrophone"];
|
speakerEnabled = [route isEqualToString:@"Speaker"] || [route isEqualToString:@"SpeakerAndMicrophone"];
|
||||||
if (!LinphoneManager.runningOnIpad && [route isEqualToString:@"HeadsetBT"] && !speakerEnabled) {
|
if (!IPAD && [route isEqualToString:@"HeadsetBT"] && !speakerEnabled) {
|
||||||
lm.bluetoothEnabled = TRUE;
|
lm.bluetoothEnabled = TRUE;
|
||||||
lm.bluetoothAvailable = TRUE;
|
lm.bluetoothAvailable = TRUE;
|
||||||
NSDictionary *dict = [NSDictionary
|
NSDictionary *dict = [NSDictionary
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment identifier="iOS"/>
|
<deployment identifier="iOS"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<objects>
|
<objects>
|
||||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="UIChatCell">
|
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="UIChatCell">
|
||||||
|
|
@ -23,12 +23,10 @@
|
||||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" image="avatar.png" id="19" userLabel="avatarImage" customClass="UIRoundedImageView">
|
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" image="avatar.png" id="19" userLabel="avatarImage" customClass="UIRoundedImageView">
|
||||||
<rect key="frame" x="8" y="2" width="43" height="43"/>
|
<rect key="frame" x="8" y="2" width="43" height="43"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
<animations/>
|
|
||||||
</imageView>
|
</imageView>
|
||||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" text="11:15" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" minimumFontSize="1" id="r7A-Mk-LQX" userLabel="chatLatestTimeLabel">
|
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" text="11:15" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" minimumFontSize="1" id="r7A-Mk-LQX" userLabel="chatLatestTimeLabel">
|
||||||
<rect key="frame" x="8" y="45" width="43" height="15"/>
|
<rect key="frame" x="8" y="45" width="43" height="15"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
<animations/>
|
|
||||||
<accessibility key="accessibilityConfiguration" label=""/>
|
<accessibility key="accessibilityConfiguration" label=""/>
|
||||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="25"/>
|
<fontDescription key="fontDescription" type="boldSystem" pointSize="25"/>
|
||||||
<color key="textColor" red="1" green="0.36862745099999999" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
<color key="textColor" red="1" green="0.36862745099999999" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
|
|
@ -37,7 +35,6 @@
|
||||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" text="John Doe" lineBreakMode="tailTruncation" minimumFontSize="10" adjustsFontSizeToFit="NO" id="20" userLabel="addressLabel">
|
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" text="John Doe" lineBreakMode="tailTruncation" minimumFontSize="10" adjustsFontSizeToFit="NO" id="20" userLabel="addressLabel">
|
||||||
<rect key="frame" x="59" y="0.0" width="275" height="31"/>
|
<rect key="frame" x="59" y="0.0" width="275" height="31"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
<animations/>
|
|
||||||
<accessibility key="accessibilityConfiguration" label="Contact name"/>
|
<accessibility key="accessibilityConfiguration" label="Contact name"/>
|
||||||
<fontDescription key="fontDescription" type="system" pointSize="25"/>
|
<fontDescription key="fontDescription" type="system" pointSize="25"/>
|
||||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||||
|
|
@ -46,25 +43,22 @@
|
||||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" text="This is a placeholder message" lineBreakMode="tailTruncation" numberOfLines="3" adjustsFontSizeToFit="NO" id="21" userLabel="chatContentLabel">
|
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" text="This is a placeholder message" lineBreakMode="tailTruncation" numberOfLines="3" adjustsFontSizeToFit="NO" id="21" userLabel="chatContentLabel">
|
||||||
<rect key="frame" x="59" y="31" width="316" height="29"/>
|
<rect key="frame" x="59" y="31" width="316" height="29"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES"/>
|
||||||
<animations/>
|
|
||||||
<accessibility key="accessibilityConfiguration" label="Message"/>
|
<accessibility key="accessibilityConfiguration" label="Message"/>
|
||||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||||
<nil key="highlightedColor"/>
|
<nil key="highlightedColor"/>
|
||||||
</label>
|
</label>
|
||||||
<view autoresizesSubviews="NO" userInteractionEnabled="NO" tag="7" contentMode="scaleToFill" id="7DE-KJ-9Q3" userLabel="unreadCountView" customClass="UIBouncingView">
|
<view hidden="YES" autoresizesSubviews="NO" userInteractionEnabled="NO" tag="7" contentMode="scaleToFill" id="7DE-KJ-9Q3" userLabel="unreadCountView" customClass="UIBouncingView">
|
||||||
<rect key="frame" x="350" y="7" width="21" height="22"/>
|
<rect key="frame" x="350" y="7" width="21" height="22"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<imageView userInteractionEnabled="NO" tag="8" contentMode="scaleAspectFit" image="history_chat_indicator.png" id="NXj-A8-YLh" userLabel="unreadCountImage">
|
<imageView userInteractionEnabled="NO" tag="8" contentMode="scaleAspectFit" image="history_chat_indicator.png" id="NXj-A8-YLh" userLabel="unreadCountImage">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="21" height="21"/>
|
<rect key="frame" x="0.0" y="0.0" width="21" height="21"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
<animations/>
|
|
||||||
</imageView>
|
</imageView>
|
||||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="9" contentMode="left" text="99" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="7" id="ZXq-Do-7Ua" userLabel="unreadCountLabel">
|
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="9" contentMode="left" text="99" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="7" id="ZXq-Do-7Ua" userLabel="unreadCountLabel">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="21" height="21"/>
|
<rect key="frame" x="0.0" y="0.0" width="21" height="21"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
<animations/>
|
|
||||||
<accessibility key="accessibilityConfiguration" label="Missed message(s)">
|
<accessibility key="accessibilityConfiguration" label="Missed message(s)">
|
||||||
<accessibilityTraits key="traits" none="YES"/>
|
<accessibilityTraits key="traits" none="YES"/>
|
||||||
</accessibility>
|
</accessibility>
|
||||||
|
|
@ -73,11 +67,9 @@
|
||||||
<nil key="highlightedColor"/>
|
<nil key="highlightedColor"/>
|
||||||
</label>
|
</label>
|
||||||
</subviews>
|
</subviews>
|
||||||
<animations/>
|
|
||||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||||
</view>
|
</view>
|
||||||
</subviews>
|
</subviews>
|
||||||
<animations/>
|
|
||||||
<nil key="simulatedStatusBarMetrics"/>
|
<nil key="simulatedStatusBarMetrics"/>
|
||||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||||
<point key="canvasLocation" x="156.5" y="240"/>
|
<point key="canvasLocation" x="156.5" y="240"/>
|
||||||
|
|
|
||||||
|
|
@ -116,9 +116,9 @@
|
||||||
[UIView setAnimationDuration:0.3];
|
[UIView setAnimationDuration:0.3];
|
||||||
}
|
}
|
||||||
if (editing) {
|
if (editing) {
|
||||||
[_unreadCountButton setAlpha:0.0f];
|
[_unreadCountView setAlpha:0.0f];
|
||||||
} else {
|
} else {
|
||||||
[_unreadCountButton setAlpha:1.0f];
|
[_unreadCountView setAlpha:1.0f];
|
||||||
}
|
}
|
||||||
if (animated) {
|
if (animated) {
|
||||||
[UIView commitAnimations];
|
[UIView commitAnimations];
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@
|
||||||
self.fullscreen = fullscreen;
|
self.fullscreen = fullscreen;
|
||||||
self.landscapeMode = YES;
|
self.landscapeMode = YES;
|
||||||
self.portraitMode = YES;
|
self.portraitMode = YES;
|
||||||
self.otherFragment = LinphoneManager.runningOnIpad ? NSStringFromClass(otherFragment) : nil;
|
self.otherFragment = IPAD ? NSStringFromClass(otherFragment) : nil;
|
||||||
self.isLeftFragment = isLeftFragment || (self.otherFragment == nil);
|
self.isLeftFragment = isLeftFragment || (self.otherFragment == nil);
|
||||||
self.darkBackground = true;
|
self.darkBackground = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
[self addSubview:sub];
|
[self addSubview:sub];
|
||||||
|
|
||||||
// Sections are wider on iPad and overlap linphone image - let's move it a bit
|
// Sections are wider on iPad and overlap linphone image - let's move it a bit
|
||||||
if (LinphoneManager.runningOnIpad) {
|
if (IPAD) {
|
||||||
CGRect frame = _linphoneImage.frame;
|
CGRect frame = _linphoneImage.frame;
|
||||||
frame.origin.x -= frame.size.width / 2;
|
frame.origin.x -= frame.size.width / 2;
|
||||||
_linphoneImage.frame = frame;
|
_linphoneImage.frame = frame;
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
UIView *sub = ((UIView *)[arrayOfViews objectAtIndex:0]);
|
UIView *sub = ((UIView *)[arrayOfViews objectAtIndex:0]);
|
||||||
[self setFrame:CGRectMake(0, 0, sub.frame.size.width, sub.frame.size.height)];
|
[self setFrame:CGRectMake(0, 0, sub.frame.size.width, sub.frame.size.height)];
|
||||||
[self addSubview:sub];
|
[self addSubview:sub];
|
||||||
_detailsButton.hidden = LinphoneManager.runningOnIpad;
|
_detailsButton.hidden = IPAD;
|
||||||
callLog = NULL;
|
callLog = NULL;
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
- (void)addDoneButton {
|
- (void)addDoneButton {
|
||||||
// actually on iPad there is a done button
|
// actually on iPad there is a done button
|
||||||
if (!LinphoneManager.runningOnIpad) {
|
if (!IPAD) {
|
||||||
UIToolbar *numberToolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 320, 50)];
|
UIToolbar *numberToolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 320, 50)];
|
||||||
numberToolbar.items = [NSArray
|
numberToolbar.items = [NSArray
|
||||||
arrayWithObjects:[[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Cancel", nil)
|
arrayWithObjects:[[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Cancel", nil)
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ static RootViewManager *rootViewManagerInstance = nil;
|
||||||
|
|
||||||
// not sure what this code was doing... but since iphone does support rotation as well now...
|
// not sure what this code was doing... but since iphone does support rotation as well now...
|
||||||
#if 0
|
#if 0
|
||||||
if (LinphoneManager.runningOnIpad)
|
if (IPAD)
|
||||||
return currentViewController;
|
return currentViewController;
|
||||||
|
|
||||||
PhoneMainView *newMainView = description.landscapeMode ? self.rotatingViewController : self.portraitViewController;
|
PhoneMainView *newMainView = description.landscapeMode ? self.rotatingViewController : self.portraitViewController;
|
||||||
|
|
|
||||||
|
|
@ -583,7 +583,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
||||||
[hiddenKeys addObject:@"console_button"];
|
[hiddenKeys addObject:@"console_button"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!LinphoneManager.runningOnIpad) {
|
if (!IPAD) {
|
||||||
[hiddenKeys addObject:@"preview_preference"];
|
[hiddenKeys addObject:@"preview_preference"];
|
||||||
}
|
}
|
||||||
if ([lm lpConfigBoolForKey:@"hide_run_assistant_preference"]) {
|
if ([lm lpConfigBoolForKey:@"hide_run_assistant_preference"]) {
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@
|
||||||
|
|
||||||
- (IBAction)onAvatarClick:(id)sender {
|
- (IBAction)onAvatarClick:(id)sender {
|
||||||
// hide ourself because we are on top of image picker
|
// hide ourself because we are on top of image picker
|
||||||
if (!LinphoneManager.runningOnIpad) {
|
if (!IPAD) {
|
||||||
[PhoneMainView.instance.mainViewController hideSideMenu:YES];
|
[PhoneMainView.instance.mainViewController hideSideMenu:YES];
|
||||||
}
|
}
|
||||||
[ImagePickerView SelectImageFromDevice:self atPosition:_avatarImage inView:self.view];
|
[ImagePickerView SelectImageFromDevice:self atPosition:_avatarImage inView:self.view];
|
||||||
|
|
@ -95,7 +95,7 @@
|
||||||
|
|
||||||
- (void)imagePickerDelegateImage:(UIImage *)image info:(NSDictionary *)info {
|
- (void)imagePickerDelegateImage:(UIImage *)image info:(NSDictionary *)info {
|
||||||
// Dismiss popover on iPad
|
// Dismiss popover on iPad
|
||||||
if (LinphoneManager.runningOnIpad) {
|
if (IPAD) {
|
||||||
[VIEW(ImagePickerView).popoverController dismissPopoverAnimated:TRUE];
|
[VIEW(ImagePickerView).popoverController dismissPopoverAnimated:TRUE];
|
||||||
} else {
|
} else {
|
||||||
[PhoneMainView.instance.mainViewController hideSideMenu:NO];
|
[PhoneMainView.instance.mainViewController hideSideMenu:NO];
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,15 @@
|
||||||
|
|
||||||
#import "LinphoneManager.h"
|
#import "LinphoneManager.h"
|
||||||
|
|
||||||
|
#define LOGV(level, ...) [LinphoneLogger log:level file:__FILE__ line:__LINE__ format:__VA_ARGS__]
|
||||||
|
#define LOGD(...) LOGV(ORTP_DEBUG, __VA_ARGS__)
|
||||||
|
#define LOGI(...) LOGV(ORTP_MESSAGE, __VA_ARGS__)
|
||||||
|
#define LOGW(...) LOGV(ORTP_WARNING, __VA_ARGS__)
|
||||||
|
#define LOGE(...) LOGV(ORTP_ERROR, __VA_ARGS__)
|
||||||
|
#define LOGF(...) LOGV(ORTP_FATAL, __VA_ARGS__)
|
||||||
|
|
||||||
|
#define IPAD (LinphoneManager.runningOnIpad)
|
||||||
|
|
||||||
@interface LinphoneLogger : NSObject {
|
@interface LinphoneLogger : NSObject {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -58,13 +67,6 @@ typedef enum {
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#define LOGV(level, ...) [LinphoneLogger log:level file:__FILE__ line:__LINE__ format:__VA_ARGS__]
|
|
||||||
#define LOGD(...) LOGV(ORTP_DEBUG, __VA_ARGS__)
|
|
||||||
#define LOGI(...) LOGV(ORTP_MESSAGE, __VA_ARGS__)
|
|
||||||
#define LOGW(...) LOGV(ORTP_WARNING, __VA_ARGS__)
|
|
||||||
#define LOGE(...) LOGV(ORTP_ERROR, __VA_ARGS__)
|
|
||||||
#define LOGF(...) LOGV(ORTP_FATAL, __VA_ARGS__)
|
|
||||||
|
|
||||||
@interface NSString(md5)
|
@interface NSString(md5)
|
||||||
|
|
||||||
- (NSString *)md5;
|
- (NSString *)md5;
|
||||||
|
|
|
||||||
|
|
@ -6,3 +6,5 @@
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#import "Utils.h"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue