6558 |
6573 |
6559 ) |
6574 ) |
6560 ) |
6575 ) |
6561 ! ! |
6576 ! ! |
6562 |
6577 |
6563 !AbstractLauncherApplication::SettingsDialog class methodsFor:'application icons'! |
6578 !AbstractLauncherApplication class methodsFor:'documentation'! |
6564 |
6579 |
6565 communicationIcon |
6580 version |
6566 "This resource specification was automatically generated |
6581 ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.241 2002-12-13 16:28:35 penk Exp $' |
6567 by the ImageEditor of ST/X." |
|
6568 |
|
6569 "Do not manually edit this!! If it is corrupted, |
|
6570 the ImageEditor may not be able to read the specification." |
|
6571 |
|
6572 " |
|
6573 self communicationIcon inspect |
|
6574 ImageEditor openOnClass:self andSelector:#communicationIcon |
|
6575 Icon flushCachedIcons |
|
6576 " |
|
6577 |
|
6578 <resource: #image> |
|
6579 |
|
6580 ^Icon |
|
6581 constantNamed:#'AbstractLauncherApplication::SettingsDialog class communicationIcon' |
|
6582 ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
6583 @@@@_$RA@@@@@@@@@@@@@HED_ @@@@@@ U2+UX\@@@@@@@@@@H]U*52A@@@@ U*9^S-A @@@@@@@HIT.HD4O8D@_%29^#6JZE"B@@@@@HIX-(@9!!&-\_"Z+ |
|
6584 .+QKZ(0@J @@@@@*@K*5SV2B*2XDQ+":,XR5WP8@@@@@BDJ5.+V@.E4KEA46-+*5U9TVHRD!!HP<+JKV:-%*SG1@Y@R8@WYV)I@A/@@@SH D$@E>K*BP-$PUH |
|
6585 QH60)2U0[$:]KYPJN$RK,JX''[TFW]BB*)*4Z\K)[Q''L6''GD *JZ.HF4UV;H_**U6\+)%T7,WDUB3G:^%_E<@WB%RG*)8\+*BL(=Q#@(!!R!!2-_P5-@@AUNA!!4 |
|
6586 BGV:.(IQ)I<LQS@R^VE([P@@(E9OZQT/[[*:-9=YO8M''S6B ZF4@@@@@[0@[M0I5.)!!!!(4NE@F<@&$&C@@@@@@@@G&PCBGYV&;@<!!P@@#$^P@@@@@@@@@FN@ |
|
6587 [R<#+J2,PHT@%$2E@@@@@@@@@@BEA7>"I;B/''$*H%$"I@@@@@@@@@@@@$#D]^RF''*F]5$D2I@@@@@@@@@@@@@@BIKB<F(VHIHSNE@@@@@@@@@@@@@@@@@I$> |
|
6588 MVY7@@@@@@@@@@@@@@@@@@@@@@@@!!3Y9@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 0 0 0 7 7 7 12 12 12 20 20 20 23 23 23 24 24 24 28 28 28 30 30 30 32 32 32 35 35 35 40 40 40 41 41 41 43 43 43 45 45 45 48 47 48 50 49 50 51 50 51 52 52 52 54 53 54 55 54 55 56 56 56 58 57 58 58 58 58 59 59 59 60 59 60 60 60 60 61 61 61 62 62 62 66 65 66 66 66 66 67 66 67 68 67 68 69 69 69 70 69 70 70 70 70 71 71 71 72 71 72 73 73 73 74 73 74 75 75 75 76 75 76 76 76 76 77 76 77 78 78 78 79 79 79 80 80 80 85 84 85 86 84 86 86 85 86 87 86 87 87 87 87 88 87 88 89 88 89 89 89 89 90 88 90 90 89 90 93 91 93 93 93 93 94 92 94 94 93 94 96 94 96 97 96 97 98 97 98 99 98 99 99 99 99 100 99 100 100 100 100 102 102 102 103 103 103 104 103 104 104 104 104 105 105 105 106 106 106 108 107 108 109 109 109 110 110 110 111 110 111 113 113 113 114 113 114 114 114 114 115 115 115 116 116 116 117 115 117 118 118 118 120 120 120 121 121 121 122 121 122 122 122 122 123 122 123 123 123 123 124 124 124 125 125 125 127 127 127 128 128 128 129 129 129 130 130 130 131 131 131 132 131 132 132 132 132 133 132 133 134 134 134 135 135 135 136 136 136 137 137 137 138 138 138 140 139 140 142 142 142 147 147 147 151 151 151 153 153 153 154 154 154 155 155 155 156 155 156 156 156 156 159 159 159 164 163 164 165 165 165 167 167 167 168 168 168 170 170 170 172 172 172 174 174 174 175 174 175 177 177 177 178 178 178 181 181 181 182 182 182 183 183 183 185 185 185 189 189 189 190 190 190 191 191 191 192 192 192 194 192 194 194 194 194 195 195 195 196 196 196 198 196 198 199 198 199 200 200 200 201 200 201 201 201 201 202 201 202 202 202 202 203 203 203 204 204 204 205 204 205 205 205 205 206 205 206 206 206 206 209 209 209 210 210 210 211 211 211 212 212 212 213 212 213 213 213 213 214 214 214 215 213 215 215 215 215 216 216 216 217 216 217 217 217 217 218 217 218 219 219 219 221 219 221 222 221 222 224 222 224 224 223 224 225 223 225 225 224 225 225 225 225 226 224 226 226 225 226 227 226 227 228 226 228 229 228 229 231 231 231 232 231 232 235 234 235 237 237 237 239 239 239 241 241 241 244 244 244 247 247 247 248 248 248 255 255 255]; mask:((ImageMask new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'G@C O G0_0O8?8_<?(W<?8_<???<=:^<???<???<???<_??<O??<O??<B?=\@?<8@?=0@?? @??@@_>@@O @@G@@') ; yourself); yourself] |
|
6589 ! |
|
6590 |
|
6591 defaultSettingsAppIcon |
|
6592 |
|
6593 ^ self settingsIcon |
|
6594 ! |
|
6595 |
|
6596 settingsIcon |
|
6597 "This resource specification was automatically generated |
|
6598 by the ImageEditor of ST/X." |
|
6599 |
|
6600 "Do not manually edit this!! If it is corrupted, |
|
6601 the ImageEditor may not be able to read the specification." |
|
6602 |
|
6603 " |
|
6604 self settingsIcon inspect |
|
6605 ImageEditor openOnClass:self andSelector:#settingsIcon |
|
6606 Icon flushCachedIcons |
|
6607 " |
|
6608 |
|
6609 <resource: #image> |
|
6610 |
|
6611 ^Icon |
|
6612 constantNamed:#'AbstractLauncherApplication::SettingsDialog class settingsIcon' |
|
6613 ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
6614 @@BP#8>O#8>M @@@@@@@@@@@@@@@@BJ%9&Y&Y&Y%R^B@@@@@@@@@@@@@@BI&J^(*J"(*JZTIIFQ$YFQ$YH@@@@@ JN#(:N#(:N#(9.V%)ZV%)ZKZP@@@HOU |
|
6615 4=OS4=OL3,''I0<B;/]F3*TE?@@BC5MKR4-KM,\^:.MJ:-;21/:1D_@@@ =SR4-KM3<+K/<J01,R20+R+QG0@@HOT4-KR/,^?-\[H1(Q^WW"1*4Q<@@BC5MKR |
|
6616 ,-CO1<>/+(X*F1(S,Z1D_@@@ =SR4-J:2,[J0X TU!!BE+F$GS!!=@HOT,+WK.\J/28\&TV=EKAV1RELG BC5L7H0-KB/HT TV-CKA8>TG@=_H8M ;[H1+:: |
|
6617 -;8\TWECKBD9)T=0]R40AXOE2;F5-;:/G6)EKBD?ZF5KV#ITJ0M>''*B_''ZF]''5,(KA8)X8ENU#XR@ )L^1$YFQ$YFQ$WBA PE@QMVSDON82S@@@@@@@@@@@@ |
|
6618 @@A_@F)IU#DQMWH@@@@@@@@@@@@@@@@@@F1JWC\LMJI''^ @@@@@@@@@@@@@@@F9GU28ROGI%+VY4@@@@@@@@@@@@@GIFXC(IL9(@^VR*X''\@@@@@@@@@@@AU |
|
6619 IPXKP@@@@@A3XZ4#@@@@@@@@@@@@# 8AK90@@@@@@GX"T @a') ; colorMapFromArray:#[0 0 0 0 60 60 0 84 84 4 45 45 21 20 15 38 38 38 38 192 192 43 43 43 45 45 45 45 151 151 46 99 99 46 147 147 46 151 151 47 47 47 47 88 88 47 151 151 48 48 48 48 144 144 48 145 145 56 53 38 57 57 49 59 52 40 62 56 43 65 65 53 65 65 65 67 67 54 68 68 68 70 70 70 72 64 47 72 72 35 72 72 72 73 69 48 73 73 73 74 74 74 80 44 10 80 62 43 81 81 24 84 132 132 85 85 76 86 86 36 86 86 86 87 87 49 87 87 77 87 193 193 88 88 88 91 101 101 92 193 193 94 117 117 97 97 97 97 193 193 98 195 195 99 120 120 101 75 31 101 107 89 101 193 193 102 193 193 103 103 103 104 86 69 106 193 193 107 120 120 107 121 121 109 109 109 110 96 70 111 78 42 111 119 119 113 113 60 113 113 113 115 115 115 116 116 56 116 116 116 116 145 145 118 147 147 119 121 85 121 150 150 122 151 151 122 152 148 124 124 124 124 146 139 124 151 149 127 118 78 127 119 78 128 128 128 129 120 112 133 157 157 135 216 216 137 137 137 139 207 207 140 206 206 141 141 141 141 201 201 141 202 202 142 136 75 142 201 201 143 128 88 143 143 88 144 144 144 144 204 204 145 85 24 146 126 100 147 82 13 148 83 17 148 86 24 148 123 91 148 127 98 149 122 89 150 150 150 151 151 151 152 152 152 152 155 155 153 129 100 154 154 154 156 156 156 156 199 199 157 157 157 158 158 158 159 159 159 160 160 160 162 179 179 163 161 159 163 163 162 164 151 101 164 160 156 164 163 161 165 165 150 165 165 165 168 168 168 169 169 62 171 171 171 172 172 71 174 117 58 177 177 177 178 178 89 185 174 113 186 178 115 186 186 115 189 179 116 189 189 115 189 189 132 190 190 139 192 192 142 192 192 192 193 193 154 194 194 194 196 196 155 197 197 159 200 200 168 202 202 174 202 202 202 204 204 102 205 205 97 206 206 149 210 210 144 210 210 149 213 213 103 213 213 213 215 215 164 215 215 215 227 212 124 227 213 140 227 217 124 227 220 124 227 227 124 234 156 79 236 236 197 239 214 144 243 201 148 243 243 146 243 243 155 244 244 147 245 232 157 247 165 83 248 215 149 248 231 149 255 170 86 255 227 156 255 228 156 255 229 156 255 230 156 255 231 156 255 233 168 255 234 156 255 235 156 255 235 193 255 236 156 255 237 156 255 238 156 255 239 156 255 239 168 255 240 156 255 240 168 255 241 156 255 242 156 255 242 168 255 243 156 255 244 156 255 244 168 255 245 156 255 245 193 255 246 156 255 247 156 255 248 156 255 248 168 255 249 156 255 250 156 255 250 168 255 251 156 255 251 168 255 252 156 255 253 156 255 253 168 255 255 156 255 255 168 255 255 193 255 255 200]; mask:((ImageMask new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'O<@@_>@@???@??? ???0???0???0???0???0???8???8???<???<???<???<???8@B? @A?0@C?8@G=<@G0<@G0\') ; yourself); yourself] |
|
6620 ! ! |
6582 ! ! |
6621 |
|
6622 !AbstractLauncherApplication::SettingsDialog class methodsFor:'application list access'! |
|
6623 |
|
6624 settingsAppListClasses |
|
6625 |
|
6626 ^ self applList collect:[:entry | entry at:2]. |
|
6627 ! |
|
6628 |
|
6629 settingsAppListNames |
|
6630 |
|
6631 ^ self applList collect:[:entry | entry first]. |
|
6632 ! ! |
|
6633 |
|
6634 !AbstractLauncherApplication::SettingsDialog class methodsFor:'applications'! |
|
6635 |
|
6636 addApplClass:aClass withName:aName |
|
6637 |
|
6638 self addApplClass:aClass withName:aName inCategory:nil icon:nil. |
|
6639 ! |
|
6640 |
|
6641 addApplClass:aClass withName:aName inCategory:aCategory icon:icon |
|
6642 |
|
6643 ApplicationList isNil ifTrue:[ |
|
6644 self initialize. |
|
6645 ]. |
|
6646 (self settingsAppListNames includes:aName) ifTrue:[ |
|
6647 ^ self. |
|
6648 ]. |
|
6649 (self settingsAppListNames includes:aCategory) not ifTrue:[ |
|
6650 self error:'category for listentry doesnt exist' |
|
6651 ]. |
|
6652 ApplicationList add:(Array with:aName with:aClass asString asSymbol with:aCategory with:icon) |
|
6653 ! |
|
6654 |
|
6655 addCategory:aCatString inCategory:aInCatStringOrNil icon:aIcon |
|
6656 |
|
6657 " add a new category aCatString under categorie aInCatStringOrNil with icon |
|
6658 if aInCatStringOrNil is nil the category is inserted under root " |
|
6659 |
|
6660 ApplicationList isNil ifTrue:[ |
|
6661 self initialize. |
|
6662 ]. |
|
6663 ApplicationList add:(Array with:aCatString with:nil with:aInCatStringOrNil with:aIcon) |
|
6664 ! |
|
6665 |
|
6666 applList |
|
6667 ApplicationList isNil ifTrue:[ |
|
6668 self initialize. |
|
6669 ]. |
|
6670 ^ ApplicationList |
|
6671 ! |
|
6672 |
|
6673 defaultAppList |
|
6674 " list of settings applications |
|
6675 format: nameString applicationClassNameMethodOrNil inCategory iconClass iconSelector" |
|
6676 |
|
6677 | appList | |
|
6678 appList := OrderedCollection new. |
|
6679 #( |
|
6680 #('Tools' #'AbstractSettingsApplication::ToolsSettingsAppl' nil nil nil) |
|
6681 #('Language' #'AbstractSettingsApplication::LanguageSettingsAppl' nil nil nil ) |
|
6682 #('Keyboard Mappings' #'AbstractSettingsApplication::KbdMappingSettingsAppl' nil nil nil ) |
|
6683 #('Style Selection' #'AbstractSettingsApplication::StyleSettingsAppl' nil nil nil) |
|
6684 #('System Messages' #'AbstractSettingsApplication::SystemMessageSettingsAppl' nil nil nil) |
|
6685 #('Compiler' #'AbstractSettingsApplication::CompilerSettingsAppl' nil nil nil) |
|
6686 #('Memory' #'AbstractSettingsApplication::MemorySettingsAppl' nil nil nil) |
|
6687 #('SourceCode & Debugger' #'AbstractSettingsApplication::SourceAndDebuggerSettingsAppl' nil nil nil) |
|
6688 #('Printer' #'AbstractSettingsApplication::PrinterSettingsAppl' nil nil nil) |
|
6689 #('Display' #'AbstractSettingsApplication::DisplaySettingsAppl' nil nil nil) |
|
6690 #('Editor' #'AbstractSettingsApplication::EditSettingsAppl' nil nil nil) |
|
6691 #('Misc' #'AbstractSettingsApplication::MiscSettingsAppl' nil nil nil) |
|
6692 #('Communication' nil nil #'AbstractLauncherApplication::SettingsDialog' #communicationIcon) |
|
6693 #('RDoIt' #'AbstractSettingsApplication::RDoItServerSettingsAppl' 'Communication' nil nil) |
|
6694 #('HTTP Server' #'AbstractSettingsApplication::HTTPServerSettingsAppl' 'Communication' nil nil) |
|
6695 #('OSI Protocol' #'AbstractSettingsApplication::OsiSettingsAppl' 'Communication' nil nil) |
|
6696 #('Misc' #'AbstractSettingsApplication::MiscCommunicationSettingsAppl' 'Communication' nil nil) |
|
6697 ) do:[ :entry| | nameString applicationClassNameMethodOrNil inCategory iconClass iconSelector icon | |
|
6698 nameString := entry at:1. |
|
6699 applicationClassNameMethodOrNil := entry at:2. |
|
6700 inCategory := entry at:3. |
|
6701 iconClass := entry at:4. |
|
6702 iconSelector := entry at:5. |
|
6703 (iconClass notNil and:[iconSelector notNil]) ifTrue:[ |
|
6704 icon := ((Smalltalk classNamed:iconClass) perform:iconSelector) |
|
6705 ]. |
|
6706 appList add:(Array with:nameString with:applicationClassNameMethodOrNil with:inCategory with:icon). |
|
6707 ]. |
|
6708 ^ appList |
|
6709 ! |
|
6710 |
|
6711 removeApplByClass:aClass |
|
6712 |
|
6713 | classEntries| |
|
6714 |
|
6715 ApplicationList isNil ifTrue:[ |
|
6716 self initialize. |
|
6717 ]. |
|
6718 classEntries := ApplicationList select:[: aEntry | ((aEntry at:2) == aClass)]. |
|
6719 ApplicationList removeAll:classEntries. |
|
6720 ! |
|
6721 |
|
6722 removeCategoryByName:aCatName |
|
6723 |
|
6724 |index| |
|
6725 |
|
6726 ApplicationList isNil ifTrue:[ |
|
6727 self initialize. |
|
6728 ]. |
|
6729 index := ApplicationList findFirst:[:el | |
|
6730 el first == aCatName |
|
6731 ]. |
|
6732 index ~~ 0 ifTrue:[ |
|
6733 ApplicationList removeIndex:index. |
|
6734 ]. |
|
6735 ! ! |
|
6736 |
|
6737 !AbstractLauncherApplication::SettingsDialog class methodsFor:'initialize'! |
|
6738 |
|
6739 initialize |
|
6740 |
|
6741 ApplicationList := self defaultAppList asOrderedCollection. |
|
6742 |
|
6743 " |
|
6744 self initialize |
|
6745 " |
|
6746 ! ! |
|
6747 |
|
6748 !AbstractLauncherApplication::SettingsDialog class methodsFor:'interface specs'! |
|
6749 |
|
6750 windowSpec |
|
6751 "This resource specification was automatically generated |
|
6752 by the UIPainter of ST/X." |
|
6753 |
|
6754 "Do not manually edit this!! If it is corrupted, |
|
6755 the UIPainter may not be able to read the specification." |
|
6756 |
|
6757 " |
|
6758 UIPainter new openOnClass:AbstractLauncherApplication::SettingsDialog andSelector:#windowSpec |
|
6759 AbstractLauncherApplication::SettingsDialog new openInterface:#windowSpec |
|
6760 AbstractLauncherApplication::SettingsDialog open |
|
6761 " |
|
6762 |
|
6763 <resource: #canvas> |
|
6764 |
|
6765 ^ |
|
6766 #(#FullSpec |
|
6767 #name: #windowSpec |
|
6768 #window: |
|
6769 #(#WindowSpec |
|
6770 #label: 'Settings Dialog' |
|
6771 #name: 'Settings Dialog' |
|
6772 #min: #(#Point 10 10) |
|
6773 #max: #(#Point 1024 768) |
|
6774 #bounds: #(#Rectangle 12 22 812 642) |
|
6775 #menu: #mainMenu |
|
6776 ) |
|
6777 #component: |
|
6778 #(#SpecCollection |
|
6779 #collection: #( |
|
6780 #(#VariableHorizontalPanelSpec |
|
6781 #name: 'VariableHorizontalPanel1' |
|
6782 #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
6783 #showHandle: true |
|
6784 #snapMode: #both |
|
6785 #component: |
|
6786 #(#SpecCollection |
|
6787 #collection: #( |
|
6788 #(#ViewSpec |
|
6789 #name: 'Box1' |
|
6790 #component: |
|
6791 #(#SpecCollection |
|
6792 #collection: #( |
|
6793 #(#HierarchicalListViewSpec |
|
6794 #name: 'HierarchicalListView1' |
|
6795 #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -34 1) |
|
6796 #model: #selectionInApplList |
|
6797 #hasHorizontalScrollBar: true |
|
6798 #hasVerticalScrollBar: true |
|
6799 #listModel: #applList |
|
6800 #useIndex: false |
|
6801 #highlightMode: #label |
|
6802 #showLeftIndicators: false |
|
6803 #indicatorSelector: #doIndicatorClick: |
|
6804 ) |
|
6805 #(#HorizontalPanelViewSpec |
|
6806 #name: 'HorizontalPanel2' |
|
6807 #layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1) |
|
6808 #horizontalLayout: #fitSpace |
|
6809 #verticalLayout: #center |
|
6810 #horizontalSpace: 3 |
|
6811 #verticalSpace: 3 |
|
6812 #component: |
|
6813 #(#SpecCollection |
|
6814 #collection: #( |
|
6815 #(#ActionButtonSpec |
|
6816 #label: 'Save to Disc ...' |
|
6817 #name: 'Button1' |
|
6818 #translateLabel: true |
|
6819 #model: #saveSettings |
|
6820 #extent: #(#Point 128 22) |
|
6821 ) |
|
6822 #(#ActionButtonSpec |
|
6823 #label: 'Load from Disc ...' |
|
6824 #name: 'Button2' |
|
6825 #translateLabel: true |
|
6826 #model: #loadSettings |
|
6827 #extent: #(#Point 128 22) |
|
6828 ) |
|
6829 ) |
|
6830 |
|
6831 ) |
|
6832 ) |
|
6833 ) |
|
6834 |
|
6835 ) |
|
6836 ) |
|
6837 #(#ViewSpec |
|
6838 #name: 'Box2' |
|
6839 #component: |
|
6840 #(#SpecCollection |
|
6841 #collection: #( |
|
6842 #(#SubCanvasSpec |
|
6843 #name: 'SubCanvas' |
|
6844 #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -34 1) |
|
6845 #level: -1 |
|
6846 #hasHorizontalScrollBar: false |
|
6847 #hasVerticalScrollBar: false |
|
6848 #clientHolder: #subCanvasApplicationHolder |
|
6849 #postBuildCallback: #postBuildSubCanvas: |
|
6850 ) |
|
6851 #(#HorizontalPanelViewSpec |
|
6852 #name: 'HorizontalPanel1' |
|
6853 #layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1) |
|
6854 #horizontalLayout: #fitSpace |
|
6855 #verticalLayout: #center |
|
6856 #horizontalSpace: 3 |
|
6857 #verticalSpace: 3 |
|
6858 #component: |
|
6859 #(#SpecCollection |
|
6860 #collection: #( |
|
6861 #(#ActionButtonSpec |
|
6862 #label: 'OK' |
|
6863 #name: 'OK' |
|
6864 #translateLabel: true |
|
6865 #model: #doSave |
|
6866 #enableChannel: #enableOK |
|
6867 #extent: #(#Point 127 22) |
|
6868 ) |
|
6869 #(#ActionButtonSpec |
|
6870 #label: 'Discard' |
|
6871 #name: 'Reload' |
|
6872 #translateLabel: true |
|
6873 #model: #doReload |
|
6874 #enableChannel: #enableReload |
|
6875 #extent: #(#Point 128 22) |
|
6876 ) |
|
6877 #(#ActionButtonSpec |
|
6878 #label: 'Close' |
|
6879 #name: 'Close' |
|
6880 #translateLabel: true |
|
6881 #model: #closeRequest |
|
6882 #extent: #(#Point 127 22) |
|
6883 ) |
|
6884 #(#ActionButtonSpec |
|
6885 #label: 'Help' |
|
6886 #name: 'Help' |
|
6887 #translateLabel: true |
|
6888 #model: #help |
|
6889 #enableChannel: #enableHelp |
|
6890 #extent: #(#Point 128 22) |
|
6891 ) |
|
6892 ) |
|
6893 |
|
6894 ) |
|
6895 ) |
|
6896 ) |
|
6897 |
|
6898 ) |
|
6899 ) |
|
6900 ) |
|
6901 |
|
6902 ) |
|
6903 #handles: #(#Any 0.3375 1.0) |
|
6904 ) |
|
6905 ) |
|
6906 |
|
6907 ) |
|
6908 ) |
|
6909 ! ! |
|
6910 |
|
6911 !AbstractLauncherApplication::SettingsDialog class methodsFor:'menu specs'! |
|
6912 |
|
6913 mainMenu |
|
6914 "This resource specification was automatically generated |
|
6915 by the MenuEditor of ST/X." |
|
6916 |
|
6917 "Do not manually edit this!! If it is corrupted, |
|
6918 the MenuEditor may not be able to read the specification." |
|
6919 |
|
6920 " |
|
6921 MenuEditor new openOnClass:SettingsDialog andSelector:#mainMenu |
|
6922 (Menu new fromLiteralArrayEncoding:(SettingsDialog mainMenu)) startUp |
|
6923 " |
|
6924 |
|
6925 <resource: #menu> |
|
6926 |
|
6927 ^ |
|
6928 #(#Menu |
|
6929 #( |
|
6930 #(#MenuItem |
|
6931 #label: 'File' |
|
6932 #translateLabel: true |
|
6933 #submenu: |
|
6934 #(#Menu |
|
6935 #( |
|
6936 #(#MenuItem |
|
6937 #label: 'Load Settings...' |
|
6938 #itemValue: #loadSettings |
|
6939 #translateLabel: true |
|
6940 ) |
|
6941 #(#MenuItem |
|
6942 #label: 'Save Settings...' |
|
6943 #itemValue: #saveSettings |
|
6944 #translateLabel: true |
|
6945 ) |
|
6946 #(#MenuItem |
|
6947 #label: 'Exit' |
|
6948 #itemValue: #closeRequest |
|
6949 #translateLabel: true |
|
6950 ) |
|
6951 ) |
|
6952 nil |
|
6953 nil |
|
6954 ) |
|
6955 ) |
|
6956 ) |
|
6957 nil |
|
6958 nil |
|
6959 ) |
|
6960 ! ! |
|
6961 |
|
6962 !AbstractLauncherApplication::SettingsDialog methodsFor:'accessing'! |
|
6963 |
|
6964 requestor |
|
6965 "return the 'requestor' of the SettingsDialog" |
|
6966 |
|
6967 ^ requestor |
|
6968 ! |
|
6969 |
|
6970 requestor:something |
|
6971 "set the value of the instance variable 'requestor' (automatically generated)" |
|
6972 |
|
6973 requestor := something. |
|
6974 ! ! |
|
6975 |
|
6976 !AbstractLauncherApplication::SettingsDialog methodsFor:'actions'! |
|
6977 |
|
6978 destroyAll |
|
6979 |
|
6980 self applList do:[ : applItem | |
|
6981 (applItem isCategory not and:[applItem application notNil]) ifTrue:[ |
|
6982 applItem application close. |
|
6983 ]. |
|
6984 ]. |
|
6985 ^ true |
|
6986 ! |
|
6987 |
|
6988 doIndicatorClick:index |
|
6989 "handle a click on the indicator |
|
6990 " |
|
6991 |
|
6992 (applList at:index) toggleExpand |
|
6993 ! |
|
6994 |
|
6995 doReload |
|
6996 |
|
6997 | item | |
|
6998 |
|
6999 item := self selectionInApplList value. |
|
7000 (item isNil or:[item isCategory or:[item application isNil]]) ifTrue:[ ^ self]. |
|
7001 item application loadRequest. |
|
7002 ! |
|
7003 |
|
7004 doSave |
|
7005 | item | |
|
7006 |
|
7007 item := self selectionInApplList value. |
|
7008 (item isNil or:[item isCategory or:[item application isNil]]) ifTrue:[ ^ self]. |
|
7009 item application saveSettings. |
|
7010 ! |
|
7011 |
|
7012 help |
|
7013 |
|
7014 | item | |
|
7015 |
|
7016 item := self selectionInApplList value. |
|
7017 (item isNil or:[item isCategory or:[item application isNil]]) ifTrue:[ ^ self]. |
|
7018 item application help. |
|
7019 ! |
|
7020 |
|
7021 sendLoadRequestToAll |
|
7022 |
|
7023 self applList do:[ : applItem | |
|
7024 (applItem isCategory not and:[applItem application notNil]) ifTrue:[ |
|
7025 ^ applItem application loadRequest |
|
7026 ]. |
|
7027 ]. |
|
7028 ^ true |
|
7029 ! |
|
7030 |
|
7031 sendSaveRequestToAll |
|
7032 |
|
7033 self applList do:[ : applItem | |
|
7034 (applItem isCategory not and:[applItem application notNil]) ifTrue:[ |
|
7035 applItem application saveRequest ifFalse:[ |
|
7036 ^ false |
|
7037 ]. |
|
7038 ]. |
|
7039 ]. |
|
7040 ^ true |
|
7041 ! ! |
|
7042 |
|
7043 !AbstractLauncherApplication::SettingsDialog methodsFor:'aspects'! |
|
7044 |
|
7045 appIsCategory |
|
7046 |
|
7047 appIsCategory isNil ifTrue:[ |
|
7048 appIsCategory := false asValue. |
|
7049 ]. |
|
7050 ^ appIsCategory. |
|
7051 ! |
|
7052 |
|
7053 applList |
|
7054 |
|
7055 applList isNil ifTrue:[ |
|
7056 applList := AbstractLauncherApplication::HierarchicalSettingsApplList new. |
|
7057 ]. |
|
7058 ^ applList. |
|
7059 ! |
|
7060 |
|
7061 enableHelp |
|
7062 "automatically generated by UIPainter ..." |
|
7063 |
|
7064 "*** the code below creates a default model when invoked." |
|
7065 "*** (which may not be the one you wanted)" |
|
7066 "*** Please change as required and accept it in the browser." |
|
7067 "*** (and replace this comment by something more useful ;-)" |
|
7068 |
|
7069 enableHelp isNil ifTrue:[ |
|
7070 enableHelp := true asValue. |
|
7071 "/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
7072 "/ enableHelp addDependent:self. |
|
7073 "/ enableHelp onChangeSend:#enableHelpChanged to:self. |
|
7074 ]. |
|
7075 ^ enableHelp. |
|
7076 ! |
|
7077 |
|
7078 enableOK |
|
7079 "automatically generated by UIPainter ..." |
|
7080 |
|
7081 "*** the code below creates a default model when invoked." |
|
7082 "*** (which may not be the one you wanted)" |
|
7083 "*** Please change as required and accept it in the browser." |
|
7084 "*** (and replace this comment by something more useful ;-)" |
|
7085 |
|
7086 enableOK isNil ifTrue:[ |
|
7087 enableOK := true asValue. |
|
7088 "/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
7089 "/ enableOK addDependent:self. |
|
7090 "/ enableOK onChangeSend:#enableOKChanged to:self. |
|
7091 ]. |
|
7092 ^ enableOK. |
|
7093 ! |
|
7094 |
|
7095 enableReload |
|
7096 "automatically generated by UIPainter ..." |
|
7097 |
|
7098 "*** the code below creates a default model when invoked." |
|
7099 "*** (which may not be the one you wanted)" |
|
7100 "*** Please change as required and accept it in the browser." |
|
7101 "*** (and replace this comment by something more useful ;-)" |
|
7102 |
|
7103 enableReload isNil ifTrue:[ |
|
7104 enableReload := true asValue. |
|
7105 "/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
7106 "/ enableReload addDependent:self. |
|
7107 "/ enableReload onChangeSend:#enableReloadChanged to:self. |
|
7108 ]. |
|
7109 ^ enableReload. |
|
7110 ! |
|
7111 |
|
7112 selectionInApplList |
|
7113 |
|
7114 selectionInApplList isNil ifTrue:[ |
|
7115 selectionInApplList := ValueHolder new. |
|
7116 selectionInApplList addDependent:self. |
|
7117 ]. |
|
7118 ^ selectionInApplList. |
|
7119 ! |
|
7120 |
|
7121 settingsAppList |
|
7122 |
|
7123 ^ self class settingsAppListNames. |
|
7124 ! |
|
7125 |
|
7126 subCanvasApplicationHolder |
|
7127 |
|
7128 subCanvasApplicationHolder isNil ifTrue:[ |
|
7129 subCanvasApplicationHolder := ValueHolder new. |
|
7130 ]. |
|
7131 ^ subCanvasApplicationHolder. |
|
7132 ! ! |
|
7133 |
|
7134 !AbstractLauncherApplication::SettingsDialog methodsFor:'change & update'! |
|
7135 |
|
7136 modifiedChanged |
|
7137 |
|
7138 |changedObject| |
|
7139 |
|
7140 changedObject := self subCanvasApplicationHolder value modifiedChannel. |
|
7141 self enableOK value:(changedObject value). |
|
7142 self enableReload value:(changedObject value). |
|
7143 ! |
|
7144 |
|
7145 selectionChanged |
|
7146 |
|
7147 | item isCat oldAppl| |
|
7148 |
|
7149 oldAppl := self subCanvasApplicationHolder value. |
|
7150 oldAppl notNil ifTrue:[ |
|
7151 oldAppl saveRequest. |
|
7152 oldAppl modifiedChannel removeDependent:self. |
|
7153 ]. |
|
7154 item := self selectionInApplList value. |
|
7155 isCat := item isCategory. |
|
7156 self enableOK value:(isCat not). |
|
7157 self enableReload value:(isCat not). |
|
7158 self enableHelp value:(isCat not). |
|
7159 isCat ifTrue:[ |
|
7160 self subCanvasApplicationHolder value:nil. |
|
7161 ^ self |
|
7162 ]. |
|
7163 item application isNil ifTrue:[ |
|
7164 item application:(item applClass new). |
|
7165 |
|
7166 ]. |
|
7167 item application modifiedChannel addDependent:self. |
|
7168 self subCanvasApplicationHolder value:item application. |
|
7169 self modifiedChanged. |
|
7170 ! |
|
7171 |
|
7172 update:something with:aParameter from:changedObject |
|
7173 "Invoked when an object that I depend upon sends a change notification." |
|
7174 |
|
7175 "stub code automatically generated - please change as required" |
|
7176 |
|
7177 changedObject == self selectionInApplList ifTrue:[ |
|
7178 self selectionChanged. |
|
7179 ^ self |
|
7180 ]. |
|
7181 changedObject == self subCanvasApplicationHolder value modifiedChannel ifTrue:[ |
|
7182 self modifiedChanged. |
|
7183 ^ self |
|
7184 ]. |
|
7185 |
|
7186 super update:something with:aParameter from:changedObject |
|
7187 ! ! |
|
7188 |
|
7189 !AbstractLauncherApplication::SettingsDialog methodsFor:'initialization & release'! |
|
7190 |
|
7191 closeDownViews |
|
7192 "This is a hook method generated by the Browser. |
|
7193 It will be invoked when your app/dialog-window is really closed. |
|
7194 See also #closeDownViews, which is invoked before and may suppress the close |
|
7195 or ask the user for confirmation." |
|
7196 |
|
7197 "/ change the code below as required ... |
|
7198 "/ This should cleanup any leftover resources |
|
7199 "/ (for example, temporary files) |
|
7200 "/ super closeRequest will initiate the closeDown |
|
7201 |
|
7202 "/ add your code here |
|
7203 |
|
7204 "/ do not remove the one below ... |
|
7205 ^ super closeDownViews |
|
7206 ! |
|
7207 |
|
7208 closeRequest |
|
7209 "This is a hook method generated by the Browser. |
|
7210 It will be invoked when your app/dialog-window is about to be |
|
7211 closed (this method has a chance to suppress the close). |
|
7212 See also #closeDownViews, which is invoked when the close is really done." |
|
7213 |
|
7214 self sendSaveRequestToAll ifFalse:[ ^ self]. |
|
7215 self destroyAll. |
|
7216 ^ super closeRequest |
|
7217 ! |
|
7218 |
|
7219 initialize |
|
7220 |
|
7221 resources := self class owningClass resources. |
|
7222 self initializeApplList. |
|
7223 super initialize. |
|
7224 ! |
|
7225 |
|
7226 initializeApplList |
|
7227 |
|
7228 | rootItem itemClass parent| |
|
7229 applList := AbstractLauncherApplication::HierarchicalSettingsApplList new. |
|
7230 itemClass := applList class itemClass. |
|
7231 rootItem := itemClass new. |
|
7232 rootItem label:(Text string:(resources string:'Settings') emphasis:#bold). |
|
7233 rootItem nameString:'Settings'. |
|
7234 rootItem icon:self class settingsIcon. |
|
7235 self class applList do:[:entry | |
|
7236 |newItem nameString applicationClassNameMethodOrNil icon inCategory| |
|
7237 nameString := entry at:1. |
|
7238 applicationClassNameMethodOrNil := entry at:2. |
|
7239 inCategory := entry at:3. |
|
7240 icon := entry at:4. |
|
7241 |
|
7242 newItem := itemClass new. |
|
7243 newItem label:(Text string:(resources string:nameString) emphasis:#bold). |
|
7244 newItem nameString:nameString. |
|
7245 applicationClassNameMethodOrNil notNil ifTrue:[ |
|
7246 newItem applClass:(Smalltalk classNamed:applicationClassNameMethodOrNil). |
|
7247 ]. |
|
7248 (icon isNil) ifTrue:[ |
|
7249 (newItem applClass notNil and:[newItem applClass respondsTo:#defaultIcon]) ifTrue:[ |
|
7250 icon := newItem applClass defaultIcon. |
|
7251 ]. |
|
7252 icon isNil ifTrue:[ |
|
7253 icon := self class defaultSettingsAppIcon. |
|
7254 ]. |
|
7255 ]. |
|
7256 newItem icon:icon. |
|
7257 inCategory notNil ifTrue:[ |
|
7258 parent := self recursiveGetParentFor:inCategory fromItem:rootItem. |
|
7259 parent isNil ifTrue:[self error:('category:', inCategory, ' for:', newItem label, ' does not exist') mayProceed:true]. |
|
7260 parent children isNil ifTrue:[ |
|
7261 parent children:(OrderedCollection with:newItem) |
|
7262 ] ifFalse:[ |
|
7263 | newColl | |
|
7264 newColl := parent children copy. |
|
7265 newColl add:newItem. |
|
7266 parent children:newColl. |
|
7267 ] |
|
7268 ] ifFalse:[ |
|
7269 rootItem children isNil ifTrue:[ |
|
7270 rootItem children:(OrderedCollection with:newItem) |
|
7271 ] ifFalse:[ |
|
7272 | newColl | |
|
7273 newColl := rootItem children copy. |
|
7274 newColl add:newItem. |
|
7275 rootItem children:newColl. |
|
7276 ] |
|
7277 ] |
|
7278 ]. |
|
7279 |
|
7280 "/ applList showLeftIndicators:true. |
|
7281 "/ applList showRoot:true. |
|
7282 self selectionInApplList value:rootItem. |
|
7283 applList root:rootItem. |
|
7284 rootItem expand. |
|
7285 ! |
|
7286 |
|
7287 postBuildSubCanvas:aWidget |
|
7288 |
|
7289 aWidget keepClientView:true. |
|
7290 ! ! |
|
7291 |
|
7292 !AbstractLauncherApplication::SettingsDialog methodsFor:'menu actions'! |
|
7293 |
|
7294 loadSettings |
|
7295 |
|
7296 "restore settings from a settings-file." |
|
7297 |
|
7298 "a temporary kludge - we need a central systemSettings object for this, |
|
7299 which can be saved/restored with a single store/read." |
|
7300 |
|
7301 |fileName| |
|
7302 |
|
7303 fileName := Dialog |
|
7304 requestFileName:(resources string:'Load Settings From:') |
|
7305 default:'settings.stx' |
|
7306 ok:(resources string:'Load') |
|
7307 abort:(resources string:'Cancel') |
|
7308 pattern:'*.stx' |
|
7309 fromDirectory:nil. |
|
7310 |
|
7311 (fileName size == 0) ifTrue:[ |
|
7312 "/ canceled |
|
7313 ^ self |
|
7314 ]. |
|
7315 |
|
7316 self withWaitCursorDo:[ |
|
7317 Smalltalk fileIn:fileName. |
|
7318 Transcript current topView model reOpen. |
|
7319 self sendLoadRequestToAll. |
|
7320 ]. |
|
7321 ! |
|
7322 |
|
7323 saveSettings |
|
7324 |
|
7325 |fileName resources| |
|
7326 |
|
7327 resources := self class owningClass classResources. |
|
7328 |
|
7329 fileName := Dialog |
|
7330 requestFileName:(resources string:'Save settings in:') |
|
7331 default:'settings.stx' |
|
7332 ok:(resources string:'Save') |
|
7333 abort:(resources string:'Cancel') |
|
7334 pattern:'*.stx' |
|
7335 fromDirectory:'.'. |
|
7336 |
|
7337 fileName size ~~ 0 ifTrue:[ |
|
7338 "not canceled" |
|
7339 self saveSettingsIn:fileName. |
|
7340 ] |
|
7341 ! |
|
7342 |
|
7343 saveSettingsIn:fileName |
|
7344 "save settings to a settings-file." |
|
7345 |
|
7346 "a temporary kludge - we need a central systemSettings object for this, |
|
7347 which can be saved/restored with a single store/read. |
|
7348 Will move entries over to UserPreferences over time; |
|
7349 new items should always go there." |
|
7350 |
|
7351 |resources s screen currentUserPrefs| |
|
7352 |
|
7353 resources := self class owningClass classResources. |
|
7354 |
|
7355 s := fileName asFilename writeStream. |
|
7356 s isNil ifTrue:[ |
|
7357 self warn:(resources string:'Cannot write the %1 file !!' with:fileName). |
|
7358 ^ self |
|
7359 ]. |
|
7360 |
|
7361 currentUserPrefs := UserPreferences current. |
|
7362 screen := Screen current. |
|
7363 |
|
7364 s nextPutLine:'"/ ST/X saved settings'; |
|
7365 nextPutLine:'"/ DO NOT MODIFY MANUALLY'; |
|
7366 nextPutLine:'"/ (modifications would be lost with next save-settings)'; |
|
7367 nextPutLine:'"/'; |
|
7368 nextPutLine:'"/ this file was automatically generated by the'; |
|
7369 nextPutLine:'"/ ''save settings'' function of the Launcher'; |
|
7370 nextPutLine:'"/'. |
|
7371 s cr. |
|
7372 |
|
7373 s nextPutLine:'"/'. |
|
7374 s nextPutLine:'"/ saved by ' , OperatingSystem getLoginName , '@' , OperatingSystem getHostName , ' at ' , AbsoluteTime now printString. |
|
7375 s nextPutLine:'"/'. |
|
7376 s cr. |
|
7377 |
|
7378 s nextPutLine:'"/'. |
|
7379 s nextPutLine:'"/ Display settings:'. |
|
7380 s nextPutLine:'"/'. |
|
7381 s nextPutLine:'"/ only restore the display settings, if on the same Display ...'. |
|
7382 s nextPutLine:'Display notNil ifTrue:['. |
|
7383 s nextPutLine:' Display displayName = ' , (screen displayName storeString) , ' ifTrue:['. |
|
7384 screen fixColors notNil ifTrue:[ |
|
7385 s nextPutLine:' Image flushDeviceImages.'. |
|
7386 s nextPutLine:' Color colorAllocationFailSignal catch:['. |
|
7387 s nextPutLine:' Color getColorsRed:6 green:6 blue:4 on:Display'. |
|
7388 s nextPutLine:' ].'. |
|
7389 ] ifFalse:[ |
|
7390 s nextPutLine:' Display releaseFixColors.'. |
|
7391 ]. |
|
7392 s nextPutLine:' Display hasColors: ' , (screen hasColors storeString) , '.'. |
|
7393 s nextPutLine:' Display widthInMillimeter: ' , (screen widthInMillimeter storeString) , '.'. |
|
7394 s nextPutLine:' Display heightInMillimeter: ' , (screen heightInMillimeter storeString) , '.'. |
|
7395 s nextPutLine:' Display supportsDeepIcons: ' , (screen supportsDeepIcons storeString) , '.'. |
|
7396 s nextPutLine:' Image ditherAlgorithm: ' , (Image ditherAlgorithm storeString) , '.'. |
|
7397 s nextPutLine:' View defaultStyle:' , View defaultStyle storeString , '.'. |
|
7398 s nextPutLine:' ].'. |
|
7399 s nextPutLine:'].'. |
|
7400 s cr. |
|
7401 |
|
7402 s nextPutLine:'"/'. |
|
7403 s nextPutLine:'"/ Compiler settings:'. |
|
7404 s nextPutLine:'"/'. |
|
7405 s nextPutLine:'Compiler warnSTXSpecials: ' , (Compiler warnSTXSpecials storeString) , '.'; |
|
7406 nextPutLine:'Compiler warnUnderscoreInIdentifier: ' , (Compiler warnUnderscoreInIdentifier storeString) , '.'; |
|
7407 nextPutLine:'Compiler warnOldStyleAssignment: ' , (Compiler warnOldStyleAssignment storeString) , '.'; |
|
7408 nextPutLine:'Compiler warnCommonMistakes: ' , (Compiler warnCommonMistakes storeString) , '.'; |
|
7409 nextPutLine:'Compiler warnPossibleIncompatibilities: ' , (Compiler warnPossibleIncompatibilities storeString) , '.'; |
|
7410 nextPutLine:'Compiler allowUnderscoreInIdentifier: ' , (Compiler allowUnderscoreInIdentifier storeString) , '.'; |
|
7411 nextPutLine:'Compiler allowSqueakExtensions: ' , (Compiler allowSqueakExtensions storeString) , '.'; |
|
7412 nextPutLine:'Compiler allowDolphinExtensions: ' , (Compiler allowDolphinExtensions storeString) , '.'; |
|
7413 nextPutLine:'Compiler arraysAreImmutable: ' , (Compiler arraysAreImmutable storeString) , '.'; |
|
7414 nextPutLine:'Compiler lineNumberInfo: ' , (Compiler lineNumberInfo storeString) , '.'; |
|
7415 |
|
7416 nextPutLine:'Compiler foldConstants: ' , (Compiler foldConstants storeString) , '.'; |
|
7417 nextPutLine:'Compiler stcCompilation: ' , (Compiler stcCompilation storeString) , '.'; |
|
7418 nextPutLine:'OperatingSystem getOSType = ' , (OperatingSystem getOSType storeString) , ' ifTrue:['; |
|
7419 nextPutLine:' Compiler stcCompilationIncludes: ' , (Compiler stcCompilationIncludes storeString) , '.'; |
|
7420 nextPutLine:' Compiler stcCompilationDefines: ' , (Compiler stcCompilationDefines storeString) , '.'; |
|
7421 nextPutLine:' Compiler stcCompilationOptions: ' , (Compiler stcCompilationOptions storeString) , '.'; |
|
7422 nextPutLine:' ' , (Compiler stcModulePath storeString) , ' asFilename exists ifTrue:['; |
|
7423 nextPutLine:' Compiler stcModulePath: ' , (Compiler stcModulePath storeString) , '.'; |
|
7424 nextPutLine:' ].'; |
|
7425 nextPutLine:' Compiler stcPath: ' , (Compiler stcPath storeString) , '.'; |
|
7426 nextPutLine:' Compiler ccCompilationOptions: ' , (Compiler ccCompilationOptions storeString) , '.'; |
|
7427 nextPutLine:' Compiler ccPath: ' , (Compiler ccPath storeString) , '.'; |
|
7428 nextPutLine:' ObjectFileLoader linkArgs: ' , (ObjectFileLoader linkArgs storeString) , '.'; |
|
7429 nextPutLine:' ObjectFileLoader linkCommand: ' , (ObjectFileLoader linkCommand storeString) , '.'; |
|
7430 nextPutLine:' ObjectFileLoader libPath: ' , (ObjectFileLoader libPath storeString) , '.'; |
|
7431 nextPutLine:' ObjectFileLoader searchedLibraries: ' , (ObjectFileLoader searchedLibraries storeString) , '.'; |
|
7432 nextPutLine:'].'; |
|
7433 |
|
7434 nextPutLine:'ObjectMemory justInTimeCompilation: ' , (ObjectMemory justInTimeCompilation storeString) , '.'; |
|
7435 nextPutLine:'ObjectMemory fullSingleStepSupport: ' , (ObjectMemory fullSingleStepSupport storeString) , '.'. |
|
7436 |
|
7437 HistoryManager notNil ifTrue:[ |
|
7438 HistoryManager isActive ifTrue:[ |
|
7439 s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager activate].'. |
|
7440 s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager fullHistoryUpdate:' , HistoryManager fullHistoryUpdate storeString , '].'. |
|
7441 ] ifFalse:[ |
|
7442 s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager deactivate].'. |
|
7443 ]. |
|
7444 ]. |
|
7445 |
|
7446 ObjectFileLoader notNil ifTrue:[ |
|
7447 s nextPutLine:'ObjectFileLoader searchedLibraries: ' , (ObjectFileLoader searchedLibraries storeString) , '.'. |
|
7448 s nextPutLine:'ObjectFileLoader libPath: ' , (ObjectFileLoader libPath storeString) , '.'. |
|
7449 ]. |
|
7450 |
|
7451 s nextPutLine:'Class catchMethodRedefinitions: ' , (Class catchMethodRedefinitions storeString) , '.'. |
|
7452 s nextPutLine:'ClassCategoryReader sourceMode: ' , (ClassCategoryReader sourceMode storeString) , '.'. |
|
7453 |
|
7454 s cr. |
|
7455 s nextPutLine:'"/'. |
|
7456 s nextPutLine:'"/ Info & Debug Messages:'. |
|
7457 s nextPutLine:'"/'. |
|
7458 s nextPutLine:'ObjectMemory infoPrinting: ' , (ObjectMemory infoPrinting storeString) , '.'; |
|
7459 nextPutLine:'ObjectMemory debugPrinting: ' , (ObjectMemory debugPrinting storeString) , '.'; |
|
7460 nextPutLine:'Object infoPrinting: ' , (Object infoPrinting storeString) , '.'; |
|
7461 nextPutLine:'DeviceWorkstation errorPrinting: ' , (DeviceWorkstation errorPrinting storeString) , '.'. |
|
7462 |
|
7463 FlyByHelp isActive ifTrue:[ |
|
7464 s nextPutLine:'FlyByHelp start.' |
|
7465 ]. |
|
7466 |
|
7467 s cr. |
|
7468 s nextPutLine:'"/'. |
|
7469 s nextPutLine:'"/ Edit settings:'. |
|
7470 s nextPutLine:'"/'. |
|
7471 "/ s nextPutLine:'EditTextView st80Mode: ' , (EditTextView st80Mode storeString) , '.'. |
|
7472 s nextPutLine:'TextView st80SelectMode: ' , (TextView st80SelectMode storeString) , '.'. |
|
7473 s nextPutLine:'UserPreferences current syntaxColoring: ' , (currentUserPrefs syntaxColoring storeString) , '.'. |
|
7474 (ListView userDefaultTabPositions = ListView tab4Positions) ifTrue:[ |
|
7475 s nextPutLine:'ListView userDefaultTabPositions:(ListView tab4Positions).'. |
|
7476 ] ifFalse:[ |
|
7477 s nextPutLine:'ListView userDefaultTabPositions:(ListView tab8Positions).'. |
|
7478 ]. |
|
7479 |
|
7480 s nextPutLine:'"/'. |
|
7481 s nextPutLine:'"/ User preference values:'. |
|
7482 s nextPutLine:'"/'. |
|
7483 currentUserPrefs keysAndValuesDo:[:k :v | |
|
7484 (UserPreferences includesSelector:(k , ':') asSymbol) ifTrue:[ |
|
7485 s nextPutLine:'UserPreferences current ' , k , ':' , v storeString , '.'. |
|
7486 ] ifFalse:[ |
|
7487 s nextPutLine:'UserPreferences current at:' , k storeString , ' put:' , v storeString , '.'. |
|
7488 ] |
|
7489 ]. |
|
7490 |
|
7491 s cr. |
|
7492 s nextPutLine:'"/'. |
|
7493 s nextPutLine:'"/ Misc settings:'. |
|
7494 s nextPutLine:'"/'. |
|
7495 s nextPutLine:'Class keepMethodHistory: ' , (Class methodHistory notNil storeString) , '.'; |
|
7496 nextPutLine:'Smalltalk logDoits: ' , (Smalltalk logDoits storeString) , '.'; |
|
7497 nextPutLine:'Autoload compileLazy: ' , (Autoload compileLazy storeString) , '.'; |
|
7498 nextPutLine:'Smalltalk loadBinaries: ' , (Smalltalk loadBinaries storeString) , '.'; |
|
7499 nextPutLine:'StandardSystemView includeHostNameInLabel: ' , (StandardSystemView includeHostNameInLabel storeString) , '.'; |
|
7500 |
|
7501 "/ claus - I dont think its a good idea to save those ... |
|
7502 nextPutLine:'"/ Class updateChanges: ' , (Class updatingChanges storeString) , '.'; |
|
7503 nextPutLine:'"/ ObjectMemory nameForChanges: ' , (ObjectMemory nameForChanges storeString) , '.'; |
|
7504 |
|
7505 nextPutLine:'StandardSystemView returnFocusWhenClosingModalBoxes: ' , (StandardSystemView returnFocusWhenClosingModalBoxes storeString) , '.'; |
|
7506 nextPutLine:'StandardSystemView takeFocusWhenMapped: ' , (StandardSystemView takeFocusWhenMapped storeString) , '.'; |
|
7507 nextPutLine:'Display notNil ifTrue:['; |
|
7508 nextPutLine:' Display activateOnClick: ' , ((screen activateOnClick:nil) storeString) , '.'; |
|
7509 nextPutLine:'].'; |
|
7510 nextPutLine:'MenuView showAcceleratorKeys: ' , (MenuView showAcceleratorKeys storeString) , '.'; |
|
7511 nextPutLine:'Class tryLocalSourceFirst: ' , (Class tryLocalSourceFirst storeString) , '.'. |
|
7512 (Exception emergencyHandler == AbstractLauncherApplication notifyingEmergencyHandler) ifTrue:[ |
|
7513 s nextPutLine:'Exception emergencyHandler:(AbstractLauncherApplication notifyingEmergencyHandler).'. |
|
7514 ]. |
|
7515 Processor isTimeSlicing ifTrue:[ |
|
7516 s nextPutLine:'Processor startTimeSlicing.'. |
|
7517 s nextPutLine:('Processor supportDynamicPriorities:' , (Processor supportDynamicPriorities ? false) storeString , '.'). |
|
7518 ] ifFalse:[ |
|
7519 s nextPutLine:'Processor stopTimeSlicing.'. |
|
7520 ]. |
|
7521 |
|
7522 s cr. |
|
7523 s nextPutLine:'"/'. |
|
7524 s nextPutLine:'"/ Printer settings:'. |
|
7525 s nextPutLine:'"/'. |
|
7526 s nextPutLine:'Printer := ' , (Printer name) , '.'; |
|
7527 nextPutLine:'Printer printCommand: ' , (Printer printCommand storeString) , '.'. |
|
7528 |
|
7529 Printer supportsPageSizes ifTrue:[ |
|
7530 s nextPutLine:'Printer pageFormat: ' , (Printer pageFormat storeString) , '.'. |
|
7531 s nextPutLine:'Printer landscape: ' , (Printer landscape storeString) , '.'. |
|
7532 ]. |
|
7533 Printer supportsMargins ifTrue:[ |
|
7534 s nextPutLine:'Printer topMargin: ' , (Printer topMargin storeString) , '.'. |
|
7535 s nextPutLine:'Printer leftMargin: ' , (Printer leftMargin storeString) , '.'. |
|
7536 s nextPutLine:'Printer rightMargin: ' , (Printer rightMargin storeString) , '.'. |
|
7537 s nextPutLine:'Printer bottomMargin: ' , (Printer bottomMargin storeString) , '.'. |
|
7538 ]. |
|
7539 Printer supportsPostscript ifTrue:[ |
|
7540 s nextPutLine:'Printer supportsColor: ' , (Printer supportsColor storeString) , '.'. |
|
7541 ]. |
|
7542 |
|
7543 s cr. |
|
7544 s nextPutLine:'"/'. |
|
7545 s nextPutLine:'"/ Font settings:'. |
|
7546 s nextPutLine:'"/ (only restored, if image is restarted on the same display)'. |
|
7547 s nextPutLine:'"/'. |
|
7548 s nextPutLine:'Display notNil ifTrue:['. |
|
7549 s nextPutLine:' Display displayName = ' , (screen displayName storeString) , ' ifTrue:['. |
|
7550 s nextPutLine:' View defaultFont: ' , (View defaultFont storeString) , '.'. |
|
7551 s nextPutLine:' Label defaultFont: ' , (Label defaultFont storeString) , '.'. |
|
7552 s nextPutLine:' Button defaultFont: ' , (Button defaultFont storeString) , '.'. |
|
7553 s nextPutLine:' Toggle defaultFont: ' , (Toggle defaultFont storeString) , '.'. |
|
7554 s nextPutLine:' SelectionInListView defaultFont: ' , (SelectionInListView defaultFont storeString) , '.'. |
|
7555 s nextPutLine:' MenuView defaultFont: ' , (MenuView defaultFont storeString) , '.'. |
|
7556 s nextPutLine:' PullDownMenu defaultFont: ' , (PullDownMenu defaultFont storeString) , '.'. |
|
7557 s nextPutLine:' TextView defaultFont: ' , (TextView defaultFont storeString) , '.'. |
|
7558 s nextPutLine:' EditTextView defaultFont: ' , (EditTextView defaultFont storeString) , '.'. |
|
7559 s nextPutLine:' CodeView defaultFont: ' , (CodeView defaultFont storeString) , '.'. |
|
7560 s nextPutLine:' ].'. |
|
7561 s nextPutLine:'].'. |
|
7562 |
|
7563 s cr. |
|
7564 s nextPutLine:'"/'. |
|
7565 s nextPutLine:'"/ Language setting:'. |
|
7566 s nextPutLine:'"/'. |
|
7567 s nextPutLine:'Smalltalk language: ' , (Smalltalk language storeString) , '.'. |
|
7568 s nextPutLine:'Smalltalk languageTerritory: ' , (Smalltalk languageTerritory storeString) , '.'. |
|
7569 |
|
7570 s cr. |
|
7571 s nextPutLine:'"/'. |
|
7572 s nextPutLine:'"/ SourceCodeManager settings:'. |
|
7573 s nextPutLine:'"/ (only restored, if image is restarted on the same host)'. |
|
7574 s nextPutLine:'"/'. |
|
7575 s nextPutLine:'OperatingSystem getHostName = ' , (OperatingSystem getHostName storeString) , ' ifTrue:['. |
|
7576 s nextPutLine:' Class tryLocalSourceFirst:' , Class tryLocalSourceFirst storeString , '.'. |
|
7577 (Smalltalk at:#SourceCodeManager) == CVSSourceCodeManager ifTrue:[ |
|
7578 s nextPutLine:' Smalltalk at:#SourceCodeManager put: CVSSourceCodeManager.'. |
|
7579 s nextPutLine:' AbstractSourceCodeManager cacheDirectoryName:' , AbstractSourceCodeManager cacheDirectoryName storeString , '.'. |
|
7580 s nextPutLine:' CVSSourceCodeManager cvsBinDirectory:' , CVSSourceCodeManager cvsBinDirectory storeString , '.'. |
|
7581 s nextPutLine:' CVSSourceCodeManager repositoryNamesPerModule:' , CVSSourceCodeManager repositoryNamesPerModule storeString , '.'. |
|
7582 s nextPutLine:' CVSSourceCodeManager initializeForRepository:' , CVSSourceCodeManager repositoryName storeString , '.'. |
|
7583 ]. |
|
7584 s nextPutLine:'].'. |
|
7585 |
|
7586 s close. |
|
7587 |
|
7588 " |
|
7589 Transcript topView application saveSettings |
|
7590 " |
|
7591 |
|
7592 "Modified: / 6.1.1999 / 14:24:16 / cg" |
|
7593 ! ! |
|
7594 |
|
7595 !AbstractLauncherApplication::SettingsDialog methodsFor:'queries'! |
|
7596 |
|
7597 recursiveGetParentFor:aCategory fromItem:aItem |
|
7598 |
|
7599 | children | |
|
7600 children := aItem children. |
|
7601 children notNil ifTrue:[ |
|
7602 children do:[:aChildItem | | newItem | |
|
7603 aChildItem nameString = aCategory ifTrue:[ ^ aChildItem]. |
|
7604 newItem := self recursiveGetParentFor:aCategory fromItem:aChildItem. |
|
7605 newItem notNil ifTrue:[^ newItem]. |
|
7606 ]. |
|
7607 ]. |
|
7608 ^ nil |
|
7609 ! ! |
|
7610 |
|
7611 !AbstractLauncherApplication class methodsFor:'documentation'! |
|
7612 |
|
7613 version |
|
7614 ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.240 2002-12-12 13:01:10 penk Exp $' |
|
7615 ! ! |
|
7616 |
|
7617 AbstractLauncherApplication::SettingsDialog initialize! |
|