The Trunk: Morphic-kb.243.mcz

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

The Trunk: Morphic-kb.243.mcz

commits-2
Andreas Raab uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-kb.243.mcz

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

Name: Morphic-kb.243
Author: kb
Time: 20 November 2009, 6:02:23 am
UUID: 644ac6da-ec24-8c48-b190-a17e67370545
Ancestors: Morphic-kb.242

 - fix: #releaseSelection: prevented clearing the selection of MenuMorph when disappearing. This caused at least some of the glitches.
 - refactored TheWorldMainDockingBar to build a DockingBarMorph without blocks, but with tragets, selectors and arguments.

=============== Diff against Morphic-kb.242 ===============

Item was added:
+ ----- Method: MenuItemMorph>>subMenuUpdater:selector:arguments: (in category 'accessing') -----
+ subMenuUpdater: updater selector: selector arguments: arguments
+
+ subMenu := UpdatingMenuMorph new.
+ subMenu updater: updater updateSelector: selector arguments: arguments.
+ self changed.
+ !

Item was added:
+ ----- Method: TheWorldMainDockingBar>>saveAndQuitSqueak (in category 'menu actions') -----
+ saveAndQuitSqueak
+
+ SmalltalkImage current snapshot: true andQuit: true!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>saveImageAs (in category 'menu actions') -----
+ saveImageAs
+
+ SmalltalkImage current saveAs!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>newProjectMenuItemsOn: (in category 'submenu - projects') -----
  newProjectMenuItemsOn: menu
 
  Project allSubclasses do: [ :each |
  menu addItem: [ :item |
  item
  contents: ('New ', each name) translated;
  help: ('Start a new ', each name) translated;
+ target: self;
+ selector: #newProject:;
+ arguments: { each } ] ]!
- action: [ ProjectViewMorph openOn: each new ] ] ]!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>newProject: (in category 'menu actions') -----
+ newProject: projectClass
+
+ ProjectViewMorph openOn: projectClass new!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>save (in category 'menu actions') -----
+ save
+
+ SmalltalkImage current snapshot: true andQuit: false!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>windowMenuFor:on: (in category 'submenu - windows') -----
  windowMenuFor: window on: menu
 
  menu
  addItem: [ :item |
  item
  contents: 'Close';
+ target: window;
+ selector: #delete ];
- action: [ window delete ] ];
  addItem: [ :item |
  item
  contents: 'Toggle Full Screen';
+ target: window;
+ selector: #expandBoxHit ]!
- action: [ window expandBoxHit ] ]!

Item was added:
+ ----- Method: MenuItemMorph>>subMenuUpdater:selector: (in category 'accessing') -----
+ subMenuUpdater: updater selector: selector
+
+ subMenu := UpdatingMenuMorph new.
+ subMenu updater: updater updateSelector: selector.
+ self changed.
+ !

Item was changed:
  ----- Method: TheWorldMainDockingBar>>workspaceMenuItemOn: (in category 'submenu - tools') -----
  workspaceMenuItemOn: menu
 
  menu addItem: [ :item |
  item
  contents: 'Workspace' translated;
  help: 'Open a Workspace' translated;
  icon: (self colorIcon: Preferences workspaceWindowColor);
+ target: StandardToolSet;
+ selector: #openWorkspace ]!
- action: [ StandardToolSet openWorkspace ] ]!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>transcriptMenuItemOn: (in category 'submenu - tools') -----
  transcriptMenuItemOn: menu
 
  menu addItem: [ :item |
  item
  contents: 'Transcript' translated;
  help: 'Open the Transcript' translated;
  icon: (self colorIcon: Preferences transcriptWindowColor);
+ target: Transcript;
+ selector: #open ]!
- action: [ Transcript open ] ]!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>loadProjectMenuItemOn: (in category 'submenu - projects') -----
  loadProjectMenuItemOn: menu
 
  menu addItem: [ :item |
  item
  contents: 'Load Project' translated;
  help: 'Load a project from a file' translated;
  icon: MenuIcons smallLoadProjectIcon;
+ target: self;
+ selector: #loadProject ]!
- action: [ World worldMenu loadProject ] ]!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>newProjectMenuItemOn: (in category 'submenu - projects') -----
  newProjectMenuItemOn: menu
 
  menu addItem: [ :item |
  item
  contents: 'New Project' translated;
  help: 'Start a new MorphicProject' translated;
  icon: MenuIcons smallProjectIcon;
+ target: self;
+ selector: #newProject:;
+ arguments: { MorphicProject };
- action: [ ProjectViewMorph openOn: MorphicProject new ];
  addSubMenu: [ :subMenu |
  self newProjectMenuItemsOn: subMenu ] ]!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>monticelloBrowserMenuItemOn: (in category 'submenu - tools') -----
  monticelloBrowserMenuItemOn: menu
 
  menu addItem: [ :item |
  item
  contents: 'Monticello Browser' translated;
  help: 'Open a Monticello Browser' translated;
  icon: (self colorIcon: MCTool basicNew defaultBackgroundColor);
+ target: MCWorkingCopyBrowser;
+ selector: #open ]!
- action: [ MCWorkingCopyBrowser open ] ]!

