[squeak-dev] The Trunk: Morphic-mt.1999.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Sun Jun 12 14:12:29 UTC 2022


Hi Marcel,


Thanks!


> I also bumped the label size from 128 to 512 characters.


Since we are using a dialog window now and this feature is Morphic-only, can't we remove this truncation completely? I do have many workspaces in some of my images with more than 1000s of characters. It would be helpful if I could search the entire string through the dialog.


Best,

Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von commits at source.squeak.org <commits at source.squeak.org>
Gesendet: Freitag, 3. Juni 2022 15:57:23
An: squeak-dev at lists.squeakfoundation.org; packages at lists.squeakfoundation.org
Betreff: [squeak-dev] The Trunk: Morphic-mt.1999.mcz

Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1999.mcz

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

Name: Morphic-mt.1999
Author: mt
Time: 3 June 2022, 3:57:17.981722 pm
UUID: fa65a07a-3d2b-8544-b5a9-9ad67f734549
Ancestors: Morphic-mt.1998

Somewhat fixes the UI issue with "Find Workspace..." sub-menu in the "Windows" menu by delegation the choice to an extra dialog window.

(I proposed this alternative approach to Eliot (eem) a few weeks ago to which he agreed. I also bumped the label size from 128 to 512 characters.)

=============== Diff against Morphic-mt.1998 ===============

Item was added:
+ ----- Method: TheWorldMainDockingBar>>findWorkspace (in category 'submenu - windows') -----
+ findWorkspace
+
+        | allWorkspaces labels values |
+        allWorkspaces := Set new.
+        Project allMorphicProjects do:
+                [:project|
+                (self allVisibleWindowsIn: project world) do:
+                        [:window|
+                        (window model isKindOf: Workspace) ifTrue:
+                                [allWorkspaces add:
+                                        {       window model.
+                                                window.
+                                                project.
+                                                window model contents ifEmpty:
+                                                        [(window model dependents detect: [:d| d isTextView] ifNone: nil) textMorph contents] }]]].
+        allWorkspaces isEmpty ifTrue:
+                [^ self inform: 'No workspaces found.' translated].
+        "Sort workspaces with non-empty ones first..."
+        labels := OrderedCollection new.
+        values := OrderedCollection new.
+        (allWorkspaces sorted:
+                [:t1 :t2|
+                t1 last isEmpty == t2 last isEmpty
+                        ifTrue: [t1 second label <= t2 second label]
+                        ifFalse: [t1 last notEmpty]]) do:
+                [:tuple|
+                labels add: tuple second label, ': ', ((tuple last asString contractTo: 512) ifEmpty: ['(empty)']).
+                values add: (MessageSend receiver: self selector: #selectWorkspace:window:inProject:contents: arguments: tuple)].
+        (Project uiManager
+                chooseFrom: labels
+                values: values
+                title: 'Find Workspace' translated) value.!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>listWindowsOn: (in category 'submenu - windows') -----
  listWindowsOn: menu

         | windows |
         menu
                 addLine;
                 add: 'Collapse all windows' target: (Project current world) selector: #collapseAllWindows;
                 addItem: [:item | item
                         contents: 'Find Workspace...';
+                        target: self;
+                        selector: #findWorkspace];
-                        subMenuUpdater: self
-                        selector: #workspacesMenuFor:
-                        arguments: #()];
                 addLine;
                 add: 'Close all windows' target: self selector: #closeAllWindowsUnsafe;
                 addItem: [:item | item
                         contents: 'Close all windows without changes';
                         target: self;
                         icon: MenuIcons smallBroomIcon;
                         selector: #closeAllWindows];
                 add: 'Close all windows but workspaces' target: self selector: #closeAllWindowsButWorkspaces;
                 addLine.

         windows := self allVisibleWindows sorted: [:winA :winB |
                 ((winA model isNil or: [winB model isNil]) or: [winA model name = winB model name])
                         ifTrue: [winA label < winB label]
                         ifFalse: [winA model name < winB model name]].
         windows ifEmpty: [
                 menu addItem: [ :item |
                         item
                                 contents: 'No Windows' translated;
                                 isEnabled: false ] ].
         windows do: [ :each |
                 | windowColor |
                 windowColor := (each model respondsTo: #windowColorToUse)
                         ifTrue: [each model windowColorToUse]
                         ifFalse: [UserInterfaceTheme current get: #uniformWindowColor for: Model].
                 menu addItem: [ :item |
                         item
                                 contents: (self windowMenuItemLabelFor: each);
                                 icon: (self colorIcon: windowColor);
                                 target: each;
                                 selector: #comeToFront;
                                 subMenuUpdater: self
                                 selector: #windowMenuFor:on:
                                 arguments: { each };
                                 action: [ each beKeyWindow; expand ] ] ].!

Item was removed:
- ----- Method: TheWorldMainDockingBar>>workspacesMenuFor: (in category 'submenu - windows') -----
- workspacesMenuFor: anUpdatingMenuMorph
-
-        | allWorkspaces |
-        allWorkspaces := Set new.
-        Project allMorphicProjects do:
-                [:project|
-                (self allVisibleWindowsIn: project world) do:
-                        [:window|
-                        (window model isKindOf: Workspace) ifTrue:
-                                [allWorkspaces add:
-                                        {       window model.
-                                                window.
-                                                project.
-                                                window model contents ifEmpty:
-                                                        [(window model dependents detect: [:d| d isTextView] ifNone: nil) textMorph contents] }]]].
-        allWorkspaces isEmpty ifTrue:
-                [^anUpdatingMenuMorph addItem:
-                        [:item | item
-                                contents: 'no workspaces found']].
-        "Sort workspaces with non-empty ones first..."
-        (allWorkspaces sorted:
-                [:t1 :t2|
-                t1 last isEmpty == t2 last isEmpty
-                        ifTrue: [t1 second label <= t2 second label]
-                        ifFalse: [t1 last notEmpty]]) do:
-                [:tuple|
-                anUpdatingMenuMorph addItem:
-                        [:item | item
-                                contents: tuple second label, ': ', ((tuple last asString contractTo: 128) ifEmpty: ['(empty)']);
-                                target: self;
-                                selector: #selectWorkspace:window:inProject:contents:;
-                                arguments: tuple]]!

Item was changed:
+ (PackageInfo named: 'Morphic') postscript: 'TheWorldMainDockingBar updateInstances. "Updates menu for Windows > Find Workspace ..."'!
- (PackageInfo named: 'Morphic') postscript: 'Preferences maxBalloonHelpLineLength: 45.
-
- "See commentary in MorphicProject >> #startUpActions."
- WorldState disableDeferredUpdates: Smalltalk platformName = ''Mac OS''.'!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220612/691df912/attachment.html>


More information about the Squeak-dev mailing list