[Q] Link creation Re: [ENH]MailToUrl

Karl Ramberg karl.ramberg at chello.se
Mon Jun 12 14:43:02 UTC 2000



Karl Ramberg wrote:
> 
> Here is an enhancement to MailToUrl that will try to open a
> CelesteComposer (Mr Postman) if the link you click on is a
> mail address.
> (The code is basicly the one from the changeset browser)

I'm asking my self and all of you if one could implement the mailto selection in
the alt(cmd) + 6 menu or probably better in the TextURL>>actOnClickFor: so
Celeste is opened when any email address is clicked and not Scamper.

> 
> WARNING !!!!!!
> 
> This is a very early realease and there might be some bugs!
> BACKUP your Celeste email *before* testing this !!!
> 
> Karl
> 
>   ----------------------------------------------------------------------------------------------------
> 'From Squeak2.8alpha of 19 February 2000 [latest update: #2310] on 11 June 2000 at 9:36:01 pm'!
> 
> !MailtoUrl methodsFor: 'downloading' stamp: 'kfr 6/11/2000 18:10'!
> activate
>         | celeste |
> 
>         Celeste allInstances size = 0 ifTrue: [^ self notify: 'Can''t send stuff until you open Celeste. Sorry.'].
>         celeste _ Celeste someInstance.
>         (Smalltalk includesKey: #CelesteComposition) ifTrue: [
>                 ^CelesteComposition openForCeleste: celeste  initialText: self composeText].
> 
>         self notify: 'no mail reader present'! !
> 
> !MailtoUrl methodsFor: 'downloading' stamp: 'kfr 6/11/2000 16:47'!
> composeText
>         "Answer the template for a new message."
> 
>         ^ String streamContents: [:str |
>                 str nextPutAll: 'From: '.
>                 str nextPutAll: Celeste userName; cr.
>                 str nextPutAll: 'To: '.
>                 str nextPutAll: locator asString; cr.
> 
>                 str nextPutAll: 'Subject: '; cr.
> 
>                 Celeste ccList isEmpty ifFalse: [
>                         str nextPutAll: 'Cc: '.
>                         str nextPutAll: Celeste ccList; cr].
>                 str cr].! !





More information about the Squeak-dev mailing list