[squeak-dev] The Inbox: Monticello-pre.623.mcz
Chris Muller
asqueaker at gmail.com
Wed Nov 11 22:23:48 UTC 2015
Good change. I was thinking about doing almost the same change for better
differentiating between ignored and reverted changes in the list. I had
wanted to do it by "graying out" the ignored changes, by displaying them in
gray-colored text.
MCSaveVersionDialog>>#list
^ self items collect: [:each |
(self reverts includes: each)
ifFalse: [(self ignore includes: each)
ifFalse: [each summary]
ifTrue: [Text string: '( ', each summary, ' )'
attribute: (TextColor color: Color gray)]]
ifTrue: [Text string: '( ', each summary, ' )' attributes: {
TextEmphasis italic . TextEmphasis struckOut } ]]
For some reason, the above doesn't work, Marcel, do you know why?
On Wed, Nov 11, 2015 at 9:32 AM, <commits at source.squeak.org> wrote:
> A new version of Monticello was added to project The Inbox:
> http://source.squeak.org/inbox/Monticello-pre.623.mcz
>
> ==================== Summary ====================
>
> Name: Monticello-pre.623
> Author: pre
> Time: 11 November 2015, 4:32:57.142 pm
> UUID: 7f2ebcbb-1308-4d18-b89d-04c4e3076dc8
> Ancestors: Monticello-pre.622
>
> Adds a different rendering of reverted items in Monticello change browsers
> to allow developers to remember what was already removed.
> This integrates with the Ignore feature of the SaveDialog.
>
> =============== Diff against Monticello-pre.622 ===============
>
> Item was changed:
> MCCodeTool subclass: #MCOperationsBrowser
> + instanceVariableNames: 'selection reverts'
> - instanceVariableNames: 'selection'
> classVariableNames: ''
> poolDictionaries: ''
> category: 'Monticello-UI'!
>
> Item was added:
> + ----- Method: MCOperationsBrowser>>advanceSelection (in category
> 'selecting') -----
> + advanceSelection
> +
> + self selection < items size
> + ifTrue: [self selection: self selection + 1]!
>
> Item was changed:
> ----- Method: MCOperationsBrowser>>installSelection (in category
> 'actions') -----
> installSelection
> | loader |
> selection ifNotNil:
> [loader := MCPackageLoader new.
> selection applyTo: loader.
> + loader loadWithName: self changeSetNameForInstall.
> + self reverts remove: selection ifAbsent: [].
> + self changed: #list ]!
> - loader loadWithName: self changeSetNameForInstall ]!
>
> Item was changed:
> ----- Method: MCOperationsBrowser>>list (in category 'accessing') -----
> list
> + ^ self items collect: [:each |
> + (self reverts includes: each)
> + ifFalse: [each summary]
> + ifTrue: [Text string: '( ', each summary, ' )'
> attributes: { TextEmphasis italic . TextEmphasis struckOut } ]]!
> - ^ self items collect: [:ea | ea summary]!
>
> Item was changed:
> ----- Method: MCOperationsBrowser>>revertSelection (in category
> 'actions') -----
> revertSelection
> | loader |
> selection ifNotNil:
> [loader := MCPackageLoader new.
> selection inverse applyTo: loader.
> + loader loadWithName: self changeSetNameForInstall.
> + self reverts add: selection.
> + self
> + advanceSelection;
> + changed: #list ]!
> - loader loadWithName: self changeSetNameForInstall ]!
>
> Item was added:
> + ----- Method: MCOperationsBrowser>>reverts (in category 'accessing')
> -----
> + reverts
> + ^ reverts ifNil: [reverts := Set new]!
>
> Item was changed:
> ----- Method: MCSaveVersionDialog>>ignoreSelection (in category
> 'actions') -----
> ignoreSelection
> selection
> ifNil: [ignore size = items size
> ifFalse: [ignore addAll: items]
> ifTrue: [ignore removeAll]]
> ifNotNil: [
> ignore remove: selection ifAbsent: [
> ignore add: selection].
> + self advanceSelection].
> - self selection < items size
> - ifTrue: [self selection: self selection +
> 1]].
> self changed: #list
> !
>
> Item was changed:
> ----- Method: MCSaveVersionDialog>>list (in category 'accessing') -----
> list
> + ^ self items collect: [:each |
> + (self reverts includes: each)
> + ifFalse: [(self ignore includes: each)
> + ifFalse: [each summary]
> + ifTrue: [Text string: '(
> ', each summary, ' )' attribute: TextEmphasis struckOut]]
> + ifTrue: [Text string: '( ', each summary, ' )'
> attributes: { TextEmphasis italic . TextEmphasis struckOut } ]]!
> - ^ self items collect: [:ea |
> - (self ignore includes: ea)
> - ifFalse: [ea summary]
> - ifTrue: [Text string: '( ', ea summary, ' )'
> attribute: TextEmphasis struckOut ]]!
>
> Item was removed:
> - ----- Method: MCSaveVersionDialog>>revertSelection (in category
> 'actions') -----
> - revertSelection
> - super revertSelection.
> - selection ifNotNil: [
> - ignore add: selection.
> - self changed: #list].
> - !
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151111/e70e98b5/attachment.htm
More information about the Squeak-dev
mailing list
|