[squeak-dev] The Trunk: SMLoader-mt.82.mcz

commits at source.squeak.org commits at source.squeak.org
Fri May 1 17:16:05 UTC 2015


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

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

Name: SMLoader-mt.82
Author: mt
Time: 1 May 2015, 7:15:59.365 pm
UUID: 5a87a1e6-6cac-1649-874e-a92ad8bcdd1a
Ancestors: SMLoader-cmm.81

Fixed layout problems and selection bugs in SqueakMap tools.

=============== Diff against SMLoader-cmm.81 ===============

Item was changed:
+ ----- Method: SMLoaderCategoricalPlus>>buildFancyWith: (in category 'DEPRECATED') -----
- ----- Method: SMLoaderCategoricalPlus>>buildFancyWith: (in category 'interface') -----
  buildFancyWith: aBuilder
  	"Creates a variant of the window where the package pane is split between installed and uninstalled packages."
  	| buttonBarHeight searchHeight vertDivide horizDivide |
  	buttonBarHeight := 0.07.
  	searchHeight := 0.07.
  	vertDivide := 0.5.
  	horizDivide := 0.6.
  	builder := aBuilder.
  	window := builder build: (builder pluggableWindowSpec new model: self;
  				label: #label;
  				children: (OrderedCollection new add:
  				((self buildButtonBarWith: builder)
  					frame: (0 @ 0 corner: 1 @ buttonBarHeight); yourself);
  				add: ((self buildCategoriesListWith: builder)
  					frame: (0 @ buttonBarHeight corner: vertDivide @ horizDivide); yourself);
  				add: ((self buildSearchPaneWith: builder)
  					frame: (vertDivide @ buttonBarHeight corner: 1 @ (buttonBarHeight + searchHeight)); yourself);
  				add: ((self buildNotInstalledPackagesListWith: builder)
  					frame: (vertDivide @ (buttonBarHeight + searchHeight) corner: 1 @ (horizDivide / 2)); yourself);
  				add: ((self buildInstalledPackagesListWith: builder)
  					frame: (vertDivide @ (horizDivide / 2) corner: 1 @ horizDivide); yourself);
  				add: ((self buildPackagePaneWith: builder)
  					frame: (0 @ horizDivide corner: 1 @ 1); yourself); yourself)).
  	window on: #mouseEnter send: #paneTransition: to: window.
  	window on: #mouseLeave send: #paneTransition: to: window.
  	self setUpdatablePanesFrom: #(#installedPackageList #notInstalledPackageList ).
  	currentPackageList := #notInstalled.
  	window extent: self initialExtent.
  	^ window!

Item was changed:
+ ----- Method: SMLoaderCategoricalPlus>>buildInstalledPackagesListWith: (in category 'DEPRECATED') -----
- ----- Method: SMLoaderCategoricalPlus>>buildInstalledPackagesListWith: (in category 'interface') -----
  buildInstalledPackagesListWith: aBuilder
  	^ aBuilder pluggableTreeSpec new model: self;
  		 roots: #installedPackageList;
  		 getSelectedPath: #selectedItemPath;
+ 		 getSelected: #selectedItem;
  		 setSelected: #selectedItem:;
  		 menu: #packagesMenu:;
  		 label: #itemLabel:;
  		 getChildren: #itemChildren:;
  		 hasChildren: #itemHasChildren:;
  		 autoDeselect: true;
  		 wantsDrop: true;
  		 yourself!

Item was changed:
+ ----- Method: SMLoaderCategoricalPlus>>buildNotInstalledPackagesListWith: (in category 'DEPRECATED') -----
- ----- Method: SMLoaderCategoricalPlus>>buildNotInstalledPackagesListWith: (in category 'interface') -----
  buildNotInstalledPackagesListWith: aBuilder
  	^ aBuilder pluggableTreeSpec new model: self;
  		 roots: #notInstalledPackageList;
  		 getSelectedPath: #selectedItemPath;
+ 		 getSelected: #selectedItem;
  		 setSelected: #selectedItem:;
  		 menu: #packagesMenu:;
  		 label: #itemLabel:;
  		 getChildren: #itemChildren:;
  		 hasChildren: #itemHasChildren:;
  		 autoDeselect: true;
  		 wantsDrop: true;
  		 yourself!

Item was changed:
  ----- Method: SMLoaderCategoricalPlus>>buildWith: (in category 'interface') -----
  buildWith: aBuilder
  	| buttonBarHeight searchHeight vertDivide horizDivide |
