David T. Lewis uploaded a new version of Nebraska to project The Trunk: http://source.squeak.org/trunk/Nebraska-dtl.61.mcz
==================== Summary ====================
Name: Nebraska-dtl.61 Author: dtl Time: 4 November 2023, 9:46:58.636099 pm UUID: 255009a4-58ae-44dc-aa9b-5518d09c9d65 Ancestors: Nebraska-dtl.60
Retain some Etoys classes and methods in the base image, based on Marcel's unload-etoys.33.cs Etoys removal script. Reference squeak-dev 29-Aug-2023 Let's discuss the future of Etoys in Squeak 6.1 (and beyond)
=============== Diff against Nebraska-dtl.60 ===============
Item was changed: SystemOrganization addCategory: #'Nebraska-Morphs-Experimental'! SystemOrganization addCategory: #'Nebraska-Morphic-Remote'! SystemOrganization addCategory: #'Nebraska-Network-Communications'! SystemOrganization addCategory: #'Nebraska-Network-ObjectSocket'! SystemOrganization addCategory: #'Nebraska-Audio Chat'! SystemOrganization addCategory: #'Nebraska-Morphs'! + SystemOrganization addCategory: #'Nebraska-Network-Mail'!
Item was added: + Model subclass: #FancyMailComposition + instanceVariableNames: 'messageText theLinkToInclude to subject' + classVariableNames: '' + poolDictionaries: '' + category: 'Nebraska-Network-Mail'!
Item was added: + ----- Method: FancyMailComposition>>addAttachment (in category 'actions') ----- + addAttachment + + self changed: #acceptChanges. + + (FileChooserDialog openOn: FileDirectory default pattern: nil label: 'Choose attachment') ifNotNil: + [:fileName | + FileStream readOnlyFileNamed: fileName do: + [:file | + file binary. + self messageText: + ((MailMessage from: self messageText asString) + addAttachmentFrom: file withName: (FileDirectory localNameFor: fileName); + text)]]!
Item was added: + ----- Method: FancyMailComposition>>breakLines:atWidth: (in category 'private') ----- + breakLines: aString atWidth: width + "break lines in the given string into shorter lines" + | result atAttachment | + + result := WriteStream on: (String new: (aString size * 50 // 49)). + + atAttachment := false. + aString asString linesDo: [ :line | | start end | + (line beginsWith: '====') ifTrue: [ atAttachment := true ]. + atAttachment ifTrue: [ + "at or after an attachment line; no more wrapping for the rest of the message" + result nextPutAll: line. result cr ] + ifFalse: [ + (line beginsWith: '>') ifTrue: [ + "it's quoted text; don't wrap it" + result nextPutAll: line. result cr. ] + ifFalse: [ + "regular old line. Wrap it to multiple lines" + start := 1. + "output one shorter line each time through this loop" + [ start + width <= line size ] whileTrue: [ + + "find the end of the line" + end := start + width - 1. + [end >= start and: [ (line at: (end+1)) isSeparator not ]] whileTrue: [ + end := end - 1 ]. + end < start ifTrue: [ + "a word spans the entire width!!" + end := start + width - 1 ]. + + "copy the line to the output" + result nextPutAll: (line copyFrom: start to: end). + result cr. + + "get ready for next iteration" + start := end+1. + (line at: start) isSeparator ifTrue: [ start := start + 1 ]. + ]. + + "write out the final part of the line" + result nextPutAll: (line copyFrom: start to: line size). + result cr. + ]. + ]. + ]. + + ^result contents!
Item was added: + ----- Method: FancyMailComposition>>buildButtonsWith: (in category 'toolbuilder') ----- + buildButtonsWith: builder + + | panel | + panel := builder pluggablePanelSpec new. + panel + layout: #horizontal; + children: OrderedCollection new. + + panel children addLast: (builder pluggableButtonSpec new + model: self; + label: 'send later'; + help: 'add this to the queue of messages to be sent'; + action: #submit; + color: Color white; + yourself). + + panel children addLast: (builder pluggableButtonSpec new + model: self; + label: 'send now'; + help: 'send this message immediately'; + action: #sendNow; + color: Color white; + yourself). + + panel children addLast: (builder pluggableButtonSpec new + model: self; + label: 'add attachment'; + help: 'send a file with the message'; + action: #addAttachment; + color: Color white; + yourself). + + ^ panel!
Item was added: + ----- Method: FancyMailComposition>>buildMessageTextWith: (in category 'toolbuilder') ----- + buildMessageTextWith: builder + + ^ builder pluggableTextSpec new + model: self; + getText: #messageText; + setText: #messageText:; + menu: #menuGet:shifted:; + yourself!
Item was added: + ----- Method: FancyMailComposition>>buildTextFieldsWith: (in category 'toolbuilder') ----- + buildTextFieldsWith: builder + + | panel | + panel := builder pluggablePanelSpec new. + panel + layout: #vertical; + children: OrderedCollection new. + + panel children addLast: (builder pluggableInputFieldSpec new + model: self; + help: 'To'; + getText: #to; + setText: #to:; + yourself). + + panel children addLast: (builder pluggableInputFieldSpec new + model: self; + help: 'Subject'; + getText: #subject; + setText: #subject:; + yourself). + + ^ panel!
Item was added: + ----- Method: FancyMailComposition>>buildWith: (in category 'toolbuilder') ----- + buildWith: builder + + ^ builder build: (self buildWindowWith: builder specs: { + (0 @ 0 corner: 1 @ 0.1) -> [self buildButtonsWith: builder]. + (0 @ 0.1 corner: 1 @ 0.3) -> [self buildTextFieldsWith: builder]. + (0 @ 0.3 corner: 1 @ 1) -> [self buildMessageTextWith: builder]. })!
Item was added: + ----- Method: FancyMailComposition>>celeste:to:subject:initialText:theLinkToInclude: (in category 'initialization') ----- + celeste: aCeleste to: argTo subject: argSubject initialText: aText theLinkToInclude: linkText + "self new celeste: Celeste current to: 'danielv@netvision.net.il' subject: 'Mysubj' initialText: 'atext' theLinkToInclude: 'linkText'" + + to := argTo. + subject := argSubject. + messageText := aText. + theLinkToInclude := linkText.!
Item was added: + ----- Method: FancyMailComposition>>completeTheMessage (in category 'actions') ----- + completeTheMessage + + | newText strm | + self changed: #acceptChanges. + + newText := String new: 200. + strm := WriteStream on: newText. + strm + nextPutAll: 'Content-Type: text/html'; cr; + nextPutAll: 'From: ', MailSender userName; cr; + nextPutAll: 'To: ',to; cr; + nextPutAll: 'Subject: ',subject; cr; + + cr; + nextPutAll: '<HTML><BODY><BR>'; + nextPutAll: messageText asStringToHtml; + nextPutAll: '<BR><BR>',theLinkToInclude,'<BR></BODY></HTML>'. + ^strm contents!
Item was added: + ----- Method: FancyMailComposition>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + + ^ Color veryLightGray!
Item was added: + ----- Method: FancyMailComposition>>forgetIt (in category 'user interface') ----- + forgetIt + + self changed: #close.!
Item was added: + ----- Method: FancyMailComposition>>menuGet:shifted: (in category 'interface') ----- + menuGet: aMenu shifted: shifted + + aMenu addList: { + {'find...(f)' translated. #find}. + {'find selection again (g)' translated. #findAgain}. + #-. + {'accept (s)' translated. #accept}. + {'send message' translated. #submit}}. + + ^aMenu.!
Item was added: + ----- Method: FancyMailComposition>>messageText (in category 'accessing') ----- + messageText + "return the current text" + ^messageText. + !
Item was added: + ----- Method: FancyMailComposition>>messageText: (in category 'accessing') ----- + messageText: aText + "change the current text" + messageText := aText. + self changed: #messageText. + ^true!
Item was added: + ----- Method: FancyMailComposition>>open (in category 'user interface') ----- + open + + self flag: #refactor. "FancyMailComposition should probably be removed in favour of MailComposition." + ^ ToolBuilder open: self!
Item was added: + ----- Method: FancyMailComposition>>sendMailMessage: (in category 'MailSender interface') ----- + sendMailMessage: aMailMessage + self messageText: aMailMessage text!
Item was added: + ----- Method: FancyMailComposition>>sendNow (in category 'actions') ----- + sendNow + + self submit: true + !
Item was added: + ----- Method: FancyMailComposition>>smtpServer (in category 'MailSender interface') ----- + smtpServer + ^MailSender smtpServer!
Item was added: + ----- Method: FancyMailComposition>>subject (in category 'accessing') ----- + subject + + ^ subject + + !
Item was added: + ----- Method: FancyMailComposition>>subject: (in category 'accessing') ----- + subject: x + + subject := x. + self changed: #subject. + ^true!
Item was added: + ----- Method: FancyMailComposition>>submit (in category 'actions') ----- + submit + + self submit: false!
Item was added: + ----- Method: FancyMailComposition>>submit: (in category 'actions') ----- + submit: sendNow + + | message | + + messageText := self breakLines: self completeTheMessage atWidth: 999. + message := MailMessage from: messageText. + SMTPClient + deliverMailFrom: message from + to: (Array with: message to) + text: message text + usingServer: self smtpServer. + self forgetIt. + !
Item was added: + ----- Method: FancyMailComposition>>to (in category 'accessing') ----- + to + + ^to!
Item was added: + ----- Method: FancyMailComposition>>to: (in category 'accessing') ----- + to: x + + to := x. + self changed: #to. + ^true + !
Item was added: + ----- Method: FancyMailComposition>>windowTitle (in category 'user interface') ----- + windowTitle + + ^ 'Mister Postman'!
packages@lists.squeakfoundation.org