diff --git a/packages/Algernon.package/ALGActionVerbFilter.class/class/helpTexts.st b/packages/Algernon.package/ALGActionVerbFilter.class/class/helpTexts.st index 5d157005..aa806aaf 100644 --- a/packages/Algernon.package/ALGActionVerbFilter.class/class/helpTexts.st +++ b/packages/Algernon.package/ALGActionVerbFilter.class/class/helpTexts.st @@ -7,7 +7,6 @@ helpTexts add: 'browse'->'Open a given class in the Browser.'; add: 'fileout'->'Generates a .st file in Resources of squeak image Folder'; add: 'open'->'Open an app, tool or morph'; - add: 'saverepo'->'Saves to Repository with a working copy'; add: 'inspect'->'Open Inspector for an object'; add: 'explore'-> 'Open Explorer for an object or all intances of a given class'; add: 'front'-> 'Bring a given window to the front'; diff --git a/packages/Algernon.package/ALGActionVerbFilter.class/class/keywords.st b/packages/Algernon.package/ALGActionVerbFilter.class/class/keywords.st index 11b03be9..c996fd79 100644 --- a/packages/Algernon.package/ALGActionVerbFilter.class/class/keywords.st +++ b/packages/Algernon.package/ALGActionVerbFilter.class/class/keywords.st @@ -1,7 +1,7 @@ filtering keywords ^ Set newFrom: {'run'. 'browse'. 'fileout'. - 'open'. 'saverepo'. 'do'. + 'open'. 'do'. 'inspect'. 'explore'. '='. 'front'. 'expand'. 'collapse'. 'contract'. 'close' } \ No newline at end of file diff --git a/packages/Algernon.package/ALGActionVerbFilter.class/methodProperties.json b/packages/Algernon.package/ALGActionVerbFilter.class/methodProperties.json index d17a6d2b..c8a621c1 100644 --- a/packages/Algernon.package/ALGActionVerbFilter.class/methodProperties.json +++ b/packages/Algernon.package/ALGActionVerbFilter.class/methodProperties.json @@ -1,6 +1,6 @@ { "class" : { - "helpTexts" : "b 5/29/2021 09:18", - "keywords" : "lm 5/26/2021 19:46" }, + "helpTexts" : "lm 7/6/2021 20:54", + "keywords" : "lm 7/6/2021 20:53" }, "instance" : { "filter:given:" : "pw 8/4/2020 00:30" } } diff --git a/packages/Algernon.package/ALGCore.class/instance/handleActivationKeyEvent..st b/packages/Algernon.package/ALGCore.class/instance/handleActivationKeyEvent..st index f2ff3cdd..00cfe553 100644 --- a/packages/Algernon.package/ALGCore.class/instance/handleActivationKeyEvent..st +++ b/packages/Algernon.package/ALGCore.class/instance/handleActivationKeyEvent..st @@ -9,6 +9,7 @@ handleActivationKeyEvent: anEvent isTrigger ifTrue: [ + self saveLastFocus. lastActivationKeyTimestamp := nil. self toggleVisibility: anEvent ] ifFalse: [ diff --git a/packages/Algernon.package/ALGCore.class/instance/lastFocus.st b/packages/Algernon.package/ALGCore.class/instance/lastFocus.st new file mode 100644 index 00000000..053f838d --- /dev/null +++ b/packages/Algernon.package/ALGCore.class/instance/lastFocus.st @@ -0,0 +1,4 @@ +accessing +lastFocus + + ^ lastFocus \ No newline at end of file diff --git a/packages/Algernon.package/ALGCore.class/instance/saveLastFocus.st b/packages/Algernon.package/ALGCore.class/instance/saveLastFocus.st new file mode 100644 index 00000000..1e22f8eb --- /dev/null +++ b/packages/Algernon.package/ALGCore.class/instance/saveLastFocus.st @@ -0,0 +1,4 @@ +updating +saveLastFocus + + lastFocus := ActiveHand keyboardFocus \ No newline at end of file diff --git a/packages/Algernon.package/ALGCore.class/methodProperties.json b/packages/Algernon.package/ALGCore.class/methodProperties.json index 167f08d8..a0b61ab5 100644 --- a/packages/Algernon.package/ALGCore.class/methodProperties.json +++ b/packages/Algernon.package/ALGCore.class/methodProperties.json @@ -67,7 +67,7 @@ "firstOnSearchStack" : "jRo 6/14/2020 18:21", "firstStep:" : "DS 5/21/2017 16:43", "grabFocus:" : "b 6/2/2021 00:59", - "handleActivationKeyEvent:" : "NM 6/30/2021 14:43", + "handleActivationKeyEvent:" : "NL 7/7/2021 18:14", "handleAsQuickAccess:" : "NM 6/7/2021 21:22", "handleListenEvent:" : "NM 6/30/2021 14:45", "handleTextEntered:" : "rk 8/3/2020 22:16", @@ -95,6 +95,7 @@ "keyStroke:" : "NL 6/7/2021 20:05", "lastActivationKeyTimestamp" : "fsa 6/16/2021 14:22", "lastActivationKeyTimestamp:" : "fsa 6/16/2021 14:22", + "lastFocus" : "NL 7/7/2021 18:14", "lastInputString" : "jRo 5/27/2020 17:35", "lastInputString:" : "jRo 5/27/2020 17:35", "moveCursorToEnd" : "beb 5/23/2020 15:58", @@ -113,6 +114,7 @@ "registeredWithSystem" : "LK 7/14/2016 15:04", "reset" : "beb 6/11/2020 15:13", "resetFilteringThreshold" : "DS 5/21/2017 16:55", + "saveLastFocus" : "NL 7/7/2021 18:14", "searchStack" : "J.J. 7/11/2015 21:40", "searchStack:" : "J.J. 7/11/2015 21:40", "selectNext" : "J.J. 7/27/2015 21:41", diff --git a/packages/Algernon.package/ALGCore.class/properties.json b/packages/Algernon.package/ALGCore.class/properties.json index f02cf1f2..8be2f7da 100644 --- a/packages/Algernon.package/ALGCore.class/properties.json +++ b/packages/Algernon.package/ALGCore.class/properties.json @@ -24,7 +24,8 @@ "textField", "firstStep", "lastInputString", - "lastActivationKeyTimestamp" ], + "lastActivationKeyTimestamp", + "lastFocus" ], "name" : "ALGCore", "pools" : [ ], diff --git a/packages/Algernon.package/ALGDynamicWorldMenuType.class/README.md b/packages/Algernon.package/ALGDynamicWorldMenuType.class/README.md deleted file mode 100644 index 8e70a160..00000000 --- a/packages/Algernon.package/ALGDynamicWorldMenuType.class/README.md +++ /dev/null @@ -1 +0,0 @@ -An ALGDynamicWorldMenuType represents an updating World Menu Entry, e.g. stuff from the windows menu. \ No newline at end of file diff --git a/packages/Algernon.package/ALGDynamicWorldMenuType.class/class/extractMenuEntriesFrom..st b/packages/Algernon.package/ALGDynamicWorldMenuType.class/class/extractMenuEntriesFrom..st deleted file mode 100644 index 99ed7ee0..00000000 --- a/packages/Algernon.package/ALGDynamicWorldMenuType.class/class/extractMenuEntriesFrom..st +++ /dev/null @@ -1,10 +0,0 @@ -algertem lists -extractMenuEntriesFrom: aNamedWorldMenuEntry - ^ aNamedWorldMenuEntry isDynamic - ifTrue: [ | entries | - aNamedWorldMenuEntry morph updateMenu. - entries := OrderedCollection newFrom: aNamedWorldMenuEntry menuEntries. - entries := self filterOutDuplicates: entries. - aNamedWorldMenuEntry morph removeAllMorphs. - entries ] - ifFalse: [ OrderedCollection new ] \ No newline at end of file diff --git a/packages/Algernon.package/ALGDynamicWorldMenuType.class/class/filterOutDuplicates..st b/packages/Algernon.package/ALGDynamicWorldMenuType.class/class/filterOutDuplicates..st deleted file mode 100644 index 453d2a93..00000000 --- a/packages/Algernon.package/ALGDynamicWorldMenuType.class/class/filterOutDuplicates..st +++ /dev/null @@ -1,7 +0,0 @@ -algertem lists -filterOutDuplicates: aCollection - - ^ aCollection reject: - [ :entry | entry isMenuItemMorph and: - [ ALGStaticWorldMenuType algertemList anySatisfy: - [ :staticEntry | staticEntry name = entry contents ] ] ] diff --git a/packages/Algernon.package/ALGDynamicWorldMenuType.class/methodProperties.json b/packages/Algernon.package/ALGDynamicWorldMenuType.class/methodProperties.json deleted file mode 100644 index 9205a575..00000000 --- a/packages/Algernon.package/ALGDynamicWorldMenuType.class/methodProperties.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "class" : { - "excludeDynamicWindows:" : "b 5/22/2021 20:46", - "extractMenuEntriesFrom:" : "NL 6/29/2021 15:00", - "filterOutDuplicates:" : "NM 6/29/2021 17:28", - "menuEntries:" : "NL 6/4/2021 16:21" }, - "instance" : { - } } diff --git a/packages/Algernon.package/ALGDynamicWorldMenuType.class/properties.json b/packages/Algernon.package/ALGDynamicWorldMenuType.class/properties.json deleted file mode 100644 index 8ef63cc7..00000000 --- a/packages/Algernon.package/ALGDynamicWorldMenuType.class/properties.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "category" : "Algernon", - "classinstvars" : [ - ], - "classvars" : [ - ], - "commentStamp" : "OH 5/20/2021 17:29", - "instvars" : [ - ], - "name" : "ALGDynamicWorldMenuType", - "pools" : [ - ], - "super" : "ALGWorldMenuType", - "type" : "normal" } diff --git a/packages/Algernon.package/ALGItemProvider.class/class/initializeItems.st b/packages/Algernon.package/ALGItemProvider.class/class/initializeItems.st index ea7ef8e9..4b8db963 100644 --- a/packages/Algernon.package/ALGItemProvider.class/class/initializeItems.st +++ b/packages/Algernon.package/ALGItemProvider.class/class/initializeItems.st @@ -11,5 +11,5 @@ initializeItems addAll: ALGSettingsType algertemList; addAll: ALGClassType algertemList; addAll: ALGMethodType algertemList; - addAll: ALGStaticWorldMenuType algertemList; + addAll: ALGWindowOperationsType algertemList; yourself \ No newline at end of file diff --git a/packages/Algernon.package/ALGItemProvider.class/instance/dynamicItems.st b/packages/Algernon.package/ALGItemProvider.class/instance/dynamicItems.st index ce6f9f41..441a63f5 100644 --- a/packages/Algernon.package/ALGItemProvider.class/instance/dynamicItems.st +++ b/packages/Algernon.package/ALGItemProvider.class/instance/dynamicItems.st @@ -1,5 +1,5 @@ accessing dynamicItems ^ (ALGExpressionType algertemList: self controller), - ALGDynamicWorldMenuType algertemList, + ALGWorldMenuType algertemList, ALGWindowType algertemList \ No newline at end of file diff --git a/packages/Algernon.package/ALGItemProvider.class/methodProperties.json b/packages/Algernon.package/ALGItemProvider.class/methodProperties.json index 264a1d95..ef3149fe 100644 --- a/packages/Algernon.package/ALGItemProvider.class/methodProperties.json +++ b/packages/Algernon.package/ALGItemProvider.class/methodProperties.json @@ -3,7 +3,7 @@ "defaultItems" : "J.J. 7/27/2015 17:37", "defaultSearchLevel" : "OH 5/20/2021 13:59", "filters" : "beb 5/20/2020 17:57", - "initializeItems" : "lm 5/19/2021 10:54", + "initializeItems" : "NL 7/6/2021 11:59", "maximumItemsToCompute" : "b 5/28/2021 15:43", "newIn:" : "J.J. 7/30/2015 22:00", "searchDelimeter" : "J.J. 7/28/2015 17:11" }, @@ -18,7 +18,7 @@ "controller:" : "beb 7/15/2020 16:47", "createCategoriesFor:" : "jRo 7/2/2020 01:01", "defaultItems" : "fsa 5/18/2021 17:37", - "dynamicItems" : "lm 5/25/2021 21:23", + "dynamicItems" : "NL 7/5/2021 19:32", "filterItems:for:" : "OH 5/20/2021 14:37", "filteredStaticItemsFor:" : "OH 5/20/2021 14:35", "getCachedStaticItemsFor:" : "OH 5/20/2021 14:37", diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/class/newFrom..st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/class/newFrom..st new file mode 100644 index 00000000..1fea76a2 --- /dev/null +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/class/newFrom..st @@ -0,0 +1,6 @@ +instance creation +newFrom: aMorph + + ^ self new + morph: aMorph; + yourself \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/class/newFrom.inCategory..st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/class/newFrom.inCategory..st new file mode 100644 index 00000000..ee08b6f2 --- /dev/null +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/class/newFrom.inCategory..st @@ -0,0 +1,6 @@ +instance creation +newFrom: aMorph inCategory: aString + + ^ (self newFrom: aMorph) + category: aString; + yourself \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/class/newFrom.name..st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/class/newFrom.name..st deleted file mode 100644 index bd52aa9d..00000000 --- a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/class/newFrom.name..st +++ /dev/null @@ -1,7 +0,0 @@ -instance creation -newFrom: aMorph name: aString - - ^ (self new) - name: aString; - morph: aMorph; - yourself. \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/allEntries.st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/allEntries.st new file mode 100644 index 00000000..d7ce5d0c --- /dev/null +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/allEntries.st @@ -0,0 +1,10 @@ +accessing +allEntries + | entries | + + entries := OrderedCollection new. + + entries addAll: (self menuEntries inject: OrderedCollection new into: + [ :accumulator :entry | accumulator addAll: {entry}, entry allEntries; yourself ]). + + ^ entries \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/category..st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/category..st new file mode 100644 index 00000000..ff108064 --- /dev/null +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/category..st @@ -0,0 +1,3 @@ +accessing +category: aString + category := aString \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/category.st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/category.st new file mode 100644 index 00000000..04be151a --- /dev/null +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/category.st @@ -0,0 +1,3 @@ +accessing +category + ^ category \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/enabledMenuSubmorphs.st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/enabledMenuSubmorphs.st index a50ed5f7..fcf1b457 100644 --- a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/enabledMenuSubmorphs.st +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/enabledMenuSubmorphs.st @@ -2,4 +2,4 @@ accessing enabledMenuSubmorphs "Some submorphs can't be disabled (e.g. line, ...)" - ^ self menuSubmorphs select: [:menuItem | (menuItem class canUnderstand: #isEnabled) not or: [menuItem isEnabled]] \ No newline at end of file + ^ (self menuSubmorphs, self subMenuSubmorphs) select: [:menuItem | (menuItem class canUnderstand: #isEnabled) not or: [menuItem isEnabled]] \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/excludeDynamicWindows.st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/excludeDynamicWindows.st deleted file mode 100644 index 0e77f63b..00000000 --- a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/excludeDynamicWindows.st +++ /dev/null @@ -1,7 +0,0 @@ -helpers -excludeDynamicWindows - - |lineMorph| - - lineMorph := self menuSubmorphs detect: [:subMorph | subMorph externalName = 'line']. - ^ self menuSubmorphs copyAfter: lineMorph diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/execute.st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/execute.st new file mode 100644 index 00000000..c0b32be6 --- /dev/null +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/execute.st @@ -0,0 +1,4 @@ +action +execute + + self morph doButtonAction \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/hasEntries.st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/hasEntries.st new file mode 100644 index 00000000..37612710 --- /dev/null +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/hasEntries.st @@ -0,0 +1,4 @@ +accessing +hasEntries + + ^ self menuEntries isEmpty not \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/ifDynamicItem..st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/ifDynamicItem..st new file mode 100644 index 00000000..d10fe4ec --- /dev/null +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/ifDynamicItem..st @@ -0,0 +1,4 @@ +accessing +ifDynamicItem: aBlock + + self isDynamicItem ifTrue: [aBlock value] \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/ifDynamicMenu..st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/ifDynamicMenu..st new file mode 100644 index 00000000..68e94bbe --- /dev/null +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/ifDynamicMenu..st @@ -0,0 +1,4 @@ +accessing +ifDynamicMenu: aBlock + + self isDynamicMenu ifTrue: [aBlock value] \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/isDynamic.st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/isDynamic.st deleted file mode 100644 index e22c3460..00000000 --- a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/isDynamic.st +++ /dev/null @@ -1,4 +0,0 @@ -accessing -isDynamic - - ^ self morph isKindOf: DockingBarUpdatingMenuMorph \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/isDynamicItem.st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/isDynamicItem.st new file mode 100644 index 00000000..b777da5e --- /dev/null +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/isDynamicItem.st @@ -0,0 +1,4 @@ +accessing +isDynamicItem + + ^ self morph isKindOf: UpdatingMenuItemMorph \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/isDynamicMenu.st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/isDynamicMenu.st new file mode 100644 index 00000000..e76ddb76 --- /dev/null +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/isDynamicMenu.st @@ -0,0 +1,8 @@ +accessing +isDynamicMenu + + | subMenu | + subMenu := self subMenuIfAbsent: [ ^ false ]. + + ^ (subMenu isKindOf: DockingBarUpdatingMenuMorph) + or: [subMenu isKindOf: UpdatingMenuMorph] \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/isEnabled.st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/isEnabled.st new file mode 100644 index 00000000..fd666468 --- /dev/null +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/isEnabled.st @@ -0,0 +1,4 @@ +accessing +isEnabled + + ^ (self morph class canUnderstand: #isEnabled) not or: [self morph isEnabled] \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/isMenu.st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/isMenu.st index a9bac241..e8814c61 100644 --- a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/isMenu.st +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/isMenu.st @@ -1,4 +1,6 @@ accessing isMenu - "Some entries in the docking bar (project name) are not a real menu, but are only distinct by not having a menu morph" - ^ self morph isNil not \ No newline at end of file + + self subMenuIfAbsent: [ ^ false ]. + + ^ true \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/isValid.st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/isValid.st new file mode 100644 index 00000000..8b47b373 --- /dev/null +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/isValid.st @@ -0,0 +1,4 @@ +accessing +isValid + + ^ (self morph isKindOf: DockingBarItemMorph) or: [self morph isKindOf: MenuItemMorph] \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/menuEntries.st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/menuEntries.st index 8a891efb..b7452370 100644 --- a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/menuEntries.st +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/menuEntries.st @@ -1,7 +1,6 @@ accessing menuEntries - (self isDynamic and: [self name = 'Windows']) - ifTrue: [^ self excludeDynamicWindows]. - - ^ self enabledMenuSubmorphs \ No newline at end of file + ^ self menuSubmorphs + collect: [ :morph | ALGNamedWorldMenuEntry newFrom: morph inCategory: self category ] + thenSelect: [ :entry | entry isValid and: [entry isEnabled] ] \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/menuSubmorphs.st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/menuSubmorphs.st index 47165907..9f91037c 100644 --- a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/menuSubmorphs.st +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/menuSubmorphs.st @@ -1,4 +1,9 @@ accessing menuSubmorphs - ^ self morph submorphs \ No newline at end of file + | subMenu | + + subMenu := self subMenuIfAbsent: [ ^ OrderedCollection new ]. + + self ifDynamicMenu: [subMenu updateMenu]. + ^ OrderedCollection newFrom: subMenu submorphs \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/name..st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/name..st deleted file mode 100644 index e8cfe90d..00000000 --- a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/name..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -name: aString - name := aString \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/name.st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/name.st index 22077c20..98825e1c 100644 --- a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/name.st +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/name.st @@ -1,3 +1,4 @@ accessing name - ^ name \ No newline at end of file + self ifDynamicItem: [self morph updateContents]. + ^ self morph contents \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/selector.st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/selector.st new file mode 100644 index 00000000..072f7ca0 --- /dev/null +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/selector.st @@ -0,0 +1,4 @@ +accessing +selector + ^ (self morph selector + ifNil: [ String new.]) asString \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/subMenuIfAbsent..st b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/subMenuIfAbsent..st new file mode 100644 index 00000000..aafff9a7 --- /dev/null +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/instance/subMenuIfAbsent..st @@ -0,0 +1,6 @@ +accessing +subMenuIfAbsent: aBlock + + ^ (self morph class canUnderstand: #subMenu) + ifTrue: [ self morph subMenu ifNil: [^ aBlock value] ] + ifFalse: [ aBlock value ] \ No newline at end of file diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/methodProperties.json b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/methodProperties.json index c9619c09..b5ce2a70 100644 --- a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/methodProperties.json +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/methodProperties.json @@ -1,14 +1,25 @@ { "class" : { - "newFrom:name:" : "NL 6/4/2021 16:16" }, + "newFrom:" : "NL 7/12/2021 23:09", + "newFrom:inCategory:" : "lm 7/6/2021 22:54" }, "instance" : { - "enabledMenuSubmorphs" : "fsa 6/27/2021 11:29", - "excludeDynamicWindows" : "fsa 6/27/2021 10:55", - "isDynamic" : "fsa 6/27/2021 10:40", - "isMenu" : "fsa 6/27/2021 10:40", - "menuEntries" : "fsa 6/27/2021 10:56", - "menuSubmorphs" : "fsa 6/27/2021 11:09", + "allEntries" : "b 7/12/2021 15:15", + "category" : "NL 7/5/2021 19:20", + "category:" : "NL 7/5/2021 19:21", + "enabledMenuSubmorphs" : "lm 7/4/2021 22:36", + "execute" : "NL 7/6/2021 12:16", + "hasEntries" : "NL 7/5/2021 19:42", + "ifDynamicItem:" : "NL 7/12/2021 23:24", + "ifDynamicMenu:" : "NL 7/12/2021 23:24", + "isDynamicItem" : "b 7/12/2021 18:54", + "isDynamicMenu" : "b 7/12/2021 18:41", + "isEnabled" : "NL 7/5/2021 17:48", + "isMenu" : "NL 7/5/2021 17:54", + "isValid" : "b 7/5/2021 18:43", + "menuEntries" : "b 7/12/2021 15:04", + "menuSubmorphs" : "b 7/12/2021 20:26", "morph" : "NL 6/4/2021 16:15", "morph:" : "NL 6/4/2021 16:15", - "name" : "NL 6/4/2021 16:15", - "name:" : "NL 6/4/2021 16:15" } } + "name" : "b 7/12/2021 20:28", + "selector" : "NL 7/12/2021 23:12", + "subMenuIfAbsent:" : "b 7/5/2021 18:18" } } diff --git a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/properties.json b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/properties.json index 649e49c5..972d2846 100644 --- a/packages/Algernon.package/ALGNamedWorldMenuEntry.class/properties.json +++ b/packages/Algernon.package/ALGNamedWorldMenuEntry.class/properties.json @@ -6,8 +6,8 @@ ], "commentStamp" : "fsa 6/27/2021 10:38", "instvars" : [ - "name", - "morph" ], + "morph", + "category" ], "name" : "ALGNamedWorldMenuEntry", "pools" : [ ], diff --git a/packages/Algernon.package/ALGStaticWorldMenuType.class/README.md b/packages/Algernon.package/ALGStaticWorldMenuType.class/README.md deleted file mode 100644 index 3644f1e7..00000000 --- a/packages/Algernon.package/ALGStaticWorldMenuType.class/README.md +++ /dev/null @@ -1 +0,0 @@ -An ALGStaticWorldMenuType represents a non-updating World Menu Entry, e.g. stuff from the tools or apps menu. diff --git a/packages/Algernon.package/ALGStaticWorldMenuType.class/class/extractMenuEntriesFrom..st b/packages/Algernon.package/ALGStaticWorldMenuType.class/class/extractMenuEntriesFrom..st deleted file mode 100644 index f329862c..00000000 --- a/packages/Algernon.package/ALGStaticWorldMenuType.class/class/extractMenuEntriesFrom..st +++ /dev/null @@ -1,5 +0,0 @@ -algertem lists -extractMenuEntriesFrom: aNamedWorldMenuEntry - ^ (aNamedWorldMenuEntry morph isKindOf: DockingBarUpdatingMenuMorph) - ifTrue: [ OrderedCollection new ] - ifFalse: [ OrderedCollection newFrom: aNamedWorldMenuEntry menuEntries ] \ No newline at end of file diff --git a/packages/Algernon.package/ALGStaticWorldMenuType.class/methodProperties.json b/packages/Algernon.package/ALGStaticWorldMenuType.class/methodProperties.json deleted file mode 100644 index eb8c6a9f..00000000 --- a/packages/Algernon.package/ALGStaticWorldMenuType.class/methodProperties.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "class" : { - "extractMenuEntriesFrom:" : "fsa 6/27/2021 11:11" }, - "instance" : { - } } diff --git a/packages/Algernon.package/ALGWindowOperationsType.class/README.md b/packages/Algernon.package/ALGWindowOperationsType.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/packages/Algernon.package/ALGWindowOperationsType.class/class/algertemList.st b/packages/Algernon.package/ALGWindowOperationsType.class/class/algertemList.st new file mode 100644 index 00000000..2353b9b1 --- /dev/null +++ b/packages/Algernon.package/ALGWindowOperationsType.class/class/algertemList.st @@ -0,0 +1,5 @@ +algertem lists +algertemList + + ^ self allWindowActions + collect: [ :each | ALGItem withAlgertype: (self with: each) ] \ No newline at end of file diff --git a/packages/Algernon.package/ALGWindowOperationsType.class/class/allWindowActions.st b/packages/Algernon.package/ALGWindowOperationsType.class/class/allWindowActions.st new file mode 100644 index 00000000..d69b1bdc --- /dev/null +++ b/packages/Algernon.package/ALGWindowOperationsType.class/class/allWindowActions.st @@ -0,0 +1,8 @@ +algertem lists +allWindowActions + + ^ {'Collapse all windows' -> #collapseAllWindows. + 'Close all windows' -> #closeAllWindows. + 'Close all windows without changes' -> #closeWithoutChanges. + 'Close all windows but workspaces' -> #closeAllButWorkspaces + } asOrderedCollection \ No newline at end of file diff --git a/packages/Algernon.package/ALGWindowOperationsType.class/class/icon.st b/packages/Algernon.package/ALGWindowOperationsType.class/class/icon.st new file mode 100644 index 00000000..107b4427 --- /dev/null +++ b/packages/Algernon.package/ALGWindowOperationsType.class/class/icon.st @@ -0,0 +1,4 @@ +algertem lists +icon + + ^ #Window \ No newline at end of file diff --git a/packages/Algernon.package/ALGWindowOperationsType.class/instance/closeAllButWorkspaces.st b/packages/Algernon.package/ALGWindowOperationsType.class/instance/closeAllButWorkspaces.st new file mode 100644 index 00000000..ca53f2d2 --- /dev/null +++ b/packages/Algernon.package/ALGWindowOperationsType.class/instance/closeAllButWorkspaces.st @@ -0,0 +1,4 @@ +action handlers +closeAllButWorkspaces + + TheWorldMainDockingBar instance closeAllWindowsButWorkspaces \ No newline at end of file diff --git a/packages/Algernon.package/ALGWindowOperationsType.class/instance/closeAllWindows.st b/packages/Algernon.package/ALGWindowOperationsType.class/instance/closeAllWindows.st new file mode 100644 index 00000000..05813a6a --- /dev/null +++ b/packages/Algernon.package/ALGWindowOperationsType.class/instance/closeAllWindows.st @@ -0,0 +1,4 @@ +action handlers +closeAllWindows + + TheWorldMainDockingBar instance closeAllWindowsUnsafe \ No newline at end of file diff --git a/packages/Algernon.package/ALGWindowOperationsType.class/instance/closeWithoutChanges.st b/packages/Algernon.package/ALGWindowOperationsType.class/instance/closeWithoutChanges.st new file mode 100644 index 00000000..a6186677 --- /dev/null +++ b/packages/Algernon.package/ALGWindowOperationsType.class/instance/closeWithoutChanges.st @@ -0,0 +1,4 @@ +action handlers +closeWithoutChanges + + TheWorldMainDockingBar instance closeAllWindows \ No newline at end of file diff --git a/packages/Algernon.package/ALGWindowOperationsType.class/instance/collapseAllWindows.st b/packages/Algernon.package/ALGWindowOperationsType.class/instance/collapseAllWindows.st new file mode 100644 index 00000000..1a64e803 --- /dev/null +++ b/packages/Algernon.package/ALGWindowOperationsType.class/instance/collapseAllWindows.st @@ -0,0 +1,4 @@ +action handlers +collapseAllWindows + + Project current world collapseAllWindows \ No newline at end of file diff --git a/packages/Algernon.package/ALGWindowOperationsType.class/instance/createAction.st b/packages/Algernon.package/ALGWindowOperationsType.class/instance/createAction.st new file mode 100644 index 00000000..7e952c01 --- /dev/null +++ b/packages/Algernon.package/ALGWindowOperationsType.class/instance/createAction.st @@ -0,0 +1,9 @@ +actions +createAction + + ^ ALGAction + withName: 'do' + rank: 1 + target: self + selector: self typeObject value + args: #() \ No newline at end of file diff --git a/packages/Algernon.package/ALGWindowOperationsType.class/instance/createListOfAlgeractions.st b/packages/Algernon.package/ALGWindowOperationsType.class/instance/createListOfAlgeractions.st new file mode 100644 index 00000000..b067ec1c --- /dev/null +++ b/packages/Algernon.package/ALGWindowOperationsType.class/instance/createListOfAlgeractions.st @@ -0,0 +1,4 @@ +actions +createListOfAlgeractions + + ^ self createSortedListFrom: { self createAction } \ No newline at end of file diff --git a/packages/Algernon.package/ALGWindowOperationsType.class/instance/name.st b/packages/Algernon.package/ALGWindowOperationsType.class/instance/name.st new file mode 100644 index 00000000..7ecc80bc --- /dev/null +++ b/packages/Algernon.package/ALGWindowOperationsType.class/instance/name.st @@ -0,0 +1,4 @@ +accessing +name + + ^ self typeObject key \ No newline at end of file diff --git a/packages/Algernon.package/ALGWindowOperationsType.class/instance/rankBonus.st b/packages/Algernon.package/ALGWindowOperationsType.class/instance/rankBonus.st new file mode 100644 index 00000000..988435db --- /dev/null +++ b/packages/Algernon.package/ALGWindowOperationsType.class/instance/rankBonus.st @@ -0,0 +1,4 @@ +relevance +rankBonus + + ^ 9 \ No newline at end of file diff --git a/packages/Algernon.package/ALGWindowOperationsType.class/instance/typeName.st b/packages/Algernon.package/ALGWindowOperationsType.class/instance/typeName.st new file mode 100644 index 00000000..f5a479e5 --- /dev/null +++ b/packages/Algernon.package/ALGWindowOperationsType.class/instance/typeName.st @@ -0,0 +1,4 @@ +accessing +typeName + + ^ 'Window operation' \ No newline at end of file diff --git a/packages/Algernon.package/ALGWindowOperationsType.class/methodProperties.json b/packages/Algernon.package/ALGWindowOperationsType.class/methodProperties.json new file mode 100644 index 00000000..6224b6a2 --- /dev/null +++ b/packages/Algernon.package/ALGWindowOperationsType.class/methodProperties.json @@ -0,0 +1,15 @@ +{ + "class" : { + "algertemList" : "NL 7/6/2021 11:54", + "allWindowActions" : "NL 7/6/2021 12:04", + "icon" : "NL 7/6/2021 11:55" }, + "instance" : { + "closeAllButWorkspaces" : "NL 7/6/2021 12:03", + "closeAllWindows" : "NL 7/6/2021 12:03", + "closeWithoutChanges" : "NL 7/6/2021 12:03", + "collapseAllWindows" : "NL 7/6/2021 12:01", + "createAction" : "NL 7/6/2021 11:59", + "createListOfAlgeractions" : "NL 7/6/2021 11:56", + "name" : "NL 7/6/2021 11:59", + "rankBonus" : "NL 7/6/2021 11:58", + "typeName" : "NL 7/6/2021 11:58" } } diff --git a/packages/Algernon.package/ALGStaticWorldMenuType.class/properties.json b/packages/Algernon.package/ALGWindowOperationsType.class/properties.json similarity index 56% rename from packages/Algernon.package/ALGStaticWorldMenuType.class/properties.json rename to packages/Algernon.package/ALGWindowOperationsType.class/properties.json index 10002507..667c8728 100644 --- a/packages/Algernon.package/ALGStaticWorldMenuType.class/properties.json +++ b/packages/Algernon.package/ALGWindowOperationsType.class/properties.json @@ -4,11 +4,11 @@ ], "classvars" : [ ], - "commentStamp" : "OH 5/20/2021 17:29", + "commentStamp" : "", "instvars" : [ ], - "name" : "ALGStaticWorldMenuType", + "name" : "ALGWindowOperationsType", "pools" : [ ], - "super" : "ALGWorldMenuType", + "super" : "ALGType", "type" : "normal" } diff --git a/packages/Algernon.package/ALGWorldMenuItem.class/instance/icon.st b/packages/Algernon.package/ALGWorldMenuItem.class/instance/icon.st index d908f26c..ea086749 100644 --- a/packages/Algernon.package/ALGWorldMenuItem.class/instance/icon.st +++ b/packages/Algernon.package/ALGWorldMenuItem.class/instance/icon.st @@ -2,5 +2,5 @@ icon icon ^ self class mapping - at: self algerType typeObject name + at: self algerType typeObject category ifAbsent: [ #WorldMenu ] \ No newline at end of file diff --git a/packages/Algernon.package/ALGWorldMenuItem.class/methodProperties.json b/packages/Algernon.package/ALGWorldMenuItem.class/methodProperties.json index 0ef2b75b..c1020eee 100644 --- a/packages/Algernon.package/ALGWorldMenuItem.class/methodProperties.json +++ b/packages/Algernon.package/ALGWorldMenuItem.class/methodProperties.json @@ -2,4 +2,4 @@ "class" : { "mapping" : "NL 6/4/2021 15:42" }, "instance" : { - "icon" : "NL 6/4/2021 16:43" } } + "icon" : "NL 7/5/2021 19:26" } } diff --git a/packages/Algernon.package/ALGWorldMenuType.class/class/actionNameSelectors.st b/packages/Algernon.package/ALGWorldMenuType.class/class/actionNameSelectors.st new file mode 100644 index 00000000..c197b9cd --- /dev/null +++ b/packages/Algernon.package/ALGWorldMenuType.class/class/actionNameSelectors.st @@ -0,0 +1,5 @@ +algertem lists +actionNameSelectors + "If world menu items have selectors starting with these Strings, name the action name after the selector" + + ^ {'apply' . 'toggle'} \ No newline at end of file diff --git a/packages/Algernon.package/ALGWorldMenuType.class/class/algertemList.st b/packages/Algernon.package/ALGWorldMenuType.class/class/algertemList.st index fe65fc9e..74519a2e 100644 --- a/packages/Algernon.package/ALGWorldMenuType.class/class/algertemList.st +++ b/packages/Algernon.package/ALGWorldMenuType.class/class/algertemList.st @@ -1,5 +1,5 @@ algertem lists algertemList - ^ self menuEntries + ^ self allEntries collect: [ :each | ALGWorldMenuItem withAlgertype: (self with: each) ] diff --git a/packages/Algernon.package/ALGWorldMenuType.class/class/algertemListWith..st b/packages/Algernon.package/ALGWorldMenuType.class/class/algertemListWith..st new file mode 100644 index 00000000..b718e5ba --- /dev/null +++ b/packages/Algernon.package/ALGWorldMenuType.class/class/algertemListWith..st @@ -0,0 +1,5 @@ +algertem lists +algertemListWith: aNamedWorldMenuEntry + + ^ aNamedWorldMenuEntry menuEntries + collect: [ :each | ALGWorldMenuItem withAlgertype: (self with: each)] \ No newline at end of file diff --git a/packages/Algernon.package/ALGWorldMenuType.class/class/allEntries.st b/packages/Algernon.package/ALGWorldMenuType.class/class/allEntries.st new file mode 100644 index 00000000..3cbf87c3 --- /dev/null +++ b/packages/Algernon.package/ALGWorldMenuType.class/class/allEntries.st @@ -0,0 +1,14 @@ +algertem lists +allEntries + + | entries | + + entries := OrderedCollection new. + entries addAll: (self menuEntries inject: OrderedCollection new into: + [ :accumulator :entry | accumulator addAll: {entry}, entry allEntries; yourself]). + self currentContextEntries do: [ :entry | + entries add: entry. + entries addAll: entry allEntries ]. + entries := self filterOutDuplicates: entries. + + ^ entries \ No newline at end of file diff --git a/packages/Algernon.package/ALGWorldMenuType.class/class/currentContextEntries.st b/packages/Algernon.package/ALGWorldMenuType.class/class/currentContextEntries.st new file mode 100644 index 00000000..9de778fd --- /dev/null +++ b/packages/Algernon.package/ALGWorldMenuType.class/class/currentContextEntries.st @@ -0,0 +1,21 @@ +algertem lists +currentContextEntries + | event menu menus items | + ALGCore currentInstance lastFocus ifNil: [ ^ {} ]. + event := MouseButtonEvent new. + "cursorPos := ALGCore currentInstance textField inputfield cursor. + Transcript showln: cursorPos." + event setType: 0 position: 0@0 buttons: 2 hand: ActiveHand. + ALGCore currentInstance lastFocus mouseDown: event. + menus := World submorphs select: [ :each | each isKindOf: MenuMorph ]. + menus ifEmpty: [^ {} ]. + menu := menus last. + items := menu items. + menu delete. + World doOneCycle. + ActiveHand newKeyboardFocus: ALGCore currentInstance textField. + ALGCore currentInstance moveCursorToEnd. + + ^ (items + collect: [ :each | ALGNamedWorldMenuEntry newFrom: each ]) + do: [ :each | each category: each name ] \ No newline at end of file diff --git a/packages/Algernon.package/ALGWorldMenuType.class/class/extractMenuEntriesFrom..st b/packages/Algernon.package/ALGWorldMenuType.class/class/extractMenuEntriesFrom..st deleted file mode 100644 index 62270589..00000000 --- a/packages/Algernon.package/ALGWorldMenuType.class/class/extractMenuEntriesFrom..st +++ /dev/null @@ -1,3 +0,0 @@ -algertem lists -extractMenuEntriesFrom: aNamedWorldMenuEntry - self subclassResponsibility \ No newline at end of file diff --git a/packages/Algernon.package/ALGWorldMenuType.class/class/filterOutDuplicates..st b/packages/Algernon.package/ALGWorldMenuType.class/class/filterOutDuplicates..st new file mode 100644 index 00000000..1b16e0d9 --- /dev/null +++ b/packages/Algernon.package/ALGWorldMenuType.class/class/filterOutDuplicates..st @@ -0,0 +1,7 @@ +helpers +filterOutDuplicates: anOrderedCollection + + | usedNames | + usedNames := Set new. + " note that ifAbsendAdd: returns whether or not the item was newly inserted " + ^ anOrderedCollection select: [ :each | usedNames ifAbsentAdd: each name ]. \ No newline at end of file diff --git a/packages/Algernon.package/ALGWorldMenuType.class/class/menuEntries.st b/packages/Algernon.package/ALGWorldMenuType.class/class/menuEntries.st index a0dd09e5..b8223946 100644 --- a/packages/Algernon.package/ALGWorldMenuType.class/class/menuEntries.st +++ b/packages/Algernon.package/ALGWorldMenuType.class/class/menuEntries.st @@ -1,16 +1,14 @@ algertem lists menuEntries - |entries| - - entries := OrderedCollection new. - ((self menus - collect: [ :each | ALGNamedWorldMenuEntry newFrom: each subMenu name: each contents ]) - select: [ :each | each isMenu ]) - do: [ :each | - entries addAll: ( - (self extractMenuEntriesFrom: each) - collect: [ :entry | ALGNamedWorldMenuEntry newFrom: entry name: each name]) ]. + | entries | + + entries := self dockingBar submorphs + collect: [:morph | ALGNamedWorldMenuEntry newFrom: morph] + thenSelect: + [:entry | entry isValid + and: [entry hasEntries] + and: [entry name ~= 'Windows']]. + entries do: [:entry | entry category: entry name]. - ^ entries select: [:each | each morph isKindOf: MenuItemMorph] - \ No newline at end of file + ^ entries \ No newline at end of file diff --git a/packages/Algernon.package/ALGWorldMenuType.class/class/menus.st b/packages/Algernon.package/ALGWorldMenuType.class/class/menus.st deleted file mode 100644 index be4131bd..00000000 --- a/packages/Algernon.package/ALGWorldMenuType.class/class/menus.st +++ /dev/null @@ -1,3 +0,0 @@ -algertem lists -menus - ^ self dockingBar submorphs select: [:each | each isKindOf: MenuItemMorph] \ No newline at end of file diff --git a/packages/Algernon.package/ALGWorldMenuType.class/instance/algertemChildrenList.st b/packages/Algernon.package/ALGWorldMenuType.class/instance/algertemChildrenList.st new file mode 100644 index 00000000..71bc15ec --- /dev/null +++ b/packages/Algernon.package/ALGWorldMenuType.class/instance/algertemChildrenList.st @@ -0,0 +1,4 @@ +children +algertemChildrenList + + ^ ALGWorldMenuType algertemListWith: self typeObject \ No newline at end of file diff --git a/packages/Algernon.package/ALGWorldMenuType.class/instance/createAction.st b/packages/Algernon.package/ALGWorldMenuType.class/instance/createAction.st index dd1c6065..0da78acc 100644 --- a/packages/Algernon.package/ALGWorldMenuType.class/instance/createAction.st +++ b/packages/Algernon.package/ALGWorldMenuType.class/instance/createAction.st @@ -1,7 +1,5 @@ actions createAction - ^ self createActionNamed: (self class menuActionMapping - at: self typeObject name - ifAbsent: [ 'open' ]) + ^ self createActionNamed: self determineActionName \ No newline at end of file diff --git a/packages/Algernon.package/ALGWorldMenuType.class/instance/determineActionName.st b/packages/Algernon.package/ALGWorldMenuType.class/instance/determineActionName.st new file mode 100644 index 00000000..b443a660 --- /dev/null +++ b/packages/Algernon.package/ALGWorldMenuType.class/instance/determineActionName.st @@ -0,0 +1,13 @@ +actions +determineActionName + + self typeObject hasEntries ifTrue: [ ^ 'entries' ]. + self class actionNameSelectors + detect: [ :selectorString | self typeObject selector startsWith: selectorString] + ifFound: [ :element | ^ element ]. + self class menuActionMapping + at: self typeObject category + ifPresent: [ :name | ^ name ]. + + ^ 'open' + \ No newline at end of file diff --git a/packages/Algernon.package/ALGWorldMenuType.class/instance/hasChildren.st b/packages/Algernon.package/ALGWorldMenuType.class/instance/hasChildren.st new file mode 100644 index 00000000..1a11bb5a --- /dev/null +++ b/packages/Algernon.package/ALGWorldMenuType.class/instance/hasChildren.st @@ -0,0 +1,4 @@ +children +hasChildren + + ^ self typeObject hasEntries \ No newline at end of file diff --git a/packages/Algernon.package/ALGWorldMenuType.class/instance/name.st b/packages/Algernon.package/ALGWorldMenuType.class/instance/name.st index a88b0832..91804de5 100644 --- a/packages/Algernon.package/ALGWorldMenuType.class/instance/name.st +++ b/packages/Algernon.package/ALGWorldMenuType.class/instance/name.st @@ -1,3 +1,3 @@ accessing name - ^ self typeObject morph contents \ No newline at end of file + ^ self typeObject name \ No newline at end of file diff --git a/packages/Algernon.package/ALGWorldMenuType.class/instance/openMenuItem.st b/packages/Algernon.package/ALGWorldMenuType.class/instance/openMenuItem.st index 5922493e..bae18fa9 100644 --- a/packages/Algernon.package/ALGWorldMenuType.class/instance/openMenuItem.st +++ b/packages/Algernon.package/ALGWorldMenuType.class/instance/openMenuItem.st @@ -1,3 +1,3 @@ actions openMenuItem - self typeObject morph doButtonAction \ No newline at end of file + self typeObject execute \ No newline at end of file diff --git a/packages/Algernon.package/ALGWorldMenuType.class/methodProperties.json b/packages/Algernon.package/ALGWorldMenuType.class/methodProperties.json index 9dcd75d1..0c4552c0 100644 --- a/packages/Algernon.package/ALGWorldMenuType.class/methodProperties.json +++ b/packages/Algernon.package/ALGWorldMenuType.class/methodProperties.json @@ -1,17 +1,22 @@ { "class" : { - "algertemList" : "NL 6/4/2021 16:39", + "actionNameSelectors" : "lm 7/6/2021 23:05", + "algertemList" : "NL 7/5/2021 19:16", + "algertemListWith:" : "NL 7/5/2021 20:08", + "allEntries" : "b 7/12/2021 15:15", "dockingBar" : "b 5/16/2021 19:30", - "extractMenuEntriesFrom:" : "NL 6/4/2021 16:23", + "filterOutDuplicates:" : "NM 7/6/2021 22:25", "icon" : "NL 6/4/2021 14:21", "menuActionMapping" : "NL 6/4/2021 16:34", - "menuEntries" : "fsa 6/27/2021 11:03", - "menus" : "OH 5/18/2021 11:28" }, + "menuEntries" : "b 7/12/2021 15:10" }, "instance" : { - "createAction" : "NL 6/4/2021 16:37", + "algertemChildrenList" : "NL 7/5/2021 19:34", + "createAction" : "lm 7/6/2021 23:28", "createActionNamed:" : "NL 6/4/2021 16:30", "createListOfAlgeractions" : "NL 6/4/2021 16:37", - "name" : "NL 6/4/2021 16:28", - "openMenuItem" : "NL 6/4/2021 16:28", + "determineActionName" : "NL 7/12/2021 23:38", + "hasChildren" : "NL 7/5/2021 19:42", + "name" : "NL 7/6/2021 12:17", + "openMenuItem" : "NL 7/6/2021 12:15", "rankBonus" : "NM 5/16/2021 21:14", "typeName" : "NM 5/16/2021 20:48" } } diff --git a/packages/AlgernonTests.package/ALGTestAction.class/instance/testWindowTypeCreateListOfAlgeractions.st b/packages/AlgernonTests.package/ALGTestAction.class/instance/testWindowTypeCreateListOfAlgeractions.st new file mode 100644 index 00000000..3b2a885b --- /dev/null +++ b/packages/AlgernonTests.package/ALGTestAction.class/instance/testWindowTypeCreateListOfAlgeractions.st @@ -0,0 +1,8 @@ +testing +testWindowTypeCreateListOfAlgeractions + |windows| + + windows := ALGWindowType visibleWindows. + windows do: [ :each | + self assert: (ALGWindowType + with: each) createListOfAlgeractions notEmpty] \ No newline at end of file diff --git a/packages/AlgernonTests.package/ALGTestAction.class/instance/testWorldMenuTypeAlgertemListWith.st b/packages/AlgernonTests.package/ALGTestAction.class/instance/testWorldMenuTypeAlgertemListWith.st new file mode 100644 index 00000000..7a496e27 --- /dev/null +++ b/packages/AlgernonTests.package/ALGTestAction.class/instance/testWorldMenuTypeAlgertemListWith.st @@ -0,0 +1,3 @@ +testing +testWorldMenuTypeAlgertemListWith + self assert: (ALGWorldMenuType algertemListWith: ALGWorldMenuType allEntries first) notEmpty \ No newline at end of file diff --git a/packages/AlgernonTests.package/ALGTestAction.class/instance/testWorldMenuTypeCreateListOfAlgeractions.st b/packages/AlgernonTests.package/ALGTestAction.class/instance/testWorldMenuTypeCreateListOfAlgeractions.st index 4653f2b4..971c8436 100644 --- a/packages/AlgernonTests.package/ALGTestAction.class/instance/testWorldMenuTypeCreateListOfAlgeractions.st +++ b/packages/AlgernonTests.package/ALGTestAction.class/instance/testWorldMenuTypeCreateListOfAlgeractions.st @@ -1,3 +1,8 @@ testing testWorldMenuTypeCreateListOfAlgeractions - self assertAlgeractionsNotEmptyForType: ALGWorldMenuType \ No newline at end of file + |entries| + + entries := ALGWorldMenuType allEntries. + entries do: [ :each | + self assert: (ALGWorldMenuType + with: each) createListOfAlgeractions notEmpty] \ No newline at end of file diff --git a/packages/AlgernonTests.package/ALGTestAction.class/methodProperties.json b/packages/AlgernonTests.package/ALGTestAction.class/methodProperties.json index 5a9558f5..6addc491 100644 --- a/packages/AlgernonTests.package/ALGTestAction.class/methodProperties.json +++ b/packages/AlgernonTests.package/ALGTestAction.class/methodProperties.json @@ -18,4 +18,6 @@ "testSelectionIncrement" : "rk 8/5/2020 19:49", "testSettingsTypeCreateListOfAlgeractions" : "rk 8/6/2020 10:51", "testTestTypeCreateListOfAlgeractions" : "rk 8/6/2020 10:51", - "testWorldMenuTypeCreateListOfAlgeractions" : "b 5/17/2021 14:12" } } + "testWindowTypeCreateListOfAlgeractions" : "b 7/12/2021 19:51", + "testWorldMenuTypeAlgertemListWith" : "b 7/12/2021 19:42", + "testWorldMenuTypeCreateListOfAlgeractions" : "b 7/12/2021 19:49" } } diff --git a/packages/AlgernonTests.package/ALGTestGeneral.class/instance/testDynamicItemsOnlyOnDefaultSearchLevel.st b/packages/AlgernonTests.package/ALGTestGeneral.class/instance/testDynamicItemsOnlyOnDefaultSearchLevel.st index a5438a43..622b30d4 100644 --- a/packages/AlgernonTests.package/ALGTestGeneral.class/instance/testDynamicItemsOnlyOnDefaultSearchLevel.st +++ b/packages/AlgernonTests.package/ALGTestGeneral.class/instance/testDynamicItemsOnlyOnDefaultSearchLevel.st @@ -4,7 +4,7 @@ testDynamicItemsOnlyOnDefaultSearchLevel self runQuery: 'Transcript clear'. self assert: ((self itemMorphs reject: [:each | each item isNil]) - anySatisfy: [:each | each item algerType isKindOf: ALGDynamicWorldMenuType ]). + anySatisfy: [:each | each item algerType isKindOf: ALGWorldMenuType ]). "increase search level" self runQuery: 'Monticello' withCursorAt: 'Package'. @@ -12,4 +12,4 @@ testDynamicItemsOnlyOnDefaultSearchLevel self deny: ((self itemMorphs reject: [:each | each item isNil]) - anySatisfy: [:each | each item algerType isKindOf: ALGDynamicWorldMenuType ]). \ No newline at end of file + anySatisfy: [:each | each item algerType isKindOf: ALGWorldMenuType ]). \ No newline at end of file diff --git a/packages/AlgernonTests.package/ALGTestGeneral.class/methodProperties.json b/packages/AlgernonTests.package/ALGTestGeneral.class/methodProperties.json index 79bc13ed..5877a9f4 100644 --- a/packages/AlgernonTests.package/ALGTestGeneral.class/methodProperties.json +++ b/packages/AlgernonTests.package/ALGTestGeneral.class/methodProperties.json @@ -6,7 +6,7 @@ "testBreadcrumbsListSize" : "rk 8/5/2020 16:44", "testClassAction" : "rk 8/5/2020 17:24", "testCloseWithEscape" : "b 6/2/2021 14:35", - "testDynamicItemsOnlyOnDefaultSearchLevel" : "OH 5/20/2021 14:26", + "testDynamicItemsOnlyOnDefaultSearchLevel" : "b 7/12/2021 16:45", "testKeyBindingsValid" : "jRo 8/1/2020 11:19", "testListContents" : "jRo 7/5/2020 22:15", "testMethodAction" : "rk 8/5/2020 17:26", diff --git a/packages/AlgernonTests.package/ALGTestTypes.class/instance/testDynamicWorldMenuTypeNotEmpty.st b/packages/AlgernonTests.package/ALGTestTypes.class/instance/testDynamicWorldMenuTypeNotEmpty.st deleted file mode 100644 index 2cc239e7..00000000 --- a/packages/AlgernonTests.package/ALGTestTypes.class/instance/testDynamicWorldMenuTypeNotEmpty.st +++ /dev/null @@ -1,3 +0,0 @@ -testing world menu types -testDynamicWorldMenuTypeNotEmpty - self denyEmptyAlgertemListForType: ALGDynamicWorldMenuType \ No newline at end of file diff --git a/packages/AlgernonTests.package/ALGTestTypes.class/instance/testHasChildren.st b/packages/AlgernonTests.package/ALGTestTypes.class/instance/testHasChildren.st index 6e94c0c4..b3c560cd 100644 --- a/packages/AlgernonTests.package/ALGTestTypes.class/instance/testHasChildren.st +++ b/packages/AlgernonTests.package/ALGTestTypes.class/instance/testHasChildren.st @@ -11,5 +11,4 @@ testHasChildren self assert: ALGPackageType algertemList first hasChildren. self assert: (ALGClassType new typeObject: ALGCore) hasChildren. self deny: ALGNullItem new hasChildren. - self deny: ALGStaticWorldMenuType algertemList first hasChildren. - self deny: ALGDynamicWorldMenuType algertemList first hasChildren. \ No newline at end of file + self assert: ALGWorldMenuType algertemList first hasChildren. \ No newline at end of file diff --git a/packages/AlgernonTests.package/ALGTestTypes.class/instance/testOpenSubmenuEntries.st b/packages/AlgernonTests.package/ALGTestTypes.class/instance/testOpenSubmenuEntries.st new file mode 100644 index 00000000..928df06c --- /dev/null +++ b/packages/AlgernonTests.package/ALGTestTypes.class/instance/testOpenSubmenuEntries.st @@ -0,0 +1,12 @@ +testing world menu types +testOpenSubmenuEntries + + |flatWidgetLookName fontSizeName | + + flatWidgetLookName := 'Flat Widget Look'. + self runQuery: flatWidgetLookName. + self assert: (self resultsIncludeName: flatWidgetLookName). + + fontSizeName := 'Increase Font Size'. + self runQuery: fontSizeName. + self assert: (self resultsIncludeName: fontSizeName). \ No newline at end of file diff --git a/packages/AlgernonTests.package/ALGTestTypes.class/instance/testStaticWorldMenuTypeNotEmpty.st b/packages/AlgernonTests.package/ALGTestTypes.class/instance/testStaticWorldMenuTypeNotEmpty.st deleted file mode 100644 index 1ac8f625..00000000 --- a/packages/AlgernonTests.package/ALGTestTypes.class/instance/testStaticWorldMenuTypeNotEmpty.st +++ /dev/null @@ -1,3 +0,0 @@ -testing world menu types -testStaticWorldMenuTypeNotEmpty - self denyEmptyAlgertemListForType: ALGStaticWorldMenuType \ No newline at end of file diff --git a/packages/AlgernonTests.package/ALGTestTypes.class/instance/testSubmenuCheckBoxes.st b/packages/AlgernonTests.package/ALGTestTypes.class/instance/testSubmenuCheckBoxes.st new file mode 100644 index 00000000..f4c65038 --- /dev/null +++ b/packages/AlgernonTests.package/ALGTestTypes.class/instance/testSubmenuCheckBoxes.st @@ -0,0 +1,15 @@ +testing world menu types +testSubmenuCheckBoxes + + | colorfulWindowsName colorfulWindowsInitialValue| + + colorfulWindowsName := 'Colorful Windows'. + colorfulWindowsInitialValue := Model useColorfulWindows. + self runQuery: colorfulWindowsName. + self assert: (self resultsIncludeName: colorfulWindowsName). + self doActionForItem: (self items first). + self deny: colorfulWindowsInitialValue equals: Model useColorfulWindows. + + Model useColorfulWindows: colorfulWindowsInitialValue + + \ No newline at end of file diff --git a/packages/AlgernonTests.package/ALGTestTypes.class/instance/testSubmenuCheckBoxesAfterTab.st b/packages/AlgernonTests.package/ALGTestTypes.class/instance/testSubmenuCheckBoxesAfterTab.st new file mode 100644 index 00000000..fcc126f0 --- /dev/null +++ b/packages/AlgernonTests.package/ALGTestTypes.class/instance/testSubmenuCheckBoxesAfterTab.st @@ -0,0 +1,20 @@ +testing world menu types +testSubmenuCheckBoxesAfterTab + + |themesAndColorName tab colorfulWindowsName colorfulWindowsInitialValue| + + themesAndColorName := 'Themes & Colors'. + tab := ALGFakeKeyboardEvent new keyString: ''. + colorfulWindowsName := 'Colorful Windows'. + self runQuery: themesAndColorName. + self algInstance keyStroke: tab. + self runQuery: colorfulWindowsName. + self assert: (self resultsIncludeName: colorfulWindowsName). + colorfulWindowsInitialValue := Model useColorfulWindows. + self runQuery: colorfulWindowsName. + self doActionForItem: self items first. + self deny: colorfulWindowsInitialValue equals: Model useColorfulWindows. + + Model useColorfulWindows: colorfulWindowsInitialValue + + \ No newline at end of file diff --git a/packages/AlgernonTests.package/ALGTestTypes.class/instance/testTabIntoSubmenus.st b/packages/AlgernonTests.package/ALGTestTypes.class/instance/testTabIntoSubmenus.st new file mode 100644 index 00000000..385b9dec --- /dev/null +++ b/packages/AlgernonTests.package/ALGTestTypes.class/instance/testTabIntoSubmenus.st @@ -0,0 +1,15 @@ +testing world menu types +testTabIntoSubmenus + + |themesAndColorName tab randomCheckBoxName randomEntryName| + + themesAndColorName := 'Themes & Colors'. + tab := ALGFakeKeyboardEvent new keyString: ''. + randomCheckBoxName := 'Squeak (duller)'. + randomEntryName := 'Set High-DPI Mode'. + self runQuery: themesAndColorName. + self algInstance keyStroke: tab. + self runQuery: randomCheckBoxName. + self assert: (self resultsIncludeName: randomCheckBoxName). + self runQuery: randomEntryName. + self assert: (self resultsIncludeName: randomEntryName). \ No newline at end of file diff --git a/packages/AlgernonTests.package/ALGTestTypes.class/instance/testWindowOpeningWorldMenuItem..st b/packages/AlgernonTests.package/ALGTestTypes.class/instance/testWindowOpeningWorldMenuItem..st index d67de036..cb4667cb 100644 --- a/packages/AlgernonTests.package/ALGTestTypes.class/instance/testWindowOpeningWorldMenuItem..st +++ b/packages/AlgernonTests.package/ALGTestTypes.class/instance/testWindowOpeningWorldMenuItem..st @@ -1,11 +1,11 @@ testing world menu types testWindowOpeningWorldMenuItem: menuEntry - | results newBrowser oldBrowsers | + | results newWindows oldWindows | self runQuery: 'open ' , menuEntry. results := self items select: [:each | each name = menuEntry and: [each algerType typeName = 'World Menu Item']]. self assert: results notEmpty. - oldBrowsers := self findSystemWindowsByLabel: menuEntry. + oldWindows := self findSystemWindowsByLabel: menuEntry. self doActionForItem: results first. - newBrowser := self findNewSystemWindowsByLabel: menuEntry old: oldBrowsers. - self assert: newBrowser notEmpty \ No newline at end of file + newWindows := self findNewSystemWindowsByLabel: menuEntry old: oldWindows. + self assert: newWindows notEmpty \ No newline at end of file diff --git a/packages/AlgernonTests.package/ALGTestTypes.class/instance/testWorldMenuTypeNotEmpty.st b/packages/AlgernonTests.package/ALGTestTypes.class/instance/testWorldMenuTypeNotEmpty.st new file mode 100644 index 00000000..4a37c47e --- /dev/null +++ b/packages/AlgernonTests.package/ALGTestTypes.class/instance/testWorldMenuTypeNotEmpty.st @@ -0,0 +1,3 @@ +testing world menu types +testWorldMenuTypeNotEmpty + self denyEmptyAlgertemListForType: ALGWorldMenuType \ No newline at end of file diff --git a/packages/AlgernonTests.package/ALGTestTypes.class/methodProperties.json b/packages/AlgernonTests.package/ALGTestTypes.class/methodProperties.json index 55789fac..82bab2f1 100644 --- a/packages/AlgernonTests.package/ALGTestTypes.class/methodProperties.json +++ b/packages/AlgernonTests.package/ALGTestTypes.class/methodProperties.json @@ -18,7 +18,6 @@ "testClassNotEmpty" : "rk 8/6/2020 10:51", "testClassType" : "rk 8/6/2020 10:51", "testClassesForCategoryNotEmpty" : "rk 8/5/2020 19:17", - "testDynamicWorldMenuTypeNotEmpty" : "OH 5/20/2021 13:35", "testExploreAllInstancesOpensOneWindow" : "b 6/25/2021 17:34", "testExpressionDoIt1" : "kej 8/4/2020 20:11", "testExpressionDoIt2" : "kej 8/4/2020 20:10", @@ -32,7 +31,7 @@ "testExpressionWithChildren" : "jRo 8/1/2020 13:03", "testFindsNewDynamicWorldMenuEntries" : "b 6/4/2021 18:19", "testGlobalVariableNotEmpty" : "rk 8/6/2020 10:51", - "testHasChildren" : "fsa 5/18/2021 18:39", + "testHasChildren" : "b 7/12/2021 19:21", "testHelpAction" : "8/6/2020 11:41:26", "testHelpAlgerItems" : "rk 8/6/2020 10:51", "testItemActionName:equals:" : "b 6/4/2021 17:13", @@ -40,6 +39,7 @@ "testMethodTypeOpenMethodInBrowser" : "beb 5/12/2020 12:12", "testOpenApps" : "b 6/4/2021 18:18", "testOpenInExistingBrowser" : "jRo 5/28/2020 20:32", + "testOpenSubmenuEntries" : "NL 7/12/2021 23:44", "testOpenTools" : "b 6/4/2021 18:18", "testOpenWindowEntry:withAction:" : "lm 5/26/2021 20:26", "testPackageAction" : "rk 8/5/2020 22:20", @@ -55,14 +55,16 @@ "testSave" : "OH 5/20/2021 13:48", "testSaveAndQuit" : "OH 5/20/2021 13:52", "testSettingsNotEmpty" : "rk 8/6/2020 10:51", - "testStaticWorldMenuTypeNotEmpty" : "OH 5/20/2021 13:34", + "testSubmenuCheckBoxes" : "lm 7/4/2021 23:00", + "testSubmenuCheckBoxesAfterTab" : "b 7/12/2021 19:32", + "testTabIntoSubmenus" : "b 7/12/2021 19:28", "testTestNotEmpty" : "rk 8/6/2020 10:51", "testWindowBringToFront" : "lm 5/26/2021 20:39", "testWindowClose" : "lm 5/26/2021 20:18", "testWindowCollapse" : "b 5/29/2021 09:35", "testWindowContract" : "lm 5/26/2021 20:42", "testWindowExpand" : "lm 5/26/2021 20:38", - "testWindowOpeningWorldMenuItem:" : "b 6/4/2021 18:18", + "testWindowOpeningWorldMenuItem:" : "lm 7/4/2021 21:28", "testWindowTypeNotEmpty" : "lm 5/26/2021 20:19", "testWorldMenuDefaultAction" : "b 6/4/2021 18:05", "testWorldMenuDefaultIcon" : "b 6/4/2021 18:05", @@ -70,4 +72,5 @@ "testWorldMenuDifferentIconsForDifferentMenus" : "b 6/4/2021 17:18", "testWorldMenuDisabledAreExcluded" : "NL 6/29/2021 17:54", "testWorldMenuSameActionsForSameMenu" : "b 6/4/2021 17:13", - "testWorldMenuSameIconsForSameMenu" : "b 6/4/2021 17:17" } } + "testWorldMenuSameIconsForSameMenu" : "b 6/4/2021 17:17", + "testWorldMenuTypeNotEmpty" : "b 7/12/2021 19:19" } }