Item was changed:
  ----- Method: UpdatingMenuMorph>>updateMenu (in category 'update') -----
  updateMenu
  "Reconstitute the menu by first removing the contents and then building it afresh"
 
  self removeAllMorphs.
+ arguments
+ ifNil: [ updater perform: updateSelector with: self ]
+ ifNotNil: [
+ updater
+ perform: updateSelector
+ withArguments: arguments, { self } ]
+ !
- updater perform: updateSelector with: self
-
- !

Item was changed:
  ----- Method: TheWorldMainDockingBar>>saveAsMenuItemOn: (in category 'submenu - squeak') -----
  saveAsMenuItemOn: menu
 
  menu addItem: [ :item |
  item
  contents: 'Save Image As...' translated;
  help: 'Save the current state of Squeak on disk under a new name' translated;
  icon: MenuIcons smallSaveAsIcon;
+ target: self;
+ selector: #saveImageAs ]!
- action: [ SmalltalkImage current saveAs ] ]!

Item was changed:
  MenuMorph subclass: #UpdatingMenuMorph
+ instanceVariableNames: 'updater updateSelector arguments'
- instanceVariableNames: 'updater updateSelector'
  classVariableNames: ''
  poolDictionaries: ''
  category: 'Morphic-Menus'!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>jumpToProjectMenuItemOn: (in category 'submenu - projects') -----
  jumpToProjectMenuItemOn: menu
 
  menu addItem: [ :item |
  item
  contents: 'Jump To Project' translated;
  icon: MenuIcons smallForwardIcon;
+ subMenuUpdater: self
+ selector: #updateJumpToProjectSubMenu: ]!
- addUpdatingSubMenu: [ :subMenu |
- subMenu defaultTarget: Project.
- Project buildJumpToMenu: subMenu ] ]!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>quitMenuItemOn: (in category 'submenu - squeak') -----
  quitMenuItemOn: menu
 
  menu addItem: [ :item |
  item
  contents: 'Quit' translated;
  help: 'Quit out of Squeak' translated;
  icon: MenuIcons smallQuitIcon;
+ target: self;
+ selector: #quitSqueak ]!
- action: [
- SmalltalkImage current
- snapshot: (
- self
- confirm: 'Save changes before quitting?' translated
- orCancel: [ ^self ])
- andQuit: true ] ]!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>saveMenuItemOn: (in category 'submenu - squeak') -----
  saveMenuItemOn: menu
 
  menu addItem: [ :item |
  item
  contents: 'Save Image' translated;
  help: 'Save the current state of Squeak on disk' translated;
  icon: MenuIcons smallSaveIcon;
+ target: self;
+ selector: #saveImage ]!
- action: [ SmalltalkImage current snapshot: true andQuit: false ] ]!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>saveImage (in category 'menu actions') -----
+ saveImage
+
+ SmalltalkImage current saveSession!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>saveProjectMenuItemOn: (in category 'submenu - projects') -----
  saveProjectMenuItemOn: menu
 
  menu addItem: [ :item |
  item
  contents: 'Save Project' translated;
  help: 'Save this project on a file' translated;
  icon: MenuIcons smallPublishIcon;
+ target: World;
+ selector: #saveOnFile ]!
- action: [ World saveOnFile ] ]!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>testRunnerMenuItemOn: (in category 'submenu - tools') -----
  testRunnerMenuItemOn: menu
 
  menu addItem: [ :item |
  item
  contents: 'Test Runner' translated;
  help: 'Open the Test Runner' translated;
  icon: (self colorIcon: TestRunner basicNew defaultBackgroundColor);
+ target: TestRunner;
+ selector: #open ]!
- action: [ TestRunner open ] ]!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>quitSqueak (in category 'menu actions') -----
+ quitSqueak
+
+ ^SmalltalkImage current
+ snapshot: (
+ self
+ confirm: 'Save changes before quitting?' translated
+ orCancel: [ ^self ])
+ andQuit: true
+
+ !

Item was added:
+ ----- Method: TheWorldMainDockingBar>>loadProject (in category 'menu actions') -----
+ loadProject
+
+ World worldMenu loadProject!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>updateMenuItemOn: (in category 'submenu - squeak') -----
  updateMenuItemOn: menu
 
  menu addItem: [ :item |
  item
  contents: 'Update Squeak' translated;
  help: 'Load latest code updates via the internet' translated;
+ target: self;
+ selector: #updateSqueak ]!
- action: [ Utilities updateFromServer ] ]!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>saveAsNewVersionMenuItemOn: (in category 'submenu - squeak') -----
  saveAsNewVersionMenuItemOn: menu
 
  menu addItem: [ :item |
  item
  contents: 'Save As New Version' translated;
  help: 'Save the current state of Squeak on disk under a version-stamped name' translated;
  icon: MenuIcons smallSaveAsIcon;
+ target: self;
+ selector: #saveAsNewVersion ]!
- action: [ SmalltalkImage current saveAsNewVersion ] ]!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>updateSqueak (in category 'menu actions') -----
+ updateSqueak
+
+ Utilities updateFromServer!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>aboutMenuItemOn: (in category 'submenu - squeak') -----
  aboutMenuItemOn: menu
 
  menu addItem: [ :item |
  item
  contents: 'About Squeak...' translated;
+ target: self;
+ selector: #aboutSqueak ]!
- action: [ ] ]!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>windowsMenuOn: (in category 'construction') -----
  windowsMenuOn: aDockingBar
 
  aDockingBar addItem: [ :item |
  item
  contents: 'Windows' translated;
+ subMenuUpdater: self
+ selector: #listWindowsOn: ]
- addUpdatingSubMenu: [ :menu |
- self listWindowsOn: menu ] ]
  !

