<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p><img size="65530" id="x_img933540" tabindex="0" style="max-width:99.9%" src="cid:2306d1cc-3d1c-436d-851c-b61d702452bf"><br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von commits@source.squeak.org <commits@source.squeak.org><br>
<b>Gesendet:</b> Freitag, 1. April 2022 18:16:32<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org<br>
<b>Betreff:</b> [squeak-dev] The Inbox: Morphic-ct.1958.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">A new version of Morphic was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Morphic-ct.1958.mcz">http://source.squeak.org/inbox/Morphic-ct.1958.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Morphic-ct.1958<br>
Author: ct<br>
Time: 1 April 2022, 6:16:24.044058 pm<br>
UUID: dbc1bb59-95b0-bf46-9cc5-d6c6a58bc1c4<br>
Ancestors: Morphic-ul.1956<br>
<br>
Proposal: Add "select change set..." item to the new changes menu in the docking bar.<br>
<br>
=============== Diff against Morphic-ul.1956 ===============<br>
<br>
Item was changed:<br>
----- Method: TheWorldMainDockingBar>>listChangesOn: (in category 'submenu - changes') -----<br>
listChangesOn: menu<br>
<br>
| fetchChangesBlock |<br>
+ menu addItem: [:item | item<br>
+ contents: 'Select change set...' translated;<br>
+ help: 'Switch to another change set or create a new one' translated;<br>
+ target: self;<br>
+ selector: #selectChangeSet;<br>
+ arguments: #()].<br>
{<br>
'Browse current change set' translated. #browseChangeSet. nil.<br>
'Browse changed methods' translated. #browseChangedMethods. nil.<br>
nil. nil. nil.<br>
'Simple Change Sorter' translated. #browseChanges. ChangeSorter.<br>
'Dual Change Sorter' translated. #browseChangesDual. DualChangeSorter.<br>
nil. nil. nil.<br>
} groupsDo: [:label :selector :modelClass |<br>
label ifNil: [menu addLine] ifNotNil: [<br>
menu addItem: [:item |<br>
item<br>
contents: label;<br>
icon: ((modelClass ifNotNil: [self colorIcon: modelClass basicNew windowColorToUse])<br>
ifNil: [MenuIcons blankIcon]);<br>
target: self;<br>
selector: selector]] ].<br>
<br>
fetchChangesBlock := [ | latestMethodChanges latestClassChanges updateBlock |<br>
self flag: #concurrency. "mt: Is this safe enough given the current update frequency of change sets and when this code is executed?"<br>
latestMethodChanges := (Array streamContents: [:s |<br>
ChangeSet current changedMethodsDo: [:method :changeType :dateAndTime :category |<br>
s nextPut: { dateAndTime. method. changeType. category }]])<br>
sorted: [:a :b | a first >= b first].<br>
latestClassChanges := (Array streamContents: [:s |<br>
ChangeSet current changedClassesDo: [:class :changeTypes :dateAndTime :category |<br>
"We are not interested in classes whose method's did only change."<br>
changeTypes ifNotEmpty: [s nextPut: { dateAndTime. class. changeTypes. category }]]])<br>
sorted: [:a :b | a first >= b first].<br>
updateBlock := [self listMethodChanges: latestMethodChanges andClassChanges: latestClassChanges on: menu].<br>
Project current uiProcess == Processor activeProcess<br>
ifTrue: updateBlock<br>
ifFalse: [Project current addDeferredUIMessage: [<br>
menu isInWorld ifTrue: [menu lastItem delete. updateBlock value]] ]].<br>
<br>
ChangeSet current numberOfChanges <= 30<br>
ifTrue: fetchChangesBlock ifFalse: [<br>
"We have too much data to process. Do it in the background to keep the UI responsive."<br>
menu add: '... fetching changes ...' translated action: nil.<br>
menu lastItem isEnabled: false.<br>
fetchChangesBlock forkAt: Processor userBackgroundPriority].!<br>
<br>
Item was added:<br>
+ ----- Method: TheWorldMainDockingBar>>selectChangeSet (in category 'submenu - changes') -----<br>
+ selectChangeSet<br>
+ <br>
+ | changeSets choice set |<br>
+ changeSets := ChangeSet allChangeSetNames reverse.<br>
+ choice := Project uiManager chooseFromOrAddTo: changeSets lines: #() title: 'Select or add change set...' translated.<br>
+ choice ifNil: [^ self].<br>
+ set := ChangeSet assuredChangeSetNamed: choice.<br>
+ set ifNotNil: [ChangeSet newChanges: set].!<br>
<br>
<br>
</div>
</span></font>
</body>
</html>