lists.squeakfoundation.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Packages
April 2015
----- 2024 -----
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
packages@lists.squeakfoundation.org
2 participants
1358 discussions
Start a n
N
ew thread
The Trunk: Tools-mt.612.mcz
by commits@source.squeak.org
30 Apr '15
30 Apr '15
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.612.mcz
==================== Summary ==================== Name: Tools-mt.612 Author: mt Time: 30 April 2015, 12:05:16.513 pm UUID: 4ffff371-c71a-654a-97a3-fb478e179170 Ancestors: Tools-mt.611 Minor cosmetic fix regarding space between code pane and annotation pane in code holders. It now correctly corresponds to the (surrounding) panel's #cellInset. =============== Diff against Tools-mt.611 =============== Item was changed: ----- Method: CodeHolder>>annotationFrame (in category 'toolbuilder') ----- annotationFrame ^LayoutFrame new leftFraction: 0 offset: 0; + topFraction: 1 offset: self annotationPaneHeight negated; - topFraction: 1 offset: self annotationPaneHeight negated - 1; rightFraction: 1 offset: 0; bottomFraction: 1 offset: 0! Item was changed: ----- Method: CodeHolder>>annotationPaneHeight (in category 'toolbuilder') ----- annotationPaneHeight + ^ (Preferences standardCodeFont height * 3/2) rounded! - ^Preferences standardCodeFont height * 3/2!
1
0
0
0
The Trunk: Tools-mt.611.mcz
by commits@source.squeak.org
30 Apr '15
30 Apr '15
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.611.mcz
==================== Summary ==================== Name: Tools-mt.611 Author: mt Time: 30 April 2015, 11:56:08.088 am UUID: c60f763b-2f7f-224f-b789-42f04dd883aa Ancestors: Tools-mt.610 Minor cosmetic, pixel-based changes in browsers, package browsers, and debuggers. =============== Diff against Tools-mt.610 =============== Item was changed: ----- Method: Browser>>buildSwitchesWith: (in category 'toolbuilder') ----- buildSwitchesWith: builder "Build the instance/comment/class switch" | panelSpec buttonSpec | panelSpec := builder pluggablePanelSpec new layout: #horizontal; children: OrderedCollection new; yourself. buttonSpec := builder pluggableButtonSpec new. buttonSpec model: self; label: 'instance'; state: #instanceMessagesIndicated; action: #indicateInstanceMessages. panelSpec children addLast: buttonSpec. buttonSpec := builder pluggableButtonSpec new. buttonSpec model: self; + label: '?'; + help: 'Cycle between definition, comment, and hierarchy view' translated; - label: '?'; state: #classCommentIndicated; action: #plusButtonHit. panelSpec children addLast: buttonSpec. buttonSpec := builder pluggableButtonSpec new. buttonSpec model: self; label: 'class'; state: #classMessagesIndicated; action: #indicateClassMessages. panelSpec children addLast: buttonSpec. ^panelSpec! Item was changed: ----- Method: Browser>>buildWith: (in category 'toolbuilder') ----- buildWith: builder "Create the ui for the browser" | windowSpec max | max := self wantsOptionalButtons ifTrue:[0.42] ifFalse:[0.5]. windowSpec := self buildWindowWith: builder specs: { (0@0 corner: 0.25@max) -> [self buildSystemCategoryListWith: builder]. + (self classListFrame: max fromLeft: 0.25 width: 0.25) -> [self buildClassListWith: builder]. + (self switchesFrame: max fromLeft: 0.25 width: 0.25) -> [self buildSwitchesWith: builder]. - (0.25@0 corner: 0.5(a)(max-0.08)) -> [self buildClassListWith: builder]. - (0.25(a)(max-0.08) corner: 0.5@max) -> [self buildSwitchesWith: builder]. (0.5@0 corner: 0.75@max) -> [self buildMessageCategoryListWith: builder]. (0.75@0 corner: 1@max) -> [self buildMessageListWith: builder]. (0@max corner: 1@1) -> [self buildCodePaneWith: builder]. }. ^builder build: windowSpec! Item was changed: ----- Method: Browser>>classListFrame:fromTop:fromLeft:width: (in category 'initialize-release') ----- classListFrame: bottomFraction fromTop: topFraction fromLeft: leftFraction width: rightFraction ^LayoutFrame new leftFraction: leftFraction offset: 0; topFraction: topFraction offset: 0; rightFraction: (leftFraction + rightFraction) offset: 0; + bottomFraction: bottomFraction offset: self buttonHeight negated! - bottomFraction: bottomFraction offset: self buttonHeight negated - 3! Item was changed: ----- Method: Browser>>openOnClassWithEditString: (in category 'initialize-release') ----- openOnClassWithEditString: aString "Create a pluggable version of all the views for a Browser, including views and controllers." "Example: Browser newOnClass: Browser. " | builder max | builder := ToolBuilder default. max := self wantsOptionalButtons ifTrue:[0.32] ifFalse:[0.4]. ^self buildWindowWith: builder specs: { + (self topConstantHeightFrame: self buttonHeight fromLeft: 0 width: 0.5) -> [self buildClassListSingletonWith: builder]. - (0.0(a)0.0 corner: 0.5(a)0.08) -> [self buildClassListSingletonWith: builder]. (self frameOffsetFromTop: self buttonHeight fromLeft: 0 width: 0.5 bottomFraction: max) -> [self buildMessageCategoryListWith: builder]. (self topConstantHeightFrame: self buttonHeight fromLeft: 0.5 width: 0.5) -> [self buildSwitchesWith: builder]. (self frameOffsetFromTop: self buttonHeight fromLeft: 0.5 width: 0.5 bottomFraction: max) -> [self buildMessageListWith: builder]. (0@max corner: 1@1) -> [self buildCodePaneWith: builder]. } ! Item was changed: ----- Method: Browser>>switchesFrame:fromLeft:width: (in category 'initialize-release') ----- switchesFrame: bottomFraction fromLeft: leftFraction width: rightFraction ^LayoutFrame new leftFraction: leftFraction offset: 0; + topFraction: bottomFraction offset: self buttonHeight negated; - topFraction: bottomFraction offset: self buttonHeight negated - 4; rightFraction: (leftFraction + rightFraction) offset: 0; bottomFraction: bottomFraction offset: 0! Item was changed: ----- Method: Debugger>>contextStackFrame (in category 'toolbuilder') ----- contextStackFrame + + | topOffset | - | spacing topOffset | - spacing := 3. topOffset := self wantsOptionalButtons + ifTrue: [self buttonHeight] + ifFalse: [0]. - ifTrue: [self buttonHeight + spacing] - ifFalse: [spacing]. ^LayoutFrame new leftFraction: 0 offset: 0; topFraction: 0 offset: topOffset; rightFraction: 1 offset: 0; bottomFraction: 1 offset: 0! Item was changed: ----- Method: PackagePaneBrowser>>openEditString: (in category 'initialize-release') ----- openEditString: aString "Create a pluggable version of all the views for a Browser, including views and controllers." "Example: PackagePaneBrowser fullOnClass: Browser. " | builder max | builder := ToolBuilder default. max := self wantsOptionalButtons ifTrue:[0.42] ifFalse:[0.5]. ^self buildWindowWith: builder specs: { (0@0 corner: 0.15@max) -> [self buildPackageListWith: builder]. (0.15@0 corner: 0.35@max) -> [self buildSystemCategoryListWith: builder]. + (self classListFrame: max fromLeft: 0.35 width: 0.25) -> [self buildClassListWith: builder]. + (self switchesFrame: max fromLeft: 0.35 width: 0.25) -> [self buildSwitchesWith: builder]. - (0.35@0 corner: 0.6(a)(max-0.1)) -> [self buildClassListWith: builder]. - (0.35(a)(max-0.1) corner: 0.6@max) -> [self buildSwitchesWith: builder]. (0.6@0 corner: 0.75@max) -> [self buildMessageCategoryListWith: builder]. (0.75@0 corner: 1@max) -> [self buildMessageListWith: builder]. (0@max corner: 1@1) -> [self buildCodePaneWith: builder]. }!
1
0
0
0
The Trunk: Tools-mt.611.mcz
by commits@source.squeak.org
30 Apr '15
30 Apr '15
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.611.mcz
==================== Summary ==================== Name: Tools-mt.611 Author: mt Time: 30 April 2015, 11:56:08.088 am UUID: c60f763b-2f7f-224f-b789-42f04dd883aa Ancestors: Tools-mt.610 Minor cosmetic, pixel-based changes in browsers, package browsers, and debuggers. =============== Diff against Tools-mt.610 =============== Item was changed: ----- Method: Browser>>buildSwitchesWith: (in category 'toolbuilder') ----- buildSwitchesWith: builder "Build the instance/comment/class switch" | panelSpec buttonSpec | panelSpec := builder pluggablePanelSpec new layout: #horizontal; children: OrderedCollection new; yourself. buttonSpec := builder pluggableButtonSpec new. buttonSpec model: self; label: 'instance'; state: #instanceMessagesIndicated; action: #indicateInstanceMessages. panelSpec children addLast: buttonSpec. buttonSpec := builder pluggableButtonSpec new. buttonSpec model: self; + label: '?'; + help: 'Cycle between definition, comment, and hierarchy view' translated; - label: '?'; state: #classCommentIndicated; action: #plusButtonHit. panelSpec children addLast: buttonSpec. buttonSpec := builder pluggableButtonSpec new. buttonSpec model: self; label: 'class'; state: #classMessagesIndicated; action: #indicateClassMessages. panelSpec children addLast: buttonSpec. ^panelSpec! Item was changed: ----- Method: Browser>>buildWith: (in category 'toolbuilder') ----- buildWith: builder "Create the ui for the browser" | windowSpec max | max := self wantsOptionalButtons ifTrue:[0.42] ifFalse:[0.5]. windowSpec := self buildWindowWith: builder specs: { (0@0 corner: 0.25@max) -> [self buildSystemCategoryListWith: builder]. + (self classListFrame: max fromLeft: 0.25 width: 0.25) -> [self buildClassListWith: builder]. + (self switchesFrame: max fromLeft: 0.25 width: 0.25) -> [self buildSwitchesWith: builder]. - (0.25@0 corner: 0.5(a)(max-0.08)) -> [self buildClassListWith: builder]. - (0.25(a)(max-0.08) corner: 0.5@max) -> [self buildSwitchesWith: builder]. (0.5@0 corner: 0.75@max) -> [self buildMessageCategoryListWith: builder]. (0.75@0 corner: 1@max) -> [self buildMessageListWith: builder]. (0@max corner: 1@1) -> [self buildCodePaneWith: builder]. }. ^builder build: windowSpec! Item was changed: ----- Method: Browser>>classListFrame:fromTop:fromLeft:width: (in category 'initialize-release') ----- classListFrame: bottomFraction fromTop: topFraction fromLeft: leftFraction width: rightFraction ^LayoutFrame new leftFraction: leftFraction offset: 0; topFraction: topFraction offset: 0; rightFraction: (leftFraction + rightFraction) offset: 0; + bottomFraction: bottomFraction offset: self buttonHeight negated! - bottomFraction: bottomFraction offset: self buttonHeight negated - 3! Item was changed: ----- Method: Browser>>openOnClassWithEditString: (in category 'initialize-release') ----- openOnClassWithEditString: aString "Create a pluggable version of all the views for a Browser, including views and controllers." "Example: Browser newOnClass: Browser. " | builder max | builder := ToolBuilder default. max := self wantsOptionalButtons ifTrue:[0.32] ifFalse:[0.4]. ^self buildWindowWith: builder specs: { + (self topConstantHeightFrame: self buttonHeight fromLeft: 0 width: 0.5) -> [self buildClassListSingletonWith: builder]. - (0.0(a)0.0 corner: 0.5(a)0.08) -> [self buildClassListSingletonWith: builder]. (self frameOffsetFromTop: self buttonHeight fromLeft: 0 width: 0.5 bottomFraction: max) -> [self buildMessageCategoryListWith: builder]. (self topConstantHeightFrame: self buttonHeight fromLeft: 0.5 width: 0.5) -> [self buildSwitchesWith: builder]. (self frameOffsetFromTop: self buttonHeight fromLeft: 0.5 width: 0.5 bottomFraction: max) -> [self buildMessageListWith: builder]. (0@max corner: 1@1) -> [self buildCodePaneWith: builder]. } ! Item was changed: ----- Method: Browser>>switchesFrame:fromLeft:width: (in category 'initialize-release') ----- switchesFrame: bottomFraction fromLeft: leftFraction width: rightFraction ^LayoutFrame new leftFraction: leftFraction offset: 0; + topFraction: bottomFraction offset: self buttonHeight negated; - topFraction: bottomFraction offset: self buttonHeight negated - 4; rightFraction: (leftFraction + rightFraction) offset: 0; bottomFraction: bottomFraction offset: 0! Item was changed: ----- Method: Debugger>>contextStackFrame (in category 'toolbuilder') ----- contextStackFrame + + | topOffset | - | spacing topOffset | - spacing := 3. topOffset := self wantsOptionalButtons + ifTrue: [self buttonHeight] + ifFalse: [0]. - ifTrue: [self buttonHeight + spacing] - ifFalse: [spacing]. ^LayoutFrame new leftFraction: 0 offset: 0; topFraction: 0 offset: topOffset; rightFraction: 1 offset: 0; bottomFraction: 1 offset: 0! Item was changed: ----- Method: PackagePaneBrowser>>openEditString: (in category 'initialize-release') ----- openEditString: aString "Create a pluggable version of all the views for a Browser, including views and controllers." "Example: PackagePaneBrowser fullOnClass: Browser. " | builder max | builder := ToolBuilder default. max := self wantsOptionalButtons ifTrue:[0.42] ifFalse:[0.5]. ^self buildWindowWith: builder specs: { (0@0 corner: 0.15@max) -> [self buildPackageListWith: builder]. (0.15@0 corner: 0.35@max) -> [self buildSystemCategoryListWith: builder]. + (self classListFrame: max fromLeft: 0.35 width: 0.25) -> [self buildClassListWith: builder]. + (self switchesFrame: max fromLeft: 0.35 width: 0.25) -> [self buildSwitchesWith: builder]. - (0.35@0 corner: 0.6(a)(max-0.1)) -> [self buildClassListWith: builder]. - (0.35(a)(max-0.1) corner: 0.6@max) -> [self buildSwitchesWith: builder]. (0.6@0 corner: 0.75@max) -> [self buildMessageCategoryListWith: builder]. (0.75@0 corner: 1@max) -> [self buildMessageListWith: builder]. (0@max corner: 1@1) -> [self buildCodePaneWith: builder]. }!
1
0
0
0
The Trunk: Tools-mt.611.mcz
by commits@source.squeak.org
30 Apr '15
30 Apr '15
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.611.mcz
==================== Summary ==================== Name: Tools-mt.611 Author: mt Time: 30 April 2015, 11:56:08.088 am UUID: c60f763b-2f7f-224f-b789-42f04dd883aa Ancestors: Tools-mt.610 Minor cosmetic, pixel-based changes in browsers, package browsers, and debuggers. =============== Diff against Tools-mt.610 =============== Item was changed: ----- Method: Browser>>buildSwitchesWith: (in category 'toolbuilder') ----- buildSwitchesWith: builder "Build the instance/comment/class switch" | panelSpec buttonSpec | panelSpec := builder pluggablePanelSpec new layout: #horizontal; children: OrderedCollection new; yourself. buttonSpec := builder pluggableButtonSpec new. buttonSpec model: self; label: 'instance'; state: #instanceMessagesIndicated; action: #indicateInstanceMessages. panelSpec children addLast: buttonSpec. buttonSpec := builder pluggableButtonSpec new. buttonSpec model: self; + label: '?'; + help: 'Cycle between definition, comment, and hierarchy view' translated; - label: '?'; state: #classCommentIndicated; action: #plusButtonHit. panelSpec children addLast: buttonSpec. buttonSpec := builder pluggableButtonSpec new. buttonSpec model: self; label: 'class'; state: #classMessagesIndicated; action: #indicateClassMessages. panelSpec children addLast: buttonSpec. ^panelSpec! Item was changed: ----- Method: Browser>>buildWith: (in category 'toolbuilder') ----- buildWith: builder "Create the ui for the browser" | windowSpec max | max := self wantsOptionalButtons ifTrue:[0.42] ifFalse:[0.5]. windowSpec := self buildWindowWith: builder specs: { (0@0 corner: 0.25@max) -> [self buildSystemCategoryListWith: builder]. + (self classListFrame: max fromLeft: 0.25 width: 0.25) -> [self buildClassListWith: builder]. + (self switchesFrame: max fromLeft: 0.25 width: 0.25) -> [self buildSwitchesWith: builder]. - (0.25@0 corner: 0.5(a)(max-0.08)) -> [self buildClassListWith: builder]. - (0.25(a)(max-0.08) corner: 0.5@max) -> [self buildSwitchesWith: builder]. (0.5@0 corner: 0.75@max) -> [self buildMessageCategoryListWith: builder]. (0.75@0 corner: 1@max) -> [self buildMessageListWith: builder]. (0@max corner: 1@1) -> [self buildCodePaneWith: builder]. }. ^builder build: windowSpec! Item was changed: ----- Method: Browser>>classListFrame:fromTop:fromLeft:width: (in category 'initialize-release') ----- classListFrame: bottomFraction fromTop: topFraction fromLeft: leftFraction width: rightFraction ^LayoutFrame new leftFraction: leftFraction offset: 0; topFraction: topFraction offset: 0; rightFraction: (leftFraction + rightFraction) offset: 0; + bottomFraction: bottomFraction offset: self buttonHeight negated! - bottomFraction: bottomFraction offset: self buttonHeight negated - 3! Item was changed: ----- Method: Browser>>openOnClassWithEditString: (in category 'initialize-release') ----- openOnClassWithEditString: aString "Create a pluggable version of all the views for a Browser, including views and controllers." "Example: Browser newOnClass: Browser. " | builder max | builder := ToolBuilder default. max := self wantsOptionalButtons ifTrue:[0.32] ifFalse:[0.4]. ^self buildWindowWith: builder specs: { + (self topConstantHeightFrame: self buttonHeight fromLeft: 0 width: 0.5) -> [self buildClassListSingletonWith: builder]. - (0.0(a)0.0 corner: 0.5(a)0.08) -> [self buildClassListSingletonWith: builder]. (self frameOffsetFromTop: self buttonHeight fromLeft: 0 width: 0.5 bottomFraction: max) -> [self buildMessageCategoryListWith: builder]. (self topConstantHeightFrame: self buttonHeight fromLeft: 0.5 width: 0.5) -> [self buildSwitchesWith: builder]. (self frameOffsetFromTop: self buttonHeight fromLeft: 0.5 width: 0.5 bottomFraction: max) -> [self buildMessageListWith: builder]. (0@max corner: 1@1) -> [self buildCodePaneWith: builder]. } ! Item was changed: ----- Method: Browser>>switchesFrame:fromLeft:width: (in category 'initialize-release') ----- switchesFrame: bottomFraction fromLeft: leftFraction width: rightFraction ^LayoutFrame new leftFraction: leftFraction offset: 0; + topFraction: bottomFraction offset: self buttonHeight negated; - topFraction: bottomFraction offset: self buttonHeight negated - 4; rightFraction: (leftFraction + rightFraction) offset: 0; bottomFraction: bottomFraction offset: 0! Item was changed: ----- Method: Debugger>>contextStackFrame (in category 'toolbuilder') ----- contextStackFrame + + | topOffset | - | spacing topOffset | - spacing := 3. topOffset := self wantsOptionalButtons + ifTrue: [self buttonHeight] + ifFalse: [0]. - ifTrue: [self buttonHeight + spacing] - ifFalse: [spacing]. ^LayoutFrame new leftFraction: 0 offset: 0; topFraction: 0 offset: topOffset; rightFraction: 1 offset: 0; bottomFraction: 1 offset: 0! Item was changed: ----- Method: PackagePaneBrowser>>openEditString: (in category 'initialize-release') ----- openEditString: aString "Create a pluggable version of all the views for a Browser, including views and controllers." "Example: PackagePaneBrowser fullOnClass: Browser. " | builder max | builder := ToolBuilder default. max := self wantsOptionalButtons ifTrue:[0.42] ifFalse:[0.5]. ^self buildWindowWith: builder specs: { (0@0 corner: 0.15@max) -> [self buildPackageListWith: builder]. (0.15@0 corner: 0.35@max) -> [self buildSystemCategoryListWith: builder]. + (self classListFrame: max fromLeft: 0.35 width: 0.25) -> [self buildClassListWith: builder]. + (self switchesFrame: max fromLeft: 0.35 width: 0.25) -> [self buildSwitchesWith: builder]. - (0.35@0 corner: 0.6(a)(max-0.1)) -> [self buildClassListWith: builder]. - (0.35(a)(max-0.1) corner: 0.6@max) -> [self buildSwitchesWith: builder]. (0.6@0 corner: 0.75@max) -> [self buildMessageCategoryListWith: builder]. (0.75@0 corner: 1@max) -> [self buildMessageListWith: builder]. (0@max corner: 1@1) -> [self buildCodePaneWith: builder]. }!
1
0
0
0
The Trunk: Morphic-mt.951.mcz
by commits@source.squeak.org
30 Apr '15
30 Apr '15
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.951.mcz
==================== Summary ==================== Name: Morphic-mt.951 Author: mt Time: 30 April 2015, 11:22:31.617 am UUID: cd0add46-eb53-a74e-87aa-c6824f6f2512 Ancestors: Morphic-mt.950 Some layout issues fixed in Font importer tool. Code clean-up, too. =============== Diff against Morphic-mt.950 =============== Item was changed: + Model subclass: #FontImporterTool + instanceVariableNames: 'title allFonts emphasis currentSelection currentParent warningSeen' - StringHolder subclass: #FontImporterTool - instanceVariableNames: 'title allFonts emphasis window currentSelection currentParent warningSeen' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Support'! !FontImporterTool commentStamp: 'topa 3/9/2015 18:56' prior: 0! A tool to import platform (native) fonts into the image! Item was removed: - ----- Method: FontImporterTool class>>default (in category 'accessing') ----- - default - "Answer the default font imporer tool, ie me - (polymorphic with font chooser) - " - ^ self! Item was removed: - ----- Method: FontImporterTool class>>openWithWindowTitle:for:setSelector:getSelector: (in category 'opening') ----- - openWithWindowTitle: titleString for: anObject setSelector: setSelector getSelector: getSelector - " - FontChooserTool - openWithWindowTitle: 'Choose the Menu Font' - for: Preferences - setSelector: #setMenuFontTo: - getSelector: #standardMenuFont. - " - ^(self withTitle: titleString for: anObject setSelector: setSelector getSelector: getSelector) open! Item was removed: - ----- Method: FontImporterTool class>>windowTitle:for:setSelector:getSelector: (in category 'opening') ----- - windowTitle: titleString for: anObject setSelector: setSelector getSelector: getSelector - | instance | - - instance := self new. - instance - title: titleString; - target: anObject; - setSelector: setSelector; - getSelector: getSelector. - ^instance open! Item was removed: - ----- Method: FontImporterTool class>>withTitle:for:setSelector:getSelector: (in category 'opening') ----- - withTitle: titleString for: anObject setSelector: setSelector getSelector: getSelector - " - (FontChooserTool - withTitle: 'Choose the Menu Font' - for: Preferences - setSelector: #setMenuFontTo: - getSelector: #standardMenuFont) open. - " - | instance | - instance := self new. - instance - title: titleString; - target: anObject; - setSelector: setSelector; - getSelector: getSelector. - ^instance! Item was changed: ----- Method: FontImporterTool>>buildButtonBarWith: (in category 'toolbuilder') ----- buildButtonBarWith: builder "Build the button bar" | panelSpec buttonSpec | panelSpec := builder pluggablePanelSpec new. + panelSpec + layout: #horizontal; + children: OrderedCollection new. - panelSpec children: OrderedCollection new. buttonSpec := builder pluggableButtonSpec new model: self; + label: 'Import' translated; - label: ' Import ' translated; help: 'Include the font data in the image and provide a TextStyle for the font'; action: #import; - frame: (0@0 corner: 0.5@1); yourself. panelSpec children addLast: buttonSpec. buttonSpec := builder pluggableButtonSpec new model: self; + label: 'Close' translated; - label: ' Close ' translated; action: #close; - frame: (0.5@0 corner: 1@1); yourself. panelSpec children addLast: buttonSpec. ^panelSpec! Item was changed: ----- Method: FontImporterTool>>buildPreviewPaneWith: (in category 'toolbuilder') ----- buildPreviewPaneWith: builder "Build the preview panel" ^ builder pluggablePanelSpec new + wantsResizeHandles: true; children: { builder pluggableInputFieldSpec new model: self; getText: #filename; readOnly: true; indicateUnacceptedChanges: false; font: self filenameFont; frame: (LayoutFrame fractions: (0@0 corner: 1@0) offsets: (0@0 corner: 0@ self filenameHeight)); yourself. + builder pluggableTextSpec new + model: self; + getText: #previewText; - (self buildCodePaneWith: builder) - name: #preview; askBeforeDiscardingEdits: false; indicateUnacceptedChanges: false; + softLineWrap: false; frame: (LayoutFrame fractions: (0@0 corner: 1(a)0.75) offsets: (0@ self filenameHeight corner: 0@0)); yourself. builder pluggableTextSpec new model: self; getText: #copyright; readOnly: true; indicateUnacceptedChanges: false; frame: (LayoutFrame fractions: (0(a)0.75 corner: 1@1)); yourself }; yourself! Item was added: + ----- Method: FontImporterTool>>buildWindowWith:specs: (in category 'toolbuilder') ----- + buildWindowWith: builder specs: specs + | windowSpec | + windowSpec := builder pluggableWindowSpec new. + windowSpec + model: self; + label:'Choose a Font to import' translated; + extent: self initialExtent; + children: OrderedCollection new. + + specs do:[:assoc| + | rect action widgetSpec | + rect := assoc key. + action := assoc value. + widgetSpec := action value. + widgetSpec ifNotNil:[ + widgetSpec frame: rect. + windowSpec children add: widgetSpec]]. + ^windowSpec! Item was changed: ----- Method: FontImporterTool>>buildWith: (in category 'toolbuilder') ----- buildWith: builder "Create the ui for the browser" "ToolBuilder open: self" + | windowSpec | windowSpec := self buildWindowWith: builder specs: { (self fontListFrame) -> [self buildFontListWith: builder]. (self previewFrame) -> [self buildPreviewPaneWith: builder]. (self buttonsFrame) -> [self buildButtonBarWith: builder]. }. + ^ builder build: windowSpec! - windowSpec extent: self initialExtent. - window := builder build: windowSpec. - "Yes, that's a hack. But it looks ugly with line breaks." - (builder widgetAt: #preview) textMorph wrapFlag: false. - ^window! Item was changed: + ----- Method: FontImporterTool>>buttonHeight (in category 'layout') ----- - ----- Method: FontImporterTool>>buttonHeight (in category 'toolbuilder') ----- buttonHeight ^ Preferences standardButtonFont height * 3! Item was changed: + ----- Method: FontImporterTool>>buttonsFrame (in category 'layout') ----- - ----- Method: FontImporterTool>>buttonsFrame (in category 'toolbuilder') ----- buttonsFrame ^ LayoutFrame fractions: (0@1 corner: 1@1) offsets: (0@ self buttonHeight negated corner: 0@0) ! Item was changed: ----- Method: FontImporterTool>>close (in category 'actions') ----- close + self changed: #close.! - ToolBuilder default close: window.! Item was removed: - ----- Method: FontImporterTool>>contents (in category 'toolbuilder') ----- - contents - | sample i c f | - sample := WriteStream on: ''. - f := self selectedFont ifNil:[^Text new]. - (f isSymbolFont or: [(self font: f hasGlyphOf: $a) not]) ifFalse:[ - sample - nextPutAll: 'the quick brown fox jumps over the lazy dog' ;cr; - nextPutAll: 'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.' ;cr;cr; - nextPutAll: '0123456789'; cr; cr; - nextPutAll: - 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, - sed do eiusmod tempor incididunt ut labore et dolore - magna aliqua. Ut enim ad minim veniam, quis nostrud - exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate - velit esse cillum dolore eu fugiat nulla pariatur. Excepteur - sint occaecat cupidatat non proident, sunt in culpa qui - officia deserunt mollit anim id est laborum.' - ] ifTrue:[ - i := 0. - 33 to: 255 do:[:ci | - sample nextPut: (c:=Character value: ci). - i := i + 1. - (('@Z`z' includes:c) or:[i = 30]) - ifTrue:[i :=0. sample cr]]. - ]. - sample := sample contents asText. - sample addAttribute: (TextFontReference toFont: f). - ^sample! Item was changed: + ----- Method: FontImporterTool>>copyright (in category 'model access') ----- - ----- Method: FontImporterTool>>copyright (in category 'toolbuilder') ----- copyright | f | f := self selectedFont ifNil:[^ '']. ^ f isTTCFont ifTrue: [f ttcDescription copyright ifNil: ['']] ifFalse: ['']! Item was changed: + ----- Method: FontImporterTool>>filename (in category 'model access') ----- - ----- Method: FontImporterTool>>filename (in category 'toolbuilder') ----- filename ^ self currentSelection ifNil: [''] ifNotNil: [:sel | String streamContents: [:stream | sel allFilenames do: [:filename | stream nextPutAll: filename] separatedBy: [stream nextPut: $,;nextPut: $ ]]]! Item was changed: + ----- Method: FontImporterTool>>filenameHeight (in category 'layout') ----- - ----- Method: FontImporterTool>>filenameHeight (in category 'toolbuilder') ----- filenameHeight + ^ self filenameFont height * 2! - ^ (self filenameFont lineGrid * 1.5) truncated! Item was changed: + ----- Method: FontImporterTool>>font:hasGlyphOf: (in category 'helper') ----- - ----- Method: FontImporterTool>>font:hasGlyphOf: (in category 'toolbuilder') ----- font: f hasGlyphOf: aCharacter | font | font := f isFontSet ifTrue: [f fontArray first] ifFalse: [f]. ^ font isTTCFont ifFalse: [font hasGlyphOf: aCharacter] ifTrue: [ " [(f hasGlyphOf: aCharacter) not] does not work, the fallback glyph is always found instead. So we fake. if aCharacter is the same form as Character null aka 0, we assume absence." (font characterFormAt: aCharacter) bits ~= font fallbackForm bits] ! Item was changed: + ----- Method: FontImporterTool>>fontListFrame (in category 'layout') ----- - ----- Method: FontImporterTool>>fontListFrame (in category 'toolbuilder') ----- fontListFrame ^ LayoutFrame fractions: (0@0 corner: 0.4@1) + offsets: (0@0 corner: 0@ self buttonHeight negated)! - offsets: (0@0 corner: 0@ self buttonHeight negated + 4)! Item was changed: ----- Method: FontImporterTool>>initialize (in category 'initialize') ----- initialize + super initialize. - title := 'Choose a Font to import'. emphasis := 0. ! Item was changed: + ----- Method: FontImporterTool>>labelOf: (in category 'model access') ----- - ----- Method: FontImporterTool>>labelOf: (in category 'accessing') ----- labelOf: aFontDescription ^ aFontDescription fontname ! Item was changed: + ----- Method: FontImporterTool>>open (in category 'initialize') ----- - ----- Method: FontImporterTool>>open (in category 'toolbuilder') ----- open ^ToolBuilder open: self! Item was changed: + ----- Method: FontImporterTool>>previewFrame (in category 'layout') ----- - ----- Method: FontImporterTool>>previewFrame (in category 'toolbuilder') ----- previewFrame ^ LayoutFrame fractions: (0.4@0 corner: 1@1) + offsets: (0@0 corner: 0@ self buttonHeight negated)! - offsets: (0@0 corner: 0@ self buttonHeight negated + 4)! Item was added: + ----- Method: FontImporterTool>>previewText (in category 'model access') ----- + previewText + | sample i c f | + sample := WriteStream on: ''. + f := self selectedFont ifNil:[^Text new]. + (f isSymbolFont or: [(self font: f hasGlyphOf: $a) not]) ifFalse:[ + sample + nextPutAll: 'the quick brown fox jumps over the lazy dog' ;cr; + nextPutAll: 'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.' ;cr;cr; + nextPutAll: '0123456789'; cr; cr; + nextPutAll: + 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, + sed do eiusmod tempor incididunt ut labore et dolore + magna aliqua. Ut enim ad minim veniam, quis nostrud + exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur + sint occaecat cupidatat non proident, sunt in culpa qui + officia deserunt mollit anim id est laborum.' + ] ifTrue:[ + i := 0. + 33 to: 255 do:[:ci | + sample nextPut: (c:=Character value: ci). + i := i + 1. + (('@Z`z' includes:c) or:[i = 30]) + ifTrue:[i :=0. sample cr]]. + ]. + sample := sample contents asText. + sample addAttribute: (TextFontReference toFont: f). + ^sample! Item was changed: + ----- Method: FontImporterTool>>textForFamily:subfamily: (in category 'helper') ----- - ----- Method: FontImporterTool>>textForFamily:subfamily: (in category 'accessing') ----- textForFamily: familyName subfamily: subfamilyName subfamilyName ifNil: [ ^ (TextStyle named: familyName) ifNil: [familyName] ifNotNil: [:style | style isTTCStyle ifTrue: ["we are already present " Text string: familyName attribute: TextEmphasis underlined] ifFalse: [familyName]]]. " frome here on it is only about subfamilies" (self isStyleNameSupported: subfamilyName) ifFalse: [^ Text string: subfamilyName attribute: TextColor gray]. ^ (TextStyle named: familyName) ifNil: ["importable" subfamilyName] ifNotNil: [:style | (style isTTCStyle and: [ | regular emph | regular := style fonts anyOne. emph := TTCFont indexOfSubfamilyName: subfamilyName. " detect if this style is already imported " regular emphasis = emph or: [(regular emphasis: emph) ~= regular]]) ifFalse: ["again importable" subfamilyName] ifTrue: [Text string: subfamilyName attribute: TextEmphasis underlined]]! Item was removed: - ----- Method: FontImporterTool>>title (in category 'accessing') ----- - title - - ^ title! Item was removed: - ----- Method: FontImporterTool>>title: (in category 'accessing') ----- - title: anObject - "Set the value of title" - - title := anObject! Item was removed: - ----- Method: FontImporterTool>>window (in category 'accessing') ----- - window - ^window! Item was removed: - ----- Method: FontImporterTool>>window: (in category 'accessing') ----- - window: anObject - - window := anObject! Item was removed: - ----- Method: FontImporterTool>>windowTitle (in category 'initialize') ----- - windowTitle - ^ title translated!
1
0
0
0
The Trunk: Morphic-mt.951.mcz
by commits@source.squeak.org
30 Apr '15
30 Apr '15
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.951.mcz
==================== Summary ==================== Name: Morphic-mt.951 Author: mt Time: 30 April 2015, 11:22:31.617 am UUID: cd0add46-eb53-a74e-87aa-c6824f6f2512 Ancestors: Morphic-mt.950 Some layout issues fixed in Font importer tool. Code clean-up, too. =============== Diff against Morphic-mt.950 =============== Item was changed: + Model subclass: #FontImporterTool + instanceVariableNames: 'title allFonts emphasis currentSelection currentParent warningSeen' - StringHolder subclass: #FontImporterTool - instanceVariableNames: 'title allFonts emphasis window currentSelection currentParent warningSeen' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Support'! !FontImporterTool commentStamp: 'topa 3/9/2015 18:56' prior: 0! A tool to import platform (native) fonts into the image! Item was removed: - ----- Method: FontImporterTool class>>default (in category 'accessing') ----- - default - "Answer the default font imporer tool, ie me - (polymorphic with font chooser) - " - ^ self! Item was removed: - ----- Method: FontImporterTool class>>openWithWindowTitle:for:setSelector:getSelector: (in category 'opening') ----- - openWithWindowTitle: titleString for: anObject setSelector: setSelector getSelector: getSelector - " - FontChooserTool - openWithWindowTitle: 'Choose the Menu Font' - for: Preferences - setSelector: #setMenuFontTo: - getSelector: #standardMenuFont. - " - ^(self withTitle: titleString for: anObject setSelector: setSelector getSelector: getSelector) open! Item was removed: - ----- Method: FontImporterTool class>>windowTitle:for:setSelector:getSelector: (in category 'opening') ----- - windowTitle: titleString for: anObject setSelector: setSelector getSelector: getSelector - | instance | - - instance := self new. - instance - title: titleString; - target: anObject; - setSelector: setSelector; - getSelector: getSelector. - ^instance open! Item was removed: - ----- Method: FontImporterTool class>>withTitle:for:setSelector:getSelector: (in category 'opening') ----- - withTitle: titleString for: anObject setSelector: setSelector getSelector: getSelector - " - (FontChooserTool - withTitle: 'Choose the Menu Font' - for: Preferences - setSelector: #setMenuFontTo: - getSelector: #standardMenuFont) open. - " - | instance | - instance := self new. - instance - title: titleString; - target: anObject; - setSelector: setSelector; - getSelector: getSelector. - ^instance! Item was changed: ----- Method: FontImporterTool>>buildButtonBarWith: (in category 'toolbuilder') ----- buildButtonBarWith: builder "Build the button bar" | panelSpec buttonSpec | panelSpec := builder pluggablePanelSpec new. + panelSpec + layout: #horizontal; + children: OrderedCollection new. - panelSpec children: OrderedCollection new. buttonSpec := builder pluggableButtonSpec new model: self; + label: 'Import' translated; - label: ' Import ' translated; help: 'Include the font data in the image and provide a TextStyle for the font'; action: #import; - frame: (0@0 corner: 0.5@1); yourself. panelSpec children addLast: buttonSpec. buttonSpec := builder pluggableButtonSpec new model: self; + label: 'Close' translated; - label: ' Close ' translated; action: #close; - frame: (0.5@0 corner: 1@1); yourself. panelSpec children addLast: buttonSpec. ^panelSpec! Item was changed: ----- Method: FontImporterTool>>buildPreviewPaneWith: (in category 'toolbuilder') ----- buildPreviewPaneWith: builder "Build the preview panel" ^ builder pluggablePanelSpec new + wantsResizeHandles: true; children: { builder pluggableInputFieldSpec new model: self; getText: #filename; readOnly: true; indicateUnacceptedChanges: false; font: self filenameFont; frame: (LayoutFrame fractions: (0@0 corner: 1@0) offsets: (0@0 corner: 0@ self filenameHeight)); yourself. + builder pluggableTextSpec new + model: self; + getText: #previewText; - (self buildCodePaneWith: builder) - name: #preview; askBeforeDiscardingEdits: false; indicateUnacceptedChanges: false; + softLineWrap: false; frame: (LayoutFrame fractions: (0@0 corner: 1(a)0.75) offsets: (0@ self filenameHeight corner: 0@0)); yourself. builder pluggableTextSpec new model: self; getText: #copyright; readOnly: true; indicateUnacceptedChanges: false; frame: (LayoutFrame fractions: (0(a)0.75 corner: 1@1)); yourself }; yourself! Item was added: + ----- Method: FontImporterTool>>buildWindowWith:specs: (in category 'toolbuilder') ----- + buildWindowWith: builder specs: specs + | windowSpec | + windowSpec := builder pluggableWindowSpec new. + windowSpec + model: self; + label:'Choose a Font to import' translated; + extent: self initialExtent; + children: OrderedCollection new. + + specs do:[:assoc| + | rect action widgetSpec | + rect := assoc key. + action := assoc value. + widgetSpec := action value. + widgetSpec ifNotNil:[ + widgetSpec frame: rect. + windowSpec children add: widgetSpec]]. + ^windowSpec! Item was changed: ----- Method: FontImporterTool>>buildWith: (in category 'toolbuilder') ----- buildWith: builder "Create the ui for the browser" "ToolBuilder open: self" + | windowSpec | windowSpec := self buildWindowWith: builder specs: { (self fontListFrame) -> [self buildFontListWith: builder]. (self previewFrame) -> [self buildPreviewPaneWith: builder]. (self buttonsFrame) -> [self buildButtonBarWith: builder]. }. + ^ builder build: windowSpec! - windowSpec extent: self initialExtent. - window := builder build: windowSpec. - "Yes, that's a hack. But it looks ugly with line breaks." - (builder widgetAt: #preview) textMorph wrapFlag: false. - ^window! Item was changed: + ----- Method: FontImporterTool>>buttonHeight (in category 'layout') ----- - ----- Method: FontImporterTool>>buttonHeight (in category 'toolbuilder') ----- buttonHeight ^ Preferences standardButtonFont height * 3! Item was changed: + ----- Method: FontImporterTool>>buttonsFrame (in category 'layout') ----- - ----- Method: FontImporterTool>>buttonsFrame (in category 'toolbuilder') ----- buttonsFrame ^ LayoutFrame fractions: (0@1 corner: 1@1) offsets: (0@ self buttonHeight negated corner: 0@0) ! Item was changed: ----- Method: FontImporterTool>>close (in category 'actions') ----- close + self changed: #close.! - ToolBuilder default close: window.! Item was removed: - ----- Method: FontImporterTool>>contents (in category 'toolbuilder') ----- - contents - | sample i c f | - sample := WriteStream on: ''. - f := self selectedFont ifNil:[^Text new]. - (f isSymbolFont or: [(self font: f hasGlyphOf: $a) not]) ifFalse:[ - sample - nextPutAll: 'the quick brown fox jumps over the lazy dog' ;cr; - nextPutAll: 'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.' ;cr;cr; - nextPutAll: '0123456789'; cr; cr; - nextPutAll: - 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, - sed do eiusmod tempor incididunt ut labore et dolore - magna aliqua. Ut enim ad minim veniam, quis nostrud - exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate - velit esse cillum dolore eu fugiat nulla pariatur. Excepteur - sint occaecat cupidatat non proident, sunt in culpa qui - officia deserunt mollit anim id est laborum.' - ] ifTrue:[ - i := 0. - 33 to: 255 do:[:ci | - sample nextPut: (c:=Character value: ci). - i := i + 1. - (('@Z`z' includes:c) or:[i = 30]) - ifTrue:[i :=0. sample cr]]. - ]. - sample := sample contents asText. - sample addAttribute: (TextFontReference toFont: f). - ^sample! Item was changed: + ----- Method: FontImporterTool>>copyright (in category 'model access') ----- - ----- Method: FontImporterTool>>copyright (in category 'toolbuilder') ----- copyright | f | f := self selectedFont ifNil:[^ '']. ^ f isTTCFont ifTrue: [f ttcDescription copyright ifNil: ['']] ifFalse: ['']! Item was changed: + ----- Method: FontImporterTool>>filename (in category 'model access') ----- - ----- Method: FontImporterTool>>filename (in category 'toolbuilder') ----- filename ^ self currentSelection ifNil: [''] ifNotNil: [:sel | String streamContents: [:stream | sel allFilenames do: [:filename | stream nextPutAll: filename] separatedBy: [stream nextPut: $,;nextPut: $ ]]]! Item was changed: + ----- Method: FontImporterTool>>filenameHeight (in category 'layout') ----- - ----- Method: FontImporterTool>>filenameHeight (in category 'toolbuilder') ----- filenameHeight + ^ self filenameFont height * 2! - ^ (self filenameFont lineGrid * 1.5) truncated! Item was changed: + ----- Method: FontImporterTool>>font:hasGlyphOf: (in category 'helper') ----- - ----- Method: FontImporterTool>>font:hasGlyphOf: (in category 'toolbuilder') ----- font: f hasGlyphOf: aCharacter | font | font := f isFontSet ifTrue: [f fontArray first] ifFalse: [f]. ^ font isTTCFont ifFalse: [font hasGlyphOf: aCharacter] ifTrue: [ " [(f hasGlyphOf: aCharacter) not] does not work, the fallback glyph is always found instead. So we fake. if aCharacter is the same form as Character null aka 0, we assume absence." (font characterFormAt: aCharacter) bits ~= font fallbackForm bits] ! Item was changed: + ----- Method: FontImporterTool>>fontListFrame (in category 'layout') ----- - ----- Method: FontImporterTool>>fontListFrame (in category 'toolbuilder') ----- fontListFrame ^ LayoutFrame fractions: (0@0 corner: 0.4@1) + offsets: (0@0 corner: 0@ self buttonHeight negated)! - offsets: (0@0 corner: 0@ self buttonHeight negated + 4)! Item was changed: ----- Method: FontImporterTool>>initialize (in category 'initialize') ----- initialize + super initialize. - title := 'Choose a Font to import'. emphasis := 0. ! Item was changed: + ----- Method: FontImporterTool>>labelOf: (in category 'model access') ----- - ----- Method: FontImporterTool>>labelOf: (in category 'accessing') ----- labelOf: aFontDescription ^ aFontDescription fontname ! Item was changed: + ----- Method: FontImporterTool>>open (in category 'initialize') ----- - ----- Method: FontImporterTool>>open (in category 'toolbuilder') ----- open ^ToolBuilder open: self! Item was changed: + ----- Method: FontImporterTool>>previewFrame (in category 'layout') ----- - ----- Method: FontImporterTool>>previewFrame (in category 'toolbuilder') ----- previewFrame ^ LayoutFrame fractions: (0.4@0 corner: 1@1) + offsets: (0@0 corner: 0@ self buttonHeight negated)! - offsets: (0@0 corner: 0@ self buttonHeight negated + 4)! Item was added: + ----- Method: FontImporterTool>>previewText (in category 'model access') ----- + previewText + | sample i c f | + sample := WriteStream on: ''. + f := self selectedFont ifNil:[^Text new]. + (f isSymbolFont or: [(self font: f hasGlyphOf: $a) not]) ifFalse:[ + sample + nextPutAll: 'the quick brown fox jumps over the lazy dog' ;cr; + nextPutAll: 'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.' ;cr;cr; + nextPutAll: '0123456789'; cr; cr; + nextPutAll: + 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, + sed do eiusmod tempor incididunt ut labore et dolore + magna aliqua. Ut enim ad minim veniam, quis nostrud + exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur + sint occaecat cupidatat non proident, sunt in culpa qui + officia deserunt mollit anim id est laborum.' + ] ifTrue:[ + i := 0. + 33 to: 255 do:[:ci | + sample nextPut: (c:=Character value: ci). + i := i + 1. + (('@Z`z' includes:c) or:[i = 30]) + ifTrue:[i :=0. sample cr]]. + ]. + sample := sample contents asText. + sample addAttribute: (TextFontReference toFont: f). + ^sample! Item was changed: + ----- Method: FontImporterTool>>textForFamily:subfamily: (in category 'helper') ----- - ----- Method: FontImporterTool>>textForFamily:subfamily: (in category 'accessing') ----- textForFamily: familyName subfamily: subfamilyName subfamilyName ifNil: [ ^ (TextStyle named: familyName) ifNil: [familyName] ifNotNil: [:style | style isTTCStyle ifTrue: ["we are already present " Text string: familyName attribute: TextEmphasis underlined] ifFalse: [familyName]]]. " frome here on it is only about subfamilies" (self isStyleNameSupported: subfamilyName) ifFalse: [^ Text string: subfamilyName attribute: TextColor gray]. ^ (TextStyle named: familyName) ifNil: ["importable" subfamilyName] ifNotNil: [:style | (style isTTCStyle and: [ | regular emph | regular := style fonts anyOne. emph := TTCFont indexOfSubfamilyName: subfamilyName. " detect if this style is already imported " regular emphasis = emph or: [(regular emphasis: emph) ~= regular]]) ifFalse: ["again importable" subfamilyName] ifTrue: [Text string: subfamilyName attribute: TextEmphasis underlined]]! Item was removed: - ----- Method: FontImporterTool>>title (in category 'accessing') ----- - title - - ^ title! Item was removed: - ----- Method: FontImporterTool>>title: (in category 'accessing') ----- - title: anObject - "Set the value of title" - - title := anObject! Item was removed: - ----- Method: FontImporterTool>>window (in category 'accessing') ----- - window - ^window! Item was removed: - ----- Method: FontImporterTool>>window: (in category 'accessing') ----- - window: anObject - - window := anObject! Item was removed: - ----- Method: FontImporterTool>>windowTitle (in category 'initialize') ----- - windowTitle - ^ title translated!
1
0
0
0
The Trunk: Morphic-mt.951.mcz
by commits@source.squeak.org
30 Apr '15
30 Apr '15
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.951.mcz
==================== Summary ==================== Name: Morphic-mt.951 Author: mt Time: 30 April 2015, 11:22:31.617 am UUID: cd0add46-eb53-a74e-87aa-c6824f6f2512 Ancestors: Morphic-mt.950 Some layout issues fixed in Font importer tool. Code clean-up, too. =============== Diff against Morphic-mt.950 =============== Item was changed: + Model subclass: #FontImporterTool + instanceVariableNames: 'title allFonts emphasis currentSelection currentParent warningSeen' - StringHolder subclass: #FontImporterTool - instanceVariableNames: 'title allFonts emphasis window currentSelection currentParent warningSeen' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Support'! !FontImporterTool commentStamp: 'topa 3/9/2015 18:56' prior: 0! A tool to import platform (native) fonts into the image! Item was removed: - ----- Method: FontImporterTool class>>default (in category 'accessing') ----- - default - "Answer the default font imporer tool, ie me - (polymorphic with font chooser) - " - ^ self! Item was removed: - ----- Method: FontImporterTool class>>openWithWindowTitle:for:setSelector:getSelector: (in category 'opening') ----- - openWithWindowTitle: titleString for: anObject setSelector: setSelector getSelector: getSelector - " - FontChooserTool - openWithWindowTitle: 'Choose the Menu Font' - for: Preferences - setSelector: #setMenuFontTo: - getSelector: #standardMenuFont. - " - ^(self withTitle: titleString for: anObject setSelector: setSelector getSelector: getSelector) open! Item was removed: - ----- Method: FontImporterTool class>>windowTitle:for:setSelector:getSelector: (in category 'opening') ----- - windowTitle: titleString for: anObject setSelector: setSelector getSelector: getSelector - | instance | - - instance := self new. - instance - title: titleString; - target: anObject; - setSelector: setSelector; - getSelector: getSelector. - ^instance open! Item was removed: - ----- Method: FontImporterTool class>>withTitle:for:setSelector:getSelector: (in category 'opening') ----- - withTitle: titleString for: anObject setSelector: setSelector getSelector: getSelector - " - (FontChooserTool - withTitle: 'Choose the Menu Font' - for: Preferences - setSelector: #setMenuFontTo: - getSelector: #standardMenuFont) open. - " - | instance | - instance := self new. - instance - title: titleString; - target: anObject; - setSelector: setSelector; - getSelector: getSelector. - ^instance! Item was changed: ----- Method: FontImporterTool>>buildButtonBarWith: (in category 'toolbuilder') ----- buildButtonBarWith: builder "Build the button bar" | panelSpec buttonSpec | panelSpec := builder pluggablePanelSpec new. + panelSpec + layout: #horizontal; + children: OrderedCollection new. - panelSpec children: OrderedCollection new. buttonSpec := builder pluggableButtonSpec new model: self; + label: 'Import' translated; - label: ' Import ' translated; help: 'Include the font data in the image and provide a TextStyle for the font'; action: #import; - frame: (0@0 corner: 0.5@1); yourself. panelSpec children addLast: buttonSpec. buttonSpec := builder pluggableButtonSpec new model: self; + label: 'Close' translated; - label: ' Close ' translated; action: #close; - frame: (0.5@0 corner: 1@1); yourself. panelSpec children addLast: buttonSpec. ^panelSpec! Item was changed: ----- Method: FontImporterTool>>buildPreviewPaneWith: (in category 'toolbuilder') ----- buildPreviewPaneWith: builder "Build the preview panel" ^ builder pluggablePanelSpec new + wantsResizeHandles: true; children: { builder pluggableInputFieldSpec new model: self; getText: #filename; readOnly: true; indicateUnacceptedChanges: false; font: self filenameFont; frame: (LayoutFrame fractions: (0@0 corner: 1@0) offsets: (0@0 corner: 0@ self filenameHeight)); yourself. + builder pluggableTextSpec new + model: self; + getText: #previewText; - (self buildCodePaneWith: builder) - name: #preview; askBeforeDiscardingEdits: false; indicateUnacceptedChanges: false; + softLineWrap: false; frame: (LayoutFrame fractions: (0@0 corner: 1(a)0.75) offsets: (0@ self filenameHeight corner: 0@0)); yourself. builder pluggableTextSpec new model: self; getText: #copyright; readOnly: true; indicateUnacceptedChanges: false; frame: (LayoutFrame fractions: (0(a)0.75 corner: 1@1)); yourself }; yourself! Item was added: + ----- Method: FontImporterTool>>buildWindowWith:specs: (in category 'toolbuilder') ----- + buildWindowWith: builder specs: specs + | windowSpec | + windowSpec := builder pluggableWindowSpec new. + windowSpec + model: self; + label:'Choose a Font to import' translated; + extent: self initialExtent; + children: OrderedCollection new. + + specs do:[:assoc| + | rect action widgetSpec | + rect := assoc key. + action := assoc value. + widgetSpec := action value. + widgetSpec ifNotNil:[ + widgetSpec frame: rect. + windowSpec children add: widgetSpec]]. + ^windowSpec! Item was changed: ----- Method: FontImporterTool>>buildWith: (in category 'toolbuilder') ----- buildWith: builder "Create the ui for the browser" "ToolBuilder open: self" + | windowSpec | windowSpec := self buildWindowWith: builder specs: { (self fontListFrame) -> [self buildFontListWith: builder]. (self previewFrame) -> [self buildPreviewPaneWith: builder]. (self buttonsFrame) -> [self buildButtonBarWith: builder]. }. + ^ builder build: windowSpec! - windowSpec extent: self initialExtent. - window := builder build: windowSpec. - "Yes, that's a hack. But it looks ugly with line breaks." - (builder widgetAt: #preview) textMorph wrapFlag: false. - ^window! Item was changed: + ----- Method: FontImporterTool>>buttonHeight (in category 'layout') ----- - ----- Method: FontImporterTool>>buttonHeight (in category 'toolbuilder') ----- buttonHeight ^ Preferences standardButtonFont height * 3! Item was changed: + ----- Method: FontImporterTool>>buttonsFrame (in category 'layout') ----- - ----- Method: FontImporterTool>>buttonsFrame (in category 'toolbuilder') ----- buttonsFrame ^ LayoutFrame fractions: (0@1 corner: 1@1) offsets: (0@ self buttonHeight negated corner: 0@0) ! Item was changed: ----- Method: FontImporterTool>>close (in category 'actions') ----- close + self changed: #close.! - ToolBuilder default close: window.! Item was removed: - ----- Method: FontImporterTool>>contents (in category 'toolbuilder') ----- - contents - | sample i c f | - sample := WriteStream on: ''. - f := self selectedFont ifNil:[^Text new]. - (f isSymbolFont or: [(self font: f hasGlyphOf: $a) not]) ifFalse:[ - sample - nextPutAll: 'the quick brown fox jumps over the lazy dog' ;cr; - nextPutAll: 'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.' ;cr;cr; - nextPutAll: '0123456789'; cr; cr; - nextPutAll: - 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, - sed do eiusmod tempor incididunt ut labore et dolore - magna aliqua. Ut enim ad minim veniam, quis nostrud - exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate - velit esse cillum dolore eu fugiat nulla pariatur. Excepteur - sint occaecat cupidatat non proident, sunt in culpa qui - officia deserunt mollit anim id est laborum.' - ] ifTrue:[ - i := 0. - 33 to: 255 do:[:ci | - sample nextPut: (c:=Character value: ci). - i := i + 1. - (('@Z`z' includes:c) or:[i = 30]) - ifTrue:[i :=0. sample cr]]. - ]. - sample := sample contents asText. - sample addAttribute: (TextFontReference toFont: f). - ^sample! Item was changed: + ----- Method: FontImporterTool>>copyright (in category 'model access') ----- - ----- Method: FontImporterTool>>copyright (in category 'toolbuilder') ----- copyright | f | f := self selectedFont ifNil:[^ '']. ^ f isTTCFont ifTrue: [f ttcDescription copyright ifNil: ['']] ifFalse: ['']! Item was changed: + ----- Method: FontImporterTool>>filename (in category 'model access') ----- - ----- Method: FontImporterTool>>filename (in category 'toolbuilder') ----- filename ^ self currentSelection ifNil: [''] ifNotNil: [:sel | String streamContents: [:stream | sel allFilenames do: [:filename | stream nextPutAll: filename] separatedBy: [stream nextPut: $,;nextPut: $ ]]]! Item was changed: + ----- Method: FontImporterTool>>filenameHeight (in category 'layout') ----- - ----- Method: FontImporterTool>>filenameHeight (in category 'toolbuilder') ----- filenameHeight + ^ self filenameFont height * 2! - ^ (self filenameFont lineGrid * 1.5) truncated! Item was changed: + ----- Method: FontImporterTool>>font:hasGlyphOf: (in category 'helper') ----- - ----- Method: FontImporterTool>>font:hasGlyphOf: (in category 'toolbuilder') ----- font: f hasGlyphOf: aCharacter | font | font := f isFontSet ifTrue: [f fontArray first] ifFalse: [f]. ^ font isTTCFont ifFalse: [font hasGlyphOf: aCharacter] ifTrue: [ " [(f hasGlyphOf: aCharacter) not] does not work, the fallback glyph is always found instead. So we fake. if aCharacter is the same form as Character null aka 0, we assume absence." (font characterFormAt: aCharacter) bits ~= font fallbackForm bits] ! Item was changed: + ----- Method: FontImporterTool>>fontListFrame (in category 'layout') ----- - ----- Method: FontImporterTool>>fontListFrame (in category 'toolbuilder') ----- fontListFrame ^ LayoutFrame fractions: (0@0 corner: 0.4@1) + offsets: (0@0 corner: 0@ self buttonHeight negated)! - offsets: (0@0 corner: 0@ self buttonHeight negated + 4)! Item was changed: ----- Method: FontImporterTool>>initialize (in category 'initialize') ----- initialize + super initialize. - title := 'Choose a Font to import'. emphasis := 0. ! Item was changed: + ----- Method: FontImporterTool>>labelOf: (in category 'model access') ----- - ----- Method: FontImporterTool>>labelOf: (in category 'accessing') ----- labelOf: aFontDescription ^ aFontDescription fontname ! Item was changed: + ----- Method: FontImporterTool>>open (in category 'initialize') ----- - ----- Method: FontImporterTool>>open (in category 'toolbuilder') ----- open ^ToolBuilder open: self! Item was changed: + ----- Method: FontImporterTool>>previewFrame (in category 'layout') ----- - ----- Method: FontImporterTool>>previewFrame (in category 'toolbuilder') ----- previewFrame ^ LayoutFrame fractions: (0.4@0 corner: 1@1) + offsets: (0@0 corner: 0@ self buttonHeight negated)! - offsets: (0@0 corner: 0@ self buttonHeight negated + 4)! Item was added: + ----- Method: FontImporterTool>>previewText (in category 'model access') ----- + previewText + | sample i c f | + sample := WriteStream on: ''. + f := self selectedFont ifNil:[^Text new]. + (f isSymbolFont or: [(self font: f hasGlyphOf: $a) not]) ifFalse:[ + sample + nextPutAll: 'the quick brown fox jumps over the lazy dog' ;cr; + nextPutAll: 'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.' ;cr;cr; + nextPutAll: '0123456789'; cr; cr; + nextPutAll: + 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, + sed do eiusmod tempor incididunt ut labore et dolore + magna aliqua. Ut enim ad minim veniam, quis nostrud + exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur + sint occaecat cupidatat non proident, sunt in culpa qui + officia deserunt mollit anim id est laborum.' + ] ifTrue:[ + i := 0. + 33 to: 255 do:[:ci | + sample nextPut: (c:=Character value: ci). + i := i + 1. + (('@Z`z' includes:c) or:[i = 30]) + ifTrue:[i :=0. sample cr]]. + ]. + sample := sample contents asText. + sample addAttribute: (TextFontReference toFont: f). + ^sample! Item was changed: + ----- Method: FontImporterTool>>textForFamily:subfamily: (in category 'helper') ----- - ----- Method: FontImporterTool>>textForFamily:subfamily: (in category 'accessing') ----- textForFamily: familyName subfamily: subfamilyName subfamilyName ifNil: [ ^ (TextStyle named: familyName) ifNil: [familyName] ifNotNil: [:style | style isTTCStyle ifTrue: ["we are already present " Text string: familyName attribute: TextEmphasis underlined] ifFalse: [familyName]]]. " frome here on it is only about subfamilies" (self isStyleNameSupported: subfamilyName) ifFalse: [^ Text string: subfamilyName attribute: TextColor gray]. ^ (TextStyle named: familyName) ifNil: ["importable" subfamilyName] ifNotNil: [:style | (style isTTCStyle and: [ | regular emph | regular := style fonts anyOne. emph := TTCFont indexOfSubfamilyName: subfamilyName. " detect if this style is already imported " regular emphasis = emph or: [(regular emphasis: emph) ~= regular]]) ifFalse: ["again importable" subfamilyName] ifTrue: [Text string: subfamilyName attribute: TextEmphasis underlined]]! Item was removed: - ----- Method: FontImporterTool>>title (in category 'accessing') ----- - title - - ^ title! Item was removed: - ----- Method: FontImporterTool>>title: (in category 'accessing') ----- - title: anObject - "Set the value of title" - - title := anObject! Item was removed: - ----- Method: FontImporterTool>>window (in category 'accessing') ----- - window - ^window! Item was removed: - ----- Method: FontImporterTool>>window: (in category 'accessing') ----- - window: anObject - - window := anObject! Item was removed: - ----- Method: FontImporterTool>>windowTitle (in category 'initialize') ----- - windowTitle - ^ title translated!
1
0
0
0
The Trunk: Files-cmm.144.mcz
by commits@source.squeak.org
30 Apr '15
30 Apr '15
Chris Muller uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-cmm.144.mcz
==================== Summary ==================== Name: Files-cmm.144 Author: cmm Time: 29 April 2015, 8:53:59.602 pm UUID: 308a68a6-d0f3-4fdb-a4ba-e8fe35fa6a99 Ancestors: Files-dtl.143 - Fix up asBytesDescription. - Remove a redundant override. =============== Diff against Files-dtl.143 =============== Item was changed: ----- Method: Integer>>asBytesDescription (in category '*files') ----- asBytesDescription "Answer a terse, easily-readable representation of this Integer as a number of bytes. Useful for file-browsers." + | sign abs suffixes units | + sign := self negative ifTrue: ['-'] ifFalse: [String empty]. + abs := self abs. + suffixes := { '' "bytes". 'k'"ilobytes". 'M'"egabytes". 'G'"igabytes". 'T'"erabytes". 'P'"etabytes". 'E'"xabytes". 'Z'"ettabytes". 'Y'"ottabytes"}. + 1 to: suffixes size do: + [ : index | - | suffixes | - self isZero ifTrue: [ ^ '0' ]. - suffixes := { 'k'"ilobytes". 'M'"egabytes". 'G'"igabytes". 'T'"erabytes". 'P'"etabytes". 'E'"xabytes". 'Z'"ettabytes". 'Y'"ottabytes"}. - suffixes size to: 1 by: -1 do: - [ : index | | units rounded | units := 1000 raisedTo: index. + units>abs ifTrue: [ ^ sign,(abs/(units/1000)) rounded asString,(suffixes at: index) ] ]. + ^ sign,(abs/units) rounded,'Y'! - rounded := ((self/units) rounded)*units. - (rounded/self between: 0.95 and: 1.05) ifTrue: [ ^ ((self / units) rounded) asString, (suffixes at: index) ] ]. - ^ self asString! Item was removed: - ----- Method: StandardFileStream>>next:into:startingAt: (in category 'read, write, position') ----- - next: n into: aString startingAt: startIndex - "Read n bytes into the given string. - Return aString or a partial copy if less than - n elements have been read." - - | count | - count := self readInto: aString startingAt: startIndex count: n. - count = n - ifTrue:[ ^aString ] - ifFalse:[ ^aString copyFrom: 1 to: startIndex + count - 1 ]!
1
0
0
0
The Trunk: Files-cmm.144.mcz
by commits@source.squeak.org
30 Apr '15
30 Apr '15
Chris Muller uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-cmm.144.mcz
==================== Summary ==================== Name: Files-cmm.144 Author: cmm Time: 29 April 2015, 8:53:59.602 pm UUID: 308a68a6-d0f3-4fdb-a4ba-e8fe35fa6a99 Ancestors: Files-dtl.143 - Fix up asBytesDescription. - Remove a redundant override. =============== Diff against Files-dtl.143 =============== Item was changed: ----- Method: Integer>>asBytesDescription (in category '*files') ----- asBytesDescription "Answer a terse, easily-readable representation of this Integer as a number of bytes. Useful for file-browsers." + | sign abs suffixes units | + sign := self negative ifTrue: ['-'] ifFalse: [String empty]. + abs := self abs. + suffixes := { '' "bytes". 'k'"ilobytes". 'M'"egabytes". 'G'"igabytes". 'T'"erabytes". 'P'"etabytes". 'E'"xabytes". 'Z'"ettabytes". 'Y'"ottabytes"}. + 1 to: suffixes size do: + [ : index | - | suffixes | - self isZero ifTrue: [ ^ '0' ]. - suffixes := { 'k'"ilobytes". 'M'"egabytes". 'G'"igabytes". 'T'"erabytes". 'P'"etabytes". 'E'"xabytes". 'Z'"ettabytes". 'Y'"ottabytes"}. - suffixes size to: 1 by: -1 do: - [ : index | | units rounded | units := 1000 raisedTo: index. + units>abs ifTrue: [ ^ sign,(abs/(units/1000)) rounded asString,(suffixes at: index) ] ]. + ^ sign,(abs/units) rounded,'Y'! - rounded := ((self/units) rounded)*units. - (rounded/self between: 0.95 and: 1.05) ifTrue: [ ^ ((self / units) rounded) asString, (suffixes at: index) ] ]. - ^ self asString! Item was removed: - ----- Method: StandardFileStream>>next:into:startingAt: (in category 'read, write, position') ----- - next: n into: aString startingAt: startIndex - "Read n bytes into the given string. - Return aString or a partial copy if less than - n elements have been read." - - | count | - count := self readInto: aString startingAt: startIndex count: n. - count = n - ifTrue:[ ^aString ] - ifFalse:[ ^aString copyFrom: 1 to: startIndex + count - 1 ]!
1
0
0
0
The Trunk: Files-cmm.144.mcz
by commits@source.squeak.org
30 Apr '15
30 Apr '15
Chris Muller uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-cmm.144.mcz
==================== Summary ==================== Name: Files-cmm.144 Author: cmm Time: 29 April 2015, 8:53:59.602 pm UUID: 308a68a6-d0f3-4fdb-a4ba-e8fe35fa6a99 Ancestors: Files-dtl.143 - Fix up asBytesDescription. - Remove a redundant override. =============== Diff against Files-dtl.143 =============== Item was changed: ----- Method: Integer>>asBytesDescription (in category '*files') ----- asBytesDescription "Answer a terse, easily-readable representation of this Integer as a number of bytes. Useful for file-browsers." + | sign abs suffixes units | + sign := self negative ifTrue: ['-'] ifFalse: [String empty]. + abs := self abs. + suffixes := { '' "bytes". 'k'"ilobytes". 'M'"egabytes". 'G'"igabytes". 'T'"erabytes". 'P'"etabytes". 'E'"xabytes". 'Z'"ettabytes". 'Y'"ottabytes"}. + 1 to: suffixes size do: + [ : index | - | suffixes | - self isZero ifTrue: [ ^ '0' ]. - suffixes := { 'k'"ilobytes". 'M'"egabytes". 'G'"igabytes". 'T'"erabytes". 'P'"etabytes". 'E'"xabytes". 'Z'"ettabytes". 'Y'"ottabytes"}. - suffixes size to: 1 by: -1 do: - [ : index | | units rounded | units := 1000 raisedTo: index. + units>abs ifTrue: [ ^ sign,(abs/(units/1000)) rounded asString,(suffixes at: index) ] ]. + ^ sign,(abs/units) rounded,'Y'! - rounded := ((self/units) rounded)*units. - (rounded/self between: 0.95 and: 1.05) ifTrue: [ ^ ((self / units) rounded) asString, (suffixes at: index) ] ]. - ^ self asString! Item was removed: - ----- Method: StandardFileStream>>next:into:startingAt: (in category 'read, write, position') ----- - next: n into: aString startingAt: startIndex - "Read n bytes into the given string. - Return aString or a partial copy if less than - n elements have been read." - - | count | - count := self readInto: aString startingAt: startIndex count: n. - count = n - ifTrue:[ ^aString ] - ifFalse:[ ^aString copyFrom: 1 to: startIndex + count - 1 ]!
1
0
0
0
← Newer
1
2
3
4
5
6
...
136
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
Results per page:
10
25
50
100
200