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 |
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 |
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:[ |