[squeak-dev] The Trunk: System-ct.1253.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Nov 27 19:45:40 UTC 2021


Christoph Thiede uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ct.1253.mcz

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

Name: System-ct.1253
Author: ct
Time: 27 November 2021, 8:45:05.98852 pm
UUID: 8a8c31b3-799c-b447-8406-7778b3a40b49
Ancestors: System-ct.1250, System-jar.1246

Merges System-jar.1246 (allow empty credentials when composing a mail message).

Revision: Keep #isUserNameSet and #isUserPasswordSet as a part of the public protocol.

Note that currently, you will not be asked another time for your credentials after canceling the dialog. However, this is related to a disputable behavior of the UIManager (not answering nil on cancel) and not the fault of this patch.

=============== Diff against System-ct.1250 ===============

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>>setUserName (in category 'settings') -----
  setUserName
  
  	(UIManager default
  			request: 'What is your user name on the SMTP server?' withCRs
+ 			initialAnswer: (UserName ifNil: ['']))
- 			initialAnswer: (UserName ifNil: [UserName := '']))
  		ifNotNil: [:answer | UserName := answer]!

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

Item was changed:
  ----- Method: MailSender class>>userPassword (in category 'accessing') -----
  userPassword
+ 	"Answer the user password to be used for sending out messages. Leave empty if authentication not required."
  
+ 	self isUserPasswordSet ifNil: [self setUserPassword].
- 	self isUserPasswordSet ifFalse: [self setUserPassword].
- 
- 	UserPassword isEmpty ifTrue: [ self error: 'no user name specified' ].
- 
  	^ UserPassword!



More information about the Squeak-dev mailing list