Launcher.st
changeset 582 aca73c710a3b
parent 580 71a1b9e1ee81
child 589 ce36a65f07a1
equal deleted inserted replaced
581:d1a1ae9d49e4 582:aca73c710a3b
   556     listView2 bottomInset:(box preferredExtent y - y).
   556     listView2 bottomInset:(box preferredExtent y - y).
   557 
   557 
   558 "/    box width:(400 min:(box device width * 2 // 3)); 
   558 "/    box width:(400 min:(box device width * 2 // 3)); 
   559 "/        height:(450 min:(box device height - 50)); 
   559 "/        height:(450 min:(box device height - 50)); 
   560 "/        sizeFixed:true.
   560 "/        sizeFixed:true.
   561     box showAtPointer.
   561     box open.
       
   562 
   562     box destroy.
   563     box destroy.
   563 
   564 
   564     "Modified: 17.9.1995 / 16:47:50 / claus"
   565     "Modified: 17.9.1995 / 16:47:50 / claus"
   565     "Modified: 6.4.1996 / 23:56:46 / cg"
   566     "Modified: 29.5.1996 / 14:17:07 / cg"
   566 !
   567 !
   567 
   568 
   568 snapshot
   569 snapshot
   569     |saveBox|
   570     |fileName|
   570 
   571 
   571     saveBox := EnterBox title:(resources at:'filename for image:') withCRs.
   572     fileName := DialogBox
   572     saveBox okText:(resources at:'save').
   573                     request:(resources at:'filename for image:') withCRs
   573     saveBox action:[:fileName | 
   574               initialAnswer:(ObjectMemory nameForSnapshot) 
   574         (ObjectMemory snapShotOn:fileName) ifFalse:[
   575                     okLabel:(resources at:'save')
   575             "
   576                       title:(resources string:'save image')
   576              snapshot failed for some reason (disk full, no permission etc.)
   577                    onCancel:nil.
   577             "
   578 
   578             self warn:(resources string:'failed to save snapshot image (disk full or not writable)').
   579     fileName notNil ifTrue:[
       
   580         self withCursor:Cursor write do:[
       
   581             (ObjectMemory snapShotOn:fileName) ifFalse:[
       
   582                 "
       
   583                  snapshot failed for some reason (disk full, no permission etc.)
       
   584                 "
       
   585                 self warn:(resources string:'failed to save snapshot image (disk full or not writable)').
       
   586             ]
   579         ]
   587         ]
   580     ].
   588     ].
   581 
   589 
   582     saveBox initialText:(ObjectMemory nameForSnapshot).
   590     "Modified: 29.5.1996 / 15:02:39 / cg"
   583     saveBox label:(resources string:'save image').
       
   584     saveBox showAtPointer
       
   585 
       
   586     "Modified: 27.2.1996 / 01:15:44 / cg"
       
   587 !
   591 !
   588 
   592 
   589 snapshotAndExit
   593 snapshotAndExit
   590     |saveBox|
   594     |fileName|
   591 
   595 
   592     saveBox := EnterBox title:(resources at:'filename for image:') withCRs.
   596     fileName := DialogBox
   593     saveBox okText:(resources at:'save & exit').
   597                     request:(resources at:'filename for image:') withCRs
   594     saveBox action:[:fileName | 
   598               initialAnswer:(ObjectMemory nameForSnapshot) 
   595         (ObjectMemory snapShotOn:fileName) ifFalse:[
   599                     okLabel:(resources at:'save & exit')
   596             "
   600                       title:(resources string:'save image & exit')
   597              snapshot failed for some reason (disk full, no permission etc.)
   601                    onCancel:nil.
   598              Do NOT exit in this case.
   602 
   599             "
   603     fileName notNil ifTrue:[
   600             self warn:(resources string:'failed to save snapshot image (disk full or not writable)').
   604         self withCursor:Cursor write do:[
   601         ] ifTrue:[
   605             (ObjectMemory snapShotOn:fileName) ifFalse:[
   602             "
   606                 "
   603              saveAllViews tells all views to shutdown neatly 
   607                  snapshot failed for some reason (disk full, no permission etc.)
   604              (i.e. offer a chance to save the contents to a file).
   608                  Do NOT exit in this case.
   605 
   609                 "
   606              This is NOT required - all data should be in the snapshot ...
   610                 self warn:(resources string:'failed to save snapshot image (disk full or not writable)').
   607              ... however, if remote disks/mountable filesystems are involved,
   611             ] ifTrue:[
   608              which may not be present the next time, it may make sense to 
   612                 "
   609              uncomment it and query for saving - time will show which is better.
   613                  saveAllViews tells all views to shutdown neatly 
   610             "
   614                  (i.e. offer a chance to save the contents to a file).
   611 "
   615 
   612             self saveAllViews.
   616                  This is NOT required - all data should be in the snapshot ...
   613 "
   617                  ... however, if remote disks/mountable filesystems are involved,
   614             Smalltalk exit
   618                  which may not be present the next time, it may make sense to 
       
   619                  uncomment it and query for saving - time will show which is better.
       
   620                 "
       
   621     "
       
   622                 self saveAllViews.
       
   623     "
       
   624                 Smalltalk exit
       
   625             ]
   615         ]
   626         ]
   616     ].
   627     ].
   617 
   628 
   618     saveBox initialText:(ObjectMemory nameForSnapshot).
   629     "Modified: 29.5.1996 / 15:03:10 / cg"
   619     saveBox label:(resources string:'save image & exit').
       
   620     saveBox showAtPointer
       
   621 
       
   622     "Modified: 27.2.1996 / 01:14:15 / cg"
       
   623 ! !
   630 ! !
   624 
   631 
   625 !NewLauncher methodsFor:'actions - goodies'!
   632 !NewLauncher methodsFor:'actions - goodies'!
   626 
   633 
   627 startCalendar
   634 startCalendar
   851         addHelpButtonFor:'NewLauncher/compilerSettings.html';
   858         addHelpButtonFor:'NewLauncher/compilerSettings.html';
   852         addAbortButton; 
   859         addAbortButton; 
   853         addOkButton.
   860         addOkButton.
   854 
   861 
   855     warnEnabler check.
   862     warnEnabler check.
   856     box showAtPointer.
   863     box open.
   857 
   864 
   858     box accepted ifTrue:[
   865     box accepted ifTrue:[
   859         HistoryManager notNil ifTrue:[
   866         HistoryManager notNil ifTrue:[
   860             historyLines value ifTrue:[
   867             historyLines value ifTrue:[
   861                 HistoryManager activate
   868                 HistoryManager activate
   881         ]
   888         ]
   882     ].
   889     ].
   883     box destroy
   890     box destroy
   884 
   891 
   885     "Modified: 10.9.1995 / 19:19:18 / claus"
   892     "Modified: 10.9.1995 / 19:19:18 / claus"
   886     "Modified: 13.4.1996 / 13:51:37 / cg"
   893     "Modified: 29.5.1996 / 14:16:44 / cg"
   887 !
   894 !
   888 
   895 
   889 fontSettings
   896 fontSettings
   890     (self fontBoxForEncoding:nil) ifTrue:[
   897     (self fontBoxForEncoding:nil) ifTrue:[
   891         self reopenLauncher.
   898         self reopenLauncher.
  1016         addOkButton.
  1023         addOkButton.
  1017 
  1024 
  1018     macroTextView topInset:(l preferredExtent y + 5).
  1025     macroTextView topInset:(l preferredExtent y + 5).
  1019     macroTextView bottomInset:(box preferredExtent y - y).
  1026     macroTextView bottomInset:(box preferredExtent y - y).
  1020 
  1027 
  1021     box showAtPointer.
  1028     box open.
  1022 
  1029 
  1023     box accepted ifTrue:[
  1030     box accepted ifTrue:[
  1024         "no action yet ..."
  1031         "no action yet ..."
  1025     ].
  1032     ].
  1026     box destroy
  1033     box destroy
  1027 
  1034 
  1028     "Modified: 26.5.1996 / 12:28:09 / cg"
  1035     "Modified: 29.5.1996 / 14:16:35 / cg"
  1029 !
  1036 !
  1030 
  1037 
  1031 languageSetting 
  1038 languageSetting 
  1032     |listOfLanguages translatedLanguages idx language  box|
  1039     |listOfLanguages translatedLanguages idx language  box|
  1033 
  1040 
  1055         ].
  1062         ].
  1056         self reopenLauncher.
  1063         self reopenLauncher.
  1057     ].    
  1064     ].    
  1058     box
  1065     box
  1059         addHelpButtonFor:'NewLauncher/languageSetting.html'.
  1066         addHelpButtonFor:'NewLauncher/languageSetting.html'.
  1060     box showAtPointer.
  1067     box open.
  1061     box destroy
  1068     box destroy
  1062 
  1069 
  1063     "Modified: 18.5.1996 / 15:43:17 / cg"
  1070     "Modified: 29.5.1996 / 14:16:29 / cg"
  1064 !
  1071 !
  1065 
  1072 
  1066 memorySettings
  1073 memorySettings
  1067     |box check igcLimit igcFreeLimit igcFreeAmount newSpaceSize
  1074     |box check igcLimit igcFreeLimit igcFreeAmount newSpaceSize
  1068      compressLimit
  1075      compressLimit
  1172     box addAbortButton; addOkButton.
  1179     box addAbortButton; addOkButton.
  1173 
  1180 
  1174     "/
  1181     "/
  1175     "/ show the box ...
  1182     "/ show the box ...
  1176     "/
  1183     "/
  1177     box showAtPointer.
  1184     box open.
  1178 
  1185 
  1179     "/
  1186     "/
  1180     "/ update system settings
  1187     "/ update system settings
  1181     "/
  1188     "/
  1182     box accepted ifTrue:[
  1189     box accepted ifTrue:[
  1199         ].
  1206         ].
  1200         ObjectMemory oldSpaceCompressLimit:compressLimit value.
  1207         ObjectMemory oldSpaceCompressLimit:compressLimit value.
  1201     ].
  1208     ].
  1202     box destroy
  1209     box destroy
  1203 
  1210 
  1204     "Modified: 13.4.1996 / 13:51:23 / cg"
  1211     "Modified: 29.5.1996 / 14:16:24 / cg"
  1205 !
  1212 !
  1206 
  1213 
  1207 messageSettings
  1214 messageSettings
  1208     |box vmInfo vmErrors displayErrors classInfos|
  1215     |box vmInfo vmErrors displayErrors classInfos|
  1209 
  1216 
  1222 
  1229 
  1223     box addCheckBox:(resources string:'Display error messages (Xlib, Xtlib ...)') on:displayErrors.
  1230     box addCheckBox:(resources string:'Display error messages (Xlib, Xtlib ...)') on:displayErrors.
  1224     box addCheckBox:(resources string:'Other info messages') on:classInfos.
  1231     box addCheckBox:(resources string:'Other info messages') on:classInfos.
  1225 
  1232 
  1226     box addAbortButton; addOkButton.
  1233     box addAbortButton; addOkButton.
  1227     box showAtPointer.
  1234     box open.
  1228 
  1235 
  1229     box accepted ifTrue:[
  1236     box accepted ifTrue:[
  1230 	ObjectMemory infoPrinting:vmInfo value.
  1237         ObjectMemory infoPrinting:vmInfo value.
  1231 	ObjectMemory debugPrinting:vmErrors value.
  1238         ObjectMemory debugPrinting:vmErrors value.
  1232 	Object infoPrinting:classInfos value.
  1239         Object infoPrinting:classInfos value.
  1233 	DeviceWorkstation errorPrinting:displayErrors value.
  1240         DeviceWorkstation errorPrinting:displayErrors value.
  1234     ].
  1241     ].
  1235     box destroy
  1242     box destroy
       
  1243 
       
  1244     "Modified: 29.5.1996 / 14:16:19 / cg"
  1236 !
  1245 !
  1237 
  1246 
  1238 miscSettings
  1247 miscSettings
  1239     |box check logDoits shadows updChanges changeFileName returnFocus
  1248     |box check logDoits shadows updChanges changeFileName returnFocus
  1240      loadBinaries compileLazy hostNameInLabel useManager localSourceFirst 
  1249      loadBinaries compileLazy hostNameInLabel useManager localSourceFirst 
  1330         addOkButton.
  1339         addOkButton.
  1331 
  1340 
  1332     "/
  1341     "/
  1333     "/ show the box ...
  1342     "/ show the box ...
  1334     "/
  1343     "/
  1335     box showAtPointer.
  1344     box open.
  1336 
  1345 
  1337     "/
  1346     "/
  1338     "/ update system settings
  1347     "/ update system settings
  1339     "/
  1348     "/
  1340     box accepted ifTrue:[
  1349     box accepted ifTrue:[
  1372             Smalltalk at:#SourceCodeManager put:nil
  1381             Smalltalk at:#SourceCodeManager put:nil
  1373         ]
  1382         ]
  1374     ].
  1383     ].
  1375     box destroy
  1384     box destroy
  1376 
  1385 
  1377     "Modified: 30.4.1996 / 09:23:12 / cg"
  1386     "Modified: 29.5.1996 / 14:16:14 / cg"
  1378 !
  1387 !
  1379 
  1388 
  1380 printerSettings
  1389 printerSettings
  1381     |box 
  1390     |box 
  1382      possiblePrinters possibleTypes printerType printCommand printerList
  1391      possiblePrinters possibleTypes printerType printCommand printerList
  1418 
  1427 
  1419     component list:commandList.
  1428     component list:commandList.
  1420     box addVerticalSpace.
  1429     box addVerticalSpace.
  1421 
  1430 
  1422     box addAbortButton; addOkButton.
  1431     box addAbortButton; addOkButton.
  1423     box showAtPointer.
  1432     box open.
  1424 
  1433 
  1425     box accepted ifTrue:[
  1434     box accepted ifTrue:[
  1426         Printer printCommand:printCommand value.
  1435         Printer printCommand:printCommand value.
  1427         Printer := possiblePrinters at:(printerType selectionIndex).
  1436         Printer := possiblePrinters at:(printerType selectionIndex).
  1428     ].
  1437     ].
  1429     box destroy
  1438     box destroy
  1430 
  1439 
  1431     "Modified: 23.4.1996 / 18:23:47 / cg"
  1440     "Modified: 29.5.1996 / 14:15:46 / cg"
  1432 !
  1441 !
  1433 
  1442 
  1434 viewStyleSetting 
  1443 viewStyleSetting 
  1435     |listOfStyles resourceDir dir box 
  1444     |listOfStyles resourceDir dir box 
  1436      list listView scrView infoLabel infoForwarder newStyle|
  1445      list listView scrView infoLabel infoForwarder newStyle|
  1497     box addAbortButton; addOkButton.
  1506     box addAbortButton; addOkButton.
  1498     list selection:(View defaultStyle).
  1507     list selection:(View defaultStyle).
  1499 
  1508 
  1500     box stickAtBottomWithVariableHeight:scrView.
  1509     box stickAtBottomWithVariableHeight:scrView.
  1501     box stickAtBottomWithFixHeight:infoLabel.
  1510     box stickAtBottomWithFixHeight:infoLabel.
  1502     box showAtPointer.
  1511     box open.
  1503 
  1512 
  1504     box accepted ifTrue:[
  1513     box accepted ifTrue:[
  1505         newStyle := list selection.
  1514         newStyle := list selection.
  1506         newStyle notNil ifTrue:[
  1515         newStyle notNil ifTrue:[
  1507             self withWaitCursorDo:[
  1516             self withWaitCursorDo:[
  1511             self reopenLauncher.
  1520             self reopenLauncher.
  1512         ]
  1521         ]
  1513     ].
  1522     ].
  1514     box destroy
  1523     box destroy
  1515 
  1524 
  1516     "Modified: 26.5.1996 / 12:27:44 / cg"
  1525     "Modified: 29.5.1996 / 14:16:04 / cg"
  1517 ! !
  1526 ! !
  1518 
  1527 
  1519 !NewLauncher methodsFor:'actions - tools'!
  1528 !NewLauncher methodsFor:'actions - tools'!
  1520 
  1529 
  1521 compressingGarbageCollect
  1530 compressingGarbageCollect
  2620 ! !
  2629 ! !
  2621 
  2630 
  2622 !NewLauncher class methodsFor:'documentation'!
  2631 !NewLauncher class methodsFor:'documentation'!
  2623 
  2632 
  2624 version
  2633 version
  2625     ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.130 1996-05-28 19:05:11 cg Exp $'
  2634     ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.131 1996-05-29 13:18:11 cg Exp $'
  2626 ! !
  2635 ! !