SM 2.1 coming soon
Hernan Tylim
htylim at yahoo.com.ar
Thu Nov 24 20:39:34 UTC 2005
Hi Göran,
The attached .cs will register a WindowColor preference for the
SqueakMap Package Loader.
The reason why the SMLoader window turned transparent on 3.9, I *think*,
is related to changes on the SystemWindow's look that got in on 3.9.
BTW, I only tested it on 3.9 6704 and on 3.7 full. Currently don't have
nor 3.6 nor 3.8 images at hand.
Regards,
Hernán
goran at krampe.se wrote:
> Hi!
>
> Hernan Tylim <htylim at yahoo.com.ar> wrote:
>
>>Please, don't hardcode any color. I will just send a cs later which adds
>>an SM color preference to the color preferences map. As Goran said you
>>just need to implement a class side method on the model and do a little
>>initializing.
>
>
> Well, please look at the code already there first (the latest SqueakMap
> Package Loader on SM) - I thought I had done the above already! (by
> mimicking SUnit etc)
>
>
>>BTW. The preference and color refactorings didn't change any interface.
>>So any old CS should keep working.
>
>
> Well, let me just say that the SMLoader looks fine in older Squeaks...
> so something sure changed.
> In short - show me a solution that works properly in 3.6-3.9 and I will
> be happy as a clam ;).
>
> regards, Göran
>
>
-------------- next part --------------
'From Squeak3.7 of ''4 September 2004'' [latest update: #5989] on 24 November 2005 at 5:11:27 pm'!
!SMLoader methodsFor: 'gui building' stamp: 'hpt 11/24/2005 17:10'!
createWindow
"Create the package loader window."
self paneColor: (Preferences windowColorFor: self class name).
self addMorph: (self buildSearchPane borderWidth: 0)
frame: (0.0 @ 0.0 corner: 0.3 @ 0.07).
self addMorph: (self buildMorphicPackagesList borderWidth: 0)
frame: (0.0 @ 0.07 corner: 0.3 @ 0.6).
self addMorph: (self buildMorphicCategoriesList borderWidth: 0)
frame: (0.0 @ 0.6 corner: 0.3 @ 1.0).
self addMorph: (self buildPackagePane borderWidth: 0)
frame: (0.3 @ 0.0 corner: 1.0 @ 1.0).
self on: #mouseEnter send: #paneTransition: to: self.
self on: #mouseLeave send: #paneTransition: to: self! !
!SMLoader class methodsFor: 'menu registration' stamp: 'hpt 11/24/2005 17:10'!
initialize
"Hook us up in the world menu."
(TheWorldMenu respondsTo: #registerOpenCommand:)
ifTrue: [
TheWorldMenu registerOpenCommand: {'SqueakMap Package Loader'. {self. #open}}.
TheWorldMenu unregisterOpenCommand: 'Package Loader'].
Preferences
setWindowColorFor: #SMLoader
to: (Color colorFrom: self windowColorSpecification pastelColor).
DefaultFilters _ OrderedCollection new.
DefaultCategoriesToFilterIds _ OrderedCollection new
! !
!SMLoader class methodsFor: 'color registration' stamp: 'hpt 11/24/2005 17:09'!
windowColorSpecification
"Answer a WindowColorSpec object that declares my preference"
^ WindowColorSpec
classSymbol: self name
wording: 'SqueakMap Package Loader'
brightColor: Color yellow muchLighter duller
pastelColor: Color yellow muchLighter duller
helpMessage: 'SMLoader'
! !
SMLoader initialize!
!SMLoader class reorganize!
('interface opening' open openOn:)
('private-publishing' publish)
('menu registration' initialize removeFromSystem unload)
('instance creation' new newOn:)
('color registration' windowColorSpecification)
!
SMLoader removeSelector: #paneColor!
More information about the Squeak-dev
mailing list
|