'From etoys3.0 of 24 February 2008 [latest update: #2084] on 25 August 2008 at 3:13:06 pm'! "Change Set: etoysNotSqueak-sw Date: 25 August 2008 Author: Scott Wallace Change user-facing wording 'Squeak' to 'Etoys' in the various Quit dialogs. Center the choices in confirmers. Note to Translators: the following strings have changed; OLD: Are you sure you want to Quit Squeak? NEW: Are you sure you want to Quit Etoys? OLD: Quit Squeak altogether NEW: Quit Etoys altogether "! !PasteUpMorph methodsFor: '*green' stamp: 'sw 8/25/2008 13:49'! quitSqueak "Obtain a confirmation from the user, and if the answer is true, quite Squeak summarily. If running under Sugar, quit wiithout the confirmation dialog. Not current in the flow-of-control, but useful to call if one were to implement a ctl-q shortcut for quitting (currently done by Sugar if running under sugar.)" SugarLauncher isRunningInSugar ifTrue: [^ SugarLauncher current quit]. (self confirm: 'Are you sure you want to Quit Etoys?' translated) ifFalse: [^ self]. SmalltalkImage current snapshot: false andQuit: true ! ! !PopUpMenu class methodsFor: 'dialogs' stamp: 'sw 8/25/2008 13:53'! confirm: queryString orCancel: cancelBlock "Put up a yes/no/cancel menu with caption aString. Answer true if the response is yes, false if no. If cancel is chosen, evaluate cancelBlock. This is a modal question--the user must respond yes or no." "PopUpMenu confirm: 'Reboot universe' orCancel: [^'Nevermind']" | menu choice | menu _ PopUpMenu labelArray: {'Yes' translated. 'No' translated. 'Cancel' translated}. choice _ menu startUpWithCaption: queryString at: (ActiveHand ifNil: [Sensor]) cursorPoint allowKeyboard: Preferences menuKeyboardControl centered: true. choice = 1 ifTrue: [^ true]. choice = 2 ifTrue: [^ false]. ^ cancelBlock value! ! !PopUpMenu class methodsFor: 'dialogs' stamp: 'sw 8/25/2008 13:45'! confirm: queryString trueChoice: trueChoice falseChoice: falseChoice "Put up a yes/no menu with caption queryString. The actual wording for the two choices will be as provided in the trueChoice and falseChoice parameters. Answer true if the response is the true-choice, false if it's the false-choice. This is a modal question -- the user must respond one way or the other." "PopUpMenu confirm: 'Are you hungry?' trueChoice: 'yes, I''m famished' falseChoice: 'no, I just ate'" | menu choice | menu _ PopUpMenu labelArray: {trueChoice. falseChoice}. [(choice _ menu startUpWithCaption: queryString at: (ActiveHand ifNil: [Sensor]) cursorPoint allowKeyboard: Preferences menuKeyboardControl centered: true ) isNil] whileTrue. ^ choice = 1! ! !ProjectNavigationMorph methodsFor: 'the actions' stamp: 'sw 8/25/2008 13:59'! quitSqueak "Obtain a confirmation from the user, and if the answer is true, quit Squeak summarily" (self confirm: 'Are you sure you want to Quit Etoys?' translated) ifFalse: [^ self]. SmalltalkImage current snapshot: false andQuit: true ! ! !ProjectNavigationMorph methodsFor: 'the buttons' stamp: 'sw 8/25/2008 14:00'! buttonQuit "Make and abswer a button whose pressing will resut in quitting out of Squeak." ^self makeButton: 'QUIT' translated balloonText: 'Quit Etoys altogether' translated for: #quitSqueak ! !