[Adium-devl] [Adium-svn] rev 20531 - trunk/Plugins/Purple Service

Peter Hosey boredzo at gmail.com
Sat Aug 11 06:00:54 UTC 2007


On Aug 10, 2007, at 21:34:08, Zachary West wrote:
> If you set an available message that is larger than 251, it'll  
> truncate to 249 + "...". I'm guessing we want our pretty ellipse,  
> which is why we go 2 characters shorter (and make sure it fits).

An ellipse is an oval. You mean ellipsis.

So without looking, the intent is:

	if message length > max_length:
		message = (message substring with range { 0, max_length - 1 }) + '…'

And the actual code is something like:

	if message length > max_length + 2:
		message = (message substring with range { 0, max_length + 1 }) + '…'

…?

OK, just looked.

The actual code in the same class is:

		return [messageString  
stringWithEllipsisByTruncatingToLength:MAX_AVAILABLE_MESSAGE_LENGTH];

AIUtilities to the rescue. Here's what the implementation of that  
message says:

	if message length > max_length:
		message = (message substring with range { 0, max_length - 1 }) + '…'

Sounds like we can make that macro be the real maximum length.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20070810/35cc259e/attachment.sig>


More information about the devel mailing list