The Inbox: Monticello-pre.623.mcz

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

The Inbox: Monticello-pre.623.mcz

commits-2
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].
- !


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Monticello-pre.623.mcz

Chris Muller-3
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, <[hidden email]> 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].
- !





Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Monticello-pre.623.mcz

marcel.taeumel
PluggableListMorphs and their LazyListMorph companions work with strings only. However, there is that "...emphasisAt: 1" check, which will be applied to the font setting:

LazyListMorph >> #display:atRow:on:
   ...
   emphasized := itemAsText isText
      ifTrue: [font emphasized: (itemAsText emphasisAt: 1)]
      ifFalse: [font].
   ...

This will only work with properties such as underlined, bold, and italic. Color would have to be used in the Canvas >> #drawString:in:font:color: call.

We could try to squeeze out that color information, too. Let me see...

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Monticello-pre.623.mcz

Tobias Pape

On 12.11.2015, at 09:20, marcel.taeumel <[hidden email]> wrote:

> PluggableListMorphs and their LazyListMorph companions work with strings
> only. However, there is that "...emphasisAt: 1" check, which will be applied
> to the font setting:
>
> LazyListMorph >> #display:atRow:on:
>   ...
>   emphasized := itemAsText isText
>      ifTrue: [font emphasized: (itemAsText emphasisAt: 1)]
>      ifFalse: [font].
>   ...
>
> This will only work with properties such as underlined, bold, and italic.
> Color would have to be used in the Canvas >> #drawString:in:font:color:
> call.
>
> We could try to squeeze out that color information, too. Let me see...

That would be so great!

Best
        -Tobias
Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Monticello-pre.623.mcz

marcel.taeumel
Done.

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Monticello-pre.623.mcz

David T. Lewis
In reply to this post by commits-2
On Wed, Nov 11, 2015 at 03:32:50PM +0000, [hidden email] wrote:
> A new version of Monticello was added to project The Inbox:
> http://source.squeak.org/inbox/Monticello-pre.623.mcz
>

Monticello-pre.622 and Monticello-pre.623 are in trunk now, so I moved
the inbox copies to the treated inbox (using web interface, select "details"
then "Move to the Treated Inbox").

Dave
 

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Monticello-pre.623.mcz

marcel.taeumel
Ah, thanks. I always wondered, how they disappear. :) I will think of it next time!

Best,
Marcel