+ 	buttonBarHeight := Preferences standardButtonFont height * 2.
+ 	searchHeight := Preferences standardDefaultTextFont height * 2.
- 	buttonBarHeight := 0.07.
- 	searchHeight := 0.07.
  	vertDivide := 0.5.
  	horizDivide := 0.6.
  	builder := aBuilder.
  	window := builder build: (builder pluggableWindowSpec new model: self;
  				label: #label;
+ 				children:  (OrderedCollection new
+ 						add: ((self buildButtonBarWith: builder)
+ 							frame: (LayoutFrame
+ 								fractions: (0 @ 0 corner: 1 @ 0)
+ 								offsets: (0 at 0 corner: 0 at buttonBarHeight)));
+ 						add: ((self buildCategoriesListWith: builder)
+ 							frame: (LayoutFrame
+ 								fractions: (0 @ 0 corner: vertDivide @ horizDivide)
+ 								offsets: (0@ buttonBarHeight corner: 0 at 0)));
+ 						add: ((self buildSearchPaneWith: builder)
+ 							frame: (LayoutFrame
+ 								fractions: (vertDivide @ 0 corner: 1 @ 0)
+ 								offsets: (0@ buttonBarHeight corner: 0@ (buttonBarHeight + searchHeight))));
+ 						add: ((self buildPackagesListWith: builder)
+ 							frame: (LayoutFrame
+ 								fractions: (vertDivide @ 0 corner: 1 @ horizDivide)
+ 								offsets: (0 @ (buttonBarHeight + searchHeight) corner: 0 at 0)));
+ 						add: ((self buildPackagePaneWith: builder)
+ 								frame: (0 @ horizDivide corner: 1 @ 1));
+ 						 yourself);
+ 					 yourself).
- 				children: (OrderedCollection new add:
- 				((self buildButtonBarWith: builder)
- 					frame: (0 @ 0 corner: 1 @ buttonBarHeight); yourself);
- 				add: ((self buildCategoriesListWith: builder)
- 					frame: (0 @ buttonBarHeight corner: vertDivide @ horizDivide); yourself);
- 				add: ((self buildSearchPaneWith: builder)
- 					frame: (vertDivide @ buttonBarHeight corner: 1 @ (buttonBarHeight + searchHeight)));
- 				add: ((self buildPackagesListWith: builder)
- 					frame: (vertDivide @ (buttonBarHeight + searchHeight) corner: 1 @ horizDivide));
- 				add: ((self buildPackagePaneWith: builder)
- 					frame: (0 @ horizDivide corner: 1 @ 1)); yourself)).
  	window on: #mouseEnter send: #paneTransition: to: window.
  	window on: #mouseLeave send: #paneTransition: to: window.
  	window extent: self initialExtent.
  	^ window!

Item was changed:
  ----- Method: SMLoaderPlus>>buildCategoriesListWith: (in category 'interface') -----
  buildCategoriesListWith: aBuilder 
  	"Create the hierarchical list holding the category tree."
  	^ aBuilder pluggableTreeSpec new model: self;
  		 roots: #categoryList;
  		 getSelectedPath: #selectedCategoryPath;
  		 getChildren: #categoryChildren:;
  		 hasChildren: #categoryHasChildren:;
  		 setSelected: #selectedCategory:;
+ 		 getSelected: #selectedCategory;
  		 menu: #categoriesMenu:;
  		 label: #categoryLabel:;
  		 autoDeselect: true;
  		 wantsDrop: true;
  		 name: #categoriesList;
  		 yourself!

Item was changed:
  ----- Method: SMLoaderPlus>>buildPackagePaneWith: (in category 'interface') -----
  buildPackagePaneWith: aBuilder
  	"Create the text area to the right in the loader."
  
+ 	^ aBuilder pluggableTextSpec new
+ 		model: self;
+ 		getText: #itemDescription;
+ 		name: #packagePane;
+ 		help: 'Select a package to view its description.';
+ 		yourself!
- 	^ aBuilder pluggableTextSpec new model: self; getText: #itemDescription; name: #packagePane; yourself!

Item was changed:
  ----- Method: SMLoaderPlus>>buildPackagesListWith: (in category 'interface') -----
  buildPackagesListWith: aBuilder 
  	"Create the hierarchical list holding the packages and releases."
  	^ aBuilder pluggableTreeSpec new model: self;
  		 roots: #packageList;
  		 getSelectedPath: #selectedItemPath;
+ 		 getSelected: #selectedItem;
  		 setSelected: #selectedItem:;
  		 menu: #packagesMenu:;
  		 label: #itemLabel:;
  		 getChildren: #itemChildren:;
  		 hasChildren: #itemHasChildren:;
  		 autoDeselect: true;
  		 wantsDrop: true;
  		 name: #packagesList;
  		 yourself!

