Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1861.mcz
==================== Summary ====================
Name: Morphic-mt.1861
Author: mt
Time: 27 January 2022, 4:22:53.86091 pm
UUID: 9ba08fc9-ebb8-9b4e-b88d-dabd1b733d7c
Ancestors: Morphic-mt.1860
Fixes bug in "set style..." menu interaction.
Text styles must always be copied so that local text fields can change stuff such the default text size without messing up the entire system. Also, the text morph must be configured with the style because the paragraph is just a helper.
=============== Diff against Morphic-mt.1860 ===============
Item was changed:
----- Method: TextEditor>>changeStyle (in category 'attributes') -----
changeStyle
"Let user change styles for the current text pane."
| names reply style current menuList |
+ current := morph textStyle.
- current := paragraph textStyle.
names := TextStyle knownTextStyles.
menuList := names collect: [ :styleName |
styleName = current name
ifTrue: [ '<on>', styleName ]
ifFalse: [ '<off>', styleName ]].
+ reply := Project uiManager chooseFrom: menuList values: names.
- reply := UIManager default chooseFrom: menuList values: names.
reply ifNotNil: [
(style := TextStyle named: reply) ifNil: [Beeper beep. ^ true].
+ morph textStyle: style copy].
- paragraph textStyle: style.
- paragraph composeAll.
- self recomputeSelection].
^ true!
Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-mt.467.mcz
==================== Summary ====================
Name: Graphics-mt.467
Author: mt
Time: 27 January 2022, 12:35:13.145541 pm
UUID: 7b6ea779-3305-2246-a533-1c9b6bb479ac
Ancestors: Graphics-mt.466
Fixes bug in synthetic StrikeFonts. An old change in #reset made it necessary to copy derivativeFonts in #postCopy. See, for example, #makeItalicGlyphs. #derivativeFonts should be a tree, not a graph.
=============== Diff against Graphics-mt.466 ===============
Item was changed:
----- Method: StrikeFont>>postCopy (in category 'copying') -----
postCopy
+ "The receiver is a just created shallow copy. This method gives it the final touch."
+
+ glyphs := glyphs copy.
+ xTable := xTable copy.
+ characterToGlyphMap := characterToGlyphMap copy.
+ derivativeFonts := derivativeFonts copy.
+
+ self reset. " takes care of the derivative fonts "!
- " the receiver is a just created shallow copy. This method gives it the final touch. "
-
- glyphs := glyphs copy.
- xTable := xTable copy.
- characterToGlyphMap := characterToGlyphMap copy.
-
- self reset. " takes care of the derivative fonts "!
Item was changed:
----- Method: StrikeFont>>printShortDescriptionOn: (in category 'printing') -----
printShortDescriptionOn: aStream
aStream
nextPutAll: self familyName;
space; print: self pointSize; nextPutAll: 'pt';
space; print: self pixelsPerInch; nextPutAll: 'ppi';
+ space; print: self height; nextPutAll: 'px';
+ space; nextPutAll: self emphasisString.!
- space; print: self height; nextPutAll: 'px'.!
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.1116.mcz
==================== Summary ====================
Name: Tools-mt.1116
Author: mt
Time: 27 January 2022, 12:09:57.521541 pm
UUID: f1b16021-118a-e64d-a71d-8646f9cb90e2
Ancestors: Tools-ct.1115
Makes the #fileOutOnAccept preference trigger an opt-in per Workspace window so that users actually learn where those contents will be saved.
=============== Diff against Tools-ct.1115 ===============
Item was changed:
----- Method: Workspace class>>open (in category 'instance creation') -----
open
| workspace |
workspace := self new.
- self fileOutOnAccept
- ifTrue: [workspace appendContentsToFileOnAccept].
^ self embedTranscript
ifTrue: [workspace buildAndOpenWorkspaceTranscript]
ifFalse: [workspace buildAndOpen]!
Item was changed:
----- Method: Workspace>>acceptContents: (in category 'accessing') -----
acceptContents: aString
+ (self class fileOutOnAccept and: [acceptAction isNil]) ifTrue: [
+ (Project uiManager
+ confirm: ('Do you want to append the contents to\\ {1}\\on accept so that you can safely close this window?\\{2}' translated withCRs asText format: {
+ (self suggestedFileNameForSave withNoLineLongerThan: 40) asText allBold.
+ '(You will not be asked again for this window. Use the window\menu to revise your decision later. Disable this prompt via the\system-wide #fileOutOnAccept preference.)' translated withCRs asText
+ addAttribute: (TextFontReference toFont: Preferences standardButtonFont)})
+ title: 'Accept Changes')
+ ifTrue: [self appendContentsToFileOnAccept]
+ ifFalse: [acceptAction := [:edits | true ]]].
+
- (self class fileOutOnAccept and: [acceptAction isNil]) ifTrue: [self inform: 'Your edits were <b>not persisted</b>. Please do not close this<br>window. If you want to save your edits to a file on accept,<br>check the workspace preferences or this window''s menu.' translated asTextFromHtml].
-
^ (acceptAction ifNotNil: [acceptAction value: aString]) ~~ false
and: [super acceptContents: aString]!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1860.mcz
==================== Summary ====================
Name: Morphic-mt.1860
Author: mt
Time: 27 January 2022, 12:08:10.671541 pm
UUID: 1e06e708-c328-da42-9f3d-a8cbc99ea089
Ancestors: Morphic-mt.1859
Tweaks Morphic-mt.1859 a little bit more to preserve *all* custom window titles when changing UI themes or scale factors.
=============== Diff against Morphic-mt.1859 ===============
Item was changed:
----- Method: StringMorph>>acceptContents (in category 'editing') -----
acceptContents
"The message is sent when the user hits enter or Cmd-S. Accept the current contents and end editing. This default implementation updates the model's known window title for pluggable windows."
self containingWindow ifNotNil: [:wnd |
+ wnd setLabel: self contents. "Needed for models that do not accept changes."
(wnd respondsTo: #getLabelSelector) ifTrue: [
wnd getLabelSelector ifNotNil: [:selector |
| mutator |
mutator := selector asSimpleSetter.
(wnd model respondsTo: mutator) ifTrue: [
wnd model perform: mutator with: self contents]]]]!
Item was changed:
+ (PackageInfo named: 'Morphic') postscript: '"Fixes custom edits that were not propagated properly to pluggable windows."
+ StringMorph allInstances do: [:ea | ea acceptContents].'!
- (PackageInfo named: 'Morphic') postscript: '"Fix missing command key shortcuts such as [cmd]+[+/-] for scale changes."
- Project allMorphicProjects do: [:p | p world initializeDesktopCommandKeySelectors].
-
- "New ''scale factor'' menu"
- TheWorldMainDockingBar updateInstances.
-
- "Enable ''Enclose selection with brackets'' by default (Morphic-mt.1812)"
- TextEditor encloseSelection: true.'!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1859.mcz
==================== Summary ====================
Name: Morphic-mt.1859
Author: mt
Time: 27 January 2022, 11:53:19.177541 am
UUID: 2c66cdaf-678a-e041-a518-ee6beef9824f
Ancestors: Morphic-mt.1858
Fixes an issue where the mini editor on a workspace's window title did not pass on the edits to the model.
Note that while this "fix" does not look good to me, it illustrates a fair use of Squeak's meta-object protocol. In a later revision, we should think about using specific string morphs for titles in pluggable windows. And add a #setLabelSelector to tool-builder specs etc. to get rid of the #asSimpleSetter assumption.
=============== Diff against Morphic-mt.1858 ===============
Item was changed:
----- Method: StringMorph>>acceptContents (in category 'editing') -----
acceptContents
+ "The message is sent when the user hits enter or Cmd-S. Accept the current contents and end editing. This default implementation updates the model's known window title for pluggable windows."
+
+ self containingWindow ifNotNil: [:wnd |
+ (wnd respondsTo: #getLabelSelector) ifTrue: [
+ wnd getLabelSelector ifNotNil: [:selector |
+ | mutator |
+ mutator := selector asSimpleSetter.
+ (wnd model respondsTo: mutator) ifTrue: [
+ wnd model perform: mutator with: self contents]]]]!
- "The message is sent when the user hits enter or Cmd-S. Accept the current contents and end editing. This default implementation does nothing."
- !
Christoph Thiede uploaded a new version of ToolBuilder-Kernel to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Kernel-ct.151.mcz
==================== Summary ====================
Name: ToolBuilder-Kernel-ct.151
Author: ct
Time: 27 January 2022, 2:24:12.700143 am
UUID: f388ba46-30e2-d447-adc0-eea48b1f93fe
Ancestors: ToolBuilder-Kernel-mt.150
Adds #dragType property to PluggableTreeSpec.
=============== Diff against ToolBuilder-Kernel-mt.150 ===============
Item was changed:
PluggableWidgetSpec subclass: #PluggableTreeSpec
+ instanceVariableNames: 'roots getSelectedPath setSelectedPath setSelected getSelected setSelectedParent getChildren hasChildren label icon unusedVar menu keyPress doubleClick dropItem dropAccept autoDeselect dragItem dragType nodeClass columns vScrollBarPolicy hScrollBarPolicy dragStarted'
- instanceVariableNames: 'roots getSelectedPath setSelectedPath setSelected getSelected setSelectedParent getChildren hasChildren label icon unusedVar menu keyPress doubleClick dropItem dropAccept autoDeselect dragItem nodeClass columns vScrollBarPolicy hScrollBarPolicy dragStarted'
classVariableNames: ''
poolDictionaries: ''
category: 'ToolBuilder-Kernel'!
!PluggableTreeSpec commentStamp: 'pre 4/24/2018 10:20' prior: 0!
A pluggable tree widget. PluggableTrees are slightly different from lists in such that they ALWAYS store the actual objects and use the label selector to query for the label of the item. PluggableTrees also behave somewhat differently in such that they do not have a "getSelected" message but only a getSelectedPath message. The difference is that getSelectedPath is used to indicate by the model that the tree should select the appropriate path. This allows disambiguation of items. Because of this, implementations of PluggableTrees must always set their internal selection directly, e.g., rather than sending the model a setSelected message and wait for an update of the #getSelected the implementation must set the selection before sending the #setSelected message. If a client doesn't want this, it can always just signal a change of getSelectedPath to revert to whatever is needed.
Instance variables:
roots <Symbol> The message to retrieve the roots of the tree.
getSelectedPath <Symbol> The message to retrieve the selected path in the tree.
setSelectedPath <Symbol> The message to set the selected path in the tree.
setSelected <Symbol> The message to set the selected item in the tree.
getChildren <Symbol> The message to retrieve the children of an item
hasChildren <Symbol> The message to query for children of an item
label <Symbol> The message to query for the label of an item.
icon <Symbol> The message to query for the icon of an item.
help <Symbol> The message to query for the help of an item.
menu <Symbol> The message to query for the tree's menu
keyPress <Symbol> The message to process a keystroke.
wantsDrop <Symbol> The message to query whether a drop might be accepted.
dropItem <Symbol> The message to drop an item.
enableDrag <Boolean> Enable dragging from this tree.
autoDeselect <Boolean> Whether the tree should allow automatic deselection or not.
unusedVar (unused) This variable is a placeholder to fix problems with loading packages in 3.10.!
Item was added:
+ ----- Method: PluggableTreeSpec>>dragType (in category 'accessing - drag and drop') -----
+ dragType
+ "Answer the selector to determine the type that can be used configure the drop."
+
+ ^ dragType!
Item was added:
+ ----- Method: PluggableTreeSpec>>dragType: (in category 'accessing - drag and drop') -----
+ dragType: aSymbol
+ "Inidicate the selector to determine the type that can be used configure the drop."
+
+ dragType := aSymbol.!
Christoph Thiede uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-ct.288.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-ct.288
Author: ct
Time: 27 January 2022, 2:20:53.392143 am
UUID: a36ad51c-5653-2f41-a258-7f0ba847dcd1
Ancestors: ToolBuilder-Morphic-mt.287
Adds change hook to update the pane color of an already existing window from its model.
=============== Diff against ToolBuilder-Morphic-mt.287 ===============
Item was changed:
----- Method: PluggableSystemWindow>>update: (in category 'updating') -----
update: what
what ifNil:[^self].
what == getLabelSelector ifTrue:[self setLabel: (model perform: getLabelSelector)].
what == getChildrenSelector ifTrue:[
children ifNil:[children := #()].
self removeAllMorphsIn: children.
children := model perform: getChildrenSelector.
self addAllMorphs: children.
children do:[:m| m hResizing: #spaceFill; vResizing: #spaceFill].
].
+ what == #windowColorToUse ifTrue: [
+ self paneColor = model windowColorToUse ifFalse:
+ [self refreshWindowColor]].
^super update: what!