Karl Ramberg uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-kfr.604.mcz ==================== Summary ==================== Name: Tools-kfr.604 Author: kfr Time: 26 April 2015, 3:44:10.399 pm UUID: d08794a4-73df-9b44-be43-17abba050abf Ancestors: Tools-kfr.603 A little more tweaking to ArchiveViewer =============== Diff against Tools-kfr.603 =============== Item was changed: ----- Method: ArchiveViewer>>createButtonBar (in category 'initialization') ----- createButtonBar + | bar | + - | bar font | - font := Preferences standardButtonFont. bar := AlignmentMorph newRow. bar color: self defaultBackgroundColor; rubberBandCells: false; vResizing: #shrinkWrap; cellInset: 6 @ 0. #(#('new archive' #canCreateNewArchive #createNewArchive 'Create a new, empty archive and discard this one') #('load archive' #canOpenNewArchive #openNewArchive 'Open another archive and discard this one') #('save archive' #canSaveArchive #saveArchive 'Save this archive under a new name') #('extract all' #canExtractAll #extractAll 'Extract all this archive''s members into a directory') #('add file' #canAddMember #addMember 'Add a file to this archive') #('add clipboard' #canAddMember #addMemberFromClipboard 'Add the contents of the clipboard as a new file') #('add dir ' #canAddMember #addDirectory 'Add the entire contents of a directory, with all of its subdirectories') #('extract member' #canExtractMember #extractMember 'Extract the selected member to a file') #('delete member' #canDeleteMember #deleteMember 'Remove the selected member from this archive') #('rename member' #canRenameMember #renameMember 'Rename the selected member') #('view all' #canViewAllContents #changeViewAllContents 'Toggle the view of all the selected member''s contents')) do: [:arr | | button | (button := PluggableButtonMorph on: self getState: arr second action: arr third) + vResizing: #spaceFill; - vResizing: #rigid; hResizing: #spaceFill; onColor: self buttonOnColor offColor: self buttonOffColor; label: arr first withCRs; setBalloonText: arr fourth. bar addMorphBack: button]. ^bar! Item was changed: ----- Method: ArchiveViewer>>createWindow (in category 'initialization') ----- createWindow | list heading font text buttonBar | font := (TextStyle named: #DefaultFixedTextStyle) ifNotNil: [ :ts | ts fontArray first]. buttonBar := self createButtonBar. self addMorph: buttonBar + fullFrame: (LayoutFrame fractions: (0@0 corner: 1.0@0.0) offsets: (0@0 corner: 0@34)). - fullFrame: (LayoutFrame fractions: (0@0 corner: 1.0@0.0) offsets: (0@0 corner: 0@44)). self minimumExtent: (buttonBar fullBounds width + 20) @ 230. self extent: self minimumExtent. heading := self createListHeadingUsingFont: font. self addMorph: heading + fullFrame: (LayoutFrame fractions: (0@0 corner: 1.0@0.0) offsets: (0@34 corner: 0@44)). - fullFrame: (LayoutFrame fractions: (0@0 corner: 1.0@0.0) offsets: (0@44 corner: 0@60)). (list := PluggableListMorph new) on: self list: #memberList selected: #memberIndex changeSelected: #memberIndex: menu: #memberMenu:shifted: keystroke: nil. list color: self defaultBackgroundColor. font ifNotNil: [list font: font]. self addMorph: list + fullFrame: (LayoutFrame fractions: (0@0 corner: 1.0@0.8) offsets: (0@50 corner: 0@0)). - fullFrame: (LayoutFrame fractions: (0@0 corner: 1.0@0.8) offsets: (0@60 corner: 0@0)). text := PluggableTextMorph on: self text: #contents accept: nil readSelection: nil menu: nil. self addMorph: text frame: (0@0.8 corner: 1.0@1.0). text lock. self setLabel: 'Ned''s Zip Viewer'! |
Free forum by Nabble | Edit this page |