Item was changed:
  ----- Method: TheWorldMainDockingBar>>saveAndQuitMenuItemOn: (in category 'submenu - squeak') -----
  saveAndQuitMenuItemOn: menu
 
  menu addItem: [ :item |
  item
  contents: 'Save And Quit' translated;
  help: 'Save the current state of Squeak on disk, and quit out of Squeak' translated;
  icon: MenuIcons smallQuitIcon;
+ target: self;
+ selector: #saveAndQuitSqueak ]!
- action: [ SmalltalkImage current snapshot: true andQuit: true ] ]!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>previousProjectMenuItemOn: (in category 'submenu - projects') -----
  previousProjectMenuItemOn: menu
 
  menu addItem: [ :item |
  item
  contents: 'Previous Project' translated;
  help: 'Return to the most-recently-visited project' translated;
  icon: MenuIcons smallBackIcon;
+ target: World;
+ selector: #goBack ]!
- action: [ World goBack ] ]!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>browserMenuItemOn: (in category 'submenu - tools') -----
  browserMenuItemOn: menu
 
  menu addItem: [ :item |
  item
  contents: 'Browser' translated;
  help: 'Open a browser' translated;
  icon: (self colorIcon: Preferences browserWindowColor);
+ target: StandardToolSet;
+ selector: #openClassBrowser ]!
- action: [ StandardToolSet openClassBrowser ] ]!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>aboutSqueak (in category 'menu actions') -----
+ aboutSqueak
+ !

Item was changed:
  ----- Method: TheWorldMainDockingBar>>fileListMenuItemOn: (in category 'submenu - tools') -----
  fileListMenuItemOn: menu
 
  menu addItem: [ :item |
  item
  contents: 'File List' translated;
  help: 'Open a file list' translated;
  icon: (self colorIcon: Preferences fileListWindowColor);
+ target: StandardToolSet;
+ selector: #openFileList ]!
- action: [ StandardToolSet openFileList ] ]!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>saveAsNewVersion (in category 'menu actions') -----
+ saveAsNewVersion
+
+ SmalltalkImage current saveAsNewVersion!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>listWindowsOn: (in category 'submenu - windows') -----
  listWindowsOn: menu
 
  | expanded |
  expanded := SystemWindow windowsIn: World satisfying: [ :w | w isCollapsed not ].
  expanded ifEmpty: [
  menu addItem: [ :item |
  item
  contents: 'No open Windows' translated;
+ isEnabled: false ] ].
- isEnabled: false;
- action: [ ] ] ].
  expanded do: [ :each |
  menu addItem: [ :item |
  item
  contents: each label;
  icon: (self colorIcon: each paneColor);
+ subMenuUpdater: self
+ selector: #windowMenuFor:on:
+ arguments: { each };
- addUpdatingSubMenu: [ :subMenu | self windowMenuFor: each on: subMenu ];
  action: [ each activateAndForceLabelToShow ] ] ].!

Item was added:
+ ----- Method: UpdatingMenuMorph>>updater:updateSelector:arguments: (in category 'initialization') -----
+ updater: anObject updateSelector: aSelector arguments: anArray
+
+ updater := anObject.
+ updateSelector := aSelector.
+ arguments := anArray!

Item was added:
+ ----- Method: TheWorldMainDockingBar>>updateJumpToProjectSubMenu: (in category 'submenu - projects') -----
+ updateJumpToProjectSubMenu: subMenu
+
+ subMenu defaultTarget: Project.
+ Project buildJumpToMenu: subMenu!

Item was changed:
  ----- Method: MenuItemMorph>>deselect: (in category 'selecting') -----
  deselect: evt
+
  self isSelected: false.
  subMenu ifNotNil: [
+ owner ifNotNil: [ owner activeSubmenu: nil ] ].!
- owner ifNotNil:[owner activeSubmenu: nil].
- self removeAlarm: #deselectTimeOut:].!

Item was changed:
  ----- Method: MenuMorph>>releasesSelection: (in category 'events') -----
  releasesSelection: evt
  " The MenuMorph releases its selection if the selected item releases it.
  Used in #selectItem:event: "
 
  self selectedItem ifNil: [ ^true ].
+ evt ifNil: [ ^true ].
- evt ifNil: [ ^false ].
  (self selectedItem containsPoint: evt position) ifTrue: [ ^true ].
  ^self selectedItem releasesSelection: evt!