Item was changed:
  ----- Method: SMLoaderPlus>>buildSearchPaneWith: (in category 'interface') -----
  buildSearchPaneWith: aBuilder
  	^ aBuilder pluggableInputFieldSpec new model: self;
  		selection: #searchSelection;
+ 		setText: #findPackage:notifying:;
+ 		help: 'Search packages...';
+ 		name: #search;
+ 		yourself!
- 		getText: #searchText; setText: #findPackage:notifying:; name: #search; yourself!

Item was changed:
  ----- Method: SMLoaderPlus>>buildWith: (in category 'interface') -----
  buildWith: aBuilder 
  	"Create the package loader window."
+ 	| buttonBarHeight searchPaneHeight vertDivide horizDivide |
+ 	buttonBarHeight := Preferences standardButtonFont height * 2.
+ 	searchPaneHeight := Preferences standardDefaultTextFont height * 2.
- 	| buttonBarHeight vertDivide horizDivide |
- 	buttonBarHeight := 0.07.
  	vertDivide := 0.6.
  	horizDivide := 0.3.
  	builder := aBuilder.
  	window := builder build: (builder pluggableWindowSpec new model: self;
  					 label: #label;
  					 children: (OrderedCollection new
  						add: ((self buildButtonBarWith: builder)
+ 							frame: (LayoutFrame
+ 								fractions: (0 @ 0 corner: 1 @ 0)
+ 								offsets: (0 at 0 corner: 0 at buttonBarHeight)));
- 							frame: (0 @ 0 corner: 1 @ buttonBarHeight));
  						add: ((self buildSearchPaneWith: builder)
+ 							frame: (LayoutFrame
+ 								fractions: (0 @ 0 corner: horizDivide @ 0)
+ 								offsets: (0@ buttonBarHeight corner: 0@ (buttonBarHeight + searchPaneHeight))));
- 							frame: (0 @ buttonBarHeight corner: horizDivide @ (buttonBarHeight * 2)));
  						add: ((self buildPackagesListWith: builder)
+ 							frame: (LayoutFrame
+ 								fractions: (0 @ 0 corner: horizDivide @ vertDivide)
+ 								offsets: (0 @ (buttonBarHeight + searchPaneHeight) corner: 0 at 0)));
- 							frame: (0 @ (buttonBarHeight * 2) corner: horizDivide @ vertDivide));
  						add: ((self buildCategoriesListWith: builder)
  							frame: (0 @ vertDivide corner: horizDivide @ 1));
  						add: ((self buildPackagePaneWith: builder)
+ 								frame: (LayoutFrame
+ 									fractions: (horizDivide @ 0 corner: 1 @ 1)
+ 									offsets: (0 @ buttonBarHeight corner: 0 at 0)));
- 								frame: (horizDivide @ buttonBarHeight corner: 1 @ 1));
  						 yourself);
  					 yourself).
  	window on: #mouseEnter send: #paneTransition: to: window.
  	window on: #mouseLeave send: #paneTransition: to: window.
  	window extent: self initialExtent.
  	^ window!

Item was changed:
  ----- Method: SMLoaderPlus>>itemDescription (in category 'private') -----
  itemDescription
  	^ self selectedPackageOrRelease
+ 		ifNotNil: [:item | item fullDescription]!
- 		ifNil: ['<No package selected>']
- 		ifNotNilDo: [:item | item fullDescription]!

Item was changed:
  ----- Method: SMLoaderPlus>>searchText (in category 'interface') -----
  searchText
  	"A dummy default search text so that the field describes its purpose."
+ 	^ ''!
- 	^ 'Search packages'!

Item was changed:
  ----- Method: SMLoaderPlus>>selectedCategory: (in category 'accessing') -----
  selectedCategory: anSMCategory 
  	"Change the selected category."
  	selectedCategory := anSMCategory.
  	selectedCategory ifNotNil:
  		[ (selectedCategory objects includes: self selectedItem) ifFalse: [ self selectedItem: nil ] ].
  	self
+ 		 changed: #selectedCategory;
- 		 changed: #selectedCategoryPath ;
  		 changed: #packageList!

Item was changed:
  ----- Method: SMLoaderPlus>>selectedItem: (in category 'accessing') -----
  selectedItem: anItem
  	"This == workaround protects us from recursion since ToolBuilder's tree widgets will always tell us that the selection has been updated when we tell it that the selection path has been updated. Cleaner solutions invited."
  	anItem == selectedItem ifFalse: [
  		selectedItem := anItem.
+ 		self changed: #selectedItem.
- 		self changed: #selectedItemPath.
  		self changed: #itemDescription.
  		self changed: #hasSelectedItem]!



More information about the Squeak-dev mailing list