From 817f686157471a1bf492dfd2e2239ebe1ac17bc5 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Tue, 16 Oct 2012 16:54:19 +0200 Subject: [PATCH] Update chat list --- Classes/LinphoneUI/UIChatCell.m | 35 +-- Classes/LinphoneUI/UIChatCell.xib | 209 ++++++++++++------ Classes/en.lproj/ChatViewController.xib | 103 ++++++++- Classes/fr.lproj/ChatViewController.xib | 109 ++++++++- linphone.ldb/Contents.plist | 12 +- .../{16 => 17}/ChatViewController.xib | 103 ++++++++- 6 files changed, 441 insertions(+), 130 deletions(-) rename linphone.ldb/Resources/Classes/ChatViewController/{16 => 17}/ChatViewController.xib (82%) diff --git a/Classes/LinphoneUI/UIChatCell.m b/Classes/LinphoneUI/UIChatCell.m index f95a2fc56..1ecac8e96 100644 --- a/Classes/LinphoneUI/UIChatCell.m +++ b/Classes/LinphoneUI/UIChatCell.m @@ -44,6 +44,7 @@ if ([arrayOfViews count] >= 1) { [self addSubview:[[arrayOfViews objectAtIndex:0] retain]]; } + [chatContentLabel setAdjustsFontSizeToFitWidth:TRUE]; // Auto shrink: IB lack! } return self; } @@ -129,40 +130,6 @@ linphone_address_destroy(linphoneAddress); } -- (void)layoutSubviews { - [super layoutSubviews]; - // - // Adapt size - // - CGRect displayNameFrame = [addressLabel frame]; - CGRect chatContentFrame = [chatContentLabel frame]; - - // Compute firstName size - CGSize displayNameSize = [[addressLabel text] sizeWithFont:[addressLabel font]]; - CGSize chatContentSize = [[chatContentLabel text] sizeWithFont:[chatContentLabel font]]; - float sum = displayNameSize.width + 5 + chatContentSize.width; - float limit = self.bounds.size.width - 5 - displayNameFrame.origin.x; - if(sum > limit) { - displayNameSize.width *= limit/sum; - chatContentSize.width *= limit/sum; - if(displayNameSize.width > limit/2) { - displayNameSize.width = limit/2; - chatContentSize.width = limit/2; - } - } - - displayNameFrame.size.width = displayNameSize.width; - chatContentFrame.size.width = chatContentSize.width; - - // Compute lastName size & position - chatContentFrame.origin.x = displayNameFrame.origin.x + displayNameFrame.size.width; - if(displayNameFrame.size.width) - chatContentFrame.origin.x += 5; - - [addressLabel setFrame: displayNameFrame]; - [chatContentLabel setFrame: chatContentFrame]; -} - - (void)setEditing:(BOOL)editing { [self setEditing:editing animated:FALSE]; } diff --git a/Classes/LinphoneUI/UIChatCell.xib b/Classes/LinphoneUI/UIChatCell.xib index 78812d464..f97b66e98 100644 --- a/Classes/LinphoneUI/UIChatCell.xib +++ b/Classes/LinphoneUI/UIChatCell.xib @@ -2,9 +2,9 @@ 1536 - 11E53 + 11G56 2840 - 1138.47 + 1138.51 569.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -35,13 +35,14 @@ - 274 + 256 292 {{10, 8}, {27, 27}} + _NS:9 NO @@ -54,8 +55,9 @@ 274 - {{45, 0}, {60, 44}} + {{45, 2}, {235, 25}} + _NS:328 NO @@ -90,8 +92,9 @@ 274 - {{110, 0}, {170, 44}} + {{45, 27}, {235, 33}} + _NS:328 NO @@ -108,6 +111,7 @@ 1 10 + 2 1 12 @@ -118,12 +122,80 @@ 16 NO + 235 + + + + 257 + + + + 274 + {{10, 12}, {24, 20}} + + + + _NS:9 + NO + IBCocoaTouchFramework + + NSImage + bubble.png + + + + + 292 + {{12, 10}, {20, 20}} + + + + _NS:9 + NO + YES + 7 + NO + IBCocoaTouchFramework + 3 + + 1 + MSAxIDEAA + + 1 + + + + 0 + 9 + 1 + + 1 + 14 + + + Helvetica + 14 + 16 + + + + {{276, 8}, {44, 44}} + + + + _NS:9 + + 3 + MCAwAA + + IBCocoaTouchFramework 257 - {{276, 0}, {44, 44}} + {{276, 8}, {44, 44}} + _NS:9 NO @@ -157,71 +229,10 @@ 16 - - - 257 - - - - 274 - {{10, 12}, {24, 20}} - - - _NS:9 - NO - IBCocoaTouchFramework - - NSImage - bubble.png - - - - - 292 - {{12, 10}, {20, 20}} - - _NS:9 - NO - YES - 7 - NO - IBCocoaTouchFramework - 3 - - 1 - MSAxIDEAA - - 1 - - - - 0 - 9 - 1 - - 1 - 14 - - - Helvetica - 14 - 16 - - - - {{276, 0}, {44, 44}} - - - _NS:9 - - 3 - MCAwAA - - IBCocoaTouchFramework - - {320, 44} + {320, 60} + _NS:9 @@ -314,8 +325,8 @@ - + @@ -389,7 +400,63 @@ 43 - + + + + UIChatCell + UITableViewCell + + onDeleteClick: + id + + + onDeleteClick: + + onDeleteClick: + id + + + + UILabel + UIImageView + UILabel + UIButton + UILabel + UIView + + + + addressLabel + UILabel + + + avatarImage + UIImageView + + + chatContentLabel + UILabel + + + deleteButton + UIButton + + + unreadMessageLabel + UILabel + + + unreadMessageView + UIView + + + + IBProjectSource + ./Classes/UIChatCell.h + + + + 0 IBCocoaTouchFramework YES diff --git a/Classes/en.lproj/ChatViewController.xib b/Classes/en.lproj/ChatViewController.xib index aae2a8c7b..d524c9766 100644 --- a/Classes/en.lproj/ChatViewController.xib +++ b/Classes/en.lproj/ChatViewController.xib @@ -2,9 +2,9 @@ 1536 - 11E53 + 11G56 2840 - 1138.47 + 1138.51 569.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -48,6 +48,7 @@ 290 {320, 44} + _NS:9 NO @@ -62,6 +63,7 @@ 292 {160, 44} + _NS:9 NO @@ -112,6 +114,7 @@ 289 {{160, 0}, {160, 44}} + _NS:9 NO @@ -153,6 +156,7 @@ {320, 44} + _NS:9 @@ -169,6 +173,8 @@ 274 {{0, 79}, {320, 381}} + + _NS:9 3 @@ -192,7 +198,7 @@ 0 YES - 44 + 60 22 22 @@ -201,6 +207,7 @@ 290 {{2, 44}, {316, 35}} + _NS:9 @@ -244,6 +251,7 @@ {320, 460} + _NS:9 @@ -450,7 +458,94 @@ 28 - + + + + ChatTableViewController + UITableViewController + + IBProjectSource + ./Classes/ChatTableViewController.h + + + + ChatViewController + UIViewController + + id + id + + + + onAddClick: + id + + + onEditClick: + id + + + + UITextField + UIToggleButton + ChatTableViewController + + + + addressField + UITextField + + + editButton + UIToggleButton + + + tableController + ChatTableViewController + + + + IBProjectSource + ./Classes/ChatViewController.h + + + + TUNinePatch + NSObject + + IBProjectSource + ./Classes/TUNinePatch.h + + + + UILinphoneTextField + UITextField + + backgroundNinePatch + TUNinePatch + + + backgroundNinePatch + + backgroundNinePatch + TUNinePatch + + + + IBProjectSource + ./Classes/UILinphoneTextField.h + + + + UIToggleButton + UIButton + + IBProjectSource + ./Classes/UIToggleButton.h + + + + 0 IBCocoaTouchFramework YES diff --git a/Classes/fr.lproj/ChatViewController.xib b/Classes/fr.lproj/ChatViewController.xib index a305f9d93..5fd2b5997 100644 --- a/Classes/fr.lproj/ChatViewController.xib +++ b/Classes/fr.lproj/ChatViewController.xib @@ -1,22 +1,22 @@ - 1280 - 11E53 - 1938 - 1138.47 + 1536 + 11G56 + 2840 + 1138.51 569.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 933 + 1926 + IBProxyObject IBUIButton IBUIImageView - IBProxyObject - IBUITextField - IBUITableViewController IBUITableView + IBUITableViewController + IBUITextField IBUIView @@ -192,7 +192,7 @@ 0 YES - 44 + 60 22 22 @@ -449,7 +449,94 @@ 28 - + + + + ChatTableViewController + UITableViewController + + IBProjectSource + ./Classes/ChatTableViewController.h + + + + ChatViewController + UIViewController + + id + id + + + + onAddClick: + id + + + onEditClick: + id + + + + UITextField + UIToggleButton + ChatTableViewController + + + + addressField + UITextField + + + editButton + UIToggleButton + + + tableController + ChatTableViewController + + + + IBProjectSource + ./Classes/ChatViewController.h + + + + TUNinePatch + NSObject + + IBProjectSource + ./Classes/TUNinePatch.h + + + + UILinphoneTextField + UITextField + + backgroundNinePatch + TUNinePatch + + + backgroundNinePatch + + backgroundNinePatch + TUNinePatch + + + + IBProjectSource + ./Classes/UILinphoneTextField.h + + + + UIToggleButton + UIButton + + IBProjectSource + ./Classes/UIToggleButton.h + + + + 0 IBCocoaTouchFramework YES @@ -463,6 +550,6 @@ {542, 88} {5, 88} - 933 + 1926 diff --git a/linphone.ldb/Contents.plist b/linphone.ldb/Contents.plist index e08e48542..5c3c4c0a9 100644 --- a/linphone.ldb/Contents.plist +++ b/linphone.ldb/Contents.plist @@ -803,17 +803,17 @@ backup - 16 + 17 class BLWrapperHandle name - Classes/ChatViewController/16/ChatViewController.xib + Classes/ChatViewController/17/ChatViewController.xib change date - 2012-09-25T09:16:19Z + 2012-10-16T14:43:40Z changed values class @@ -823,7 +823,7 @@ flags 0 hash - 7505ccd2bea1c762e561f35644e6dffe + 7e5a8ab77b42e6a8f401a59751110598 name ChatViewController.xib @@ -1038,9 +1038,9 @@ versions en - 16 + 17 fr - 16 + 17 diff --git a/linphone.ldb/Resources/Classes/ChatViewController/16/ChatViewController.xib b/linphone.ldb/Resources/Classes/ChatViewController/17/ChatViewController.xib similarity index 82% rename from linphone.ldb/Resources/Classes/ChatViewController/16/ChatViewController.xib rename to linphone.ldb/Resources/Classes/ChatViewController/17/ChatViewController.xib index aae2a8c7b..d524c9766 100644 --- a/linphone.ldb/Resources/Classes/ChatViewController/16/ChatViewController.xib +++ b/linphone.ldb/Resources/Classes/ChatViewController/17/ChatViewController.xib @@ -2,9 +2,9 @@ 1536 - 11E53 + 11G56 2840 - 1138.47 + 1138.51 569.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -48,6 +48,7 @@ 290 {320, 44} + _NS:9 NO @@ -62,6 +63,7 @@ 292 {160, 44} + _NS:9 NO @@ -112,6 +114,7 @@ 289 {{160, 0}, {160, 44}} + _NS:9 NO @@ -153,6 +156,7 @@ {320, 44} + _NS:9 @@ -169,6 +173,8 @@ 274 {{0, 79}, {320, 381}} + + _NS:9 3 @@ -192,7 +198,7 @@ 0 YES - 44 + 60 22 22 @@ -201,6 +207,7 @@ 290 {{2, 44}, {316, 35}} + _NS:9 @@ -244,6 +251,7 @@ {320, 460} + _NS:9 @@ -450,7 +458,94 @@ 28 - + + + + ChatTableViewController + UITableViewController + + IBProjectSource + ./Classes/ChatTableViewController.h + + + + ChatViewController + UIViewController + + id + id + + + + onAddClick: + id + + + onEditClick: + id + + + + UITextField + UIToggleButton + ChatTableViewController + + + + addressField + UITextField + + + editButton + UIToggleButton + + + tableController + ChatTableViewController + + + + IBProjectSource + ./Classes/ChatViewController.h + + + + TUNinePatch + NSObject + + IBProjectSource + ./Classes/TUNinePatch.h + + + + UILinphoneTextField + UITextField + + backgroundNinePatch + TUNinePatch + + + backgroundNinePatch + + backgroundNinePatch + TUNinePatch + + + + IBProjectSource + ./Classes/UILinphoneTextField.h + + + + UIToggleButton + UIButton + + IBProjectSource + ./Classes/UIToggleButton.h + + + + 0 IBCocoaTouchFramework YES