--- a/AbstractLauncherApplication.st Sat Mar 06 02:59:44 1999 +0100
+++ b/AbstractLauncherApplication.st Sat Mar 06 03:15:15 1999 +0100
@@ -554,7 +554,7 @@
box addVerticalSpace:10.
box addHelpButtonFor:'programming/language.html#RESOURCEDEFS'.
- box addAbortButton; addOkButton.
+ box addAbortAndOkButtons.
box showAtPointer.
box destroy.
@@ -1370,8 +1370,7 @@
box
addHelpButtonFor:'Launcher/compilerSettings.html';
- addAbortButton;
- addOkButton.
+ addAbortAndOkButtons.
warnEnabler value.
box open.
@@ -1437,16 +1436,16 @@
listOfSizes := resources at:'LIST_OF_OFFERED_SCREEN_SIZES' default:#default.
listOfSizes == #default ifTrue:[
- "/ nothing in resource file; offer at least some.
- sizeInfos := #(
- ( '11.3'' (235mm x 175mm) LCD' (235 175) )
- ( '17'' (325mm x 245mm)' (325 245) )
- ( '19'' (340mm x 270mm)' (340 270) )
- ( '20'' (350mm x 280mm)' (350 280) )
- ( '21'' (365mm x 285mm)' (365 285) )
- ).
+ "/ nothing in resource file; offer at least some.
+ sizeInfos := #(
+ ( '11.3'' (235mm x 175mm) LCD' (235 175) )
+ ( '17'' (325mm x 245mm)' (325 245) )
+ ( '19'' (340mm x 270mm)' (340 270) )
+ ( '20'' (350mm x 280mm)' (350 280) )
+ ( '21'' (365mm x 285mm)' (365 285) )
+ ).
] ifFalse:[
- sizeInfos := resources array:listOfSizes.
+ sizeInfos := resources array:listOfSizes.
].
sizeNames := sizeInfos collect:[:entry | entry at:1].
sizes := sizeInfos collect:[:entry | entry at:2].
@@ -1472,43 +1471,43 @@
ditherList := SelectionInList new.
(visual == #StaticGray or:[visual == #GrayScale]) ifTrue:[
- ditherStyles := #('threshold' 'ordered dither' 'error diffusion').
- ditherSyms := #(threshold ordered floydSteinberg).
+ ditherStyles := #('threshold' 'ordered dither' 'error diffusion').
+ ditherSyms := #(threshold ordered floydSteinberg).
] ifFalse:[
- visual ~~ #TrueColor ifTrue:[
- ditherStyles := #('nearest color' 'error diffusion').
- ditherSyms := #(ordered floydSteinberg).
- ]
+ visual ~~ #TrueColor ifTrue:[
+ ditherStyles := #('nearest color' 'error diffusion').
+ ditherSyms := #(ordered floydSteinberg).
+ ]
].
ditherSyms notNil ifTrue:[
- ditherList list:ditherStyles.
- ditherList selectionIndex:(ditherSyms indexOf:(Image ditherAlgorithm) ifAbsent:#threshold).
+ ditherList list:ditherStyles.
+ ditherList selectionIndex:(ditherSyms indexOf:(Image ditherAlgorithm) ifAbsent:#threshold).
].
box := DialogBox new.
box label:(resources string:'Display screen settings').
(box addTextLabel:(resources string:'Actual visible screen area:'))
- adjust:#left.
+ adjust:#left.
(box addPopUpList:(resources string:'common sizes:') on:sizeList)
- label:'monitor size'.
+ label:'monitor size'.
idx := sizes findFirst:[:entry |
- ((entry at:1) = sizeX value)
- and:[((entry at:2) = sizeY value)]
- ].
+ ((entry at:1) = sizeX value)
+ and:[((entry at:2) = sizeY value)]
+ ].
idx ~~ 0 ifTrue:[
- sizeList selectionIndex:idx
+ sizeList selectionIndex:idx
].
sizeList onChangeSend:#value to:[
- |idx|
-
- idx := sizeList selectionIndex.
- sizeX value:((sizes at:idx) at:1).
- sizeY value:((sizes at:idx) at:2).
- ].
+ |idx|
+
+ idx := sizeList selectionIndex.
+ sizeX value:((sizes at:idx) at:1).
+ sizeY value:((sizes at:idx) at:2).
+ ].
y := box yPosition.
component := box addTextLabel:(resources string:'screen size:').
@@ -1517,10 +1516,10 @@
box yPosition:y.
component := box addInputFieldOn:nil tabable:true.
component width:0.25; left:0.3;
- immediateAccept:false; acceptOnLeave:false;
- cursorMovementWhenUpdating:#beginOfLine;
- converter:(PrintConverter new initForInteger);
- model:sizeX.
+ immediateAccept:false; acceptOnLeave:false;
+ cursorMovementWhenUpdating:#beginOfLine;
+ converter:(PrintConverter new initForInteger);
+ model:sizeX.
box yPosition:y.
component := box addTextLabel:(' x ').
@@ -1529,10 +1528,10 @@
box yPosition:y.
component := box addInputFieldOn:nil tabable:true.
component width:0.25; left:0.65;
- immediateAccept:false; acceptOnLeave:false;
- cursorMovementWhenUpdating:#beginOfLine;
- converter:(PrintConverter new initForInteger);
- model:sizeY.
+ immediateAccept:false; acceptOnLeave:false;
+ cursorMovementWhenUpdating:#beginOfLine;
+ converter:(PrintConverter new initForInteger);
+ model:sizeY.
box yPosition:y.
component := box addTextLabel:('(mm)').
@@ -1541,28 +1540,28 @@
box addVerticalSpace; addHorizontalLine; addVerticalSpace.
(box addTextLabel:(resources string:'Screen: depth: %1 visual: %2 (%3)'
- with:Screen current depth printString
- with:Screen current visualType
- with:Screen current serverVendor))
- adjust:#left.
+ with:Screen current depth printString
+ with:Screen current visualType
+ with:Screen current serverVendor))
+ adjust:#left.
box addVerticalSpace; addHorizontalLine; addVerticalSpace.
box addCheckBox:(resources string:'color monitor') on:isColorMonitor.
visual == #PseudoColor ifTrue:[
- box addVerticalSpace.
- component := box addCheckBox:(resources string:'use fix color palette %1' with:'(4x8x4)') on:useFixPalette.
-
- box addVerticalSpace.
- component := box addCheckBox:(resources string:'use fix gray color palette %1' with:'(32)') on:useFixGrayPalette.
+ box addVerticalSpace.
+ component := box addCheckBox:(resources string:'use fix color palette %1' with:'(4x8x4)') on:useFixPalette.
+
+ box addVerticalSpace.
+ component := box addCheckBox:(resources string:'use fix gray color palette %1' with:'(32)') on:useFixGrayPalette.
].
ditherSyms notNil ifTrue:[
- box addVerticalSpace.
- component := box addPopUpList:(resources string:'image display:') on:ditherList.
- component defaultLabel:'image display'.
- component superView horizontalLayout:#leftSpace.
+ box addVerticalSpace.
+ component := box addPopUpList:(resources string:'image display:') on:ditherList.
+ component defaultLabel:'image display'.
+ component superView horizontalLayout:#leftSpace.
].
box addVerticalSpace.
@@ -1574,48 +1573,48 @@
component superView horizontalLayout:#leftSpace.
box
- addHelpButtonFor:'Launcher/screenSettings.html';
- addAbortButton; addOkButton.
+ addHelpButtonFor:'Launcher/screenSettings.html';
+ addAbortAndOkButtons.
box open.
box accepted ifTrue:[
- Image flushDeviceImages.
-
- screen visualType == #PseudoColor ifTrue:[
- useFixPalette value ifTrue:[
- Color colorAllocationFailSignal handle:[:ex |
- self warn:(resources string:'Could not allocate colors.').
- ] do:[
- Color getColorsRed:4 green:8 blue:4 on:screen
- ]
- ] ifFalse:[
- screen releaseFixColors
- ].
-
- useFixGrayPalette value ifTrue:[
- Color colorAllocationFailSignal handle:[:ex |
- self warn:(resources string:'Could not allocate colors.').
- ] do:[
- Color getGrayColors:32 on:screen
- ]
- ] ifFalse:[
- screen releaseFixGrayColors
- ]
- ].
- screen hasColors:isColorMonitor value.
- screen widthInMillimeter:sizeX value.
- screen heightInMillimeter:sizeY value.
-
- screen supportsDeepIcons:deepIcons value.
- ditherSyms notNil ifTrue:[
- Image ditherAlgorithm:(ditherSyms at:ditherList selectionIndex).
- ].
-
- requestor withWaitCursorDo:[
- View defaultStyle:(View defaultStyle).
- ].
-
- screen clipBoardEncoding:(clipEncodingSyms at:clipEncodingList selectionIndex).
+ Image flushDeviceImages.
+
+ screen visualType == #PseudoColor ifTrue:[
+ useFixPalette value ifTrue:[
+ Color colorAllocationFailSignal handle:[:ex |
+ self warn:(resources string:'Could not allocate colors.').
+ ] do:[
+ Color getColorsRed:4 green:8 blue:4 on:screen
+ ]
+ ] ifFalse:[
+ screen releaseFixColors
+ ].
+
+ useFixGrayPalette value ifTrue:[
+ Color colorAllocationFailSignal handle:[:ex |
+ self warn:(resources string:'Could not allocate colors.').
+ ] do:[
+ Color getGrayColors:32 on:screen
+ ]
+ ] ifFalse:[
+ screen releaseFixGrayColors
+ ]
+ ].
+ screen hasColors:isColorMonitor value.
+ screen widthInMillimeter:sizeX value.
+ screen heightInMillimeter:sizeY value.
+
+ screen supportsDeepIcons:deepIcons value.
+ ditherSyms notNil ifTrue:[
+ Image ditherAlgorithm:(ditherSyms at:ditherList selectionIndex).
+ ].
+
+ requestor withWaitCursorDo:[
+ View defaultStyle:(View defaultStyle).
+ ].
+
+ screen clipBoardEncoding:(clipEncodingSyms at:clipEncodingList selectionIndex).
].
box destroy
@@ -1649,8 +1648,7 @@
box
addHelpButtonFor:'Launcher/editSettings.html';
- addAbortButton;
- addOkButton.
+ addAbortAndOkButtons.
"/
"/ show the box ...
@@ -1756,7 +1754,7 @@
"/ box addHorizontalLine.
"/ box addHelpButtonFor:'Launcher/javaSettings.html'.
- box addAbortButton; addOkButton.
+ box addAbortAndOkButtons.
box open.
box accepted ifTrue:[
@@ -2071,11 +2069,11 @@
box addHorizontalLine.
component := box
- addLabelledInputField:(resources string:'size of newSpace:')
- adjust:#right
- on:nil "/ newSpaceSize
- tabable:true
- separateAtX:0.7.
+ addLabelledInputField:(resources string:'size of newSpace:')
+ adjust:#right
+ on:nil "/ newSpaceSize
+ tabable:true
+ separateAtX:0.7.
component acceptOnLeave:false.
component converter:(PrintConverter new initForNumber).
component model:newSpaceSize.
@@ -2085,11 +2083,11 @@
component := box
- addLabelledInputField:(resources string:'incremental GC allocation trigger:')
- adjust:#right
- on:nil "/ igcLimit
- tabable:true
- separateAtX:0.7.
+ addLabelledInputField:(resources string:'incremental GC allocation trigger:')
+ adjust:#right
+ on:nil "/ igcLimit
+ tabable:true
+ separateAtX:0.7.
component acceptOnLeave:false.
component converter:(PrintConverter new initForNumber).
component model:igcLimit.
@@ -2099,11 +2097,11 @@
box addHorizontalLine.
component := box
- addLabelledInputField:(resources string:'incremental GC freespace trigger:')
- adjust:#right
- on:nil "/ igcFreeLimit
- tabable:true
- separateAtX:0.7.
+ addLabelledInputField:(resources string:'incremental GC freespace trigger:')
+ adjust:#right
+ on:nil "/ igcFreeLimit
+ tabable:true
+ separateAtX:0.7.
component acceptOnLeave:false.
component converter:(PrintConverter new initForNumber).
component model:igcFreeLimit.
@@ -2113,11 +2111,11 @@
box addHorizontalLine.
component := box
- addLabelledInputField:(resources string:'incremental GC amount:')
- adjust:#right
- on:nil "/ igcFreeAmount
- tabable:true
- separateAtX:0.7.
+ addLabelledInputField:(resources string:'incremental GC amount:')
+ adjust:#right
+ on:nil "/ igcFreeAmount
+ tabable:true
+ separateAtX:0.7.
component acceptOnLeave:false.
component converter:(PrintConverter new initForNumber).
component model:igcFreeAmount.
@@ -2127,11 +2125,11 @@
box addHorizontalLine.
component := box
- addLabelledInputField:(resources string:'oldspace increment:')
- adjust:#right
- on:nil "/ oldIncr
- tabable:true
- separateAtX:0.7.
+ addLabelledInputField:(resources string:'oldspace increment:')
+ adjust:#right
+ on:nil "/ oldIncr
+ tabable:true
+ separateAtX:0.7.
component acceptOnLeave:false.
component converter:(PrintConverter new initForNumber).
component model:oldIncr.
@@ -2141,11 +2139,11 @@
box addHorizontalLine.
component := box
- addLabelledInputField:(resources string:'oldspace compress limit:')
- adjust:#right
- on:nil "/ compressLimit
- tabable:true
- separateAtX:0.7.
+ addLabelledInputField:(resources string:'oldspace compress limit:')
+ adjust:#right
+ on:nil "/ compressLimit
+ tabable:true
+ separateAtX:0.7.
component acceptOnLeave:false.
component converter:(PrintConverter new initForNumber).
component model:compressLimit.
@@ -2155,11 +2153,11 @@
box addHorizontalLine.
component := box
- addLabelledInputField:(resources string:'stack limit:')
- adjust:#right
- on:nil
- tabable:true
- separateAtX:0.7.
+ addLabelledInputField:(resources string:'stack limit:')
+ adjust:#right
+ on:nil
+ tabable:true
+ separateAtX:0.7.
component acceptOnLeave:false.
component converter:(PrintConverter new initForNumber).
component model:stackLimit.
@@ -2169,38 +2167,38 @@
box addHorizontalLine.
ObjectMemory supportsJustInTimeCompilation ifTrue:[
- component := box
- addLabelledInputField:(resources string:'dynamic code limit:')
- adjust:#right
- on:nil
- tabable:true
- separateAtX:0.7.
- component acceptOnLeave:false.
- component converter:(PrintConverter new initForNumberOrNil).
- component model:codeLimit.
- fields add:component.
-
- box addTextLabel:'(flush dynamic compiled code to stay within this limit)'.
- box addHorizontalLine.
-
- component := box
- addLabelledInputField:(resources string:'dynamic code GC trigger:')
- adjust:#right
- on:nil
- tabable:true
- separateAtX:0.7.
- component acceptOnLeave:false.
- component converter:(PrintConverter new initForNumberOrNil).
- component model:codeTrigger.
- fields add:component.
-
- box addTextLabel:'(start incremental GC whenever this amount of code has been allocated)'.
- box addHorizontalLine.
+ component := box
+ addLabelledInputField:(resources string:'dynamic code limit:')
+ adjust:#right
+ on:nil
+ tabable:true
+ separateAtX:0.7.
+ component acceptOnLeave:false.
+ component converter:(PrintConverter new initForNumberOrNil).
+ component model:codeLimit.
+ fields add:component.
+
+ box addTextLabel:'(flush dynamic compiled code to stay within this limit)'.
+ box addHorizontalLine.
+
+ component := box
+ addLabelledInputField:(resources string:'dynamic code GC trigger:')
+ adjust:#right
+ on:nil
+ tabable:true
+ separateAtX:0.7.
+ component acceptOnLeave:false.
+ component converter:(PrintConverter new initForNumberOrNil).
+ component model:codeTrigger.
+ fields add:component.
+
+ box addTextLabel:'(start incremental GC whenever this amount of code has been allocated)'.
+ box addHorizontalLine.
].
- box addAbortButton; addOkButton.
+ box addAbortAndOkButtons.
box
- addHelpButtonFor:'Launcher/memorySettings.html'.
+ addHelpButtonFor:'Launcher/memorySettings.html'.
"/
"/ show the box ...
@@ -2211,29 +2209,29 @@
"/ update system settings
"/
box accepted ifTrue:[
- fields do:[:comp | comp accept].
-
- igcFreeAmount value ~~ ObjectMemory freeSpaceGCAmount ifTrue:[
- ObjectMemory freeSpaceGCAmount:igcFreeAmount value.
- ].
- igcFreeLimit value ~~ ObjectMemory freeSpaceGCLimit ifTrue:[
- ObjectMemory freeSpaceGCLimit:igcFreeLimit value.
- ].
- igcLimit value ~~ ObjectMemory incrementalGCLimit ifTrue:[
- ObjectMemory incrementalGCLimit:igcLimit value.
- ].
- newSpaceSize value ~~ ObjectMemory newSpaceSize ifTrue:[
- ObjectMemory newSpaceSize:newSpaceSize value.
- ].
- oldIncr value ~~ ObjectMemory oldSpaceIncrement ifTrue:[
- ObjectMemory oldSpaceIncrement:oldIncr value.
- ].
- stackLimit value ~~ Process defaultMaximumStackSize ifTrue:[
- Process defaultMaximumStackSize:stackLimit value.
- ].
- ObjectMemory oldSpaceCompressLimit:compressLimit value.
- ObjectMemory dynamicCodeLimit:codeLimit value.
- ObjectMemory dynamicCodeGCTrigger:codeTrigger value.
+ fields do:[:comp | comp accept].
+
+ igcFreeAmount value ~~ ObjectMemory freeSpaceGCAmount ifTrue:[
+ ObjectMemory freeSpaceGCAmount:igcFreeAmount value.
+ ].
+ igcFreeLimit value ~~ ObjectMemory freeSpaceGCLimit ifTrue:[
+ ObjectMemory freeSpaceGCLimit:igcFreeLimit value.
+ ].
+ igcLimit value ~~ ObjectMemory incrementalGCLimit ifTrue:[
+ ObjectMemory incrementalGCLimit:igcLimit value.
+ ].
+ newSpaceSize value ~~ ObjectMemory newSpaceSize ifTrue:[
+ ObjectMemory newSpaceSize:newSpaceSize value.
+ ].
+ oldIncr value ~~ ObjectMemory oldSpaceIncrement ifTrue:[
+ ObjectMemory oldSpaceIncrement:oldIncr value.
+ ].
+ stackLimit value ~~ Process defaultMaximumStackSize ifTrue:[
+ Process defaultMaximumStackSize:stackLimit value.
+ ].
+ ObjectMemory oldSpaceCompressLimit:compressLimit value.
+ ObjectMemory dynamicCodeLimit:codeLimit value.
+ ObjectMemory dynamicCodeGCTrigger:codeTrigger value.
].
box destroy
@@ -2263,14 +2261,14 @@
box addCheckBox:(resources string:'Other info messages') on:classInfos.
box addHelpButtonFor:'Launcher/messageSettings.html'.
- box addAbortButton; addOkButton.
+ box addAbortAndOkButtons.
box open.
box accepted ifTrue:[
- ObjectMemory infoPrinting:vmInfo value.
- ObjectMemory debugPrinting:vmErrors value.
- Object infoPrinting:classInfos value.
- DeviceWorkstation errorPrinting:displayErrors value.
+ ObjectMemory infoPrinting:vmInfo value.
+ ObjectMemory debugPrinting:vmErrors value.
+ Object infoPrinting:classInfos value.
+ DeviceWorkstation errorPrinting:displayErrors value.
].
box destroy
@@ -2367,8 +2365,7 @@
box
addHelpButtonFor:'Launcher/miscSettings.html';
- addAbortButton;
- addOkButton.
+ addAbortAndOkButtons.
"/
"/ show the box ...
@@ -2504,12 +2501,12 @@
commandList := resources at:'PRINT_COMMANDS' ifAbsent:nil.
commandList isNil ifTrue:[
- commandList := PrinterStream defaultCommands.
- commandList isNil ifTrue:[
- commandList := #('lpr'
- 'lp'
- ).
- ]
+ commandList := PrinterStream defaultCommands.
+ commandList isNil ifTrue:[
+ commandList := #('lpr'
+ 'lp'
+ ).
+ ]
].
commandListPop list:commandList.
@@ -2528,24 +2525,24 @@
y := box yPosition.
box
- addRow:(1 to:2)
- fromX:0
- toX:0.5
- collect:[:idx | row at:idx]
- tabable:false
- horizontalLayout:#leftSpace
- verticalLayout:#center.
+ addRow:(1 to:2)
+ fromX:0
+ toX:0.5
+ collect:[:idx | row at:idx]
+ tabable:false
+ horizontalLayout:#leftSpace
+ verticalLayout:#center.
y1 := box yPosition.
box yPosition:y.
box
- addRow:(3 to:4)
- fromX:0.5
- toX:1.0
- collect:[:idx | row at:idx]
- tabable:false
- horizontalLayout:#leftSpace
- verticalLayout:#center.
+ addRow:(3 to:4)
+ fromX:0.5
+ toX:1.0
+ collect:[:idx | row at:idx]
+ tabable:false
+ horizontalLayout:#leftSpace
+ verticalLayout:#center.
box yPosition:(box yPosition max:y1).
@@ -2557,12 +2554,12 @@
y := box yPosition.
topMarginComponent := box
- addLabelledInputField:(resources string:'top margin:')
- adjust:#right
- on:nil "/ topMargin
- tabable:true
- from:0.0 to:0.5
- separateAtX:0.6.
+ addLabelledInputField:(resources string:'top margin:')
+ adjust:#right
+ on:nil "/ topMargin
+ tabable:true
+ from:0.0 to:0.5
+ separateAtX:0.6.
topMarginComponent converter:(PrintConverter new initForNumber).
topMarginComponent model:topMargin.
y1 := box yPosition.
@@ -2573,38 +2570,38 @@
component := box addComponent:(PopUpList on:unitList).
component
- left:0.6;
- width:0.3.
+ left:0.6;
+ width:0.3.
box yPosition:y1.
leftMarginComponent := box
- addLabelledInputField:(resources string:'left margin:')
- adjust:#right
- on:nil "/ leftMargin
- tabable:true
- from:0.0 to:0.5
- separateAtX:0.6.
+ addLabelledInputField:(resources string:'left margin:')
+ adjust:#right
+ on:nil "/ leftMargin
+ tabable:true
+ from:0.0 to:0.5
+ separateAtX:0.6.
leftMarginComponent converter:(PrintConverter new initForNumber).
leftMarginComponent model:leftMargin.
rightMarginComponent := box
- addLabelledInputField:(resources string:'right margin:')
- adjust:#right
- on:nil "/ rightMargin
- tabable:true
- from:0.0 to:0.5
- separateAtX:0.6.
+ addLabelledInputField:(resources string:'right margin:')
+ adjust:#right
+ on:nil "/ rightMargin
+ tabable:true
+ from:0.0 to:0.5
+ separateAtX:0.6.
rightMarginComponent converter:(PrintConverter new initForNumber).
rightMarginComponent model:rightMargin.
bottomMarginComponent := box
- addLabelledInputField:(resources string:'bottom margin:')
- adjust:#right
- on:nil "/ bottomMargin
- tabable:true
- from:0.0 to:0.5
- separateAtX:0.6.
+ addLabelledInputField:(resources string:'bottom margin:')
+ adjust:#right
+ on:nil "/ bottomMargin
+ tabable:true
+ from:0.0 to:0.5
+ separateAtX:0.6.
bottomMarginComponent converter:(PrintConverter new initForNumber).
bottomMarginComponent model:bottomMargin.
@@ -2614,102 +2611,102 @@
updater := [ |p fg hasPageSize hasMargins|
- printerType selectionIndex ~~ 0 ifTrue:[
- p := possiblePrinters at:(printerType selectionIndex).
- hasPageSize := p supportsPageSizes.
- hasMargins := p supportsMargins.
- ] ifFalse:[
- hasPageSize := false.
- hasMargins := false.
- ].
- hasPageSize ifTrue:[
- fg := Button new foregroundColor.
- formatComponent enable.
- landscapeComponent enable.
-
- formatComponent label:p pageFormat.
- pageFormat value:(p pageFormat).
- landscape value:(p landscape).
- ] ifFalse:[
- fg := Button new disabledForegroundColor.
- formatComponent disable.
- landscapeComponent disable.
-
- formatComponent label:'unknown'.
- landscape value:nil.
- ].
- hasMargins ifTrue:[
- unitList selectionIndex == 2 ifTrue:[
- unit := #mm
- ] ifFalse:[
- unit := #inch
- ].
-
- topMargin value:(UnitConverter convert:p topMargin from:#inch to:unit).
- leftMargin value:(UnitConverter convert:p leftMargin from:#inch to:unit).
- rightMargin value:(UnitConverter convert:p rightMargin from:#inch to:unit).
- bottomMargin value:(UnitConverter convert:p bottomMargin from:#inch to:unit).
-
- topMarginComponent enable.
- leftMarginComponent enable.
- rightMarginComponent enable.
- bottomMarginComponent enable.
- ] ifFalse:[
- topMarginComponent disable.
- leftMarginComponent disable.
- rightMarginComponent disable.
- bottomMarginComponent disable.
- ].
- formatLabel foregroundColor:fg.
- landscapeLabel foregroundColor:fg.
-
- p notNil ifTrue:[
- commandList := p defaultCommands.
- commandList notNil ifTrue:[
- commandListPop list:commandList
- ].
-
- printCommand value:(p printCommand).
- ].
- p supportsPostscript ifFalse:[
- supportsColorComponent disable.
- supportsColor value:false
- ] ifTrue:[
- supportsColorComponent enable.
- supportsColor value:(Printer supportsColor).
- ]
- ].
+ printerType selectionIndex ~~ 0 ifTrue:[
+ p := possiblePrinters at:(printerType selectionIndex).
+ hasPageSize := p supportsPageSizes.
+ hasMargins := p supportsMargins.
+ ] ifFalse:[
+ hasPageSize := false.
+ hasMargins := false.
+ ].
+ hasPageSize ifTrue:[
+ fg := Button new foregroundColor.
+ formatComponent enable.
+ landscapeComponent enable.
+
+ formatComponent label:p pageFormat.
+ pageFormat value:(p pageFormat).
+ landscape value:(p landscape).
+ ] ifFalse:[
+ fg := Button new disabledForegroundColor.
+ formatComponent disable.
+ landscapeComponent disable.
+
+ formatComponent label:'unknown'.
+ landscape value:nil.
+ ].
+ hasMargins ifTrue:[
+ unitList selectionIndex == 2 ifTrue:[
+ unit := #mm
+ ] ifFalse:[
+ unit := #inch
+ ].
+
+ topMargin value:(UnitConverter convert:p topMargin from:#inch to:unit).
+ leftMargin value:(UnitConverter convert:p leftMargin from:#inch to:unit).
+ rightMargin value:(UnitConverter convert:p rightMargin from:#inch to:unit).
+ bottomMargin value:(UnitConverter convert:p bottomMargin from:#inch to:unit).
+
+ topMarginComponent enable.
+ leftMarginComponent enable.
+ rightMarginComponent enable.
+ bottomMarginComponent enable.
+ ] ifFalse:[
+ topMarginComponent disable.
+ leftMarginComponent disable.
+ rightMarginComponent disable.
+ bottomMarginComponent disable.
+ ].
+ formatLabel foregroundColor:fg.
+ landscapeLabel foregroundColor:fg.
+
+ p notNil ifTrue:[
+ commandList := p defaultCommands.
+ commandList notNil ifTrue:[
+ commandListPop list:commandList
+ ].
+
+ printCommand value:(p printCommand).
+ ].
+ p supportsPostscript ifFalse:[
+ supportsColorComponent disable.
+ supportsColor value:false
+ ] ifTrue:[
+ supportsColorComponent enable.
+ supportsColor value:(Printer supportsColor).
+ ]
+ ].
unitList onChangeSend:#value to:updater.
printerType onChangeSend:#value to:updater.
updater value.
box addVerticalSpace;
- addHelpButtonFor:'Launcher/printerSettings.html';
- addAbortButton; addOkButton.
+ addHelpButtonFor:'Launcher/printerSettings.html';
+ addAbortAndOkButtons.
box open.
box accepted ifTrue:[
- Printer := possiblePrinters at:(printerType selectionIndex).
- Printer printCommand:printCommand value.
-
- Printer supportsPageSizes ifTrue:[
- Printer pageFormat:(pageFormat selection).
- Printer landscape:(landscape value).
- ].
- Printer supportsMargins ifTrue:[
- unitList selectionIndex == 2 ifTrue:[
- unit := #mm
- ] ifFalse:[
- unit := #inch
- ].
- Printer topMargin:(UnitConverter convert:topMargin value from:unit to:#inch).
- Printer leftMargin:(UnitConverter convert:leftMargin value from:unit to:#inch).
- Printer rightMargin:(UnitConverter convert:rightMargin value from:unit to:#inch).
- Printer bottomMargin:(UnitConverter convert:bottomMargin value from:unit to:#inch).
- ].
- Printer supportsPostscript ifTrue:[
- Printer supportsColor:supportsColor value.
- ].
+ Printer := possiblePrinters at:(printerType selectionIndex).
+ Printer printCommand:printCommand value.
+
+ Printer supportsPageSizes ifTrue:[
+ Printer pageFormat:(pageFormat selection).
+ Printer landscape:(landscape value).
+ ].
+ Printer supportsMargins ifTrue:[
+ unitList selectionIndex == 2 ifTrue:[
+ unit := #mm
+ ] ifFalse:[
+ unit := #inch
+ ].
+ Printer topMargin:(UnitConverter convert:topMargin value from:unit to:#inch).
+ Printer leftMargin:(UnitConverter convert:leftMargin value from:unit to:#inch).
+ Printer rightMargin:(UnitConverter convert:rightMargin value from:unit to:#inch).
+ Printer bottomMargin:(UnitConverter convert:bottomMargin value from:unit to:#inch).
+ ].
+ Printer supportsPostscript ifTrue:[
+ Printer supportsColor:supportsColor value.
+ ].
].
box destroy
@@ -3129,8 +3126,7 @@
box
addHelpButtonFor:'Launcher/sourceSettings.html';
- addAbortButton;
- addOkButton.
+ addAbortAndOkButtons.
"/
"/ show the box ...
@@ -3360,8 +3356,7 @@
box
addHelpButtonFor:'Launcher/compilerSettings.html';
- addAbortButton;
- addOkButton.
+ addAbortAndOkButtons.
box open.
@@ -3425,8 +3420,7 @@
box
addHelpButtonFor:'Launcher/toolSettings.html';
- addAbortButton;
- addOkButton.
+ addAbortAndOkButtons.
"/
"/ show the box ...
@@ -3470,56 +3464,56 @@
"
someRsrcFile := Smalltalk getSystemFileName:('resources' asFilename constructString:'normal.style').
someRsrcFile notNil ifTrue:[
- resourceDir := someRsrcFile asFilename directoryName
+ resourceDir := someRsrcFile asFilename directoryName
] ifFalse:[
- resourceDir := Smalltalk getSystemFileName:'resources'.
+ resourceDir := Smalltalk getSystemFileName:'resources'.
].
resourceDir isNil ifTrue:[
- self warn:'no styles found (missing ''resources'' directory)'.
- ^ self
+ self warn:'no styles found (missing ''resources'' directory)'.
+ ^ self
].
dir := resourceDir asFilename directoryContents.
list := SelectionInList new.
listUpdater := [
- |listOfStyles lastSelection|
-
- lastSelection := list selection.
- listOfStyles := dir select:[:aFileName | aFileName asFilename hasSuffix:'style'].
- listOfStyles := listOfStyles collect:[:aFileName | aFileName asFilename withoutSuffix name].
- Filename isCaseSensitive ifFalse:[
- listOfStyles := listOfStyles collect:[:aStyleName | aStyleName asLowercase].
- ].
- listOfStyles remove:'generic' ifAbsent:nil; remove:'mswindows3' ifAbsent:nil.
- showStandardStylesOnly value ifTrue:[
- listOfStyles := listOfStyles select:[:aStyleName | standardStyles includes:aStyleName].
- ].
-
- listOfStyles sort.
- list list:listOfStyles.
- list selection:lastSelection.
+ |listOfStyles lastSelection|
+
+ lastSelection := list selection.
+ listOfStyles := dir select:[:aFileName | aFileName asFilename hasSuffix:'style'].
+ listOfStyles := listOfStyles collect:[:aFileName | aFileName asFilename withoutSuffix name].
+ Filename isCaseSensitive ifFalse:[
+ listOfStyles := listOfStyles collect:[:aStyleName | aStyleName asLowercase].
+ ].
+ listOfStyles remove:'generic' ifAbsent:nil; remove:'mswindows3' ifAbsent:nil.
+ showStandardStylesOnly value ifTrue:[
+ listOfStyles := listOfStyles select:[:aStyleName | standardStyles includes:aStyleName].
+ ].
+
+ listOfStyles sort.
+ list list:listOfStyles.
+ list selection:lastSelection.
].
listUpdater value.
showStandardStylesOnly onChangeSend:#value to:listUpdater.
infoForwarder := [
- |nm sheet comment|
-
- comment := ''.
- nm := list selection.
- nm notNil ifTrue:[
- sheet := ViewStyle fromFile:(nm , '.style').
- comment := (sheet at:#comment ifAbsent:'') withoutSeparators.
- ].
- comment := comment withCRs asStringCollection.
- comment size == 1 ifTrue:[
- comment := comment first
- ].
- infoLabel label:comment
- ].
+ |nm sheet comment|
+
+ comment := ''.
+ nm := list selection.
+ nm notNil ifTrue:[
+ sheet := ViewStyle fromFile:(nm , '.style').
+ comment := (sheet at:#comment ifAbsent:'') withoutSeparators.
+ ].
+ comment := comment withCRs asStringCollection.
+ comment size == 1 ifTrue:[
+ comment := comment first
+ ].
+ infoLabel label:comment
+ ].
list onChangeSend:#value to:infoForwarder.
@@ -3536,16 +3530,13 @@
(infoLabel := box addTextLabel:'\\' withCRs) adjust:#centerLeft.
- box addAbortButton.
-
+ box addAbortAndOkButtons.
"/ mhmh - the newLauncher does not yet handle apply (without close) correctly
"/ b := box addButton:(Button label:(resources string:'apply')).
"/ b action:[didApply := true. requestor changeViewStyleTo:(list selection)].
- box addOkButton.
-
(standardStyles includes:View defaultStyle) ifFalse:[
- showStandardStylesOnly value:false
+ showStandardStylesOnly value:false
].
list selection:(View defaultStyle).
@@ -3556,10 +3547,10 @@
box destroy.
box accepted ifTrue:[
- ((newStyle := list selection) ~= View defaultStyle
- or:[didApply ~~ true]) ifTrue:[
- requestor changeViewStyleTo:newStyle.
- ].
+ ((newStyle := list selection) ~= View defaultStyle
+ or:[didApply ~~ true]) ifTrue:[
+ requestor changeViewStyleTo:newStyle.
+ ].
].
"
@@ -3994,13 +3985,13 @@
resources := requestor class classResources.
OperatingSystem isUNIXlike ifTrue:[
- defaultsList := #('/files/CVS' '/CVS' 'host:/files/CVS' 'host:/CVS').
+ defaultsList := #('/files/CVS' '/CVS' 'host:/files/CVS' 'host:/CVS').
] ifFalse:[
- OperatingSystem isMSDOSlike ifTrue:[
- defaultsList := #(':local:c:\files\CVS' ':local:c:\CVS' 'host:/files/CVS' 'host:/CVS').
- ] ifFalse:[
- defaultsList := #('host:/files/CVS' 'host:/CVS').
- ]
+ OperatingSystem isMSDOSlike ifTrue:[
+ defaultsList := #(':local:c:\files\CVS' ':local:c:\CVS' 'host:/files/CVS' 'host:/CVS').
+ ] ifFalse:[
+ defaultsList := #('host:/files/CVS' 'host:/CVS').
+ ]
].
cvsRootHolder := CVSSourceCodeManager repositoryName ? '/files/CVS'.
@@ -4035,9 +4026,8 @@
"/ component model:cvsRootHolder.
box
- addHelpButtonFor:'Launcher/sourceSettings.html';
- addAbortButton;
- addOkButton.
+ addHelpButtonFor:'Launcher/sourceSettings.html';
+ addAbortAndOkButtons.
"/
"/ show the box ...
@@ -4049,7 +4039,7 @@
"/ update system settings
"/
box accepted ifTrue:[
- CVSSourceCodeManager initializeForRepository:cvsRootHolder value
+ CVSSourceCodeManager initializeForRepository:cvsRootHolder value
].
box destroy
@@ -4143,7 +4133,7 @@
]
].
- box addAbortButton; addOkButton.
+ box addAbortAndOkButtons.
defaultButton := Button label:(resources string:'defaults').
(DialogBox styleSheet at:'dialogBox.okAtLeft') ifTrue:[
@@ -4260,8 +4250,7 @@
box
"/ addHelpButtonFor:'Launcher/sourceSettings.html';
- addAbortButton;
- addOkButton.
+ addAbortAndOkButtons.
"/
"/ show the box ...
@@ -4285,5 +4274,5 @@
!AbstractLauncherApplication class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.14 1999-03-06 01:59:44 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.15 1999-03-06 02:15:15 cg Exp $'
! !
--- a/BrowserView.st Sat Mar 06 02:59:44 1999 +0100
+++ b/BrowserView.st Sat Mar 06 03:15:15 1999 +0100
@@ -1907,7 +1907,7 @@
'a year ago'
'all'
).
- box addAbortButton; addOkButton.
+ box addAbortAndOkButtons.
box open.
box accepted ifTrue:[
@@ -4046,7 +4046,7 @@
box addVerticalSpace.
- box addAbortButton; addOkButton.
+ box addAbortAndOkButtons.
box showAtPointer.
@@ -4265,7 +4265,7 @@
component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
box addVerticalSpace.
- box addAbortButton; addOkButton.
+ box addAbortAndOkButtons.
box showAtPointer.
@@ -4677,7 +4677,7 @@
vScrollable:true.
dialog width:(textView preferredExtentForLines:10 cols:70) x.
textView contents:lastSourceLogMessage.
- dialog addAbortButton; addOkButton.
+ dialog addAbortAndOkButtons.
dialog okButton isReturnButton:false.
dialog open.
dialog accepted ifTrue:[
@@ -12761,6 +12761,6 @@
!BrowserView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.476 1999-03-06 01:59:32 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.477 1999-03-06 02:15:04 cg Exp $'
! !
BrowserView initialize!
--- a/BrwsrView.st Sat Mar 06 02:59:44 1999 +0100
+++ b/BrwsrView.st Sat Mar 06 03:15:15 1999 +0100
@@ -1907,7 +1907,7 @@
'a year ago'
'all'
).
- box addAbortButton; addOkButton.
+ box addAbortAndOkButtons.
box open.
box accepted ifTrue:[
@@ -4046,7 +4046,7 @@
box addVerticalSpace.
- box addAbortButton; addOkButton.
+ box addAbortAndOkButtons.
box showAtPointer.
@@ -4265,7 +4265,7 @@
component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
box addVerticalSpace.
- box addAbortButton; addOkButton.
+ box addAbortAndOkButtons.
box showAtPointer.
@@ -4677,7 +4677,7 @@
vScrollable:true.
dialog width:(textView preferredExtentForLines:10 cols:70) x.
textView contents:lastSourceLogMessage.
- dialog addAbortButton; addOkButton.
+ dialog addAbortAndOkButtons.
dialog okButton isReturnButton:false.
dialog open.
dialog accepted ifTrue:[
@@ -12761,6 +12761,6 @@
!BrowserView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Attic/BrwsrView.st,v 1.476 1999-03-06 01:59:32 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Attic/BrwsrView.st,v 1.477 1999-03-06 02:15:04 cg Exp $'
! !
BrowserView initialize!
--- a/FBrowser.st Sat Mar 06 02:59:44 1999 +0100
+++ b/FBrowser.st Sat Mar 06 03:15:15 1999 +0100
@@ -1492,15 +1492,15 @@
dialog addVerticalSpace.
dialog addListBoxOn:list withNumberOfLines:5.
- dialog addAbortButton; addOkButton.
+ dialog addAbortAndOkButtons.
dialog open.
dialog accepted ifTrue:[
- idx := list selectionIndex.
- fileEncoding := encodings at:idx.
- subView externalEncoding:fileEncoding.
-
- self validateFontEncodingFor:fileEncoding ask:true.
+ idx := list selectionIndex.
+ fileEncoding := encodings at:idx.
+ subView externalEncoding:fileEncoding.
+
+ self validateFontEncodingFor:fileEncoding ask:true.
].
"Modified: 30.6.1997 / 14:41:12 / cg"
@@ -2456,7 +2456,7 @@
(box addTextLabel:(resources string:'to:')) adjust:#left.
if2 := box addFilenameInputFieldOn:name2 in:here tabable:true.
- box addAbortButton; addOkButton.
+ box addAbortAndOkButtons.
orgName1 size > 0 ifTrue:[
box focusOnField:if2.
@@ -2512,7 +2512,7 @@
orgName1 := ''.
(sel size > 0) ifTrue:[
- orgName1 := sel
+ orgName1 := sel
].
name1 := orgName1 asValue.
@@ -2524,43 +2524,43 @@
(box addTextLabel:'as:') adjust:#left.
if2 := box addFilenameInputFieldOn:name2 in:here tabable:true.
- box addAbortButton; addOkButton.
+ box addAbortAndOkButtons.
orgName1 size > 0 ifTrue:[
- box focusOnField:if2.
+ box focusOnField:if2.
].
box showAtPointer.
box accepted ifTrue:[
- name1 := name1 value.
- (name1 size == 0) ifTrue:[
- err := 'no name entered'.
- ] ifFalse:[
- f1 := name1 asFilename.
- name2 := name2 value.
- (name2 size == 0) ifTrue:[
- err := 'no name entered'.
- ] ifFalse:[
- f2 := name2 asFilename.
- f2 exists ifTrue:[
- err := '''%2'' already exists'.
- ] ifFalse:[
- f1 exists ifFalse:[
- err := '''%1'' does not exist (link created anyway)'.
- ].
- ErrorSignal handle:[:ex |
- err := ex errorString
- ] do:[
- OperatingSystem createSymbolicLinkFrom:name1 to:name2
- ]
- ]
- ]
- ].
-
- err notNil ifTrue:[
- self warn:(resources string:err with:(name1 ? '') asText allBold with:(name2 ? '') asText allBold).
- ^ self
- ].
+ name1 := name1 value.
+ (name1 size == 0) ifTrue:[
+ err := 'no name entered'.
+ ] ifFalse:[
+ f1 := name1 asFilename.
+ name2 := name2 value.
+ (name2 size == 0) ifTrue:[
+ err := 'no name entered'.
+ ] ifFalse:[
+ f2 := name2 asFilename.
+ f2 exists ifTrue:[
+ err := '''%2'' already exists'.
+ ] ifFalse:[
+ f1 exists ifFalse:[
+ err := '''%1'' does not exist (link created anyway)'.
+ ].
+ ErrorSignal handle:[:ex |
+ err := ex errorString
+ ] do:[
+ OperatingSystem createSymbolicLinkFrom:name1 to:name2
+ ]
+ ]
+ ]
+ ].
+
+ err notNil ifTrue:[
+ self warn:(resources string:err with:(name1 ? '') asText allBold with:(name2 ? '') asText allBold).
+ ^ self
+ ].
].
"Modified: / 13.8.1998 / 21:26:59 / cg"
@@ -2616,11 +2616,11 @@
(sel size > 0
and:[lastFileDiffDirectory notNil
and:[lastFileDiffDirectory asFilename isDirectory]]) ifTrue:[
- f := lastFileDiffDirectory asFilename construct:sel.
- (f exists
- and:[f isReadable]) ifTrue:[
- orgName1 := f name
- ]
+ f := lastFileDiffDirectory asFilename construct:sel.
+ (f exists
+ and:[f isReadable]) ifTrue:[
+ orgName1 := f name
+ ]
].
name1 := orgName1 asValue.
@@ -2633,62 +2633,62 @@
(box addTextLabel:'and file2:') adjust:#left.
box addFilenameInputFieldOn:name2 in:here tabable:true.
- box addAbortButton; addOkButton.
+ box addAbortAndOkButtons.
box showAtPointer.
box accepted ifTrue:[
- name1 := name1 value.
- (name1 isNil or:[name1 isEmpty]) ifTrue:[
- text1 := subView contents.
- name1 := nil.
- l1 := 'browser contents'
- ] ifFalse:[
- name1 := currentDirectory filenameFor:name1.
- name1 isReadable ifFalse:[
- nm := name1.
- name1 exists ifFalse:[
- err := '%1 does not exist'.
- ] ifTrue:[
- err := '%1 is not readable'
- ].
- ].
- l1 := name1 pathName
- ].
-
- name2 := currentDirectory filenameFor:name2 value.
- err isNil ifTrue:[
- name2 isReadable ifFalse:[
- nm := name2.
- name2 exists ifFalse:[
- err := '%1 does not exist'.
- ] ifTrue:[
- err := '%1 is not readable'
- ].
- ].
- ].
- err notNil ifTrue:[
- self warn:(resources string:err with:nm pathName).
- ^ self
- ].
-
- self withWaitCursorDo:[
- (name1 notNil and:[name1 name ~= orgName1]) ifTrue:[
- lastFileDiffDirectory := name1 directoryName
- ].
- name1 notNil ifTrue:[
- text1 := name1 contents.
- ].
- text2 := name2 contents.
- text1 = text2 ifTrue:[
- self information:'same contents'
- ] ifFalse:[
- d := DiffTextView
- openOn:text1 label:l1
- and:text2 label:name2 pathName.
- d label:'file differences'.
- ]
- ]
+ name1 := name1 value.
+ (name1 isNil or:[name1 isEmpty]) ifTrue:[
+ text1 := subView contents.
+ name1 := nil.
+ l1 := 'browser contents'
+ ] ifFalse:[
+ name1 := currentDirectory filenameFor:name1.
+ name1 isReadable ifFalse:[
+ nm := name1.
+ name1 exists ifFalse:[
+ err := '%1 does not exist'.
+ ] ifTrue:[
+ err := '%1 is not readable'
+ ].
+ ].
+ l1 := name1 pathName
+ ].
+
+ name2 := currentDirectory filenameFor:name2 value.
+ err isNil ifTrue:[
+ name2 isReadable ifFalse:[
+ nm := name2.
+ name2 exists ifFalse:[
+ err := '%1 does not exist'.
+ ] ifTrue:[
+ err := '%1 is not readable'
+ ].
+ ].
+ ].
+ err notNil ifTrue:[
+ self warn:(resources string:err with:nm pathName).
+ ^ self
+ ].
+
+ self withWaitCursorDo:[
+ (name1 notNil and:[name1 name ~= orgName1]) ifTrue:[
+ lastFileDiffDirectory := name1 directoryName
+ ].
+ name1 notNil ifTrue:[
+ text1 := name1 contents.
+ ].
+ text2 := name2 contents.
+ text1 = text2 ifTrue:[
+ self information:'same contents'
+ ] ifFalse:[
+ d := DiffTextView
+ openOn:text1 label:l1
+ and:text2 label:name2 pathName.
+ d label:'file differences'.
+ ]
+ ]
].
"Created: / 7.12.1995 / 20:33:58 / cg"
@@ -6325,5 +6325,5 @@
!FileBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Attic/FBrowser.st,v 1.293 1999-02-25 18:42:37 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Attic/FBrowser.st,v 1.294 1999-03-06 02:14:22 cg Exp $'
! !
--- a/FileBrowser.st Sat Mar 06 02:59:44 1999 +0100
+++ b/FileBrowser.st Sat Mar 06 03:15:15 1999 +0100
@@ -1492,15 +1492,15 @@
dialog addVerticalSpace.
dialog addListBoxOn:list withNumberOfLines:5.
- dialog addAbortButton; addOkButton.
+ dialog addAbortAndOkButtons.
dialog open.
dialog accepted ifTrue:[
- idx := list selectionIndex.
- fileEncoding := encodings at:idx.
- subView externalEncoding:fileEncoding.
-
- self validateFontEncodingFor:fileEncoding ask:true.
+ idx := list selectionIndex.
+ fileEncoding := encodings at:idx.
+ subView externalEncoding:fileEncoding.
+
+ self validateFontEncodingFor:fileEncoding ask:true.
].
"Modified: 30.6.1997 / 14:41:12 / cg"
@@ -2456,7 +2456,7 @@
(box addTextLabel:(resources string:'to:')) adjust:#left.
if2 := box addFilenameInputFieldOn:name2 in:here tabable:true.
- box addAbortButton; addOkButton.
+ box addAbortAndOkButtons.
orgName1 size > 0 ifTrue:[
box focusOnField:if2.
@@ -2512,7 +2512,7 @@
orgName1 := ''.
(sel size > 0) ifTrue:[
- orgName1 := sel
+ orgName1 := sel
].
name1 := orgName1 asValue.
@@ -2524,43 +2524,43 @@
(box addTextLabel:'as:') adjust:#left.
if2 := box addFilenameInputFieldOn:name2 in:here tabable:true.
- box addAbortButton; addOkButton.
+ box addAbortAndOkButtons.
orgName1 size > 0 ifTrue:[
- box focusOnField:if2.
+ box focusOnField:if2.
].
box showAtPointer.
box accepted ifTrue:[
- name1 := name1 value.
- (name1 size == 0) ifTrue:[
- err := 'no name entered'.
- ] ifFalse:[
- f1 := name1 asFilename.
- name2 := name2 value.
- (name2 size == 0) ifTrue:[
- err := 'no name entered'.
- ] ifFalse:[
- f2 := name2 asFilename.
- f2 exists ifTrue:[
- err := '''%2'' already exists'.
- ] ifFalse:[
- f1 exists ifFalse:[
- err := '''%1'' does not exist (link created anyway)'.
- ].
- ErrorSignal handle:[:ex |
- err := ex errorString
- ] do:[
- OperatingSystem createSymbolicLinkFrom:name1 to:name2
- ]
- ]
- ]
- ].
-
- err notNil ifTrue:[
- self warn:(resources string:err with:(name1 ? '') asText allBold with:(name2 ? '') asText allBold).
- ^ self
- ].
+ name1 := name1 value.
+ (name1 size == 0) ifTrue:[
+ err := 'no name entered'.
+ ] ifFalse:[
+ f1 := name1 asFilename.
+ name2 := name2 value.
+ (name2 size == 0) ifTrue:[
+ err := 'no name entered'.
+ ] ifFalse:[
+ f2 := name2 asFilename.
+ f2 exists ifTrue:[
+ err := '''%2'' already exists'.
+ ] ifFalse:[
+ f1 exists ifFalse:[
+ err := '''%1'' does not exist (link created anyway)'.
+ ].
+ ErrorSignal handle:[:ex |
+ err := ex errorString
+ ] do:[
+ OperatingSystem createSymbolicLinkFrom:name1 to:name2
+ ]
+ ]
+ ]
+ ].
+
+ err notNil ifTrue:[
+ self warn:(resources string:err with:(name1 ? '') asText allBold with:(name2 ? '') asText allBold).
+ ^ self
+ ].
].
"Modified: / 13.8.1998 / 21:26:59 / cg"
@@ -2616,11 +2616,11 @@
(sel size > 0
and:[lastFileDiffDirectory notNil
and:[lastFileDiffDirectory asFilename isDirectory]]) ifTrue:[
- f := lastFileDiffDirectory asFilename construct:sel.
- (f exists
- and:[f isReadable]) ifTrue:[
- orgName1 := f name
- ]
+ f := lastFileDiffDirectory asFilename construct:sel.
+ (f exists
+ and:[f isReadable]) ifTrue:[
+ orgName1 := f name
+ ]
].
name1 := orgName1 asValue.
@@ -2633,62 +2633,62 @@
(box addTextLabel:'and file2:') adjust:#left.
box addFilenameInputFieldOn:name2 in:here tabable:true.
- box addAbortButton; addOkButton.
+ box addAbortAndOkButtons.
box showAtPointer.
box accepted ifTrue:[
- name1 := name1 value.
- (name1 isNil or:[name1 isEmpty]) ifTrue:[
- text1 := subView contents.
- name1 := nil.
- l1 := 'browser contents'
- ] ifFalse:[
- name1 := currentDirectory filenameFor:name1.
- name1 isReadable ifFalse:[
- nm := name1.
- name1 exists ifFalse:[
- err := '%1 does not exist'.
- ] ifTrue:[
- err := '%1 is not readable'
- ].
- ].
- l1 := name1 pathName
- ].
-
- name2 := currentDirectory filenameFor:name2 value.
- err isNil ifTrue:[
- name2 isReadable ifFalse:[
- nm := name2.
- name2 exists ifFalse:[
- err := '%1 does not exist'.
- ] ifTrue:[
- err := '%1 is not readable'
- ].
- ].
- ].
- err notNil ifTrue:[
- self warn:(resources string:err with:nm pathName).
- ^ self
- ].
-
- self withWaitCursorDo:[
- (name1 notNil and:[name1 name ~= orgName1]) ifTrue:[
- lastFileDiffDirectory := name1 directoryName
- ].
- name1 notNil ifTrue:[
- text1 := name1 contents.
- ].
- text2 := name2 contents.
- text1 = text2 ifTrue:[
- self information:'same contents'
- ] ifFalse:[
- d := DiffTextView
- openOn:text1 label:l1
- and:text2 label:name2 pathName.
- d label:'file differences'.
- ]
- ]
+ name1 := name1 value.
+ (name1 isNil or:[name1 isEmpty]) ifTrue:[
+ text1 := subView contents.
+ name1 := nil.
+ l1 := 'browser contents'
+ ] ifFalse:[
+ name1 := currentDirectory filenameFor:name1.
+ name1 isReadable ifFalse:[
+ nm := name1.
+ name1 exists ifFalse:[
+ err := '%1 does not exist'.
+ ] ifTrue:[
+ err := '%1 is not readable'
+ ].
+ ].
+ l1 := name1 pathName
+ ].
+
+ name2 := currentDirectory filenameFor:name2 value.
+ err isNil ifTrue:[
+ name2 isReadable ifFalse:[
+ nm := name2.
+ name2 exists ifFalse:[
+ err := '%1 does not exist'.
+ ] ifTrue:[
+ err := '%1 is not readable'
+ ].
+ ].
+ ].
+ err notNil ifTrue:[
+ self warn:(resources string:err with:nm pathName).
+ ^ self
+ ].
+
+ self withWaitCursorDo:[
+ (name1 notNil and:[name1 name ~= orgName1]) ifTrue:[
+ lastFileDiffDirectory := name1 directoryName
+ ].
+ name1 notNil ifTrue:[
+ text1 := name1 contents.
+ ].
+ text2 := name2 contents.
+ text1 = text2 ifTrue:[
+ self information:'same contents'
+ ] ifFalse:[
+ d := DiffTextView
+ openOn:text1 label:l1
+ and:text2 label:name2 pathName.
+ d label:'file differences'.
+ ]
+ ]
].
"Created: / 7.12.1995 / 20:33:58 / cg"
@@ -6325,5 +6325,5 @@
!FileBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.293 1999-02-25 18:42:37 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.294 1999-03-06 02:14:22 cg Exp $'
! !