[squeak-dev] The Inbox: System-ct.1241.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jul 15 11:11:05 UTC 2021


A new version of System was added to project The Inbox:
http://source.squeak.org/inbox/System-ct.1241.mcz

==================== Summary ====================

Name: System-ct.1241
Author: ct
Time: 15 July 2021, 1:11:00.628878 pm
UUID: c64e0528-5c33-a945-88ad-7789ac59a447
Ancestors: System-mt.1239

MailSender: Allows for empty credentials (username and password). Empty credentials are saved as '' whereas missing credentials are saved as nil. Also improves multilingual support and makes UIManager invocations more idiomatic. Thanks to David Stes for the pointer!

Supersedes System-ct.1240.

=============== Diff against System-mt.1239 ===============

Item was changed:
  ----- Method: MailSender class>>isUserEmailSet (in category 'testing') -----
  isUserEmailSet
+ 	^ UserEmail notNil
- 	^ UserEmail notNil and: [UserEmail notEmpty]
  !

Item was changed:
  ----- Method: MailSender class>>isUserNameSet (in category 'testing') -----
  isUserNameSet
+ 	^ UserName notNil
- 	^ UserName notNil and: [UserName notEmpty]
  !

Item was changed:
  ----- Method: MailSender class>>isUserPasswordSet (in category 'testing') -----
  isUserPasswordSet
+ 	^ UserPassword notNil
- 	^ UserPassword notNil and: [UserPassword notEmpty]
  !

Item was changed:
  ----- Method: MailSender class>>setSmtpServer (in category 'settings') -----
  setSmtpServer
  	"Set the SMTP server used to send outgoing messages via"
+ 	| answer |
+ 	answer := Project uiManager
+ 		request: 'What is your mail server for outgoing mail?' translated
+ 		initialAnswer: (SmtpServer ifNil: ['']).
+ 	answer ifNotNil: [SmtpServer := answer].!
- 	SmtpServer ifNil: [SmtpServer := ''].
- 	SmtpServer := UIManager default
- 		request: 'What is your mail server for outgoing mail?'
- 		initialAnswer: SmtpServer.
- !

Item was changed:
  ----- Method: MailSender class>>setSmtpServerPort (in category 'settings') -----
  setSmtpServerPort
  	"Set the SMTP server port used to send outgoing messages via"
+ 	| answer |
+ 	answer := Project uiManager
+ 		request: 'What is your mail server port for outgoing mail?' translated
+ 		initialAnswer: (SmtpServerPort ifNil: [25]) asString.
+ 	answer isEmptyOrNil ifTrue: [^ self].
+ 	SmtpServerPort := answer asNumber.!
- 	SmtpServerPort ifNil: [SmtpServerPort := 25].
- 	SmtpServerPort := (UIManager default
- 		request: 'What is your mail server port for outgoing mail?'
- 		initialAnswer: SmtpServerPort asString) asNumber.
- !

Item was changed:
  ----- Method: MailSender class>>setUserEmail (in category 'settings') -----
  setUserEmail
  	"Change the user's email for use in composing messages."
  
+ 	(Project uiManager
+ 			request: 'What is your email address?\(This is the address other people will reply to you)' withCRs translated
+ 			initialAnswer: (UserEmail ifNil: ['']))
- 	(UIManager default
- 			request: 'What is your email address?\(This is the address other people will reply to you)' withCRs
- 			initialAnswer: (UserEmail ifNil: [UserEmail := '']))
  		ifNotNil: [:answer | UserEmail := answer]!

Item was changed:
  ----- Method: MailSender class>>setUserName (in category 'settings') -----
  setUserName
  
+ 	(Project uiManager
+ 			request: 'What is your user name on the SMTP server?' translated
+ 			initialAnswer: (UserName ifNil: ['']))
- 	(UIManager default
- 			request: 'What is your user name on the SMTP server?' withCRs
- 			initialAnswer: (UserName ifNil: [UserName := '']))
  		ifNotNil: [:answer | UserName := answer]!

Item was changed:
  ----- Method: MailSender class>>setUserPassword (in category 'settings') -----
  setUserPassword
  
+ 	(Project uiManager
+ 			requestPassword: 'What is your server password?' translated)
- 	UserPassword ifNil: [UserPassword := ''].
- 	(UIManager default
- 			requestPassword: 'What is your server passwort?' withCRs)
  		ifNotNil: [:answer | UserPassword := answer]!

Item was changed:
  ----- Method: MailSender class>>smtpServer (in category 'accessing') -----
  smtpServer
  	"Answer the server for sending email"
  
  	self isSmtpServerSet ifFalse: [self setSmtpServer].
+ 	SmtpServer ifNil: [self error: 'no SMTP server specified' translated].
- 	SmtpServer isEmpty ifTrue: [ self error: 'no SMTP server specified' ].
  
  	^SmtpServer!

Item was changed:
  ----- Method: MailSender class>>smtpServerPort (in category 'accessing') -----
  smtpServerPort
  	"Answer the server for sending email"
  
  	self isSmtpServerPortSet ifFalse: [self setSmtpServerPort].
+ 	SmtpServerPort isNil ifTrue: [self error: 'no SMTP server port specified' translated].
- 	SmtpServerPort isNil ifTrue: [ self error: 'no SMTP server port specified' ].
  
  	^SmtpServerPort!

Item was changed:
  ----- Method: MailSender class>>userEmail (in category 'accessing') -----
  userEmail
  	"Answer the user name to be used for sending out messages."
  
  	self isUserEmailSet ifFalse: [self setUserEmail].
  
+ 	UserEmail ifNil: [self error: 'no user email specified' translated].
- 	UserEmail isEmpty ifTrue: [ self error: 'no user email specified' ].
  
  	^UserEmail!

Item was changed:
  ----- Method: MailSender class>>userName (in category 'accessing') -----
  userName
  	"Answer the user name to be used for sending out messages."
  
  	self isUserNameSet ifFalse: [self setUserName].
  
+ 	UserName ifNil: [self error: 'no user name specified' translated].
- 	UserName isEmpty ifTrue: [ self error: 'no user name specified' ].
  
  	^UserName!

Item was changed:
  ----- Method: MailSender class>>userPassword (in category 'accessing') -----
  userPassword
  
  	self isUserPasswordSet ifFalse: [self setUserPassword].
  
+ 	UserPassword ifNil: [self error: 'no user name specified' translated].
- 	UserPassword isEmpty ifTrue: [ self error: 'no user name specified' ].
  
  	^ UserPassword!

Item was added:
+ ----- Method: Preferences class>>allowEtoyUserCustomEvents (in category 'standard queries') -----
+ allowEtoyUserCustomEvents
+ 	^ self
+ 		valueOfFlag: #allowEtoyUserCustomEvents
+ 		ifAbsent: [false]!



More information about the Squeak-dev mailing list