diff --git a/Classes/ChatRoomViewController.h b/Classes/ChatRoomViewController.h
index b97262562..578301aab 100644
--- a/Classes/ChatRoomViewController.h
+++ b/Classes/ChatRoomViewController.h
@@ -52,12 +52,14 @@
@property (nonatomic, retain) IBOutlet UIView *messageView;
@property (nonatomic, retain) IBOutlet UIImageView *messageBackgroundImage;
@property (nonatomic, retain) IBOutlet UIImageView *footerBackgroundImage;
+@property (nonatomic, retain) IBOutlet UITapGestureRecognizer *listTapGestureRecognizer;
+
@property (nonatomic, copy) NSString *remoteAddress;
@property (nonatomic, retain) IBOutlet UIButton* pictButton;
@property (nonatomic, retain) IBOutlet UIButton* cancelTransfertButton;
@property (nonatomic, retain) IBOutlet UIProgressView* imageTransferProgressBar;
@property (nonatomic, retain) IBOutlet UIView* transfertView;
-@property (nonatomic, retain) IBOutlet UIView* fieldBackgroundImage;
+
- (IBAction)onBackClick:(id)event;
- (IBAction)onEditClick:(id)event;
diff --git a/Classes/ChatRoomViewController.m b/Classes/ChatRoomViewController.m
index 049970f40..ffd1b36fb 100644
--- a/Classes/ChatRoomViewController.m
+++ b/Classes/ChatRoomViewController.m
@@ -42,11 +42,11 @@
@synthesize messageView;
@synthesize messageBackgroundImage;
@synthesize footerBackgroundImage;
+@synthesize listTapGestureRecognizer;
@synthesize pictButton;
@synthesize imageTransferProgressBar;
@synthesize cancelTransfertButton;
@synthesize transfertView;
-@synthesize fieldBackgroundImage;
#pragma mark - Lifecycle Functions
- (id)init {
@@ -71,6 +71,11 @@
[messageView release];
[messageBackgroundImage release];
[footerBackgroundImage release];
+ [listTapGestureRecognizer release];
+ [transfertView release];
+ [pictButton release];
+ [imageTransferProgressBar release];
+ [cancelTransfertButton release];
[super dealloc];
}
@@ -148,7 +153,7 @@ static UICompositeViewDescription *compositeDescription = nil;
&& [[[LinphoneManager instance] lpConfigStringForKey:@"file_upload_url_preference"] length]>0 ;
[pictButton setHidden:!fileSharingEnabled];
- CGRect frame = transfertView.frame;
+ CGRect frame = messageView.frame;
if (fileSharingEnabled) {
frame.origin.x=61;
frame.size.width=175;
@@ -156,7 +161,8 @@ static UICompositeViewDescription *compositeDescription = nil;
frame.origin.x=0;
frame.size.width=175+61;
}
- [transfertView setFrame:frame];
+ [messageView setFrame:frame];
+
}
- (void)viewWillDisappear:(BOOL)animated {
@@ -330,6 +336,15 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
#pragma mark - UITextFieldDelegate Functions
+- (BOOL)growingTextViewShouldBeginEditing:(HPGrowingTextView *)growingTextView {
+ if(editButton.selected) {
+ [tableController setEditing:FALSE animated:TRUE];
+ [editButton setOff];
+ [listTapGestureRecognizer setEnabled:TRUE];
+ }
+ return TRUE;
+}
+
- (void)growingTextView:(HPGrowingTextView *)growingTextView willChangeHeight:(float)height {
int diff = height - growingTextView.bounds.size.height;
@@ -361,6 +376,7 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
}
- (IBAction)onEditClick:(id)event {
+ [listTapGestureRecognizer setEnabled:[tableController isEditing]];
[tableController setEditing:![tableController isEditing] animated:TRUE];
[messageField resignFirstResponder];
}
@@ -413,6 +429,7 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
//[uploadCnx cancel];
}
+ [transfertView setHidden:!isTranfer];
[imageTransferProgressBar setHidden:!isTranfer];
[cancelTransfertButton setHidden:!isTranfer];
[pictButton setHidden:isTranfer];
@@ -654,7 +671,7 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
You might want to generate a random boundary.. this is just the same
as my output from wireshark on a valid html post
*/
- NSString *boundary = [NSString stringWithString:@"---------------------------14737809831466499882746641449"];
+ NSString *boundary =@"---------------------------14737809831466499882746641449";
NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@",boundary];
[request addValue:contentType forHTTPHeaderField: @"Content-Type"];
@@ -664,7 +681,7 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
NSMutableData *body = [NSMutableData data];
[body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"userfile\"; filename=\"%@\"\r\n",name] dataUsingEncoding:NSUTF8StringEncoding]];
- [body appendData:[[NSString stringWithString:@"Content-Type: application/octet-stream\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];
+ [body appendData:[@"Content-Type: application/octet-stream\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[NSData dataWithData:imageData]];
[body appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]];
// setting the body of the post to the reqeust
diff --git a/Classes/LinphoneUI/UIChatRoomCell.m b/Classes/LinphoneUI/UIChatRoomCell.m
index e0bc54616..0ccfcce18 100644
--- a/Classes/LinphoneUI/UIChatRoomCell.m
+++ b/Classes/LinphoneUI/UIChatRoomCell.m
@@ -205,7 +205,7 @@ static UIFont *CELL_FONT = nil;
#pragma mark - Action Functions
-- (IBAction)onDeleteClick: (id) event {
+- (IBAction)onDeleteClick:(id)event {
if(chat != NULL) {
UIView *view = [self superview];
// Find TableViewCell
diff --git a/Classes/LinphoneUI/UIChatRoomCell.xib b/Classes/LinphoneUI/UIChatRoomCell.xib
index cda2cfccd..7710f22af 100644
--- a/Classes/LinphoneUI/UIChatRoomCell.xib
+++ b/Classes/LinphoneUI/UIChatRoomCell.xib
@@ -117,6 +117,7 @@
_NS:9
YES
+ NO
IBCocoaTouchFramework
- 20
+ 32
70
+
+
+ listTapGestureRecognizer
+
+
+
+ 71
+
+
+
+ transfertView
+
+
+
+ 76
+
+
+
+ cancelTransfertButton
+
+
+
+ 77
+
+
+
+ imageTransferProgressBar
+
+
+
+ 79
+
+
+
+ pictButton
+
+
+
+ 80
+
dataSource
@@ -561,6 +677,24 @@
62
+
+
+ onPictClick:
+
+
+ 7
+
+ 81
+
+
+
+ onTransferCancelClick:
+
+
+ 7
+
+ 78
+
@@ -679,6 +813,8 @@
+
+
footerView
@@ -723,6 +859,34 @@
messageField
+
+ 72
+
+
+
+
+
+
+ transferView
+
+
+ 75
+
+
+ cancel
+
+
+ 74
+
+
+ progressBar
+
+
+ 73
+
+
+ pictureButton
+
@@ -752,6 +916,10 @@
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
@@ -761,7 +929,7 @@
- 70
+ 81
@@ -781,7 +949,9 @@
id
id
id
+ id
id
+ id
@@ -800,24 +970,37 @@
onMessageChange:
id
+
+ onPictClick:
+ id
+
onSendClick:
id
+
+ onTransferCancelClick:
+ id
+
UILabel
UIImageView
+ UIButton
UIView
UIToggleButton
UIImageView
UIView
UIView
+ UIProgressView
+ UITapGestureRecognizer
UIImageView
HPGrowingTextView
UIView
+ UIButton
UIButton
ChatRoomTableViewController
+ UIView
@@ -828,6 +1011,10 @@
avatarImage
UIImageView
+
+ cancelTransfertButton
+ UIButton
+
chatView
UIView
@@ -848,6 +1035,14 @@
headerView
UIView
+
+ imageTransferProgressBar
+ UIProgressView
+
+
+ listTapGestureRecognizer
+ UITapGestureRecognizer
+
messageBackgroundImage
UIImageView
@@ -860,6 +1055,10 @@
messageView
UIView
+
+ pictButton
+ UIButton
+
sendButton
UIButton
@@ -868,6 +1067,10 @@
tableController
ChatRoomTableViewController
+
+ transfertView
+ UIView
+
IBProjectSource
diff --git a/Classes/fr.lproj/ChatRoomViewController.xib b/Classes/fr.lproj/ChatRoomViewController.xib
index 00108b6b3..d529292f6 100644
--- a/Classes/fr.lproj/ChatRoomViewController.xib
+++ b/Classes/fr.lproj/ChatRoomViewController.xib
@@ -474,6 +474,14 @@
70
+
+
+ listTapGestureRecognizer
+
+
+
+ 71
+
dataSource
@@ -743,7 +751,7 @@
- 70
+ 71
@@ -795,6 +803,7 @@
UIImageView
UIView
UIView
+ UITapGestureRecognizer
UIImageView
HPGrowingTextView
UIView
@@ -830,6 +839,10 @@
headerView
UIView
+
+ listTapGestureRecognizer
+ UITapGestureRecognizer
+
messageBackgroundImage
UIImageView
diff --git a/linphone.ldb/Contents.plist b/linphone.ldb/Contents.plist
index e446bc3c4..70072ae50 100644
--- a/linphone.ldb/Contents.plist
+++ b/linphone.ldb/Contents.plist
@@ -212,17 +212,17 @@
backup
- 10
+ 11
class
BLWrapperHandle
name
- Classes/ChatRoomViewController/10/ChatRoomViewController.xib
+ Classes/ChatRoomViewController/11/ChatRoomViewController.xib
change date
- 2012-09-13T15:16:23Z
+ 2012-09-13T16:01:39Z
changed values
class
@@ -232,7 +232,7 @@
flags
0
hash
- 17cff3d2e83eebab4ab29a3d6e6361ce
+ 1017e47ad2fcb46b91d384f53e88bb41
name
ChatRoomViewController.xib
@@ -443,9 +443,9 @@
versions
en
- 10
+ 11
fr
- 10
+ 11
diff --git a/linphone.ldb/Resources/Classes/ChatRoomViewController/10/ChatRoomViewController.xib b/linphone.ldb/Resources/Classes/ChatRoomViewController/11/ChatRoomViewController.xib
similarity index 98%
rename from linphone.ldb/Resources/Classes/ChatRoomViewController/10/ChatRoomViewController.xib
rename to linphone.ldb/Resources/Classes/ChatRoomViewController/11/ChatRoomViewController.xib
index 3bde993df..76a72edf1 100644
--- a/linphone.ldb/Resources/Classes/ChatRoomViewController/10/ChatRoomViewController.xib
+++ b/linphone.ldb/Resources/Classes/ChatRoomViewController/11/ChatRoomViewController.xib
@@ -492,6 +492,14 @@
70
+
+
+ listTapGestureRecognizer
+
+
+
+ 71
+
dataSource
@@ -761,7 +769,7 @@
- 70
+ 71
@@ -813,6 +821,7 @@
UIImageView
UIView
UIView
+ UITapGestureRecognizer
UIImageView
HPGrowingTextView
UIView
@@ -848,6 +857,10 @@
headerView
UIView
+
+ listTapGestureRecognizer
+ UITapGestureRecognizer
+
messageBackgroundImage
UIImageView