'From Squeak3.1alpha of 28 February 2001 [latest update: #4293] on 24 August 2001 at 4:12:50 pm'! "Change Set: flapTweaks Date: 24 August 2001 Author: Michael Rueger Enables flaps in standalone mode. Fixes a bug that prevented the widget flap from being enabled."! !Flaps class methodsFor: 'predefined flaps' stamp: 'mir 8/24/2001 15:52'! addAndEnableEToyFlaps "Initialize the standard default out-of-box set of global flaps. This method creates them and places them in my class variable #SharedFlapTabs, but does not itself get them displayed." SharedFlapTabs ifNil: [SharedFlapTabs _ OrderedCollection new]. SharedFlapTabs add: self newSuppliesFlap. SharedFlapTabs add: self newWidgetsFlap. self enableGlobalFlapWithID: 'Supplies'. self enableGlobalFlapWithID: 'Widgets'. SharedFlapTabs do: [:aFlapTab | aFlapTab setToPopOutOnMouseOver: false]. "The above amends some historic behavior imparted by the initializers of the individual flaps" SharedFlapsAllowed _ true. Project current flapsSuppressed: false. ^ SharedFlapTabs "Flaps addAndEnableEToyFlaps"! ! !ProjectLauncher methodsFor: 'running' stamp: 'mir 8/24/2001 16:10'! startUpAfterLogin | scriptName loader isUrl | self setupFlaps. HTTPClient isRunningInBrowser ifTrue:[ self setupFromParameters. scriptName _ self parameterAt: 'src'. CodeLoader defaultBaseURL: (self parameterAt: 'Base'). ] ifFalse:[ scriptName _ (Smalltalk getSystemAttribute: 2) ifNil:['']. scriptName isEmpty ifFalse:[ "figure out if script name is a URL by itself" isUrl _ (scriptName asLowercase beginsWith:'http://') or:[ (scriptName asLowercase beginsWith:'file://') or:[ (scriptName asLowercase beginsWith:'ftp://')]]. isUrl ifFalse:[scriptName _ 'file://',scriptName]]. ]. scriptName isEmptyOrNil ifTrue:[^self currentWorld addGlobalFlaps]. loader _ CodeLoader new. loader loadSourceFiles: (Array with: scriptName). (scriptName asLowercase endsWith: '.pr') ifTrue:[self installProjectFrom: loader] ifFalse:[loader installSourceFiles]. ! ! !ProjectLauncher methodsFor: 'initialization' stamp: 'mir 8/24/2001 15:51'! setupFlaps "Only called when the image has been launched in a browser. If I am requested to show etoy flaps, then remove any pre-existing shared flaps and put up the supplies flap only. if I am requested to show all flaps, then if flaps already exist, use them as is, else set up to show the default set of standard flaps." ((whichFlaps = 'etoy') or: [Preferences eToyFriendly]) ifTrue: [Flaps addAndEnableEToyFlaps]. whichFlaps = 'all' ifTrue: [Flaps sharedFlapsAllowed ifFalse: [Flaps enableGlobalFlaps]]! !