forked from mirrors/linphone-iphone
UICompositeView.m: fix invalid Y origin for side menu
This commit is contained in:
parent
1ded3faae2
commit
6e7f9b6f7d
2 changed files with 10 additions and 10 deletions
|
|
@ -584,10 +584,10 @@
|
|||
|
||||
// 2. side menu - fixed size, always starting below status bar (hack: except in fullscreen)
|
||||
CGRect sideMenuFrame = viewFrame;
|
||||
sideMenuFrame.origin.y = origin + (currentViewDescription.fullscreen ? 0 : statusBarFrame.size.height);
|
||||
sideMenuFrame.origin.y = origin - (currentViewDescription.fullscreen ? statusBarFrame.size.height : 0);
|
||||
sideMenuFrame.size.height -= sideMenuFrame.origin.y;
|
||||
if (!currentViewDescription.sideMenuEnabled) {
|
||||
// really hide; -width won't be enough since some animations may use this...
|
||||
// hack bis: really hide; -width won't be enough since some animations may use this...
|
||||
sideMenuFrame.origin.x = -3 * sideMenuFrame.size.width;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -277,21 +277,21 @@ void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info, void
|
|||
- (BOOL)saveContact:(Contact *)contact {
|
||||
CFErrorRef error = NULL;
|
||||
if (ABRecordGetRecordID(contact.person) == kABRecordInvalidID) {
|
||||
ABAddressBookAddRecord(addressBook, contact.person, (CFErrorRef *)&error);
|
||||
if (error != NULL) {
|
||||
LOGE(@"Add contact %p: Fail(%@)", contact.person, [(__bridge NSError *)error localizedDescription]);
|
||||
} else {
|
||||
if (ABAddressBookAddRecord(addressBook, contact.person, (CFErrorRef *)&error)) {
|
||||
LOGI(@"Add contact %p: Success!", contact.person);
|
||||
} else {
|
||||
LOGE(@"Add contact %p: Fail(%@)", contact.person, [(__bridge NSError *)error localizedDescription]);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
// Save address book
|
||||
error = NULL;
|
||||
ABAddressBookSave(addressBook, &error);
|
||||
if (error != NULL) {
|
||||
LOGE(@"Save AddressBook: Fail(%@)", [(__bridge NSError *)error localizedDescription]);
|
||||
} else {
|
||||
if (ABAddressBookSave(addressBook, &error)) {
|
||||
LOGI(@"Save AddressBook: Success!");
|
||||
} else {
|
||||
LOGE(@"Save AddressBook: Fail(%@)", [(__bridge NSError *)error localizedDescription]);
|
||||
return FALSE;
|
||||
}
|
||||
[self reload];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue