adium-1.4 3572:18dd2db94025: Inserted emoticon will replace the ...

commits at adium.im commits at adium.im
Mon Jul 18 10:51:47 UTC 2011


details:	http://hg.adium.im/adium-1.4/rev/18dd2db94025
revision:	3572:18dd2db94025
branch:		(none)
author:		Adrian Godoroja <robotive at me.com>
date:		Mon Jul 18 13:50:37 2011 +0300

Inserted emoticon will replace the selected text (if any).

diffs (36 lines):

diff -r 646dca67f2ec -r 18dd2db94025 ChangeLogs/Changes.txt
--- a/ChangeLogs/Changes.txt	Sat Jul 16 17:49:16 2011 -0500
+++ b/ChangeLogs/Changes.txt	Mon Jul 18 13:50:37 2011 +0300
@@ -1,4 +1,4 @@
-				Adium Version History
+				Adium Version History
 				-----------------------
 Version 1.4.3
  * MSN: Fixed direct file transfers, user icons, and receiving custom emoticons, while disabling multiple points of presence (MPOP). We determined that this was the better trade-off based on user feedback.
@@ -8,6 +8,8 @@
  * AIM/ICQ: Fixed connecting while using a proxy server
  * Twitter: Fixed loading the Following list.
  * Fixed the 'Add Link' function, which was broken in 1.4.2
+ * MessageView
+   * Inserted emoticon will replace the selected text (if any)
 
 Version 1.4.2 (06/13/2011)
  Updated to libpurple 2.7.11. Highlights of applicable changes:
diff -r 646dca67f2ec -r 18dd2db94025 Source/BGEmoticonMenuPlugin.m
--- a/Source/BGEmoticonMenuPlugin.m	Sat Jul 16 17:49:16 2011 -0500
+++ b/Source/BGEmoticonMenuPlugin.m	Mon Jul 18 13:50:37 2011 +0300
@@ -233,10 +233,12 @@
 		NSResponder *responder = [[[NSApplication sharedApplication] keyWindow] firstResponder];
 		if (emoString && [responder isKindOfClass:[NSTextView class]] && [(NSTextView *)responder isEditable]) {
 			NSRange tmpRange = [(NSTextView *)responder selectedRange];
+			
+			[responder insertText:emoString];
+		
 			if (0 != tmpRange.length) {
-				[(NSTextView *)responder setSelectedRange:NSMakeRange((tmpRange.location + tmpRange.length),0)];
+				[(NSTextView *)responder setSelectedRange:NSMakeRange((tmpRange.location + emoString.length),0)];
 			}
-			[responder insertText:emoString];
 		}
     }
 }




More information about the commits mailing list