[squeak-dev] The Inbox: Morphic-nice.635.mcz
Nicolas Cellier
nicolas.cellier.aka.nice at gmail.com
Tue Jan 22 22:17:44 UTC 2013
Bert's solution is simpler, so he shall better commit it to trunk and
I will reject this one in treated inbox.
2013/1/22 H. Hirzel <hannes.hirzel at gmail.com>:
> Ok, this is a different approach from what Bert suggests
>
> http://lists.squeakfoundation.org/pipermail/squeak-dev/2013-January/168158.html
>
> to make it possible that closed Monticello windows are garbage
> collected and with them MCDefinitions. Both apply to all windows.
>
> What are the pros and cons?
>
> --Hannes
>
> On Tue, 22 Jan 2013 21:57:54.533 0000, commits at source.squeak.org
> <commits at source.squeak.org> wrote:
>> A new version of Morphic was added to project The Inbox:
>> http://source.squeak.org/inbox/Morphic-nice.635.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Morphic-nice.635
>> Author: nice
>> Time: 22 January 2013, 10:57:07.833 pm
>> UUID: 3a69be3a-68a2-47aa-86e5-1aa7147bcb38
>> Ancestors: Morphic-dtl.634
>>
>> Let TheWorldMainDockingBar points weakly on opened windows.
>> Otherwise they won't be garbage collected until next time the 'windows' menu
>> is opened.
>>
>> =============== Diff against Morphic-dtl.634 ===============
>>
>> Item was changed:
>> ----- Method: TheWorldMainDockingBar>>listWindowsOn: (in category 'submenu
>> - windows') -----
>> listWindowsOn: menu
>>
>> | windows |
>> windows := SortedCollection sortBlock: [:winA :winB |
>> winA model name = winB model name
>> ifTrue: [winA label < winB label]
>> ifFalse: [winA model name < winB model name]].
>> windows addAll: self allVisibleWindows.
>> windows ifEmpty: [
>> menu addItem: [ :item |
>> item
>> contents: 'No Windows' translated;
>> isEnabled: false ] ].
>> windows do: [ :each |
>> + | weak |
>> + weak := WeakArray with: each.
>> menu addItem: [ :item |
>> item
>> contents: (self windowMenuItemLabelFor: each);
>> icon: (self colorIcon: each model defaultBackgroundColor);
>> - target: each;
>> - selector: #comeToFront;
>> subMenuUpdater: self
>> + selector: #windowMenuFor:on:
>> + arguments: { weak };
>> + action: [ weak first ifNotNil: [:w | w activateAndForceLabelToShow;
>> expand ] ] ] ].!
>> - selector: #windowMenuFor:on:
>> - arguments: { each };
>> - action: [ each activateAndForceLabelToShow; expand ] ] ].!
>>
>> Item was changed:
>> ----- Method: TheWorldMainDockingBar>>windowMenuFor:on: (in category
>> 'submenu - windows') -----
>> + windowMenuFor: weakArray on: menu
>> + weakArray first
>> + ifNil:
>> + [menu
>> + addItem: [ :item |
>> + item
>> + contents: 'already closed...' translated ;
>> + isEnabled: false ]]
>> + ifNotNil:
>> + [:window |
>> + menu
>> + addItem: [ :item |
>> + item
>> + contents: 'Close' translated ;
>> + target: window;
>> + selector: #delete ];
>> + addItem: [ :item |
>> + item
>> + contents: 'Close all like this' translated ;
>> + target: self;
>> + selector: #closeAllWindowsLike:;
>> + arguments: { window } ];
>> + addItem: [ :item |
>> + item
>> + contents: 'Close all but this' translated ;
>> + target: self;
>> + selector: #closeAllWindowsBut:;
>> + arguments: { window } ];
>> + addItem: [ :item |
>> + item
>> + contents: 'Expand or Contract' translated ;
>> + target: window;
>> + selector: #expandBoxHit ] ]!
>> - windowMenuFor: window on: menu
>> - menu
>> - addItem: [ :item |
>> - item
>> - contents: 'Close' translated ;
>> - target: window;
>> - selector: #delete ];
>> - addItem: [ :item |
>> - item
>> - contents: 'Close all like this' translated ;
>> - target: self;
>> - selector: #closeAllWindowsLike:;
>> - arguments: { window } ];
>> - addItem: [ :item |
>> - item
>> - contents: 'Close all but this' translated ;
>> - target: self;
>> - selector: #closeAllWindowsBut:;
>> - arguments: { window } ];
>> - addItem: [ :item |
>> - item
>> - contents: 'Expand or Contract' translated ;
>> - target: window;
>> - selector: #expandBoxHit ]!
>>
>>
>>
>
More information about the Squeak-dev
mailing list
|