The Trunk: Morphic-ar.463.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-ar.463.mcz

commits-2
Andreas Raab uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ar.463.mcz

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

Name: Morphic-ar.463
Author: ar
Time: 1 September 2010, 10:51:44.878 pm
UUID: 05e011ff-55a5-354a-9949-fee34e545f32
Ancestors: Morphic-nice.462

Reclassify methods to fix various package dependencies.

=============== Diff against Morphic-nice.462 ===============

Item was added:
+ ----- Method: TextURL>>actOnClickFor: (in category '*Morphic') -----
+ actOnClickFor: anObject
+ "Do what you can with this URL.  Later a web browser."
+
+ | response m |
+
+ (url beginsWith: 'sqPr://') ifTrue: [
+ ProjectLoading thumbnailFromUrl: (url copyFrom: 8 to: url size).
+ ^self "should not get here, but what the heck"
+ ].
+ "if it's a web browser, tell it to jump"
+ anObject isWebBrowser
+ ifTrue: [anObject jumpToUrl: url. ^ true]
+ ifFalse: [((anObject respondsTo: #model) and: [anObject model isWebBrowser])
+ ifTrue: [anObject model jumpToUrl: url. ^ true]].
+
+ "if it's a morph, see if it is contained in a web browser"
+ (anObject isKindOf: Morph) ifTrue: [
+ m := anObject.
+ [ m ~= nil ] whileTrue: [
+ (m isWebBrowser) ifTrue: [
+ m  jumpToUrl: url.
+ ^true ].
+ (m hasProperty: #webBrowserView) ifTrue: [
+ m model jumpToUrl: url.
+ ^true ].
+ m := m owner. ]
+ ].
+
+ "no browser in sight.  ask if we should start a new browser"
+ ((self confirm: 'open a browser to view this URL?' translated) and: [WebBrowser default notNil]) ifTrue: [
+ WebBrowser default openOnUrl: url.
+ ^ true ].
+
+ "couldn't display in a browser.  Offer to put up just the source"
+
+ response := (UIManager default
+ chooseFrom: (Array with: 'View web page as source' translated
+ with: 'Cancel' translated)
+ title:  'Couldn''t find a web browser. View\page as source?' withCRs translated).
+ response = 1 ifTrue: [HTTPSocket httpShowPage: url].
+ ^ true!

Item was removed:
- ----- Method: WindowColorSpec class>>classSymbol:wording:brightColor:pastelColor:helpMessage: (in category 'instance creation') -----
- classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol helpMessage: hlpMsg
- "Answer a new instance of the receiver with the given slots filled in"
-
- ^ self new classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol helpMessage: hlpMsg!

Item was removed:
- ----- Method: WindowColorSpec>>classSymbol:wording:brightColor:pastelColor:helpMessage: (in category 'initialization') -----
- classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol helpMessage: hlpMsg
- "Initialize the receiver's instance variables"
-
- classSymbol := sym.
- wording := wrd.
- brightColor := brCol.
- pastelColor := paCol.
- helpMessage := hlpMsg!

Item was removed:
- ----- Method: WindowColorSpec>>printOn: (in category 'printing') -----
- printOn: aStream
- "Print the receiver on a stream"
-
- super printOn: aStream.
- classSymbol printOn: aStream.
- aStream nextPutAll: ' bright: ', brightColor printString, ' pastel: ', pastelColor printString!

Item was removed:
- ----- Method: WindowColorSpec>>classSymbol (in category 'access') -----
- classSymbol
- "Answer the classSymbol"
-
- ^ classSymbol!

Item was removed:
- ----- Method: WindowColorSpec>>helpMessage (in category 'access') -----
- helpMessage
- "Answer the helpMessage"
-
- ^ helpMessage!

Item was removed:
- ----- Method: WindowColorSpec>>brightColor (in category 'access') -----
- brightColor
- "Answer the brightColor"
-
- ^ brightColor!

Item was removed:
- ----- Method: WindowColorSpec>>pastelColor (in category 'access') -----
- pastelColor
- "Answer the pastelColor"
-
- ^ pastelColor!

Item was removed:
- ----- Method: WindowColorSpec>>wording (in category 'access') -----
- wording
- "Answer the wording"
-
- ^ wording!

Item was removed:
- Object subclass: #WindowColorSpec
- instanceVariableNames: 'classSymbol wording brightColor pastelColor helpMessage'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Morphic-Windows'!