The Inbox: Monticello-ct.716.mcz

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

The Inbox: Monticello-ct.716.mcz

commits-2
Christoph Thiede uploaded a new version of Monticello to project The Inbox:
http://source.squeak.org/inbox/Monticello-ct.716.mcz

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

Name: Monticello-ct.716
Author: ct
Time: 17 February 2020, 1:04:25.4 am
UUID: 5524340c-418f-f64c-9788-982834460df7
Ancestors: Monticello-cmm.708

Refines OperationsBrowser menu commands: Allows to revert all/install all when selection is empty. Also fixes a bug that destroyed the selection if a single operation was reinstalled.

=============== Diff against Monticello-cmm.708 ===============

Item was changed:
  ----- Method: MCOperationsBrowser>>advanceSelection (in category 'selecting') -----
  advanceSelection
 
+ selection ifNil: [^ self].
  self selection < items size
  ifTrue: [self selection: self selection + 1]!

Item was added:
+ ----- Method: MCOperationsBrowser>>installOperations: (in category 'actions') -----
+ installOperations: operations
+
+ | loader |
+ loader := MCPackageLoader new.
+ operations do: [:operation |
+ operation applyTo: loader].
+ loader loadWithName: self changeSetNameForInstall.
+ self reverts removeAllFoundIn: operations.
+ self changed: #list; changed: #selection.!

Item was changed:
  ----- Method: MCOperationsBrowser>>installSelection (in category 'actions') -----
  installSelection
+
+ self installOperations: (selection
+ ifNotNil: [{selection}]
+ ifNil: [items]).!
- | loader |
- selection ifNotNil:
- [loader := MCPackageLoader new.
- selection applyTo: loader.
- loader loadWithName: self changeSetNameForInstall.
- self reverts remove: selection ifAbsent: [].
- self changed: #list ]!

Item was changed:
  ----- Method: MCOperationsBrowser>>methodListMenu: (in category 'menus') -----
  methodListMenu: aMenu
+ aMenu addList: #(
+ ('install' installSelection)
+ ('revert (x)' revertSelection)).
  selection ifNotNil:
  [aMenu addList: #(
+ ('browse origin' browseSelectionOrigin))].
+ aMenu addLine.
- ('install' installSelection)
- ('revert (x)' revertSelection)
- ('browse origin' browseSelectionOrigin)
- -)].
  self unchangedMethods ifNotEmpty:
  [aMenu addList: #(
  ('revert unchanged methods...' revertUnchangedMethods)
  -)].
  super methodListMenu: aMenu.
  ^ aMenu!

Item was added:
+ ----- Method: MCOperationsBrowser>>revertOperations: (in category 'actions') -----
+ revertOperations: operations
+
+ | loader |
+ loader := MCPackageLoader new.
+ operations do: [:operation |
+ operation inverse applyTo: loader].
+ self environmentInDisplayingImage beCurrentDuring: [loader loadWithName: self changeSetNameForInstall].
+ self reverts addAll: operations.
+ self changed: #list; changed: #selection.!

Item was changed:
  ----- Method: MCOperationsBrowser>>revertSelection (in category 'actions') -----
  revertSelection
+
+ selection
+ ifNotNil: [
+ self revertOperations: {selection}.
+ self advanceSelection ]
+ ifNil: [
+ self revertOperations: items ].!
- | loader |
- selection ifNotNil:
- [loader := MCPackageLoader new.
- selection inverse applyTo: loader.
- self environmentInDisplayingImage beCurrentDuring: [loader loadWithName: self changeSetNameForInstall].
- self reverts add: selection.
- self
- advanceSelection;
- changed: #list ]!