NewLauncher.st
author tz
Sun, 18 Jan 1998 20:03:44 +0100
changeset 1406 60e6a7d07c93
child 1411 da20bf21fb13
permissions -rw-r--r--
initial checkin
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1406
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
     1
"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
     2
 COPYRIGHT (c) 1997 by eXept Software AG / Thomas Zwick
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
     3
              All Rights Reserved
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
     4
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
     5
 This software is furnished under a license and may be used
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
     7
 inclusion of the above copyright notice. This software may not
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
     9
 other person. No title to or ownership of the software is
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    10
 hereby transferred.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    11
"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    12
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    13
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    14
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    15
ToolApplicationModel subclass:#NewLauncher
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    16
	instanceVariableNames:'transcript isMainLauncher'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    17
	classVariableNames:'OpenLaunchers NotifyingEmergencyHandler'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    18
	poolDictionaries:''
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    19
	category:'Interface-Advanced-Tools'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    20
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    21
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    22
!NewLauncher class methodsFor:'documentation'!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    23
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    24
copyright
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    25
"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    26
 COPYRIGHT (c) 1997 by eXept Software AG / Thomas Zwick
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    27
              All Rights Reserved
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    28
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    29
 This software is furnished under a license and may be used
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    30
 only in accordance with the terms of that license and with the
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    31
 inclusion of the above copyright notice. This software may not
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    32
 be provided or otherwise made available to, or used by, any
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    33
 other person. No title to or ownership of the software is
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    34
 hereby transferred.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    35
"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    36
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    37
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    38
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    39
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    40
documentation
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    41
"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    42
    documentation to be added.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    43
"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    44
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    45
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    46
history
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    47
    "Created: / 10.1.1998 / 11:00:24 / tz"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    48
! !
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    49
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    50
!NewLauncher class methodsFor:'accessing'!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    51
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    52
OpenLaunchers
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    53
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    54
    ^OpenLaunchers ? (OpenLaunchers := OrderedCollection new)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    55
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    56
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    57
current
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    58
    "return the launcher running on the current screen.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    59
     (for access via addMenu/ removeMenu)"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    60
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    61
    OpenLaunchers do:[:aLauncher |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    62
        aLauncher window graphicsDevice == Screen current ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    63
            ^ aLauncher
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    64
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    65
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    66
    ^ nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    67
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    68
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    69
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    70
label
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    71
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    72
    ^'Launcher'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    73
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    74
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    75
! !
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    76
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    77
!NewLauncher class methodsFor:'defaults'!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    78
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    79
notifyingEmergencyHandler
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    80
    "return a block (used as an emergency handler
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    81
     for exceptions), which does errorNotification before going
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    82
     into the debugger."
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    83
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    84
    "Remember the handlerBlock, to be able to determine if the current
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    85
     handler is the notifying one."
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    86
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    87
    ^ NotifyingEmergencyHandler ? (NotifyingEmergencyHandler := Exception notifyingEmergencyHandler)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    88
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    89
! !
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    90
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    91
!NewLauncher class methodsFor:'interface specs'!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    92
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    93
menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    94
    "this window spec was automatically generated by the ST/X MenuEditor"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    95
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    96
    "do not manually edit this - the builder may not be able to
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    97
     handle the specification if its corrupted."
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    98
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
    99
    "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   100
     MenuEditor new openOnClass:NewLauncher andSelector:#menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   101
     (Menu new fromLiteralArrayEncoding:(NewLauncher menu)) startUp
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   102
    "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   103
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   104
    <resource: #menu>
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   105
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   106
    ^
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   107
     
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   108
       #(#Menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   109
          
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   110
           #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   111
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   112
                #'label:' 'about'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   113
                #'labelImage:' #(#ResourceRetriever #ToolApplicationModel #stxIcon)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   114
                #'submenuChannel:' #menuAbout
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   115
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   116
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   117
                #'label:' 'File'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   118
                #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   119
                #'value:' #file
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   120
                #'accessCharacterPosition:' 1
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   121
                #'submenu:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   122
                 #(#Menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   123
                    
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   124
                     #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   125
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   126
                          #'label:' 'File Browser'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   127
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   128
                          #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   129
                          #'argument:' 'FileBrowser'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   130
                          #'labelImage:' #(#ResourceRetriever nil #startFileBrowserIcon 'File Browser')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   131
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   132
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   133
                          #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   134
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   135
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   136
                          #'label:' 'Modules...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   137
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   138
                          #'value:' #objectModuleDialog
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   139
                          #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   140
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   141
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   142
                          #'label:' 'Build Application...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   143
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   144
                          #'value:' #openApplicationBuilder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   145
                          #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   146
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   147
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   148
                          #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   149
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   150
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   151
                          #'label:' 'Save Image'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   152
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   153
                          #'value:' #saveImage
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   154
                          #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   155
                          #'labelImage:' #(#ResourceRetriever nil #saveIcon 'Save Image')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   156
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   157
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   158
                          #'label:' 'Save Image As...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   159
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   160
                          #'value:' #saveImageAs
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   161
                          #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   162
                          #'labelImage:' #(#ResourceRetriever nil #saveIcon 'Save Image As...')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   163
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   164
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   165
                          #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   166
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   167
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   168
                          #'label:' 'Exit...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   169
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   170
                          #'value:' #exit
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   171
                          #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   172
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   173
                    ) nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   174
                    nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   175
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   176
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   177
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   178
                #'label:' 'Classes'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   179
                #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   180
                #'value:' #classes
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   181
                #'accessCharacterPosition:' 1
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   182
                #'submenu:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   183
                 #(#Menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   184
                    
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   185
                     #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   186
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   187
                          #'label:' 'System Browser'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   188
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   189
                          #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   190
                          #'argument:' 'SystemBrowser'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   191
                          #'labelImage:' #(#ResourceRetriever nil #startSystemBrowserIcon 'System Browser')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   192
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   193
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   194
                          #'label:' 'Class Browser...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   195
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   196
                          #'value:' #startClassBrowser
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   197
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   198
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   199
                          #'label:' 'Full Class Browser...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   200
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   201
                          #'value:' #startFullClassBrowser
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   202
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   203
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   204
                          #'label:' 'Class Hierarchy Browser...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   205
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   206
                          #'value:' #startClassHierarchyBrowser
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   207
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   208
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   209
                          #'label:' 'Class Tree'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   210
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   211
                          #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   212
                          #'argument:' 'ClassTreeGraphView'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   213
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   214
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   215
                          #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   216
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   217
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   218
                          #'label:' 'Implementors...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   219
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   220
                          #'value:' #browseImplementors
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   221
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   222
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   223
                          #'label:' 'Senders...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   224
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   225
                          #'value:' #browseSenders
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   226
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   227
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   228
                          #'label:' 'Special'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   229
                          #'value:' #special
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   230
                          #'submenu:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   231
                           #(#Menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   232
                              
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   233
                               #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   234
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   235
                                    #'label:' 'References To Undeclared'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   236
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   237
                                    #'value:' #browseUndeclared
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   238
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   239
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   240
                                    #'label:' 'Resource Methods...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   241
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   242
                                    #'value:' #browseResources
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   243
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   244
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   245
                                    #'label:' 'Show Break/Trace Points'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   246
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   247
                                    #'value:' #browseAllBreakAndTracePoints
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   248
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   249
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   250
                                    #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   251
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   252
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   253
                                    #'label:' 'Remove All Break/Trace Points'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   254
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   255
                                    #'value:' #removeAllBreakAndTracePoints
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   256
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   257
                              ) nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   258
                              nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   259
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   260
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   261
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   262
                          #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   263
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   264
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   265
                          #'label:' 'Change Browser'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   266
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   267
                          #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   268
                          #'argument:' 'ChangesBrowser'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   269
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   270
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   271
                          #'label:' 'New Changes Browser'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   272
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   273
                          #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   274
                          #'argument:' 'NewChangesBrowser'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   275
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   276
                    ) nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   277
                    nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   278
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   279
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   280
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   281
                #'label:' 'Tools'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   282
                #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   283
                #'value:' #tools
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   284
                #'accessCharacterPosition:' 1
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   285
                #'submenu:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   286
                 #(#Menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   287
                    
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   288
                     #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   289
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   290
                          #'label:' 'Workspace'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   291
                          #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   292
                          #'argument:' 'Workspace'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   293
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   294
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   295
                          #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   296
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   297
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   298
                          #'label:' 'GUI Builder'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   299
                          #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   300
                          #'argument:' 'UIPainter'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   301
                          #'labelImage:' #(#ResourceRetriever nil #startGUIBuilderIcon 'GUI Builder')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   302
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   303
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   304
                          #'label:' 'Menu Editor'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   305
                          #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   306
                          #'argument:' 'MenuEditor'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   307
                          #'labelImage:' #(#ResourceRetriever nil #startMenuEditorIcon 'Menu Editor')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   308
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   309
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   310
                          #'label:' 'Image Editor'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   311
                          #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   312
                          #'argument:' 'ImageEditor'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   313
                          #'labelImage:' #(#ResourceRetriever nil #startImageEditorIcon 'Image Editor')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   314
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   315
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   316
                          #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   317
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   318
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   319
                          #'label:' 'Source Code Browser'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   320
                          #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   321
                          #'argument:' 'SourceCodeBrowser'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   322
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   323
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   324
                          #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   325
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   326
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   327
                          #'label:' 'Old Launcher'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   328
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   329
                          #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   330
                          #'argument:' 'Launcher'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   331
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   332
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   333
                          #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   334
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   335
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   336
                          #'label:' 'Monitors'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   337
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   338
                          #'value:' #monitors
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   339
                          #'submenu:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   340
                           #(#Menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   341
                              
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   342
                               #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   343
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   344
                                    #'label:' 'Processes'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   345
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   346
                                    #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   347
                                    #'argument:' 'ProcessMonitor'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   348
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   349
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   350
                                    #'label:' 'Semaphores'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   351
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   352
                                    #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   353
                                    #'argument:' 'SemaphoreMonitor'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   354
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   355
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   356
                                    #'label:' 'Memory'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   357
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   358
                                    #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   359
                                    #'argument:' 'MemoryMonitor'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   360
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   361
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   362
                                    #'label:' 'Irq Latency'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   363
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   364
                                    #'value:' #startLatencyMonitor
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   365
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   366
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   367
                                    #'label:' 'Event View'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   368
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   369
                                    #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   370
                                    #'argument:' 'EventMonitor'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   371
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   372
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   373
                                    #'label:' 'Event Trace'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   374
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   375
                                    #'value:' #startStopEventTrace
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   376
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   377
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   378
                                    #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   379
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   380
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   381
                                    #'label:' 'Memory Usage'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   382
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   383
                                    #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   384
                                    #'argument:' 'MemoryUsageView'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   385
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   386
                              ) nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   387
                              nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   388
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   389
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   390
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   391
                          #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   392
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   393
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   394
                          #'label:' 'Views'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   395
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   396
                          #'value:' #views
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   397
                          #'submenu:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   398
                           #(#Menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   399
                              
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   400
                               #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   401
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   402
                                    #'label:' 'Iconify All'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   403
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   404
                                    #'value:' #iconifyAllWindows
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   405
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   406
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   407
                                    #'label:' 'De-iconify All'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   408
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   409
                                    #'value:' #deIconifyAllWindows
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   410
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   411
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   412
                                    #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   413
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   414
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   415
                                    #'label:' 'Find And Raise...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   416
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   417
                                    #'value:' #findAndRaiseWindow
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   418
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   419
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   420
                                    #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   421
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   422
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   423
                                    #'label:' 'View Tree (all views)'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   424
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   425
                                    #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   426
                                    #'argument:' 'WindowTreeView'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   427
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   428
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   429
                                    #'label:' 'View Tree'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   430
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   431
                                    #'value:' #startWindowTreeView
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   432
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   433
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   434
                                    #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   435
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   436
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   437
                                    #'label:' 'Select And Inspect View'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   438
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   439
                                    #'value:' #viewInspect
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   440
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   441
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   442
                                    #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   443
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   444
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   445
                                    #'label:' 'Select And Destroy View'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   446
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   447
                                    #'value:' #viewDestroy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   448
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   449
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   450
                                    #'label:' 'Find And Destroy...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   451
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   452
                                    #'value:' #findAndDestroyWindow
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   453
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   454
                              ) nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   455
                              nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   456
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   457
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   458
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   459
                          #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   460
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   461
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   462
                          #'label:' 'Hardcopy'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   463
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   464
                          #'value:' #hardcopy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   465
                          #'submenu:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   466
                           #(#Menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   467
                              
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   468
                               #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   469
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   470
                                    #'label:' 'Screen'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   471
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   472
                                    #'value:' #fullScreenHardcopy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   473
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   474
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   475
                                    #'label:' 'Area'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   476
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   477
                                    #'value:' #screenHardcopy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   478
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   479
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   480
                                    #'label:' 'View'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   481
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   482
                                    #'value:' #viewHardcopy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   483
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   484
                              ) nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   485
                              nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   486
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   487
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   488
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   489
                          #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   490
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   491
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   492
                          #'label:' 'Misc'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   493
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   494
                          #'value:' #misc
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   495
                          #'submenu:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   496
                           #(#Menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   497
                              
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   498
                               #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   499
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   500
                                    #'label:' 'Garbage Collect'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   501
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   502
                                    #'value:' #garbageCollect
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   503
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   504
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   505
                                    #'label:' 'Garbage Collect And Compress'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   506
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   507
                                    #'value:' #compressingGarbageCollect
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   508
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   509
                              ) nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   510
                              nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   511
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   512
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   513
                    ) nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   514
                    nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   515
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   516
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   517
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   518
                #'label:' 'Settings'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   519
                #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   520
                #'value:' #settings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   521
                #'accessCharacterPosition:' 1
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   522
                #'submenu:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   523
                 #(#Menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   524
                    
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   525
                     #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   526
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   527
                          #'label:' 'Language...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   528
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   529
                          #'value:' #languageSetting
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   530
                          #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   531
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   532
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   533
                          #'label:' 'Show Keyboard Mappings...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   534
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   535
                          #'value:' #keyboardSetting
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   536
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   537
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   538
                          #'label:' 'View Style...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   539
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   540
                          #'value:' #viewStyleSetting
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   541
                          #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   542
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   543
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   544
                          #'label:' 'Fonts...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   545
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   546
                          #'value:' #fontSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   547
                          #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   548
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   549
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   550
                          #'label:' 'Printer...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   551
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   552
                          #'value:' #printerSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   553
                          #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   554
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   555
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   556
                          #'label:' 'Messages...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   557
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   558
                          #'value:' #messageSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   559
                          #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   560
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   561
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   562
                          #'label:' 'Compilation...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   563
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   564
                          #'value:' #compilerSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   565
                          #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   566
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   567
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   568
                          #'label:' 'Source And Debugger...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   569
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   570
                          #'value:' #sourceAndDebuggerSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   571
                          #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   572
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   573
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   574
                          #'label:' 'Object Memory...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   575
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   576
                          #'value:' #memorySettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   577
                          #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   578
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   579
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   580
                          #'label:' 'Screen...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   581
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   582
                          #'value:' #displaySettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   583
                          #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   584
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   585
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   586
                          #'label:' 'Misc...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   587
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   588
                          #'value:' #miscSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   589
                          #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   590
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   591
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   592
                          #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   593
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   594
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   595
                          #'label:' 'Save Settings...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   596
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   597
                          #'value:' #saveSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   598
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   599
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   600
                          #'label:' 'Restore Settings...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   601
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   602
                          #'value:' #restoreSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   603
                          #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   604
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   605
                    ) nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   606
                    nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   607
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   608
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   609
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   610
                #'label:' 'Demos'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   611
                #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   612
                #'value:' #demos
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   613
                #'accessCharacterPosition:' 1
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   614
                #'submenu:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   615
                 #(#Menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   616
                    
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   617
                     #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   618
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   619
                          #'label:' 'Goodies'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   620
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   621
                          #'value:' #goodies
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   622
                          #'submenu:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   623
                           #(#Menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   624
                              
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   625
                               #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   626
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   627
                                    #'label:' 'Clock'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   628
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   629
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   630
                                    #'argument:' 'Clock'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   631
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   632
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   633
                                    #'label:' 'Digital Clock'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   634
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   635
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   636
                                    #'argument:' 'DigitalClockView'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   637
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   638
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   639
                                    #'label:' 'Calendar'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   640
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   641
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   642
                                    #'argument:' 'Calendar'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   643
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   644
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   645
                                    #'label:' 'Calculator'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   646
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   647
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   648
                                    #'argument:' 'CalculatorView'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   649
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   650
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   651
                                    #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   652
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   653
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   654
                                    #'label:' 'Mail Tool'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   655
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   656
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   657
                                    #'argument:' 'MailView'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   658
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   659
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   660
                                    #'label:' 'News Tool'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   661
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   662
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   663
                                    #'argument:' 'NewsView'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   664
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   665
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   666
                                    #'label:' 'FTP Tool'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   667
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   668
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   669
                                    #'argument:' 'FTPTool'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   670
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   671
                              ) nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   672
                              nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   673
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   674
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   675
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   676
                          #'label:' 'Games'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   677
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   678
                          #'value:' #games
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   679
                          #'submenu:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   680
                           #(#Menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   681
                              
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   682
                               #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   683
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   684
                                    #'label:' 'Tetris'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   685
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   686
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   687
                                    #'argument:' 'Games::Tetris'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   688
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   689
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   690
                                    #'label:' 'Tic Tac Toe'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   691
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   692
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   693
                                    #'argument:' 'TicTacToeGame'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   694
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   695
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   696
                                    #'label:' 'Tic Tac Toe (2 players)'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   697
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   698
                                    #'value:' #startTicTacToe2
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   699
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   700
                              ) nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   701
                              nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   702
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   703
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   704
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   705
                          #'label:' 'Geometric Designs'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   706
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   707
                          #'value:' #geometricDesigns
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   708
                          #'submenu:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   709
                           #(#Menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   710
                              
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   711
                               #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   712
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   713
                                    #'label:' 'Pen Demo'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   714
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   715
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   716
                                    #'argument:' 'PenDemo'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   717
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   718
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   719
                                    #'label:' 'Commander Demo'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   720
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   721
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   722
                                    #'argument:' 'CommanderDemo'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   723
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   724
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   725
                                    #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   726
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   727
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   728
                                    #'label:' 'Fractal Plants Demo'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   729
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   730
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   731
                                    #'argument:' 'FractalPlantsDemo'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   732
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   733
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   734
                                    #'label:' 'Fractal Patterns Demo'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   735
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   736
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   737
                                    #'argument:' 'FractalPatternsDemo'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   738
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   739
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   740
                                    #'label:' 'More Fractal Patterns Demo'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   741
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   742
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   743
                                    #'argument:' 'ArmchairUniverseDemo'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   744
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   745
                              ) nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   746
                              nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   747
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   748
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   749
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   750
                          #'label:' 'Simple Animations'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   751
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   752
                          #'value:' #simpleAnimations
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   753
                          #'submenu:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   754
                           #(#Menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   755
                              
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   756
                               #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   757
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   758
                                    #'label:' 'Walking Man'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   759
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   760
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   761
                                    #'argument:' 'Animation'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   762
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   763
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   764
                                    #'label:' 'Globe Demo'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   765
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   766
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   767
                                    #'argument:' 'GlobeDemo'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   768
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   769
                              ) nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   770
                              nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   771
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   772
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   773
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   774
                          #'label:' '3D Graphics'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   775
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   776
                          #'value:' #'3Dgraphics'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   777
                          #'submenu:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   778
                           #(#Menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   779
                              
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   780
                               #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   781
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   782
                                    #'label:' 'Plane'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   783
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   784
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   785
                                    #'argument:' 'GLPlaneDemoView2'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   786
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   787
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   788
                                    #'label:' 'Tetra'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   789
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   790
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   791
                                    #'argument:' 'GLTetraDemoView'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   792
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   793
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   794
                                    #'label:' 'Cube (wireframe)'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   795
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   796
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   797
                                    #'argument:' 'GLWireCubeDemoView'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   798
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   799
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   800
                                    #'label:' 'Cube (solid)'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   801
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   802
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   803
                                    #'argument:' 'GLCubeDemoView'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   804
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   805
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   806
                                    #'label:' 'Sphere (wireframe)'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   807
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   808
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   809
                                    #'argument:' 'GLWireSphereDemoView'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   810
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   811
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   812
                                    #'label:' 'Doughnut (wireframe)'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   813
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   814
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   815
                                    #'argument:' 'GLDoughnutDemoView'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   816
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   817
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   818
                                    #'label:' 'Planet'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   819
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   820
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   821
                                    #'argument:' 'GLPlanetDemoView'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   822
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   823
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   824
                                    #'label:' 'Teapot'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   825
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   826
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   827
                                    #'argument:' 'GLTeapotDemo'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   828
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   829
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   830
                                    #'label:' 'Logo'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   831
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   832
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   833
                                    #'argument:' 'Logo3DView1'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   834
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   835
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   836
                                    #'label:' 'Rubics Cube'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   837
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   838
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   839
                                    #'argument:' 'RubicsCubeView'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   840
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   841
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   842
                                    #'label:' 'X/Y Graph'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   843
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   844
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   845
                                    #'argument:' 'GLXYGraph'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   846
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   847
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   848
                                    #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   849
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   850
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   851
                                    #'label:' 'Cube (light)'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   852
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   853
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   854
                                    #'argument:' 'GLCubeDemoView2'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   855
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   856
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   857
                                    #'label:' 'Cube (light && texture)'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   858
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   859
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   860
                                    #'accessCharacterPosition:' 13
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   861
                                    #'argument:' 'GLBrickCubeDemoView'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   862
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   863
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   864
                                    #'label:' 'Sphere (light)'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   865
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   866
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   867
                                    #'argument:' 'GLSphereDemoView2'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   868
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   869
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   870
                                    #'label:' 'Colored Octahedron'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   871
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   872
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   873
                                    #'argument:' 'GLOctaHedronDemoView'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   874
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   875
                              ) nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   876
                              nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   877
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   878
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   879
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   880
                          #'label:' 'Graphic Editors'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   881
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   882
                          #'value:' #graphicEditors
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   883
                          #'submenu:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   884
                           #(#Menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   885
                              
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   886
                               #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   887
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   888
                                    #'label:' 'Draw Tool'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   889
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   890
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   891
                                    #'argument:' 'DrawTool'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   892
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   893
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   894
                                    #'label:' 'Logic Tool'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   895
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   896
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   897
                                    #'argument:' 'LogicTool'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   898
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   899
                                 #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   900
                                    #'label:' 'Paint Demo'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   901
                                    #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   902
                                    #'value:' #'openDemo:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   903
                                    #'argument:' 'ColorDrawDemo3'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   904
                                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   905
                              ) nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   906
                              nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   907
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   908
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   909
                    ) nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   910
                    nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   911
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   912
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   913
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   914
                #'label:' 'Help'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   915
                #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   916
                #'value:' #help
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   917
                #'accessCharacterPosition:' 1
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   918
                #'submenu:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   919
                 #(#Menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   920
                    
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   921
                     #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   922
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   923
                          #'label:' 'What''s New'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   924
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   925
                          #'value:' #startWhatsNewDocumentation
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   926
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   927
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   928
                          #'label:' 'Index'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   929
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   930
                          #'value:' #startDocumentationIndex
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   931
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   932
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   933
                          #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   934
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   935
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   936
                          #'label:' 'ST/X Online Documentation'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   937
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   938
                          #'value:' #startDocumentationTool
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   939
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   940
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   941
                          #'label:' 'Class Documentation'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   942
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   943
                          #'value:' #openClassDocumentation
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   944
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   945
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   946
                          #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   947
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   948
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   949
                          #'label:' 'Print Documentation ...'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   950
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   951
                          #'value:' #showBookPrintDocument
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   952
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   953
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   954
                          #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   955
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   956
                       #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   957
                          #'label:' 'Active Help'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   958
                          #'translateLabel:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   959
                          #'value:' #'activeHelp:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   960
                          #'indication:' #activeHelp
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   961
                      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   962
                    ) nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   963
                    nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   964
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   965
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   966
          ) nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   967
          nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   968
      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   969
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   970
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   971
menuToolbar
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   972
    "this window spec was automatically generated by the ST/X MenuEditor"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   973
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   974
    "do not manually edit this - the builder may not be able to
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   975
     handle the specification if its corrupted."
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   976
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   977
    "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   978
     MenuEditor new openOnClass:NewLauncher andSelector:#menuToolbar
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   979
     (Menu new fromLiteralArrayEncoding:(NewLauncher menuToolbar)) startUp
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   980
    "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   981
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   982
    <resource: #menu>
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   983
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   984
    ^
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   985
     
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   986
       #(#Menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   987
          
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   988
           #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   989
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   990
                #'label:' 'saveImage'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   991
                #'isButton:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   992
                #'value:' #saveImage
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   993
                #'labelImage:' #(#ResourceRetriever nil #saveIcon)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   994
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   995
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   996
                #'label:' 'garbageCollect'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   997
                #'isButton:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   998
                #'value:' #compressingGarbageCollect
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
   999
                #'labelImage:' #(#ResourceRetriever nil #garbageCollectIcon)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1000
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1001
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1002
                #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1003
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1004
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1005
                #'label:' 'open system browser'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1006
                #'isButton:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1007
                #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1008
                #'activeHelpKey:' #'#startSystemBrowser'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1009
                #'argument:' 'SystemBrowser'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1010
                #'labelImage:' #(#ResourceRetriever nil #startSystemBrowserIcon)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1011
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1012
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1013
                #'label:' 'open file browser'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1014
                #'isButton:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1015
                #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1016
                #'argument:' 'FileBrowser'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1017
                #'labelImage:' #(#ResourceRetriever nil #startFileBrowserIcon)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1018
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1019
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1020
                #'label:' 'open change browser'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1021
                #'isButton:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1022
                #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1023
                #'argument:' 'NewChangesBrowser'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1024
                #'labelImage:' #(#ResourceRetriever nil #startNewChangesBrowserIcon)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1025
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1026
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1027
                #'label:' 'open source code browser'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1028
                #'isButton:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1029
                #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1030
                #'argument:' 'SourceCodeBrowser'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1031
                #'labelImage:' #(#ResourceRetriever nil #startSourceCodeBrowserIcon)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1032
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1033
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1034
                #'label:' '-'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1035
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1036
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1037
                #'label:' 'open GUI Builder'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1038
                #'isButton:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1039
                #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1040
                #'argument:' 'UIPainter'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1041
                #'labelImage:' #(#ResourceRetriever nil #startGUIBuilderIcon)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1042
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1043
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1044
                #'label:' 'open menu editor'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1045
                #'isButton:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1046
                #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1047
                #'argument:' 'MenuEditor'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1048
                #'labelImage:' #(#ResourceRetriever nil #startMenuEditorIcon)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1049
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1050
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1051
                #'label:' 'open image editor'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1052
                #'isButton:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1053
                #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1054
                #'argument:' 'ImageEditor'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1055
                #'labelImage:' #(#ResourceRetriever nil #startImageEditorIcon)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1056
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1057
          ) nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1058
          nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1059
      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1060
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1061
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1062
menuToolbarForProjects
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1063
    "this window spec was automatically generated by the ST/X MenuEditor"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1064
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1065
    "do not manually edit this - the builder may not be able to
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1066
     handle the specification if its corrupted."
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1067
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1068
    "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1069
     MenuEditor new openOnClass:NewLauncher andSelector:#menuToolbarForProjects
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1070
     (Menu new fromLiteralArrayEncoding:(NewLauncher menuToolbarForProjects)) startUp
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1071
    "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1072
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1073
    <resource: #menu>
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1074
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1075
    ^
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1076
     
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1077
       #(#Menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1078
          
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1079
           #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1080
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1081
                #'label:' 'newProject'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1082
                #'value:' #newProject
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1083
                #'labelImage:' #(#ResourceRetriever nil #newIcon)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1084
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1085
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1086
                #'label:' 'removeProject'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1087
                #'value:' #removeProject
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1088
                #'labelImage:' #(#ResourceRetriever nil #removeIcon)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1089
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1090
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1091
                #'label:' 'loadProject'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1092
                #'value:' #loadProject
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1093
                #'labelImage:' #(#ResourceRetriever nil #loadIcon)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1094
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1095
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1096
                #'label:' 'saveProject'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1097
                #'value:' #saveProject
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1098
                #'labelImage:' #(#ResourceRetriever nil #saveIcon)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1099
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1100
             #(#MenuItem
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1101
                #'label:' 'startProjectBuilder'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1102
                #'value:' #'openApplication:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1103
                #'argument:' 'ProjectBuilder'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1104
                #'labelImage:' #(#ResourceRetriever nil #startProjectBuilderIcon)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1105
            )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1106
          ) nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1107
          nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1108
      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1109
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1110
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1111
windowSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1112
    "this window spec was automatically generated by the ST/X UIPainter"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1113
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1114
    "do not manually edit this - the painter/builder may not be able to
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1115
     handle the specification if its corrupted."
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1116
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1117
    "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1118
     UIPainter new openOnClass:NewLauncher andSelector:#windowSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1119
     NewLauncher new openInterface:#windowSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1120
    "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1121
    "NewLauncher open"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1122
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1123
    <resource: #canvas>
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1124
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1125
    ^
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1126
     
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1127
       #(#FullSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1128
          #'window:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1129
           #(#WindowSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1130
              #'name:' 'Smalltalk/X'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1131
              #'layout:' #(#LayoutFrame 272 0 262 0 691 0 485 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1132
              #'label:' 'Smalltalk/X'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1133
              #'min:' #(#Point 420 220)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1134
              #'max:' #(#Point 1152 900)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1135
              #'bounds:' #(#Rectangle 272 262 692 486)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1136
              #'menu:' #menu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1137
              #'usePreferredExtent:' false
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1138
          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1139
          #'component:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1140
           #(#SpecCollection
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1141
              #'collection:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1142
               #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1143
                 #(#MenuPanelSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1144
                    #'name:' 'menuToolbarView'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1145
                    #'layout:' #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1146
                    #'menu:' #menuToolbar
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1147
                    #'style:' #(#FontDescription #helvetica #medium #roman 10)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1148
                    #'showSeparatingLines:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1149
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1150
                 #(#ArbitraryComponentSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1151
                    #'name:' 'transcriptView'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1152
                    #'layout:' #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -22 1.0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1153
                    #'hasHorizontalScrollBar:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1154
                    #'hasVerticalScrollBar:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1155
                    #'miniScrollerHorizontal:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1156
                    #'component:' #TextCollector
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1157
                    #'hasBorder:' false
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1158
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1159
                 #(#LabelSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1160
                    #'name:' 'infoLabel'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1161
                    #'layout:' #(#LayoutFrame 0 0.0 -22 1.0 -80 1.0 0 1.0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1162
                    #'style:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1163
                     #(#Font
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1164
                        'helvetica' 'medium'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1165
                        'roman' 12
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1166
                    )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1167
                    #'labelChannel:' #valueOfInfoLabel
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1168
                    #'level:' 1
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1169
                    #'adjust:' #left
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1170
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1171
                 #(#LabelSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1172
                    #'name:' 'timeLabel'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1173
                    #'layout:' #(#LayoutFrame -80 1 -22 1 0 1.0 0 1.0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1174
                    #'labelChannel:' #valueOfTimeLabel
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1175
                    #'level:' 1
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1176
                    #'adjust:' #right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1177
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1178
              )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1179
          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1180
      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1181
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1182
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1183
windowSpecForApplicationSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1184
    "this window spec was automatically generated by the ST/X UIPainter"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1185
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1186
    "do not manually edit this - the painter/builder may not be able to
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1187
     handle the specification if its corrupted."
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1188
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1189
    "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1190
     UIPainter new openOnClass:NewLauncher andSelector:#windowSpecForApplicationSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1191
     NewLauncher new openInterface:#windowSpecForApplicationSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1192
    "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1193
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1194
    <resource: #canvas>
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1195
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1196
    ^
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1197
     
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1198
       #(#FullSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1199
          #'window:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1200
           #(#WindowSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1201
              #'name:' 'Application Builder'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1202
              #'layout:' #(#LayoutFrame 86 0 180 0 506 0 782 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1203
              #'label:' 'Application Builder'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1204
              #'min:' #(#Point 420 220)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1205
              #'max:' #(#Point 1152 900)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1206
              #'bounds:' #(#Rectangle 86 180 507 783)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1207
              #'usePreferredExtent:' false
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1208
          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1209
          #'component:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1210
           #(#SpecCollection
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1211
              #'collection:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1212
               #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1213
                 #(#LabelSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1214
                    #'name:' 'applicationNameLabel'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1215
                    #'layout:' #(#LayoutFrame 4 0 4 0 130 0 26 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1216
                    #'label:' 'Application Name:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1217
                    #'adjust:' #right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1218
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1219
                 #(#InputFieldSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1220
                    #'name:' 'applicationNameInputField'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1221
                    #'layout:' #(#LayoutFrame 140 0 4 0 -4 1 26 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1222
                    #'model:' #valueOfApplicationName
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1223
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1224
                 #(#LabelSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1225
                    #'name:' 'startupClassLabel'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1226
                    #'layout:' #(#LayoutFrame 4 0 28 0 130 0 50 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1227
                    #'label:' 'Startup Class:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1228
                    #'adjust:' #right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1229
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1230
                 #(#InputFieldSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1231
                    #'name:' 'startupClassInputField'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1232
                    #'layout:' #(#LayoutFrame 140 0 28 0 -4 1.0 50 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1233
                    #'model:' #valueOfStartupClass
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1234
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1235
                 #(#LabelSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1236
                    #'name:' 'startupSelectorLabel'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1237
                    #'layout:' #(#LayoutFrame 4 0 52 0 130 0 74 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1238
                    #'label:' 'Startup Selector:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1239
                    #'adjust:' #right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1240
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1241
                 #(#InputFieldSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1242
                    #'name:' 'startupSelectorInputField'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1243
                    #'layout:' #(#LayoutFrame 140 0 52 0 -4 1.0 74 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1244
                    #'model:' #valueOfStartupSelector
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1245
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1246
                 #(#LabelSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1247
                    #'name:' 'targetDirectoryLabel'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1248
                    #'layout:' #(#LayoutFrame 4 0 130 0 130 0 152 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1249
                    #'label:' 'Target Directory:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1250
                    #'adjust:' #right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1251
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1252
                 #(#InputFieldSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1253
                    #'name:' 'targetDirectoryInputField'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1254
                    #'layout:' #(#LayoutFrame 140 0 130 0 -4 1.0 152 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1255
                    #'model:' #valueOfTargetDirectory
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1256
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1257
                 #(#LabelSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1258
                    #'name:' 'buildDateLabel'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1259
                    #'layout:' #(#LayoutFrame 4 0 76 0 130 0 98 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1260
                    #'label:' 'Build Date:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1261
                    #'adjust:' #right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1262
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1263
                 #(#InputFieldSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1264
                    #'name:' 'buildDateInputField'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1265
                    #'layout:' #(#LayoutFrame 140 0 76 0 -4 1.0 98 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1266
                    #'model:' #valueOfBuildDate
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1267
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1268
                 #(#LabelSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1269
                    #'name:' 'configurationLabel'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1270
                    #'layout:' #(#LayoutFrame 4 0 100 0 130 0 122 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1271
                    #'label:' 'Configuration:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1272
                    #'adjust:' #right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1273
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1274
                 #(#InputFieldSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1275
                    #'name:' 'configurationInputField'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1276
                    #'layout:' #(#LayoutFrame 140 0 100 0 -4 1.0 122 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1277
                    #'model:' #valueOfConfiguration
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1278
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1279
                 #(#LabelSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1280
                    #'name:' 'startupModulLabel'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1281
                    #'layout:' #(#LayoutFrame 4 0 178 0 130 0 200 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1282
                    #'label:' 'Startup Modul:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1283
                    #'adjust:' #right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1284
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1285
                 #(#InputFieldSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1286
                    #'name:' 'startupModulInputField'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1287
                    #'layout:' #(#LayoutFrame 140 0 178 0 -4 1.0 200 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1288
                    #'model:' #valueOfStartupModule
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1289
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1290
                 #(#InputFieldSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1291
                    #'name:' 'topDirectoryInputField'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1292
                    #'layout:' #(#LayoutFrame 140 0 154 0 -4 1.0 176 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1293
                    #'model:' #valueOfTopDirectory
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1294
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1295
                 #(#LabelSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1296
                    #'name:' 'topDirectoryLabel'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1297
                    #'layout:' #(#LayoutFrame 4 0 154 0 130 0 176 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1298
                    #'label:' 'Top Directory:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1299
                    #'adjust:' #right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1300
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1301
                 #(#LabelSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1302
                    #'name:' 'librariesLabel'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1303
                    #'layout:' #(#LayoutFrame 3 0 208 0 129 0 230 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1304
                    #'label:' 'System Libraries:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1305
                    #'adjust:' #right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1306
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1307
                 #(#ViewSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1308
                    #'name:' 'view2'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1309
                    #'layout:' #(#LayoutFrame 0 0.0 -44 1 0 1.0 0 1.0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1310
                    #'component:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1311
                     #(#SpecCollection
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1312
                        #'collection:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1313
                         #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1314
                           #(#ActionButtonSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1315
                              #'name:' 'buildButton'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1316
                              #'layout:' #(#LayoutFrame 10 0.5 10 0 -10 1 -10 1)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1317
                              #'label:' 'Build'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1318
                              #'model:' #buildApplication
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1319
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1320
                           #(#ActionButtonSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1321
                              #'name:' 'closeButton'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1322
                              #'layout:' #(#LayoutFrame 10 0.0 10 0 -10 0.5 -10 1)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1323
                              #'label:' 'Close'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1324
                              #'model:' #accept
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1325
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1326
                        )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1327
                    )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1328
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1329
                 #(#DividerSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1330
                    #'name:' 'divider1'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1331
                    #'layout:' #(#LayoutFrame 0 0 202 0 0 1 205 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1332
                    #'orientation:' #horizontal
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1333
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1334
                 #(#DividerSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1335
                    #'name:' 'divider3'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1336
                    #'layout:' #(#LayoutFrame 0 0 124 0 0 1 127 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1337
                    #'orientation:' #horizontal
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1338
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1339
                 #(#FramedBoxSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1340
                    #'name:' 'framedBox1'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1341
                    #'layout:' #(#LayoutFrame 0 0 281 0 0 0.5 -44 1)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1342
                    #'component:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1343
                     #(#SpecCollection
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1344
                        #'collection:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1345
                         #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1346
                           #(#CheckBoxSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1347
                              #'name:' 'librunCheckBox'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1348
                              #'layout:' #(#LayoutFrame 10 0 22 0 10 0.5 44 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1349
                              #'initiallyDisabled:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1350
                              #'model:' #valueOfDefaultLibs
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1351
                              #'label:' 'librun'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1352
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1353
                           #(#CheckBoxSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1354
                              #'name:' 'libbasicCheckBox'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1355
                              #'layout:' #(#LayoutFrame 10 0 48 0 10 0.5 70 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1356
                              #'initiallyDisabled:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1357
                              #'model:' #valueOfDefaultLibs
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1358
                              #'label:' 'libbasic'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1359
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1360
                           #(#CheckBoxSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1361
                              #'name:' 'libbasic2CheckBox'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1362
                              #'layout:' #(#LayoutFrame 10 0 74 0 10 0.5 96 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1363
                              #'initiallyDisabled:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1364
                              #'model:' #valueOfDefaultLibs
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1365
                              #'label:' 'libbasic2'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1366
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1367
                           #(#CheckBoxSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1368
                              #'name:' 'libbasic3CheckBox'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1369
                              #'layout:' #(#LayoutFrame 10 0 100 0 10 1 122 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1370
                              #'initiallyDisabled:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1371
                              #'model:' #valueOfDefaultLibs
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1372
                              #'label:' 'libbasic3'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1373
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1374
                           #(#CheckBoxSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1375
                              #'name:' 'libviewCheckBox'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1376
                              #'layout:' #(#LayoutFrame 10 0 126 0 10 1 148 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1377
                              #'initiallyDisabled:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1378
                              #'model:' #valueOfDefaultLibs
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1379
                              #'label:' 'libview'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1380
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1381
                           #(#CheckBoxSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1382
                              #'name:' 'libview2CheckBox'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1383
                              #'layout:' #(#LayoutFrame 10 0 152 0 10 1 174 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1384
                              #'initiallyDisabled:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1385
                              #'model:' #valueOfDefaultLibs
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1386
                              #'label:' 'libview2'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1387
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1388
                           #(#CheckBoxSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1389
                              #'name:' 'ObjectFileLoaderCheckBox'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1390
                              #'layout:' #(#LayoutFrame 10 0 178 0 10 1 202 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1391
                              #'initiallyDisabled:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1392
                              #'model:' #valueOfDefaultLibs
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1393
                              #'label:' 'ObjectFileLoader'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1394
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1395
                           #(#CheckBoxSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1396
                              #'name:' 'GLXWorkstationCheckBox'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1397
                              #'layout:' #(#LayoutFrame 10 0 232 0 10 1 254 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1398
                              #'initiallyDisabled:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1399
                              #'model:' #valueOfDefaultLibs
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1400
                              #'label:' 'GLXWorkstation'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1401
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1402
                           #(#CheckBoxSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1403
                              #'name:' 'XWorkstationCheckBox'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1404
                              #'layout:' #(#LayoutFrame 10 0 206 0 10 1 228 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1405
                              #'initiallyDisabled:' true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1406
                              #'model:' #valueOfDefaultLibs
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1407
                              #'label:' 'XWorkstation'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1408
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1409
                        )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1410
                    )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1411
                    #'label:' 'Basics'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1412
                    #'labelPosition:' #topLeft
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1413
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1414
                 #(#FramedBoxSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1415
                    #'name:' 'framedBox2'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1416
                    #'layout:' #(#LayoutFrame 0 0.5 281 0 0 1 392 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1417
                    #'component:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1418
                     #(#SpecCollection
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1419
                        #'collection:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1420
                         #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1421
                           #(#CheckBoxSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1422
                              #'name:' 'libwidgCheckBox'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1423
                              #'layout:' #(#LayoutFrame 10 0 22 0 10 1 44 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1424
                              #'model:' #valueOfLibwidg
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1425
                              #'label:' 'libwidg'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1426
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1427
                           #(#CheckBoxSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1428
                              #'name:' 'libwidg2CheckBox'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1429
                              #'layout:' #(#LayoutFrame 10 0 48 0 10 1 70 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1430
                              #'model:' #valueOfLibwidg2
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1431
                              #'label:' 'libwidg2'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1432
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1433
                           #(#CheckBoxSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1434
                              #'name:' 'libuiCheckBox'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1435
                              #'layout:' #(#LayoutFrame 10 0 74 0 10 1 96 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1436
                              #'model:' #valueOfLibui
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1437
                              #'label:' 'libui'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1438
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1439
                        )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1440
                    )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1441
                    #'label:' 'UI'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1442
                    #'labelPosition:' #topLeft
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1443
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1444
                 #(#FramedBoxSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1445
                    #'name:' 'framedBox3'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1446
                    #'layout:' #(#LayoutFrame 0 0.5 392 0 0 1 -44 1)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1447
                    #'component:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1448
                     #(#SpecCollection
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1449
                        #'collection:' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1450
                         #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1451
                           #(#CheckBoxSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1452
                              #'name:' 'libtoolCheckBox'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1453
                              #'layout:' #(#LayoutFrame 10 0 22 0 10 1 44 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1454
                              #'model:' #valueOfLibtool
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1455
                              #'label:' 'libtool'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1456
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1457
                           #(#CheckBoxSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1458
                              #'name:' 'libtool2CheckBox'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1459
                              #'layout:' #(#LayoutFrame 10 0 48 0 10 1 70 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1460
                              #'model:' #valueOfLibtool2
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1461
                              #'label:' 'libtool2'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1462
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1463
                           #(#CheckBoxSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1464
                              #'name:' 'libcompCheckBox'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1465
                              #'layout:' #(#LayoutFrame 10 0 74 0 10 1 96 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1466
                              #'model:' #valueOfLibcomp
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1467
                              #'label:' 'libcomp'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1468
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1469
                           #(#CheckBoxSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1470
                              #'name:' 'libhtmlCheckBox'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1471
                              #'layout:' #(#LayoutFrame 10 0 100 0 10 1 122 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1472
                              #'model:' #valueOfLibhtml
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1473
                              #'label:' 'libhtml'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1474
                          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1475
                        )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1476
                    )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1477
                    #'label:' 'Optional'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1478
                    #'labelPosition:' #topLeft
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1479
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1480
                 #(#LabelSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1481
                    #'name:' 'userLibrariesLabel'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1482
                    #'layout:' #(#LayoutFrame 3 0 232 0 129 0 254 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1483
                    #'label:' 'User Libraries:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1484
                    #'adjust:' #right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1485
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1486
                 #(#InputFieldSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1487
                    #'name:' 'userLibrariesInputField'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1488
                    #'layout:' #(#LayoutFrame 139 0 233 0 -5 1.0 255 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1489
                    #'model:' #valueOfUserLibraries
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1490
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1491
                 #(#LabelSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1492
                    #'name:' 'label1'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1493
                    #'layout:' #(#LayoutFrame 3 0 256 0 129 0 278 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1494
                    #'label:' 'ST/X Libraries:'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1495
                    #'adjust:' #right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1496
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1497
                 #(#InputFieldSpec
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1498
                    #'name:' 'systemLibrariesInputField'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1499
                    #'layout:' #(#LayoutFrame 139 0 208 0 -5 1.0 230 0)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1500
                    #'model:' #valueOfSystemLibraries
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1501
                )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1502
              )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1503
          )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1504
      )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1505
! !
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1506
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1507
!NewLauncher methodsFor:'accessing - menu'!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1508
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1509
mode: aValue
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1510
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1511
    ^mode = aValue
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1512
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1513
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1514
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1515
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1516
mode: aValue value: dummy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1517
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1518
    mode := aValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1519
    (builder componentAt: mode asSymbol) raise
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1520
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1521
! !
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1522
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1523
!NewLauncher methodsFor:'action - application building'!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1524
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1525
buildApplication
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1526
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1527
    |dir compilerPath compilerFlags|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1528
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1529
    Transcript showCR: (Text string: 'Starting building of application...' color: Color blue); cr.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1530
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1531
    (dir := self getApplicationDirectory) isNil ifTrue: [^self warn: 'Could not create application directory!!'].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1532
    (compilerPath := ByteCodeCompiler ccPath, ' ') isNil ifTrue: [^self warn:'Define first a system compiler!!'].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1533
    compilerFlags := self getCompilerFlags.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1534
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1535
    (self generateHFileWithSymbolsIn: dir) isNil ifTrue: [^self warn:'Could not generate h-file with symbols!!'].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1536
    (self generateCFileWithModulesIn: dir) isNil ifTrue: [^self warn:'Select first some libraries!!'].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1537
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1538
    (self compileModulListFileWith: compilerPath, compilerFlags inDirectory: dir) isNil ifTrue: [^self warn:'Could not compile modules file!!'].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1539
    (self compileStartupFileWith: compilerPath, compilerFlags inDirectory: dir) isNil ifTrue: [^self warn:'Could not compile startup file!!']. 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1540
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1541
    self defineSymbolicLinksToTheLibrariesIn: dir.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1542
    self linkLibrariesToTheApplicationIn: dir. 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1543
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1544
    Transcript showCR: (Text string: 'Application build.' color: Color blue); cr.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1545
    Display beep.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1546
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1547
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1548
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1549
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1550
compileModulListFileWith: ccPathAndFlags inDirectory: dir
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1551
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1552
    |command|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1553
    command := ccPathAndFlags , ' -c -fPIC -O6 -fomit-frame-pointer -m486 -DDEBUG -Di386 ',
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1554
        'modulList.c'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1555
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1556
    Transcript cr; showCR: (Text string: 'Starting compilation of modules init file...' color: Color yellow).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1557
    self executeCommand: command inDirectory: dir.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1558
    Transcript showCR: (Text string: 'Modules init file compiled.' color: Color yellow); cr.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1559
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1560
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1561
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1562
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1563
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1564
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1565
compileStartupFileWith: ccPathAndFlags inDirectory: appDir
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1566
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1567
    |startupFile command|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1568
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1569
    (startupFile := self valueOfTopDirectory value asFilename construct: self valueOfStartupModule value) exists ifFalse: [^nil].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1570
    startupFile copyTo: (startupFile := appDir asFilename construct: self valueOfStartupModule value asFilename baseName).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1571
    command := ccPathAndFlags , ' -o main.o -c -O -O6 -fomit-frame-pointer -m486 -DDEBUG -Di386 ',
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1572
        '-DSTARTUP_CLASS="\"', self valueOfStartupClass value, '\"" ',
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1573
        '-DSTARTUP_SELECTOR="\"', self valueOfStartupSelector value, '\"" ',
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1574
        '-DCONFIGURATION_STRING="\"', self valueOfConfiguration value, '\"" ',
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1575
        '-DBUILD_DATE="\"', self valueOfBuildDate value, '\"" ',
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1576
        startupFile name.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1577
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1578
    Transcript cr; showCR: (Text string: 'Starting compilation of startup file...' color: Color yellow).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1579
    self executeCommand: command inDirectory: appDir.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1580
    Transcript showCR: (Text string: 'Startup file compiled.' color: Color yellow); cr.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1581
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1582
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1583
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1584
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1585
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1586
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1587
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1588
defineSymbolicLinksToTheLibrariesIn: dir
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1589
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1590
    Transcript cr; showCR: (Text string: 'Starting defining of symbolic links to the libraries...' color: Color green).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1591
    self selectionOfLibraries value , (Array with: 'librun')do:
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1592
    [:lib|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1593
        self executeCommand: 'ln -s ', ((self valueOfTopDirectory value asFilename construct: 'lib') construct: (lib, '.so ')) name , (lib, '.so') inDirectory: dir.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1594
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1595
    Transcript showCR: (Text string: 'Symbolic links to the libraries defined.' color: Color green); cr.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1596
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1597
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1598
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1599
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1600
executeCommand: aCommand inDirectory: dir
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1601
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1602
    |outStream|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1603
    Transcript showCR: 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1604
        (Text string: 'Execute: "' color: Color yellow), 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1605
        (Text string: aCommand color: Color white), 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1606
        (Text string: '" in directory: "' color: Color yellow), 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1607
        (Text string: dir color: Color white),
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1608
        (Text string: '"' color: Color yellow).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1609
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1610
    outStream:= PipeStream readingFrom: aCommand errorDisposition:#inline inDirectory: dir.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1611
    [      
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1612
        outStream canReadWithoutBlocking
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1613
        ifTrue:
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1614
        [
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1615
            outStream readWait.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1616
            Transcript showCR: (Text string: (outStream upTo: Character cr) color: Color red).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1617
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1618
    ] doWhile:[outStream atEnd not].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1619
    outStream close
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1620
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1621
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1622
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1623
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1624
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1625
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1626
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1627
generateCFileWithModulesIn: dir
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1628
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1629
    |selectionOfLibraries|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1630
    selectionOfLibraries := self selectionOfLibraries remove: #librun; yourself.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1631
    Transcript cr; showCR: (Text string: 'Starting generation of c-file with modules...' color: Color green).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1632
    self executeCommand: 'echo "#include <stcIntern.h>" > modulList.c' inDirectory: dir.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1633
    self executeCommand: 'echo "typedef void (*vf)();" >> modulList.c' inDirectory: dir.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1634
    selectionOfLibraries do:
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1635
    [:lib|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1636
        self executeCommand: 'echo "extern void _', lib, '_Init();" >> modulList.c' inDirectory: dir.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1637
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1638
    self executeCommand: 'echo "static vf modules[] = {" >> modulList.c' inDirectory: dir.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1639
    selectionOfLibraries do:
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1640
    [:lib|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1641
        self executeCommand: 'echo "_', lib, '_Init," >> modulList.c' inDirectory: dir.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1642
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1643
    self executeCommand: 'echo "(vf)0};" >> modulList.c' inDirectory: dir.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1644
    self executeCommand: 'echo "vf *__modules__ = modules;" >> modulList.c' inDirectory: dir.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1645
    Transcript showCR: (Text string: 'C-file of modules generated.' color: Color green); cr.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1646
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1647
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1648
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1649
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1650
generateHFileWithSymbolsIn: dir
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1651
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1652
    |symbolsFile realInc|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1653
    ByteCodeCompiler stcCompilationIncludes asArrayOfSubstrings do:
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1654
    [:inc|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1655
        realInc := inc readStream.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1656
        realInc upTo: $/. 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1657
        realInc := '/', realInc upToEnd.      
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1658
        (symbolsFile := realInc asFilename construct: 'symbols.stc') exists
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1659
        ifTrue:
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1660
        [   
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1661
            "A guck o mol, i honds gfunda"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1662
            Transcript cr; showCR: (Text string: 'Starting generation of h-file with symbols...' color: Color green).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1663
            self executeCommand: 'echo "char *__symbols[] = {" > symbols.h' inDirectory: dir.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1664
            self executeCommand: 'sed ''s/^/"/'' < ', symbolsFile name,' | sed ''s/$/",/'' | sed ''s/\\/\\\\/g'' >> symbols.h' inDirectory: dir.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1665
            self executeCommand: 'echo "0 };" >> symbols.h' inDirectory: dir.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1666
            Transcript showCR: (Text string: 'H-file of symbols generated.' color: Color green); cr.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1667
            ^self
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1668
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1669
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1670
    ^nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1671
                                       
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1672
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1673
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1674
getApplicationDirectory
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1675
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1676
    |appDir|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1677
    (appDir := self valueOfTargetDirectory value asFilename) exists ifFalse:[appDir makeDirectory].   
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1678
    (appDir isReadable and:[appDir isWritable])
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1679
    ifFalse:
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1680
    [
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1681
        ^nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1682
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1683
    ^appDir name
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1684
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1685
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1686
getCompilerFlags
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1687
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1688
    |compilerFlags|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1689
    compilerFlags := OperatingSystem getOSDefine ? ''.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1690
    ByteCodeCompiler stcCompilationDefines notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1691
        compilerFlags := compilerFlags , ' ' , ByteCodeCompiler stcCompilationDefines
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1692
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1693
    ByteCodeCompiler stcCompilationIncludes notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1694
        compilerFlags := compilerFlags , ' ' , ByteCodeCompiler stcCompilationIncludes.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1695
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1696
    ByteCodeCompiler ccCompilationOptions notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1697
        compilerFlags := compilerFlags , ' ' , ByteCodeCompiler ccCompilationOptions
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1698
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1699
    ^compilerFlags
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1700
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1701
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1702
linkLibrariesToTheApplicationIn: appDir
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1703
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1704
    |mainFile command libs|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1705
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1706
    libs := self selectionOfLibraries value collect: [:lib| lib, '.so '].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1707
    libs add: 'librun.so'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1708
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1709
    command := ByteCodeCompiler ccPath, 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1710
        ' -L/usr/X11/lib -Llib -Lbinary -L. -L/usr/local/lib -L/usr/lib -L/lib ',
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1711
        '-lm -ldl -lXext -lX11 ',
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1712
        ' -o ' , self valueOfApplicationName value,
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1713
        ' modulList.o main.o ',
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1714
        ((libs, self valueOfSystemLibraries value asArrayOfSubstrings) asStringCollection asStringWith: $ ).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1715
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1716
    Transcript cr; showCR: (Text string: 'Starting linking of libraries to the application...' color: Color yellow).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1717
    self executeCommand: command inDirectory: appDir.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1718
    Transcript showCR: (Text string: 'Libraries to the application linked.' color: Color yellow); cr.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1719
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1720
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1721
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1722
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1723
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1724
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1725
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1726
selectionOfLibraries
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1727
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1728
    |selectionOfLibraries|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1729
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1730
    selectionOfLibraries := OrderedCollection new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1731
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1732
    selectionOfLibraries addAll: #(librun libbasic libbasic2 libbasic3 libview libview2 ObjectFileLoader XWorkstation GLXWorkstation).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1733
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1734
    self valueOfLibwidg value ifTrue: [selectionOfLibraries add: #libwidg].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1735
    self valueOfLibwidg2 value ifTrue: [selectionOfLibraries add: #libwidg2].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1736
    self valueOfLibui value ifTrue: [selectionOfLibraries add: #libui].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1737
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1738
    self valueOfLibtool value ifTrue: [selectionOfLibraries add: #libtool].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1739
    self valueOfLibtool2 value ifTrue: [selectionOfLibraries add: #libtool2].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1740
    self valueOfLibcomp value ifTrue: [selectionOfLibraries add: #libcomp].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1741
    self valueOfLibhtml value ifTrue: [selectionOfLibraries add: #libhtml].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1742
     
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1743
    selectionOfLibraries addAll: self valueOfUserLibraries value asArrayOfSubstrings.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1744
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1745
    ^selectionOfLibraries
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1746
! !
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1747
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1748
!NewLauncher methodsFor:'action - classes'!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1749
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1750
browseAllBreakAndTracePoints
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1751
    "open a browser showing all breakPointed/traced methods
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1752
     (but, to get rid of them, there is also a menu itme to remove them all)"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1753
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1754
    SystemBrowser browseMethods: WrappedMethod allInstances title:'all breakPointed/traced methods'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1755
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1756
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1757
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1758
browseImplementors
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1759
    "open an implementors- browser after asking for a selector"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1760
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1761
    |enterBox selector|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1762
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1763
    enterBox := EnterBox 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1764
                    title:(resources at:'Browse implementors of:') withCRs
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1765
                    okText:(resources at:'browse')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1766
                    action:[:acceptedString | selector := acceptedString].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1767
    enterBox showAtPointer.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1768
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1769
    selector notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1770
        self withWaitCursorDo:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1771
            SystemBrowser browseImplementorsOf:selector
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1772
        ]  
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1773
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1774
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1775
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1776
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1777
browseResources
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1778
    "open a resource- browser after asking for a resource string"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1779
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1780
    |box resourceHolder valueHolder component rsrc value t anyString|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1781
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1782
    anyString := resources string:'* any *'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1783
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1784
    resourceHolder := ValueHolder newString.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1785
    valueHolder := '*' asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1786
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1787
    box := DialogBox new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1788
    box label:(resources at:'Resource search:').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1789
    component := box addTextLabel:(resources at:'Search for methods which contain a\particular resource specification') withCRs.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1790
    component adjust:#left.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1791
    box addVerticalSpace:10.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1792
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1793
    component := box addTextLabel:(resources at:'Resource symbol (empty for any; no matchPattern allowed):') withCRs.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1794
    component adjust:#left.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1795
    component :=  box addComboBoxOn:resourceHolder tabable:true.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1796
    component list:((Array with:anyString) , #('canvas' 'menu' 'keyboard' 'style' 'image' 'programMenu' nil 'needsFix')).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1797
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1798
    component := box addTextLabel:(resources at:'Resource value (* for any; matchPattern is allowed):') withCRs.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1799
    component adjust:#left.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1800
    box addInputFieldOn:valueHolder tabable:true.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1801
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1802
    box addVerticalSpace:10.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1803
    box addHelpButtonFor:'programming/language.html#RESOURCEDEFS'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1804
    box addAbortButton; addOkButton.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1805
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1806
    box showAtPointer.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1807
    box destroy.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1808
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1809
    box accepted ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1810
        rsrc := resourceHolder value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1811
        value := valueHolder value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1812
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1813
        (rsrc isNil or:[rsrc isEmpty or:[rsrc = '*' or:[rsrc = anyString]]]) ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1814
            t := 'methods with any resource'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1815
            rsrc := nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1816
        ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1817
            t := 'methods with #' , rsrc , '-resource'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1818
            rsrc := rsrc withoutSeparators asSymbol
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1819
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1820
        (value isNil or:[value isEmpty or:[value = '*']]) ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1821
            t := t , ' and any value'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1822
            value := nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1823
        ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1824
            t := t , ' and value ' , value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1825
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1826
        self withWaitCursorDo:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1827
            SystemBrowser browseForResource:rsrc
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1828
                          containing:value
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1829
                          in:(Smalltalk allClasses)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1830
                          title:t
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1831
        ]  
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1832
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1833
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1834
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1835
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1836
browseSenders
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1837
    "open a senders- browser after asking for a selector"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1838
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1839
    |enterBox selector|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1840
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1841
    enterBox := EnterBox 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1842
                    title:(resources at:'Browse senders of:') withCRs
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1843
                    okText:(resources at:'browse')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1844
                    action:[:acceptedString | selector := acceptedString].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1845
    enterBox showAtPointer.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1846
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1847
    selector notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1848
        self withWaitCursorDo:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1849
            SystemBrowser browseAllCallsOn:selector
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1850
        ]  
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1851
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1852
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1853
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1854
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1855
browseUndeclared
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1856
    "open a browser on methods refering to undeclared variables"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1857
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1858
    self withWaitCursorDo:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1859
        SystemBrowser 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1860
            browseReferendsOf:(Smalltalk underclaredPrefix , '*')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1861
            title:(resources string:'references to undeclared variables')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1862
            warnIfNone:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1863
    ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1864
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1865
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1866
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1867
startClassBrowser
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1868
    "open a classBrowser; asks for class"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1869
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1870
    SystemBrowser askThenBrowseClass
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1871
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1872
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1873
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1874
startClassHierarchyBrowser
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1875
    "open a classHierarchyBrowser; asks for class"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1876
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1877
    SystemBrowser askThenBrowseClassHierarchy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1878
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1879
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1880
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1881
startFullClassBrowser
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1882
    "open a fullClass systemBrowser; asks for class"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1883
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1884
    SystemBrowser askThenBrowseFullClassProtocol
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1885
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1886
! !
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1887
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1888
!NewLauncher methodsFor:'action - demos'!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1889
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1890
openDemo:className
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1891
    "open a demo, given its name.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1892
     Looks in both the Smalltalk- and the Demos-Namespace
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1893
     for that class."
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1894
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1895
    self openApplication:className nameSpace:Demos
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1896
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1897
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1898
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1899
startTicTacToe2
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1900
    "opens a 2-user ticTacToe game"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1901
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1902
    self openApplication:'TicTacToeGame' nameSpace:Games with:#open2UserGame
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1903
! !
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1904
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1905
!NewLauncher methodsFor:'action - file'!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1906
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1907
exit
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1908
    "saves a snapshot image and exits, after asking for a fileName"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1909
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1910
    |fileName saveAndExit box|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1911
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1912
    box := EnterBox2 title:'Save image before exiting?' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1913
        okText:'No' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1914
        abortText:'Cancel'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1915
        action:[:str|saveAndExit := false].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1916
    box label: 'Exiting ST/X'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1917
    box initialText: ObjectMemory nameForSnapshot.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1918
    box okText2:'OK' action2:[:str|fileName := str. saveAndExit := true]; showAtPointer.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1919
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1920
    saveAndExit notNil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1921
    ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1922
        saveAndExit
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1923
        ifTrue:
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1924
        [
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1925
            self saveImageAs: fileName
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1926
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1927
        Smalltalk exit
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1928
    ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1929
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1930
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1931
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1932
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1933
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1934
objectModuleDialog
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1935
    "opens a moduleInfo dialog"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1936
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1937
    |allModules moduleNames
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1938
     allObjects methodObjects methodNames 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1939
     cObjects cObjectNames
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1940
     otherObjects otherObjectNames
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1941
     box l handles unloadButton
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1942
     list1 list2 listView1 listView2
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1943
     y panel 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1944
     showBuiltIn showModules showMethods showCObjects showOthers
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1945
     moduleListUpdater check canDoIt menu|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1946
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1947
    showBuiltIn := true asValue. 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1948
    canDoIt := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1949
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1950
    showModules := canDoIt asValue. 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1951
    showMethods := canDoIt asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1952
    showCObjects := canDoIt asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1953
    showOthers := canDoIt asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1954
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1955
    list1 := SelectionInList new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1956
    list2 := SelectionInList new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1957
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1958
    moduleListUpdater := [
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1959
            |l|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1960
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1961
            list2 list:nil.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1962
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1963
            l := Array new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1964
            handles := Array new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1965
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1966
            (showModules value or:[showBuiltIn value]) ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1967
                allModules := ObjectMemory binaryModuleInfo asOrderedCollection.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1968
                (showBuiltIn value and:[showModules value]) ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1969
                    allModules := allModules select:[:i |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1970
                        |wantToSee|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1971
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1972
                        wantToSee := i dynamic.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1973
                        showBuiltIn value ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1974
                            wantToSee := wantToSee not
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1975
                        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1976
                        wantToSee
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1977
                    ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1978
                ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1979
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1980
                "/ sorting by reverse id brings newest ones to the top (a side effect)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1981
                allModules sort:[:a :b | (a id) > (b id)].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1982
                moduleNames := allModules collect:[:entry | entry name].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1983
                l := l , moduleNames.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1984
                handles := handles , allModules.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1985
            ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1986
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1987
            showMethods value ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1988
                allObjects := ObjectFileLoader loadedObjectHandles.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1989
                methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1990
                methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1991
                                                                'compiled method - removed' , ' (in ' , mH pathName , ')'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1992
                                                            ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1993
                                                                'compiled method ' , mH method whoString , ' (in ' , mH pathName , ')'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1994
                                                            ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1995
                                                     ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1996
                l := l , methodNames.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1997
                handles := handles , methodObjects.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1998
            ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  1999
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2000
            showCObjects value ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2001
                allObjects := ObjectFileLoader loadedObjectHandles.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2002
                cObjects := (allObjects select:[:h | h isFunctionObjectHandle]) asArray.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2003
                cObjectNames := cObjects collect:[:entry | entry pathName].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2004
                l := l , cObjectNames.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2005
                handles := handles , cObjects.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2006
            ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2007
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2008
            showOthers value ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2009
                allObjects := ObjectFileLoader loadedObjectHandles.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2010
                otherObjects := (allObjects select:[:h | (h isFunctionObjectHandle
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2011
                                                         or:[h isMethodHandle
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2012
                                                         or:[h isClassLibHandle]]) not]) asArray.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2013
                otherObjectNames := otherObjects collect:[:entry | entry pathName].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2014
                l := l , otherObjectNames.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2015
                handles := handles , otherObjects.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2016
            ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2017
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2018
            list1 list:l.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2019
            unloadButton disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2020
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2021
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2022
    showBuiltIn onChangeSend:#value to:moduleListUpdater.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2023
    showModules onChangeSend:#value to:moduleListUpdater.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2024
    showMethods onChangeSend:#value to:moduleListUpdater.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2025
    showCObjects onChangeSend:#value to:moduleListUpdater.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2026
    showOthers onChangeSend:#value to:moduleListUpdater.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2027
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2028
    box := Dialog new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2029
    box label:(resources string:'Module dialog').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2030
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2031
    listView1 := HVScrollableView for:SelectionInListView miniScrollerH:true.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2032
    listView1 model:list1.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2033
    listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2034
    listView1 action:[:sel |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2035
        |info classNames tabs module|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2036
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2037
        listView1 middleButtonMenu:nil.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2038
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2039
        box withWaitCursorDo:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2040
            |nm fileName addr entry1 entry2 entry3 method|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2041
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2042
            tabs := TabulatorSpecification unit:#inch positions:#(0 2.6).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2043
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2044
            (showModules value or:[showBuiltIn value]) ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2045
                info := allModules at:sel ifAbsent:nil.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2046
            ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2047
            info isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2048
                "/ selected a method, cObject or unknown
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2049
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2050
                module := handles at:sel.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2051
                fileName := module pathName.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2052
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2053
                module isMethodHandle ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2054
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2055
                    (method := module method) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2056
                        nm := '** removed **'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2057
                    ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2058
                        menu := PopUpMenu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2059
                                    labels:#('inspect' 'browse')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2060
                                    selectors:#(inspect browse).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2061
                        menu actionAt:#inspect put:[ method inspect ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2062
                        menu actionAt:#browse put:[ |who|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2063
                                                    who := method who.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2064
                                                    SystemBrowser 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2065
                                                        openInClass:(who methodClass) 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2066
                                                        selector:(who methodSelector) 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2067
                                                  ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2068
                        listView1 middleButtonMenu:menu.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2069
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2070
                        nm := (method whoString) asText emphasizeAllWith:(#color->Color blue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2071
                    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2072
                    entry1 := MultiColListEntry new:2 tabulatorSpecification:tabs.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2073
                    entry1 colAt:1 put:'compiled method'; colAt:2 put:nm.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2074
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2075
                    entry2 := MultiColListEntry new:2 tabulatorSpecification:tabs.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2076
                    entry2 colAt:1 put:'path'; colAt:2 put:fileName.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2077
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2078
                    entry3 := MultiColListEntry new:2 tabulatorSpecification:tabs.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2079
                    entry3 colAt:1 put:'address'; colAt:2 put:('(16r) ' , (method code hexPrintString leftPaddedTo:8 with:$0)).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2080
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2081
                    list2 list:(Array with:entry1 with:entry2 with:entry3).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2082
                ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2083
                    (module isFunctionObjectHandle 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2084
                    and:[module functions notEmpty]) ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2085
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2086
                        menu := PopUpMenu
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2087
                                    labels:#('inspect')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2088
                                    selectors:#(inspect).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2089
                        menu actionAt:#inspect put:[ module functions inspect  ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2090
                        listView1 middleButtonMenu:menu.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2091
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2092
                        list2 list:((module functions select:[:f | f notNil])
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2093
                                        collect:[:f | |entry|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2094
                                                        entry := MultiColListEntry new:2 tabulatorSpecification:tabs.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2095
                                                        entry colAt:1 put:(f name asText emphasizeAllWith:(#color->Color blue)).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2096
                                                        entry colAt:2 put:('address: (16r) ' , (f code hexPrintString leftPaddedTo:8 with:$0)).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2097
                                                        entry
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2098
                                                ]).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2099
                    ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2100
                        list2 list:#('nothing known about contents (no functions have been extracted)').    
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2101
                    ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2102
                ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2103
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2104
                unloadButton enable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2105
            ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2106
                "/ selected a package
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2107
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2108
                "/ fill bottom list with class-info
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2109
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2110
                classNames := info classNames asSortedCollection.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2111
                classNames := classNames collect:[:cName |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2112
                                |cls entry rev listEntry|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2113
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2114
                                listEntry := MultiColListEntry new:2 tabulatorSpecification:tabs.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2115
                                listEntry colAt:1 put:cName.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2116
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2117
                                cls := Smalltalk classNamed:cName.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2118
                                cls isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2119
                                    listEntry colAt:2 put:'(class removed)'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2120
                                ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2121
                                    rev := cls binaryRevision.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2122
                                    rev notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2123
                                        cls isLoaded ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2124
                                            entry := '(stub for: ' , rev.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2125
                                        ] ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2126
                                            entry :='(bin: ' , rev.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2127
                                        ].    
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2128
                                        cls revision ~= rev ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2129
                                            entry := entry , ' / src: ' , cls revision    
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2130
                                        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2131
                                        listEntry colAt:2 put:entry , ')'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2132
                                    ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2133
                                       cls revision notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2134
                                            listEntry colAt:2 put:'(overloaded by: ' , cls revision , ')' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2135
                                       ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2136
                                    ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2137
                                ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2138
                                listEntry
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2139
                              ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2140
                list2 list:classNames.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2141
                info dynamic ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2142
                    unloadButton enable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2143
                ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2144
                    unloadButton disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2145
                ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2146
            ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2147
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2148
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2149
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2150
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2151
    panel := HorizontalPanelView new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2152
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2153
    panel add:(l := Label label:'show:').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2154
    l adjust:#left; borderWidth:0.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2155
    panel add:(check := CheckBox label:'builtin' model:showBuiltIn).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2156
    box makeTabable:check.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2157
    panel add:(check := CheckBox label:'classLibs' model:showModules).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2158
    canDoIt ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2159
        check disable
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2160
    ] ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2161
        box makeTabable:check.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2162
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2163
    panel add:(check := CheckBox label:'methods' model:showMethods).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2164
    canDoIt ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2165
        check disable
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2166
    ] ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2167
        box makeTabable:check.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2168
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2169
    panel add:(check := CheckBox label:'c-objects' model:showCObjects).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2170
    canDoIt ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2171
        check disable
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2172
    ] ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2173
        box makeTabable:check.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2174
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2175
    panel add:(check := CheckBox label:'others' model:showOthers).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2176
    canDoIt ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2177
        check disable
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2178
    ] ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2179
        box makeTabable:check.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2180
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2181
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2182
    panel horizontalLayout:#fitSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2183
    "/ panel horizontalLayout:#leftSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2184
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2185
    box addComponent:panel tabable:false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2186
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2187
    box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2188
    box addComponent:listView1 tabable:true.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2189
    listView1 topInset:(View viewSpacing + panel preferredExtent y).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2190
    listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2191
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2192
    l := box addTextLabel:(resources string:'contained classes/subsets:').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2193
    l adjust:#left; borderWidth:0.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2194
    l origin:0.0@0.4 corner:1.0@0.4.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2195
    l topInset:(View viewSpacing).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2196
    l bottomInset:((l preferredExtent y) negated - View viewSpacing).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2197
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2198
    listView2 := HVScrollableView for:SelectionInListView  miniScrollerH:true.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2199
    listView2 model:list2; printItems:false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2200
    box addComponent:listView2 tabable:true.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2201
    listView2 origin:0.0@0.4 corner:1.0@1.0. "/ ; inset:2.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2202
    listView2 disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2203
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2204
    unloadButton := Button label:(resources string:'unload').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2205
    unloadButton action:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2206
        self withWaitCursorDo:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2207
            box withWaitCursorDo:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2208
                |info idx pathName|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2209
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2210
                idx := list1 selectionIndex.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2211
                info := allModules at:idx ifAbsent:nil.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2212
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2213
                list1 selectionIndex:nil.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2214
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2215
                info isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2216
                    "/ selected a method
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2217
                    "/ idx := idx - allModules size.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2218
                    pathName := (handles at:idx) pathName.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2219
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2220
                ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2221
                    "/ selected a package
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2222
                    pathName := info pathName.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2223
                ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2224
                ObjectFileLoader unloadObjectFile:pathName.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2225
                moduleListUpdater value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2226
                unloadButton disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2227
            ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2228
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2229
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2230
    moduleListUpdater value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2231
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2232
    box addButton:unloadButton.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2233
    box addAbortButtonLabelled:(resources string:'dismiss').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2234
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2235
    y := box yPosition.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2236
    listView2 topInset:(l preferredExtent y + 5).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2237
    listView2 bottomInset:(box preferredExtent y - y).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2238
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2239
"/    box width:(400 min:(box device width * 2 // 3)); 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2240
"/        height:(450 min:(box device height - 50)); 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2241
"/        sizeFixed:true.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2242
    box open.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2243
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2244
    box destroy.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2245
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2246
    "Modified: 17.9.1995 / 16:47:50 / claus"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2247
    "Modified: 18.10.1997 / 03:43:39 / cg"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2248
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2249
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2250
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2251
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2252
openApplicationBuilder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2253
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2254
    self valueOfBuildDate value: Date today printString, ' ', Time now printString.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2255
    self openDialogInterface:#windowSpecForApplicationSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2256
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2257
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2258
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2259
saveImage
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2260
    "save image"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2261
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2262
    self showCursor:Cursor write.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2263
    [
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2264
        (ObjectMemory snapShotOn:ObjectMemory nameForSnapshot) ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2265
            self warn:(resources string:'Failed to save snapshot image (disk full or not writable)').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2266
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2267
    ] valueNowOrOnUnwindDo:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2268
        self restoreCursors.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2269
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2270
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2271
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2272
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2273
saveImageAs
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2274
    "save image, after asking for a file name"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2275
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2276
    self saveImageAs: (
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2277
        FileSelectionBrowser 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2278
            request: 'Save Image As' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2279
            fileName: ObjectMemory nameForSnapshot
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2280
            inDirectory: Filename currentDirectory name
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2281
            withFileFilters: #('*.img'))
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2282
 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2283
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2284
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2285
saveImageAs: aFileName
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2286
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2287
    aFileName notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2288
        self showCursor:Cursor write.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2289
        [       
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2290
            (ObjectMemory snapShotOn:aFileName) ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2291
                self warn:(resources string:'Failed to save snapshot image (disk full or not writable)').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2292
            ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2293
        ] valueNowOrOnUnwindDo:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2294
            self restoreCursors.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2295
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2296
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2297
! !
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2298
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2299
!NewLauncher methodsFor:'action - help'!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2300
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2301
showDocumentation:aRelativeDocFilePath
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2302
    "open an HTML browser on some document"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2303
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2304
    "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2305
     although that one is not yet finished,
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2306
     its better than nothing ...
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2307
    "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2308
    HTMLDocumentView notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2309
        "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2310
         temporary kludge;
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2311
         not all machines can autoload binaries;
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2312
         however, on my SGI (which can) we want it
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2313
         to load automatically.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2314
        "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2315
        HTMLDocumentView isLoaded ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2316
            ErrorSignal catch:[HTMLDocumentView autoload]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2317
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2318
        HTMLDocumentView isLoaded ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2319
            HTMLDocumentView openFullOnDocumentationFile:aRelativeDocFilePath. 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2320
            ^ self
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2321
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2322
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2323
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2324
    self warn:'Sorry, the ST/X HTML reader is not
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2325
included in this release.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2326
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2327
Please use Mosaic, netscape, chimera or any
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2328
other HTML viewer to see the documentation.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2329
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2330
The documentation is found in the ''doc/online'' directory.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2331
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2332
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2333
startDocumentationTool
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2334
    "open an HTML browser on the 'TOP' document"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2335
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2336
    self showDocumentation:'TOP.html'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2337
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2338
! !
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2339
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2340
!NewLauncher methodsFor:'action - projects'!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2341
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2342
loadProject
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2343
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2344
    |aFileName|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2345
    (aFileName := (FileSelectionBrowser request: 'Load Project' fileFilters: #('*.project'))) notNil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2346
    ifTrue:
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2347
    [
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2348
        |stream readProject|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2349
        stream := aFileName asFilename readStream.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2350
        readProject := Compiler evaluate: stream contents asString.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2351
        stream close.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2352
        readProject class = Project
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2353
        ifTrue:
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2354
        [
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2355
            Project allProjects add: readProject.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2356
            self listOfProjects contents: Project allProjects.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2357
            self selectionOfProject value: Project allProjects size.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2358
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2359
        ifFalse:
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2360
        [
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2361
            self warn: 'No Project in file detected!!'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2362
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2363
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2364
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2365
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2366
newProject 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2367
    "creates a new project"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2368
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2369
    Project allProjects add: Project new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2370
    self listOfProjects contents: Project allProjects.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2371
    self selectionOfProject value: Project allProjects size.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2372
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2373
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2374
projectSelected: aProjectIndex 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2375
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2376
     Project current: (Project allProjects at: aProjectIndex ifAbsent: [Project defaultProject]).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2377
     self updateInfo
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2378
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2379
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2380
removeProject 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2381
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2382
    Project allProjects remove: Project current ifAbsent: nil.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2383
    Project current: (Project allProjects at: 1 ifAbsent: [nil]).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2384
    self listOfProjects contents: Project allProjects.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2385
    self selectionOfProject value: Project allProjects size.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2386
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2387
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2388
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2389
saveProject
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2390
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2391
    Project current notNil ifTrue: [Project current saveProject]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2392
! !
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2393
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2394
!NewLauncher methodsFor:'action - settings'!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2395
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2396
compilerSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2397
    "open a dialog on compiler related settings"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2398
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2399
    |box warnings warnSTX warnUnderscore warnDollar warnOldStyle 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2400
     allowDollar allowUnderscore immutableArrays
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2401
     warnSTXBox warnUnderscoreBox warnOldStyleBox warnCommonMistakes warnCommonMistakesBox
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2402
     warnCompatibility warnCompatibilityBox warnDollarBox
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2403
     stcCompilation compilationList stcCompilationOptions stcIncludes stcDefines stcOptions
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2404
     stcLibraries stcLibraryPath cc ccOptions historyLines fullHistoryUpdate catchRedefs keepSourceOptions keepSource  
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2405
     constantFoldingOptions constantFolding justInTimeCompilation 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2406
     warnEnabler check component oldIndent t supportsJustInTimeCompilation y
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2407
     y2 fullDebugSupport yMax
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2408
     compileLazy loadBinaries canLoadBinaries|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2409
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2410
    canLoadBinaries := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2411
    loadBinaries := Smalltalk loadBinaries asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2412
    compileLazy := Autoload compileLazy asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2413
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2414
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2415
    warnings := Compiler warnings asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2416
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2417
    warnSTX := Compiler warnSTXSpecials asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2418
    warnUnderscore := Compiler warnUnderscoreInIdentifier asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2419
    warnDollar := Compiler warnDollarInIdentifier asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2420
    warnOldStyle := Compiler warnOldStyleAssignment asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2421
    warnCommonMistakes := Compiler warnCommonMistakes asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2422
    warnCompatibility := Compiler warnPossibleIncompatibilities asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2423
    allowUnderscore := Compiler allowUnderscoreInIdentifier asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2424
    allowDollar := Compiler allowDollarInIdentifier asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2425
    immutableArrays := Compiler arraysAreImmutable asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2426
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2427
    constantFoldingOptions := #( nil #level1 #level2 #full ).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2428
    constantFolding := SelectionInList new list:(resources array:#('disabled' 'level1 (always safe)' 'level2 (usually safe)' 'full')).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2429
    constantFolding selectionIndex:3.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2430
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2431
    stcCompilationOptions := #( always default never).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2432
    stcCompilation := SelectionInList new 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2433
                        list:(resources array:#('always' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2434
                                                'primitive code only' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2435
                                                'never'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2436
                                               )).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2437
    stcCompilation selectionIndex:2.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2438
    (supportsJustInTimeCompilation := ObjectMemory supportsJustInTimeCompilation)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2439
    ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2440
        justInTimeCompilation := ObjectMemory justInTimeCompilation:nil.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2441
        fullDebugSupport := ObjectMemory fullSingleStepSupport:nil.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2442
    ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2443
        justInTimeCompilation := false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2444
        fullDebugSupport := (Compiler lineNumberInfo == #full) asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2445
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2446
    justInTimeCompilation := justInTimeCompilation asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2447
    fullDebugSupport := fullDebugSupport asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2448
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2449
    stcIncludes := Compiler stcCompilationIncludes asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2450
    stcDefines := Compiler stcCompilationDefines asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2451
    stcOptions := Compiler stcCompilationOptions asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2452
    ccOptions := Compiler ccCompilationOptions asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2453
    cc := Compiler ccPath asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2454
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2455
    ObjectFileLoader notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2456
        (t := ObjectFileLoader searchedLibraries) notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2457
            stcLibraries := (String fromStringCollection:t separatedBy:' ') asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2458
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2459
        (t := ObjectFileLoader libPath) notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2460
            stcLibraryPath := t asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2461
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2462
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2463
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2464
    catchRedefs := Class catchMethodRedefinitions asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2465
    historyLines := HistoryManager notNil and:[HistoryManager isLoaded and:[HistoryManager isActive]].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2466
    historyLines ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2467
        fullHistoryUpdate := false    
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2468
    ] ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2469
        fullHistoryUpdate := HistoryManager fullHistoryUpdate asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2470
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2471
    historyLines := historyLines asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2472
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2473
    keepSourceOptions := #( keep reference absReference sourceReference discard ).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2474
    keepSource := SelectionInList new list:(resources array:#('keep as string' 'reference to filename' 'reference to full path' 'append and ref in `st.src''' 'discard' )).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2475
    keepSource selectionIndex:1.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2476
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2477
    warnEnabler := [
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2478
              warnings value ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2479
                warnSTXBox enable. 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2480
                warnOldStyleBox enable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2481
                warnCommonMistakesBox enable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2482
                warnCompatibilityBox enable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2483
                allowUnderscore value ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2484
                    warnUnderscoreBox enable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2485
                ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2486
                    warnUnderscoreBox disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2487
                ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2488
                allowDollar value ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2489
                    warnDollarBox enable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2490
                ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2491
                    warnDollarBox disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2492
                ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2493
              ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2494
                warnSTXBox disable. 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2495
                warnUnderscoreBox disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2496
                warnDollarBox disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2497
                warnOldStyleBox disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2498
                warnCommonMistakesBox disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2499
                warnCompatibilityBox disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2500
              ]].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2501
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2502
    warnings onChangeSend:#value to:warnEnabler.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2503
    allowUnderscore onChangeSend:#value to:warnEnabler.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2504
    allowDollar onChangeSend:#value to:warnEnabler.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2505
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2506
    box := DialogBox new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2507
    box label:(resources string:'Compiler settings').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2508
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2509
    box addCheckBox:(resources string:'catch method redefinitions') on:catchRedefs.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2510
    y := box yPosition.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2511
    check := box addCheckBox:(resources string:'keep history line in methods') on:historyLines.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2512
    HistoryManager isNil ifTrue:[check disable].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2513
    box yPosition:y.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2514
    check := box addCheckBox:(resources string:'keep full class history') on:fullHistoryUpdate.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2515
    check left:0.5.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2516
    HistoryManager isNil ifTrue:[check disable] ifFalse:[check enableChannel:historyLines].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2517
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2518
    box addPopUpList:(resources string:'fileIn source mode:') on:keepSource.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2519
    keepSource selectionIndex:( keepSourceOptions indexOf:(ClassCategoryReader sourceMode) ifAbsent:1).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2520
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2521
    box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2522
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2523
    box addCheckBox:(resources string:'lazy compilation when autoloading') on:compileLazy.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2524
    check := box addCheckBox:(resources string:'if present, load binary objects when autoloading') on:loadBinaries.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2525
    canLoadBinaries ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2526
        loadBinaries value:false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2527
        check disable
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2528
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2529
    supportsJustInTimeCompilation ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2530
        component := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2531
                        addCheckBox:(resources string:'just in time compilation to machine code') 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2532
                        on:justInTimeCompilation.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2533
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2534
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2535
    box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2536
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2537
    ObjectFileLoader notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2538
        compilationList := box addPopUpList:(resources string:'stc compilation to machine code') on:stcCompilation.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2539
        stcCompilation selectionIndex:( stcCompilationOptions indexOf:(Compiler stcCompilation) ifAbsent:2).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2540
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2541
        component := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2542
                        addLabelledInputField:(resources string:'include directories:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2543
                        adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2544
                        on:stcIncludes 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2545
                        tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2546
                        separateAtX:0.3.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2547
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2548
        component preferredExtent:(250 @ component preferredExtent y).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2549
        canLoadBinaries ifFalse:[component disable].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2550
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2551
"/        box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2552
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2553
        component := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2554
                        addLabelledInputField:(resources string:'defines:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2555
                        adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2556
                        on:stcDefines 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2557
                        tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2558
                        separateAtX:0.3.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2559
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2560
        component preferredExtent:(250 @ component preferredExtent y).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2561
        canLoadBinaries ifFalse:[component disable].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2562
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2563
"/        box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2564
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2565
        component := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2566
                        addLabelledInputField:(resources string:'stc options:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2567
                        adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2568
                        on:stcOptions 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2569
                        tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2570
                        separateAtX:0.3.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2571
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2572
        component preferredExtent:(250 @ component preferredExtent y).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2573
        canLoadBinaries ifFalse:[component disable].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2574
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2575
"/        box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2576
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2577
        component := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2578
                        addLabelledInputField:(resources string:'cc command:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2579
                        adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2580
                        on:cc 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2581
                        tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2582
                        separateAtX:0.3.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2583
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2584
        component preferredExtent:(250 @ component preferredExtent y).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2585
        canLoadBinaries ifFalse:[component disable].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2586
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2587
        component := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2588
                        addLabelledInputField:(resources string:'cc options:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2589
                        adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2590
                        on:ccOptions 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2591
                        tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2592
                        separateAtX:0.3.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2593
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2594
        component preferredExtent:(250 @ component preferredExtent y).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2595
        canLoadBinaries ifFalse:[component disable].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2596
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2597
        stcLibraries notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2598
"/            box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2599
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2600
            component := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2601
                            addLabelledInputField:(resources string:'C-libraries:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2602
                            adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2603
                            on:stcLibraries 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2604
                            tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2605
                            separateAtX:0.3.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2606
            component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2607
            component preferredExtent:(250 @ component preferredExtent y).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2608
            canLoadBinaries ifFalse:[component disable].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2609
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2610
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2611
        stcLibraryPath notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2612
"/            box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2613
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2614
            component := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2615
                            addLabelledInputField:(resources string:'stc libPath:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2616
                            adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2617
                            on:stcLibraryPath 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2618
                            tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2619
                            separateAtX:0.3.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2620
            component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2621
            component preferredExtent:(250 @ component preferredExtent y).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2622
            canLoadBinaries ifFalse:[component disable].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2623
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2624
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2625
"/        box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2626
        box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2627
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2628
        "/ if there is no compiler around,
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2629
        "/ change to compile nothing, and disable the checkBoxes
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2630
        Compiler canCreateMachineCode ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2631
            stcCompilation selectionIndex:3.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2632
            compilationList disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2633
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2634
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2635
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2636
    y := box yPosition.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2637
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2638
    component := box addCheckBox:(resources string:'allow underscore in identifiers') on:allowUnderscore.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2639
    component width:0.4.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2640
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2641
    component := box addCheckBox:(resources string:'allow dollar in identifiers') on:allowDollar.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2642
    component width:0.4.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2643
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2644
    component := box addCheckBox:(resources string:'literal arrays are immutable') on:immutableArrays.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2645
    component width:0.4.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2646
    y2 := box yPosition.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2647
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2648
    box yPosition:y.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2649
    box leftIndent:0.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2650
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2651
    component :=box addPopUpList:(resources string:'constant folding:') on:constantFolding.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2652
    component superView left:0.5; width:0.5.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2653
    constantFolding selectionIndex:( constantFoldingOptions indexOf:(Compiler foldConstants) ifAbsent:1).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2654
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2655
    component := box addCheckBox:(resources string:'full debug info') on:fullDebugSupport.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2656
    component left:0.5; width:0.4.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2657
    box yPosition:(box yPosition max:y2).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2658
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2659
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2660
    box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2661
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2662
    box addCheckBox:(resources string:'warnings') on:warnings.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2663
"/    box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2664
    oldIndent := box leftIndent.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2665
    box leftIndent:30.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2666
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2667
    y := box yPosition.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2668
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2669
    warnSTXBox := box addCheckBox:(resources string:'ST/X extensions') on:warnSTX.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2670
    warnSTXBox width:0.4.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2671
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2672
    warnUnderscoreBox := box addCheckBox:(resources string:'underscores in identifiers') on:warnUnderscore.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2673
    warnUnderscoreBox width:0.4.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2674
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2675
    warnDollarBox := box addCheckBox:(resources string:'dollars in identifiers') on:warnDollar.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2676
    warnDollarBox width:0.4.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2677
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2678
    yMax := box yPosition.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2679
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2680
    box yPosition:y.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2681
    box leftIndent:0.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2682
    warnOldStyleBox := box addCheckBox:(resources string:'oldStyle assignment') on:warnOldStyle.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2683
    warnOldStyleBox left:0.5; width:0.4.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2684
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2685
    warnCommonMistakesBox := box addCheckBox:(resources string:'common mistakes') on:warnCommonMistakes.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2686
    warnCommonMistakesBox left:0.5; width:0.4.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2687
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2688
    warnCompatibilityBox := box addCheckBox:(resources string:'possible incompatibilities') on:warnCompatibility.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2689
    warnCompatibilityBox left:0.5; width:0.4.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2690
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2691
    box leftIndent:oldIndent.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2692
    box yPosition:(yMax max: box yPosition).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2693
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2694
    box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2695
        addHelpButtonFor:'Launcher/compilerSettings.html';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2696
        addAbortButton; 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2697
        addOkButton.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2698
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2699
    warnEnabler value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2700
    box open.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2701
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2702
    box accepted ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2703
        HistoryManager notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2704
            HistoryManager fullHistoryUpdate:fullHistoryUpdate value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2705
            historyLines value ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2706
                HistoryManager activate
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2707
            ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2708
                HistoryManager deactivate
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2709
            ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2710
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2711
        Class catchMethodRedefinitions:catchRedefs value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2712
        ClassCategoryReader sourceMode:(keepSourceOptions at:keepSource selectionIndex).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2713
        Compiler warnings:warnings value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2714
        Compiler warnSTXSpecials:warnSTX value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2715
        Compiler warnOldStyleAssignment:warnOldStyle value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2716
        Compiler warnUnderscoreInIdentifier:warnUnderscore value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2717
        Compiler warnDollarInIdentifier:warnDollar value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2718
        Compiler warnCommonMistakes:warnCommonMistakes value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2719
        Compiler warnPossibleIncompatibilities:warnCompatibility value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2720
        Compiler allowUnderscoreInIdentifier:allowUnderscore value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2721
        Compiler allowDollarInIdentifier:allowDollar value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2722
        Compiler arraysAreImmutable:immutableArrays value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2723
        fullDebugSupport value ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2724
            Compiler lineNumberInfo:#full.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2725
        ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2726
            Compiler lineNumberInfo:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2727
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2728
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2729
        Compiler stcCompilation:(stcCompilationOptions at:stcCompilation selectionIndex).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2730
        Compiler stcCompilationIncludes:stcIncludes value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2731
        Compiler stcCompilationDefines:stcDefines value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2732
        Compiler stcCompilationOptions:stcOptions value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2733
        Compiler ccCompilationOptions:ccOptions value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2734
        Compiler ccPath:cc value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2735
        Compiler foldConstants:(constantFoldingOptions at:constantFolding selectionIndex).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2736
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2737
        supportsJustInTimeCompilation ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2738
            justInTimeCompilation value ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2739
                Method allInstancesDo:[:m | m checked:false].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2740
            ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2741
            ObjectMemory justInTimeCompilation:justInTimeCompilation value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2742
            ObjectMemory fullSingleStepSupport:fullDebugSupport value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2743
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2744
        ObjectFileLoader notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2745
            stcLibraries notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2746
                ObjectFileLoader searchedLibraries:(stcLibraries value asCollectionOfWords).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2747
            ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2748
            stcLibraryPath notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2749
                ObjectFileLoader libPath:(stcLibraryPath value).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2750
            ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2751
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2752
        Autoload compileLazy:compileLazy value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2753
        Smalltalk loadBinaries:loadBinaries value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2754
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2755
    box destroy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2756
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2757
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2758
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2759
displaySettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2760
    "open a dialog on display related settings"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2761
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2762
    |box listOfSizes sizeInfos
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2763
     sizes sizeNames sizeList sizeX sizeY deepIcons
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2764
     isColorMonitor useFixPalette useFixGrayPalette idx ditherStyles ditherSyms ditherList
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2765
     y component screen visual clipEncodings clipEncodingSyms clipEncodingList|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2766
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2767
    listOfSizes := resources at:'LIST_OF_OFFERED_SCREEN_SIZES' default:#default.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2768
    listOfSizes == #default ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2769
        "/ nothing in resource file; offer at least some.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2770
        sizeInfos := #(
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2771
                           ( '11.3'' (235mm x 175mm) LCD'   (235 175)    )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2772
                           ( '17''   (325mm x 245mm)'       (325 245)    )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2773
                           ( '19''   (340mm x 270mm)'       (340 270)    )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2774
                           ( '20''   (350mm x 280mm)'       (350 280)    )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2775
                           ( '21''   (365mm x 285mm)'       (365 285)    )
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2776
                       ).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2777
    ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2778
        sizeInfos := resources array:listOfSizes.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2779
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2780
    sizeNames := sizeInfos collect:[:entry | entry at:1].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2781
    sizes := sizeInfos collect:[:entry | entry at:2].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2782
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2783
    screen := Screen current.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2784
    visual := screen visualType.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2785
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2786
    isColorMonitor := screen hasColors asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2787
    deepIcons := screen supportsDeepIcons asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2788
    useFixPalette := screen fixColors notNil asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2789
    useFixGrayPalette := screen fixGrayColors notNil asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2790
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2791
    sizeList := SelectionInList with:sizeNames.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2792
    sizeX := screen widthInMillimeter asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2793
    sizeY := screen heightInMillimeter asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2794
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2795
    clipEncodingSyms := #(nil #iso8859 #jis #jis7 #sjis #euc #big5).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2796
    clipEncodings := resources array:#('untranslated' 'iso8859' 'jis' 'jis7' 'shift-JIS' 'EUC' 'big5').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2797
    clipEncodingList := SelectionInList new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2798
    clipEncodingList list:clipEncodings.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2799
    clipEncodingList selectionIndex:(clipEncodingSyms indexOf:screen clipBoardEncoding ifAbsent:1).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2800
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2801
    ditherList := SelectionInList new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2802
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2803
    (visual == #StaticGray or:[visual == #GrayScale]) ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2804
        ditherStyles := #('threshold' 'ordered dither' 'error diffusion').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2805
        ditherSyms := #(threshold ordered floydSteinberg).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2806
    ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2807
        visual ~~ #TrueColor ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2808
            ditherStyles := #('nearest color' 'error diffusion').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2809
            ditherSyms := #(ordered floydSteinberg).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2810
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2811
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2812
    ditherSyms notNil ifTrue:[    
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2813
        ditherList list:ditherStyles.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2814
        ditherList selectionIndex:(ditherSyms indexOf:(Image ditherAlgorithm) ifAbsent:#threshold).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2815
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2816
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2817
    box := DialogBox new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2818
    box label:(resources string:'Display screen settings').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2819
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2820
    (box addTextLabel:(resources string:'Actual visible screen area:'))
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2821
        adjust:#left.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2822
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2823
    (box addPopUpList:(resources string:'common sizes:') on:sizeList)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2824
        label:'monitor size'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2825
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2826
    idx := sizes findFirst:[:entry |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2827
                                ((entry at:1) = sizeX value)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2828
                                and:[((entry at:2) = sizeY value)]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2829
                           ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2830
    idx ~~ 0 ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2831
        sizeList selectionIndex:idx
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2832
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2833
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2834
    sizeList onChangeSend:#value to:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2835
                                        |idx|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2836
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2837
                                        idx := sizeList selectionIndex.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2838
                                        sizeX value:((sizes at:idx) at:1).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2839
                                        sizeY value:((sizes at:idx) at:2).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2840
                                    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2841
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2842
    y := box yPosition.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2843
    component := box addTextLabel:(resources string:'screen size:').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2844
    component width:0.3; adjust:#right; borderWidth:0.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2845
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2846
    box yPosition:y.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2847
    component := box addInputFieldOn:nil tabable:true.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2848
    component width:0.25; left:0.3; 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2849
              immediateAccept:false; acceptOnLeave:false; 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2850
              cursorMovementWhenUpdating:#beginOfLine;
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2851
              converter:(PrintConverter new initForInteger);
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2852
              model:sizeX.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2853
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2854
    box yPosition:y.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2855
    component := box addTextLabel:(' x ').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2856
    component width:0.1; left:0.55; adjust:#center; borderWidth:0.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2857
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2858
    box yPosition:y.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2859
    component := box addInputFieldOn:nil tabable:true.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2860
    component width:0.25; left:0.65; 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2861
              immediateAccept:false; acceptOnLeave:false; 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2862
              cursorMovementWhenUpdating:#beginOfLine;
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2863
              converter:(PrintConverter new initForInteger);
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2864
              model:sizeY.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2865
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2866
    box yPosition:y.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2867
    component := box addTextLabel:('(mm)').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2868
    component width:0.1; left:0.9; adjust:#center; borderWidth:0.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2869
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2870
    box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2871
    box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2872
    box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2873
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2874
    (box addTextLabel:(resources string:'Screen: depth: %1 visual: %2  (%3)'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2875
                                 with:Screen current depth printString
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2876
                                 with:Screen current visualType
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2877
                                 with:Screen current serverVendor))
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2878
        adjust:#left.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2879
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2880
    box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2881
    box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2882
    box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2883
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2884
    box addCheckBox:(resources string:'color monitor') on:isColorMonitor.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2885
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2886
    visual == #PseudoColor ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2887
        box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2888
        component := box addCheckBox:(resources string:'use fix color palette %1' with:'(4x8x4)') on:useFixPalette.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2889
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2890
        box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2891
        component := box addCheckBox:(resources string:'use fix gray color palette %1' with:'(32)') on:useFixGrayPalette.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2892
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2893
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2894
    ditherSyms notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2895
        box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2896
        component := box addPopUpList:(resources string:'image display:') on:ditherList.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2897
        component defaultLabel:'image display'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2898
        component superView horizontalLayout:#leftSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2899
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2900
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2901
    box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2902
    box addCheckBox:(resources string:'allow colored/grayscale icons') on:deepIcons.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2903
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2904
    box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2905
    box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2906
    box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2907
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2908
    component := box addPopUpList:(resources string:'clipBoard encoding:') on:clipEncodingList.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2909
    component superView horizontalLayout:#leftSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2910
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2911
    box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2912
        addHelpButtonFor:'Launcher/screenSettings.html';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2913
        addAbortButton; addOkButton.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2914
    box open.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2915
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2916
    box accepted ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2917
        Image flushDeviceImages.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2918
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2919
        screen visualType == #PseudoColor ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2920
            useFixPalette value ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2921
                Color colorAllocationFailSignal handle:[:ex |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2922
                    self warn:(resources string:'Could not allocate colors.').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2923
                ] do:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2924
                    Color getColorsRed:4 green:8 blue:4 on:screen
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2925
                ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2926
            ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2927
                screen releaseFixColors
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2928
            ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2929
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2930
            useFixGrayPalette value ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2931
                Color colorAllocationFailSignal handle:[:ex |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2932
                    self warn:(resources string:'Could not allocate colors.').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2933
                ] do:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2934
                    Color getGrayColors:32 on:screen
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2935
                ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2936
            ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2937
                screen releaseFixGrayColors
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2938
            ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2939
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2940
        screen hasColors:isColorMonitor value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2941
        screen widthInMillimeter:sizeX value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2942
        screen heightInMillimeter:sizeY value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2943
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2944
        screen supportsDeepIcons:deepIcons value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2945
        ditherSyms notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2946
            Image ditherAlgorithm:(ditherSyms at:ditherList selectionIndex).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2947
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2948
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2949
        self withWaitCursorDo:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2950
            View defaultStyle:(View defaultStyle).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2951
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2952
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2953
        screen clipBoardEncoding:(clipEncodingSyms at:clipEncodingList selectionIndex).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2954
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2955
    box destroy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2956
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2957
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2958
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2959
fontSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2960
    "open a dialog on font related settings"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2961
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2962
    (self fontBoxForEncoding:nil) ifTrue:[self reOpen]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2963
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2964
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2965
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2966
keyboardSetting 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2967
    "open a dialog on keyboard related settings"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2968
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2969
    |mappings listOfRawKeys listOfFunctions
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2970
     box l
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2971
     list1 list2 listView1 listView2 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2972
     frame selectionForwarder macroForwarder macroTextView y|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2973
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2974
    mappings := Screen current keyboardMap.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2975
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2976
    listOfRawKeys := (mappings keys asArray collect:[:key | key asString]) sort.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2977
    listOfFunctions := (mappings values asSet asArray collect:[:key | key asString]) sort.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2978
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2979
    selectionForwarder := Plug new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2980
    selectionForwarder respondTo:#showFunction
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2981
                  with:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2982
                        |raw|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2983
                        raw := list1 selection.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2984
                        list2 retractInterestsFor:selectionForwarder.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2985
                        list2 selection:(mappings at:raw asSymbol) asString.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2986
                        list2 onChangeSend:#showRawKey to:selectionForwarder.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2987
                       ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2988
    selectionForwarder respondTo:#showRawKey
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2989
                  with:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2990
                        |f raw|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2991
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2992
                        f := list2 selection.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2993
                        list1 retractInterestsFor:selectionForwarder.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2994
                        raw := mappings keyAtValue:f asString.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2995
                        raw isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2996
                            raw := mappings keyAtValue:f first.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2997
                            raw isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2998
                                raw := mappings keyAtValue:f asSymbol.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  2999
                            ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3000
                        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3001
                        list1 selection:raw.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3002
                        list1 onChangeSend:#showFunction to:selectionForwarder.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3003
                       ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3004
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3005
    macroForwarder := [
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3006
                        |f macro indent|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3007
                        f := list2 selection.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3008
                        (f startsWith:'Cmd') ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3009
                            f := f copyFrom:4
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3010
                        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3011
                        macro := FunctionKeySequences at:(f asSymbol) ifAbsent:nil.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3012
                        macro notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3013
                            macro := macro asStringCollection.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3014
                            indent := macro
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3015
                                         inject:99999 into:[:min :element |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3016
                                             |stripped|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3017
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3018
                                             stripped := element withoutLeadingSeparators.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3019
                                             stripped size == 0 ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3020
                                                 min
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3021
                                             ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3022
                                                 min min:(element size - stripped size)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3023
                                             ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3024
                                         ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3025
                            indent ~~ 0 ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3026
                                macro := macro collect:[:line | 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3027
                                             line size > indent ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3028
                                                line copyFrom:indent+1
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3029
                                             ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3030
                                                line
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3031
                                             ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3032
                                        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3033
                            ].                        
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3034
                        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3035
                        macroTextView contents:macro.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3036
                       ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3037
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3038
    list1 := SelectionInList with:listOfRawKeys.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3039
    list1 onChangeSend:#showFunction to:selectionForwarder.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3040
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3041
    list2 := SelectionInList with:listOfFunctions.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3042
    list2 onChangeSend:#showRawKey to:selectionForwarder.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3043
    list2 onChangeSend:#value to:macroForwarder.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3044
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3045
    box := Dialog new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3046
    box label:(resources string:'Keyboard mappings').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3047
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3048
    l := box addTextLabel:(resources string:'KEY_MSG') withCRs.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3049
    l adjust:#left; borderWidth:0.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3050
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3051
    frame := View new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3052
    frame extent:300 @ 300.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3053
    frame borderWidth:0.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3054
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3055
    listView1 := ScrollableView for:SelectionInListView in:frame.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3056
    listView1 model:list1.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3057
    listView1 origin:0.0@0.0 corner:0.5@1.0; inset:2.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3058
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3059
    listView2 := ScrollableView for:SelectionInListView in:frame.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3060
    listView2 model:list2.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3061
    listView2 origin:0.5@0.0 corner:1.0@1.0; inset:2.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3062
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3063
    frame topInset:box yPosition.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3064
    box addComponent:frame withExtent:350@200.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3065
    box makeTabable:listView1. 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3066
    box makeTabable:listView2. 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3067
    frame origin:0.0@0.0 corner:1.0@0.6.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3068
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3069
    box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3070
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3071
    l := box addTextLabel:(resources string:'Macro text (if any):') withCRs.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3072
    l adjust:#left; borderWidth:0.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3073
    l origin:0.0@0.6 corner:1.0@0.6.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3074
    l topInset:(View viewSpacing).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3075
    l bottomInset:(l preferredExtent y negated - View viewSpacing).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3076
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3077
    macroTextView := HVScrollableView for:TextView miniScroller:true.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3078
    box addComponent:macroTextView tabable:true.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3079
    macroTextView origin:0.0@0.6 corner:1.0@1.0.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3080
    y := box yPosition.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3081
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3082
    box
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3083
        addHelpButtonFor:'Launcher/keyboardSetting.html';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3084
        "addAbortButton;" 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3085
        addOkButtonLabelled:(resources string:'dismiss').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3086
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3087
    macroTextView topInset:(l preferredExtent y + 5).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3088
    macroTextView bottomInset:(box preferredExtent y - y).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3089
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3090
    box open.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3091
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3092
    box accepted ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3093
        "no action yet ..."
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3094
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3095
    box destroy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3096
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3097
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3098
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3099
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3100
languageSetting 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3101
    "open a dialog on language related settings"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3102
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3103
    |listOfLanguages translatedLanguages switch box languageList flags|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3104
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3105
    "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3106
     get list of supported languages from the launchers resources ...
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3107
    "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3108
    listOfLanguages := resources at:'LIST_OF_OFFERED_LANGUAGES' default:#('default').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3109
    listOfLanguages := listOfLanguages asOrderedCollection.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3110
    translatedLanguages := listOfLanguages collect:[:lang | |item|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3111
                                        item := resources at:lang.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3112
                                        item isString ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3113
                                            item
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3114
                                        ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3115
                                            item at:1
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3116
                                        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3117
                                ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3118
    flags := listOfLanguages collect:[:lang | |item|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3119
                                        item := resources at:lang.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3120
                                        item isArray ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3121
                                            item at:2
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3122
                                        ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3123
                                            nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3124
                                        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3125
                                ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3126
    flags := flags collect:[:nm | nm notNil ifTrue:[Image fromFile:nm] ifFalse:[nil]].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3127
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3128
    languageList := translatedLanguages with:flags collect:[:lang :flag |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3129
                                LabelAndIcon icon:flag string:lang.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3130
                        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3131
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3132
    box := ListSelectionBox title:(resources string:'LANG_MSG') withCRs.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3133
    box label:(resources string:'Language selection').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3134
    box list:languageList.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3135
    box initialText:(Language).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3136
    box action:[:newLanguage |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3137
        self withWaitCursorDo:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3138
            |fontPref idx language oldLanguage enc answer matchingFonts|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3139
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3140
            idx := translatedLanguages indexOf:newLanguage withoutSeparators.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3141
            idx ~~ 0 ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3142
                language := listOfLanguages at:idx
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3143
            ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3144
                language := newLanguage
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3145
            ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3146
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3147
            "/ check if the new language needs a differently encoded font;
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3148
            "/ ask user to switch font and allow cancellation.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3149
            "/ Otherwise, you are left with unreadable menu & button items ...
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3150
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3151
            oldLanguage := Smalltalk language.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3152
            Smalltalk language:language asSymbol.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3153
            ResourcePack flushCachedResourcePacks.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3154
            fontPref := self class classResources at:'PREFERRED_FONT_ENCODING'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3155
            Smalltalk language:oldLanguage.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3156
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3157
            switch := true.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3158
            enc := MenuView defaultFont encoding.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3159
            (fontPref match:enc) ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3160
                "/ look if there is one at all.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3161
                matchingFonts := Screen current listOfAvailableFonts select:[:f | fontPref match:f encoding].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3162
                matchingFonts size == 0 ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3163
                    (Dialog 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3164
                        confirm:(resources 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3165
                                    string:'your display does not offer any %1-encoded font.\\Change the language anyway ?\ (texts will probably be unreadable then)'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3166
                                      with:fontPref) withCRs)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3167
                    ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3168
                        switch := false
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3169
                    ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3170
                ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3171
                    answer := Dialog 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3172
                                confirmWithCancel:(resources 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3173
                                                        string:'menu font is not %1-encoded.\\Change it ?'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3174
                                                        with:fontPref) withCRs
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3175
                                           labels:(resources
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3176
                                                        array:#('cancel' 'no' 'yes'))
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3177
                                           default:3.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3178
                    answer isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3179
                        switch := false
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3180
                    ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3181
                        answer ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3182
                            switch := (self fontBoxForEncoding:fontPref)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3183
                        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3184
                    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3185
                ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3186
            ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3187
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3188
            switch ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3189
                transcript showCR:'change language to ' , newLanguage , ' ...'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3190
                Smalltalk language:language asSymbol.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3191
                ResourcePack flushCachedResourcePacks
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3192
            ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3193
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3194
        switch ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3195
            self reopenLauncher.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3196
            DebugView newDebugger.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3197
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3198
    ].    
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3199
    box
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3200
        addHelpButtonFor:'Launcher/languageSetting.html'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3201
    box open.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3202
    box destroy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3203
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3204
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3205
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3206
memorySettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3207
    "open a dialog on objectMemory related settings"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3208
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3209
    |box igcLimit igcFreeLimit igcFreeAmount newSpaceSize
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3210
     compressLimit
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3211
     oldIncr component fields codeLimit codeTrigger stackLimit|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3212
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3213
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3214
    "/ extract relevant system settings ...
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3215
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3216
    igcLimit := ObjectMemory incrementalGCLimit asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3217
    igcFreeLimit := ObjectMemory freeSpaceGCLimit asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3218
    igcFreeAmount := ObjectMemory freeSpaceGCAmount asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3219
    newSpaceSize := ObjectMemory newSpaceSize asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3220
    oldIncr := ObjectMemory oldSpaceIncrement asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3221
    compressLimit := ObjectMemory oldSpaceCompressLimit asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3222
    codeLimit := ObjectMemory dynamicCodeLimit asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3223
    codeTrigger := ObjectMemory dynamicCodeGCTrigger asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3224
    stackLimit := Process defaultMaximumStackSize asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3225
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3226
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3227
    "/ create a box on those values ...
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3228
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3229
    fields := OrderedCollection new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3230
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3231
    box := DialogBox new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3232
    box label:(resources string:'Memory manager settings').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3233
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3234
    (box addTextLabel:'Warning - invalid settings may result in failures or poor performance
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3235
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3236
You have been warned.') adjust:#left.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3237
    box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3238
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3239
    component := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3240
                    addLabelledInputField:(resources string:'size of newSpace:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3241
                    adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3242
                    on:nil "/ newSpaceSize 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3243
                    tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3244
                    separateAtX:0.7.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3245
    component acceptOnLeave:false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3246
    component converter:(PrintConverter new initForNumber).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3247
    component model:newSpaceSize.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3248
    fields add:component.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3249
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3250
    box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3251
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3252
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3253
    component := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3254
                    addLabelledInputField:(resources string:'incremental GC allocation trigger:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3255
                    adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3256
                    on:nil "/ igcLimit 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3257
                    tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3258
                    separateAtX:0.7.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3259
    component acceptOnLeave:false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3260
    component converter:(PrintConverter new initForNumber).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3261
    component model:igcLimit.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3262
    fields add:component.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3263
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3264
    box addTextLabel:'(start IGC whenever this amount has been allocated)'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3265
    box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3266
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3267
    component := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3268
                    addLabelledInputField:(resources string:'incremental GC freespace trigger:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3269
                    adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3270
                    on:nil "/ igcFreeLimit 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3271
                    tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3272
                    separateAtX:0.7.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3273
    component acceptOnLeave:false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3274
    component converter:(PrintConverter new initForNumber).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3275
    component model:igcFreeLimit.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3276
    fields add:component.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3277
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3278
    box addTextLabel:'(start IGC whenever freespace drops below this)'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3279
    box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3280
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3281
    component := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3282
                    addLabelledInputField:(resources string:'incremental GC amount:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3283
                    adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3284
                    on:nil "/ igcFreeAmount 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3285
                    tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3286
                    separateAtX:0.7.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3287
    component acceptOnLeave:false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3288
    component converter:(PrintConverter new initForNumber).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3289
    component model:igcFreeAmount.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3290
    fields add:component.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3291
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3292
    box addTextLabel:'(try to keep this amount for peak requests)'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3293
    box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3294
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3295
    component := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3296
                    addLabelledInputField:(resources string:'oldspace increment:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3297
                    adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3298
                    on:nil "/ oldIncr 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3299
                    tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3300
                    separateAtX:0.7.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3301
    component acceptOnLeave:false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3302
    component converter:(PrintConverter new initForNumber).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3303
    component model:oldIncr.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3304
    fields add:component.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3305
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3306
    box addTextLabel:'(increase oldSpace in chunks of this size)'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3307
    box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3308
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3309
    component := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3310
                    addLabelledInputField:(resources string:'oldspace compress limit:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3311
                    adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3312
                    on:nil "/ compressLimit 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3313
                    tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3314
                    separateAtX:0.7.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3315
    component acceptOnLeave:false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3316
    component converter:(PrintConverter new initForNumber).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3317
    component model:compressLimit.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3318
    fields add:component.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3319
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3320
    box addTextLabel:'(suppress compressing GC if more memory is in use)'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3321
    box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3322
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3323
    component := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3324
                    addLabelledInputField:(resources string:'stack limit:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3325
                    adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3326
                    on:nil 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3327
                    tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3328
                    separateAtX:0.7.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3329
    component acceptOnLeave:false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3330
    component converter:(PrintConverter new initForNumber).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3331
    component model:stackLimit.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3332
    fields add:component.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3333
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3334
    box addTextLabel:'(trigger recursionInterrupt if more stack is used by a process)'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3335
    box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3336
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3337
    ObjectMemory supportsJustInTimeCompilation ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3338
        component := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3339
                        addLabelledInputField:(resources string:'dynamic code limit:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3340
                        adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3341
                        on:nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3342
                        tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3343
                        separateAtX:0.7.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3344
        component acceptOnLeave:false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3345
        component converter:(PrintConverter new initForNumberOrNil).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3346
        component model:codeLimit.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3347
        fields add:component.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3348
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3349
        box addTextLabel:'(flush dynamic compiled code to stay within this limit)'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3350
        box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3351
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3352
        component := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3353
                        addLabelledInputField:(resources string:'dynamic code GC trigger:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3354
                        adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3355
                        on:nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3356
                        tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3357
                        separateAtX:0.7.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3358
        component acceptOnLeave:false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3359
        component converter:(PrintConverter new initForNumberOrNil).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3360
        component model:codeTrigger.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3361
        fields add:component.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3362
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3363
        box addTextLabel:'(start incremental GC whenever this amount of code has been allocated)'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3364
        box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3365
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3366
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3367
    box addAbortButton; addOkButton.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3368
    box
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3369
        addHelpButtonFor:'Launcher/memorySettings.html'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3370
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3371
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3372
    "/ show the box ...
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3373
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3374
    box open.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3375
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3376
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3377
    "/ update system settings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3378
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3379
    box accepted ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3380
        fields do:[:comp | comp accept].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3381
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3382
        igcFreeAmount value ~~ ObjectMemory freeSpaceGCAmount ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3383
            ObjectMemory freeSpaceGCAmount:igcFreeAmount value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3384
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3385
        igcFreeLimit value ~~ ObjectMemory freeSpaceGCLimit ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3386
            ObjectMemory freeSpaceGCLimit:igcFreeLimit value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3387
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3388
        igcLimit value ~~ ObjectMemory incrementalGCLimit ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3389
            ObjectMemory incrementalGCLimit:igcLimit value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3390
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3391
        newSpaceSize value ~~ ObjectMemory newSpaceSize ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3392
            ObjectMemory newSpaceSize:newSpaceSize value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3393
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3394
        oldIncr value ~~ ObjectMemory oldSpaceIncrement ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3395
            ObjectMemory oldSpaceIncrement:oldIncr value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3396
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3397
        stackLimit value ~~ Process defaultMaximumStackSize ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3398
            Process defaultMaximumStackSize:stackLimit value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3399
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3400
        ObjectMemory oldSpaceCompressLimit:compressLimit value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3401
        ObjectMemory dynamicCodeLimit:codeLimit value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3402
        ObjectMemory dynamicCodeGCTrigger:codeTrigger value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3403
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3404
    box destroy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3405
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3406
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3407
messageSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3408
    "open a dialog on infoMessage related settings"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3409
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3410
    |box vmInfo vmErrors displayErrors classInfos|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3411
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3412
    vmInfo := ObjectMemory infoPrinting asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3413
    vmErrors := ObjectMemory debugPrinting asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3414
    classInfos := Object infoPrinting asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3415
    displayErrors := DeviceWorkstation errorPrinting asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3416
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3417
    box := DialogBox new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3418
    box label:(resources string:'Messages').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3419
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3420
    box addCheckBox:(resources string:'VM info messages') on:vmInfo.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3421
    box addCheckBox:(resources string:'VM error messages') on:vmErrors.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3422
    box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3423
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3424
    box addCheckBox:(resources string:'Display error messages (Xlib, Xtlib ...)') on:displayErrors.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3425
    box addCheckBox:(resources string:'Other info messages') on:classInfos.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3426
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3427
    box addHelpButtonFor:'Launcher/messageSettings.html'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3428
    box addAbortButton; addOkButton.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3429
    box open.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3430
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3431
    box accepted ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3432
        ObjectMemory infoPrinting:vmInfo value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3433
        ObjectMemory debugPrinting:vmErrors value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3434
        Object infoPrinting:classInfos value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3435
        DeviceWorkstation errorPrinting:displayErrors value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3436
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3437
    box destroy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3438
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3439
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3440
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3441
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3442
miscSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3443
    "open a dialog on misc other settings"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3444
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3445
    |box shadows takeFocus returnFocus
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3446
     hostNameInLabel showAccelerators 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3447
     preemptive hostNameInLabelHolder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3448
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3449
    "/ 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3450
    "/ extract relevant system settings ...
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3451
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3452
    shadows := PopUpView shadows asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3453
    hostNameInLabel := StandardSystemView includeHostNameInLabel.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3454
    hostNameInLabelHolder := hostNameInLabel asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3455
    returnFocus := StandardSystemView returnFocusWhenClosingModalBoxes asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3456
    takeFocus := StandardSystemView takeFocusWhenMapped asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3457
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3458
    showAccelerators := MenuView showAcceleratorKeys asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3459
    preemptive := Processor isTimeSlicing asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3460
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3461
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3462
    "/ create a box on those values ...
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3463
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3464
    box := DialogBox new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3465
    box label:(resources string:'Other settings').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3466
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3467
    box addCheckBox:(resources string:'shadows under popup views') on:shadows.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3468
    box addCheckBox:(resources string:'boxes return focus to previously active view') on:returnFocus.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3469
    box addCheckBox:(resources string:'views catch focus when mapped') on:takeFocus.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3470
    box addCheckBox:(resources string:'hostname in window labels') on:hostNameInLabelHolder.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3471
    box addCheckBox:(resources string:'show accelerator keys in menus') on:showAccelerators.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3472
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3473
    box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3474
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3475
    box addCheckBox:(resources string:'preemptive scheduling') on:preemptive.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3476
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3477
    box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3478
        addHelpButtonFor:'Launcher/miscSettings.html';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3479
        addAbortButton; 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3480
        addOkButton.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3481
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3482
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3483
    "/ show the box ...
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3484
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3485
    box open.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3486
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3487
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3488
    "/ update system settings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3489
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3490
    box accepted ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3491
        PopUpView shadows:shadows value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3492
        hostNameInLabelHolder value ~~ hostNameInLabel ifTrue:[ 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3493
            StandardSystemView includeHostNameInLabel:hostNameInLabelHolder value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3494
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3495
            Screen allScreens do:[:aDisplay |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3496
                aDisplay allViewsDo:[:aView |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3497
                    |l|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3498
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3499
                    aView isTopView ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3500
                        l := aView label.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3501
                        aView label:(l , ' '); label:l.  "/ force a change
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3502
                    ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3503
                ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3504
            ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3505
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3506
        StandardSystemView returnFocusWhenClosingModalBoxes:returnFocus value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3507
        StandardSystemView takeFocusWhenMapped:takeFocus value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3508
        MenuView showAcceleratorKeys:showAccelerators value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3509
        Processor isTimeSlicing ~~ preemptive value ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3510
            preemptive value ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3511
                Processor startTimeSlicing
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3512
            ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3513
                Processor stopTimeSlicing
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3514
            ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3515
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3516
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3517
    box destroy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3518
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3519
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3520
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3521
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3522
printerSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3523
    "open a dialog on printer related settings"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3524
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3525
    |box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3526
     possiblePrinters possibleTypes printerType printCommand 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3527
     pageFormat landscape updater
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3528
     formatLabel formatComponent landscapeLabel landscapeComponent
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3529
     topMargin leftMargin rightMargin bottomMargin unitList unit
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3530
     topMarginComponent leftMarginComponent
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3531
     rightMarginComponent
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3532
     bottomMarginComponent supportsColor supportsColorComponent
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3533
     y y1 commandListPop component commandList row|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3534
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3535
    possiblePrinters := PrinterStream withAllSubclasses asArray.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3536
    possibleTypes := possiblePrinters collect:[:cls | cls printerTypeName].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3537
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3538
    printerType := SelectionInList new list:(resources array:possibleTypes).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3539
    printerType selectionIndex:(possiblePrinters identityIndexOf:Printer).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3540
    printCommand := Printer printCommand asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3541
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3542
    pageFormat := SelectionInList new list:(Printer defaultPageFormats).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3543
    pageFormat selection:(Printer pageFormat).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3544
    landscape := Printer landscape asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3545
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3546
    topMargin := Printer topMargin asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3547
    leftMargin := Printer leftMargin asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3548
    rightMargin := Printer rightMargin asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3549
    bottomMargin := Printer bottomMargin asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3550
    supportsColor := Printer supportsColor asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3551
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3552
    box := DialogBox new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3553
    box label:(resources string:'Printer settings').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3554
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3555
"/ either use a popUpList ...
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3556
"/    box addPopUpList:(resources string:'printer type:') on:printerType.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3557
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3558
"/ or a comboList;
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3559
"/ which one looks better ?
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3560
    y := box yPosition.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3561
    component := box addTextLabel:(resources string:'printer type:').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3562
    component width:0.25; adjust:#right; borderWidth:0.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3563
    box yPosition:y.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3564
    component := box addComboListOn:printerType tabable:true.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3565
    component aspect:#selectionIndex; changeMessage:#selectionIndex:; useIndex:true.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3566
    component width:0.75; left:0.25.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3567
"/ end of question
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3568
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3569
    y := box yPosition.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3570
    component := box addTextLabel:(resources string:'print command:').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3571
    component width:0.25; adjust:#right; borderWidth:0.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3572
    box yPosition:y.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3573
    commandListPop := box addComboBoxOn:printCommand tabable:true.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3574
"/    commandListPop := box addInputFieldOn:printCommand tabable:true.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3575
    commandListPop width:0.75; left:0.25; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3576
    "/ some common print commands ...
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3577
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3578
    commandList := resources at:'PRINT_COMMANDS' ifAbsent:nil.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3579
    commandList isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3580
        commandList := PrinterStream defaultCommands.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3581
        commandList isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3582
            commandList := #('lpr' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3583
                             'lp' 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3584
                            ).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3585
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3586
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3587
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3588
    commandListPop list:commandList.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3589
    box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3590
    box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3591
    box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3592
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3593
    row := OrderedCollection new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3594
    row add:(formatLabel := Label label:(resources string:'page format:')).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3595
    formatLabel borderWidth:0.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3596
    row add:(formatComponent := PopUpList on:pageFormat).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3597
    formatComponent label:'unknown'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3598
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3599
    row add:(landscapeLabel := Label label:(resources string:'landscape:')).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3600
    landscapeLabel borderWidth:0.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3601
    row add:(landscapeComponent := CheckToggle on:landscape).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3602
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3603
    y := box yPosition.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3604
    box
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3605
        addRow:(1 to:2)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3606
        fromX:0
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3607
        toX:0.5
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3608
        collect:[:idx | row at:idx]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3609
        tabable:false
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3610
        horizontalLayout:#leftSpace
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3611
        verticalLayout:#center.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3612
    y1 := box yPosition.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3613
    box yPosition:y.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3614
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3615
    box
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3616
        addRow:(3 to:4)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3617
        fromX:0.5
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3618
        toX:1.0
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3619
        collect:[:idx | row at:idx]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3620
        tabable:false
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3621
        horizontalLayout:#leftSpace
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3622
        verticalLayout:#center.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3623
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3624
    box yPosition:(box yPosition max:y1).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3625
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3626
    box makeTabable:(formatComponent).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3627
    box makeTabable:(landscapeComponent).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3628
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3629
    box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3630
    box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3631
    box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3632
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3633
    y := box yPosition.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3634
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3635
    topMarginComponent := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3636
        addLabelledInputField:(resources string:'top margin:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3637
        adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3638
        on:nil "/ topMargin 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3639
        tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3640
        from:0.0 to:0.5
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3641
        separateAtX:0.6.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3642
    topMarginComponent converter:(PrintConverter new initForNumber).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3643
    topMarginComponent model:topMargin.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3644
    y1 := box yPosition.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3645
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3646
    box yPosition:y.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3647
    unitList := SelectionInList with:#('inch' 'mm').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3648
    unitList selectionIndex:1.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3649
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3650
    component := box addComponent:(PopUpList on:unitList).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3651
    component
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3652
        left:0.6;
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3653
        width:0.3.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3654
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3655
    box yPosition:y1.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3656
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3657
    leftMarginComponent := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3658
        addLabelledInputField:(resources string:'left margin:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3659
        adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3660
        on:nil "/ leftMargin 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3661
        tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3662
        from:0.0 to:0.5
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3663
        separateAtX:0.6.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3664
    leftMarginComponent converter:(PrintConverter new initForNumber).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3665
    leftMarginComponent model:leftMargin.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3666
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3667
    rightMarginComponent := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3668
        addLabelledInputField:(resources string:'right margin:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3669
        adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3670
        on:nil "/ rightMargin 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3671
        tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3672
        from:0.0 to:0.5
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3673
        separateAtX:0.6.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3674
    rightMarginComponent converter:(PrintConverter new initForNumber).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3675
    rightMarginComponent model:rightMargin.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3676
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3677
    bottomMarginComponent := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3678
        addLabelledInputField:(resources string:'bottom margin:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3679
        adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3680
        on:nil "/ bottomMargin 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3681
        tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3682
        from:0.0 to:0.5
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3683
        separateAtX:0.6.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3684
    bottomMarginComponent converter:(PrintConverter new initForNumber).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3685
    bottomMarginComponent model:bottomMargin.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3686
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3687
    box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3688
    supportsColorComponent := box addCheckBox:(resources string:'Color printer') on:supportsColor.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3689
    box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3690
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3691
    updater := [ |p fg hasPageSize hasMargins|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3692
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3693
                       printerType selectionIndex ~~ 0 ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3694
                           p := possiblePrinters at:(printerType selectionIndex).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3695
                           hasPageSize := p supportsPageSizes. 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3696
                           hasMargins := p supportsMargins. 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3697
                       ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3698
                           hasPageSize := false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3699
                           hasMargins := false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3700
                       ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3701
                       hasPageSize ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3702
                          fg := Button new foregroundColor.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3703
                          formatComponent enable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3704
                          landscapeComponent enable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3705
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3706
                          formatComponent label:p pageFormat.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3707
                          pageFormat value:(p pageFormat).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3708
                          landscape value:(p landscape).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3709
                       ] ifFalse:[ 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3710
                          fg := Button new disabledForegroundColor.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3711
                          formatComponent disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3712
                          landscapeComponent disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3713
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3714
                          formatComponent label:'unknown'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3715
                          landscape value:nil.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3716
                       ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3717
                       hasMargins ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3718
                          unitList selectionIndex == 2 ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3719
                              unit := #mm
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3720
                          ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3721
                              unit := #inch
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3722
                          ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3723
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3724
                          topMargin value:(UnitConverter convert:p topMargin from:#inch to:unit).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3725
                          leftMargin value:(UnitConverter convert:p leftMargin from:#inch to:unit).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3726
                          rightMargin value:(UnitConverter convert:p rightMargin from:#inch to:unit).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3727
                          bottomMargin value:(UnitConverter convert:p bottomMargin from:#inch to:unit).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3728
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3729
                          topMarginComponent enable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3730
                          leftMarginComponent enable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3731
                          rightMarginComponent enable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3732
                          bottomMarginComponent enable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3733
                       ] ifFalse:[ 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3734
                          topMarginComponent disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3735
                          leftMarginComponent disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3736
                          rightMarginComponent disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3737
                          bottomMarginComponent disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3738
                       ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3739
                       formatLabel foregroundColor:fg.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3740
                       landscapeLabel foregroundColor:fg.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3741
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3742
                       p notNil ifTrue:[ 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3743
                           commandList := p defaultCommands.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3744
                           commandList notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3745
                                commandListPop list:commandList 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3746
                           ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3747
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3748
                           printCommand value:(p printCommand).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3749
                       ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3750
                       p supportsPostscript ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3751
                           supportsColorComponent disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3752
                           supportsColor value:false
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3753
                       ] ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3754
                           supportsColorComponent enable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3755
                           supportsColor value:(Printer supportsColor).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3756
                       ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3757
                     ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3758
    unitList onChangeSend:#value to:updater.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3759
    printerType onChangeSend:#value to:updater.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3760
    updater value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3761
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3762
    box addVerticalSpace;
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3763
        addHelpButtonFor:'Launcher/printerSettings.html';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3764
        addAbortButton; addOkButton.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3765
    box open.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3766
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3767
    box accepted ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3768
        Printer := possiblePrinters at:(printerType selectionIndex).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3769
        Printer printCommand:printCommand value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3770
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3771
        Printer supportsPageSizes ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3772
            Printer pageFormat:(pageFormat selection).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3773
            Printer landscape:(landscape value).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3774
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3775
        Printer supportsMargins ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3776
            unitList selectionIndex == 2 ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3777
                unit := #mm
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3778
            ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3779
                unit := #inch
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3780
            ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3781
            Printer topMargin:(UnitConverter convert:topMargin value from:unit to:#inch).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3782
            Printer leftMargin:(UnitConverter convert:leftMargin value from:unit to:#inch).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3783
            Printer rightMargin:(UnitConverter convert:rightMargin value from:unit to:#inch).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3784
            Printer bottomMargin:(UnitConverter convert:bottomMargin value from:unit to:#inch).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3785
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3786
        Printer supportsPostscript ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3787
            Printer supportsColor:supportsColor value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3788
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3789
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3790
    box destroy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3791
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3792
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3793
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3794
restoreSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3795
    "restore settings from a settings-file."
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3796
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3797
    "a temporary kludge - we need a central systemSettings object for this,
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3798
     which can be saved/restored with a single store/read."
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3799
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3800
    |fileName|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3801
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3802
    fileName := Dialog 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3803
        requestFileName:(resources string:'restore settings from:') 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3804
        default:'settings.stx'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3805
        ok:(resources string:'restore') 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3806
        abort:(resources string:'cancel') 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3807
        pattern:'*.stx'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3808
        fromDirectory:nil.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3809
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3810
    (fileName isNil or:[fileName isEmpty]) ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3811
        "/ canceled
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3812
        ^ self
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3813
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3814
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3815
    self withWaitCursorDo:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3816
        Smalltalk fileIn:fileName.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3817
        self reOpen
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3818
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3819
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3820
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3821
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3822
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3823
saveSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3824
    "save settings to a settings-file."
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3825
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3826
    "a temporary kludge - we need a central systemSettings object for this,
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3827
     which can be saved/restored with a single store/read."
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3828
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3829
    |s screen fileName|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3830
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3831
    fileName := Dialog 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3832
        requestFileName:(resources string:'save settings in:') 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3833
        default:'settings.stx'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3834
        ok:(resources string:'save') 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3835
        abort:(resources string:'cancel') 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3836
        pattern:'*.stx'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3837
        fromDirectory:nil.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3838
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3839
    (fileName isNil or:[fileName isEmpty]) ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3840
        "/ canceled
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3841
        ^ self
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3842
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3843
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3844
    s := fileName asFilename writeStream.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3845
    s isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3846
        self warn:'cannot write the ''' , fileName , ''' file'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3847
        ^ self
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3848
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3849
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3850
    s nextPutLine:'"/ ST/X saved settings';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3851
      nextPutLine:'"/ DO NOT MODIFY MANUALLY';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3852
      nextPutLine:'"/ (modifications would be lost with next save-settings)';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3853
      nextPutLine:'"/';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3854
      nextPutLine:'"/ this file was automatically generated by the';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3855
      nextPutLine:'"/ ''save settings'' function of the Launcher';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3856
      nextPutLine:'"/'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3857
    s cr.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3858
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3859
    s nextPutLine:'"/'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3860
    s nextPutLine:'"/ saved by ' , OperatingSystem getLoginName , '@' , OperatingSystem getHostName , ' at ' , AbsoluteTime now printString.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3861
    s nextPutLine:'"/'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3862
    s cr.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3863
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3864
    s nextPutLine:'"/'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3865
    s nextPutLine:'"/ Display settings:'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3866
    s nextPutLine:'"/'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3867
    s nextPutLine:'"/ only restore the display settings, if on the same Display ...'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3868
    s nextPutLine:'Display displayName = ' , (Display displayName storeString) , ' ifTrue:['.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3869
      screen := Screen current.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3870
      screen fixColors notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3871
        s nextPutLine:'  Image flushDeviceImages.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3872
        s nextPutLine:'  Color colorAllocationFailSignal catch:['.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3873
        s nextPutLine:'    Color getColorsRed:6 green:6 blue:4 on:Display'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3874
        s nextPutLine:'  ].'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3875
      ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3876
        s nextPutLine:'  Display releaseFixColors.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3877
      ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3878
      s nextPutLine:'  Display hasColors: ' , (screen hasColors storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3879
      s nextPutLine:'  Display widthInMillimeter: ' , (screen widthInMillimeter storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3880
      s nextPutLine:'  Display heightInMillimeter: ' , (screen heightInMillimeter storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3881
      s nextPutLine:'  Display supportsDeepIcons: ' , (screen supportsDeepIcons storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3882
      s nextPutLine:'  Image ditherAlgorithm: ' , (Image ditherAlgorithm storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3883
      s nextPutLine:'  View defaultStyle:(View defaultStyle). "/ to flush any device images'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3884
    s nextPutLine:'].'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3885
    s cr.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3886
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3887
    s nextPutLine:'"/'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3888
    s nextPutLine:'"/ Compiler settings:'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3889
    s nextPutLine:'"/'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3890
    s nextPutLine:'Compiler warnSTXSpecials: ' , (Compiler warnSTXSpecials storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3891
      nextPutLine:'Compiler warnUnderscoreInIdentifier: ' , (Compiler warnUnderscoreInIdentifier storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3892
      nextPutLine:'Compiler warnOldStyleAssignment: ' , (Compiler warnOldStyleAssignment storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3893
      nextPutLine:'Compiler warnCommonMistakes: ' , (Compiler warnCommonMistakes storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3894
      nextPutLine:'Compiler warnPossibleIncompatibilities: ' , (Compiler warnPossibleIncompatibilities storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3895
      nextPutLine:'Compiler allowUnderscoreInIdentifier: ' , (Compiler allowUnderscoreInIdentifier storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3896
      nextPutLine:'Compiler arraysAreImmutable: ' , (Compiler arraysAreImmutable storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3897
      nextPutLine:'Compiler lineNumberInfo: ' , (Compiler lineNumberInfo storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3898
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3899
      nextPutLine:'Compiler foldConstants: ' , (Compiler foldConstants storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3900
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3901
      nextPutLine:'Compiler stcCompilationIncludes: ' , (Compiler stcCompilationIncludes storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3902
      nextPutLine:'Compiler stcCompilationDefines: ' , (Compiler stcCompilationDefines storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3903
      nextPutLine:'Compiler stcCompilationOptions: ' , (Compiler stcCompilationOptions storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3904
      nextPutLine:'Compiler ccCompilationOptions: ' , (Compiler ccCompilationOptions storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3905
      nextPutLine:'Compiler ccPath: ' , (Compiler ccPath storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3906
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3907
      nextPutLine:'ObjectMemory justInTimeCompilation: ' , (ObjectMemory justInTimeCompilation storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3908
      nextPutLine:'ObjectMemory fullSingleStepSupport: ' , (ObjectMemory fullSingleStepSupport storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3909
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3910
    HistoryManager notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3911
        HistoryManager isActive ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3912
            s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager activate].'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3913
            s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager fullHistoryUpdate:' , HistoryManager fullHistoryUpdate storeString , '].'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3914
        ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3915
            s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager deactivate].'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3916
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3917
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3918
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3919
    ObjectFileLoader notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3920
        s nextPutLine:'ObjectFileLoader searchedLibraries: ' , (ObjectFileLoader searchedLibraries storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3921
        s nextPutLine:'ObjectFileLoader libPath: ' , (ObjectFileLoader libPath storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3922
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3923
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3924
    s nextPutLine:'Class catchMethodRedefinitions: ' , (Class catchMethodRedefinitions storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3925
    s nextPutLine:'ClassCategoryReader sourceMode: ' , (ClassCategoryReader sourceMode storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3926
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3927
    s cr.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3928
    s nextPutLine:'"/'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3929
    s nextPutLine:'"/ Info & Debug Messages:'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3930
    s nextPutLine:'"/'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3931
    s nextPutLine:'ObjectMemory infoPrinting: ' , (ObjectMemory infoPrinting storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3932
      nextPutLine:'ObjectMemory debugPrinting: ' , (ObjectMemory debugPrinting storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3933
      nextPutLine:'Object infoPrinting: ' , (Object infoPrinting storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3934
      nextPutLine:'DeviceWorkstation errorPrinting: ' , (DeviceWorkstation errorPrinting storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3935
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3936
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3937
    s cr.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3938
    s nextPutLine:'"/'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3939
    s nextPutLine:'"/ Misc settings:'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3940
    s nextPutLine:'"/'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3941
    s nextPutLine:'Class keepMethodHistory: ' , (Class methodHistory notNil storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3942
      nextPutLine:'Smalltalk logDoits: ' , (Smalltalk logDoits storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3943
      nextPutLine:'Autoload compileLazy: ' , (Autoload compileLazy storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3944
      nextPutLine:'Smalltalk loadBinaries: ' , (Smalltalk loadBinaries storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3945
      nextPutLine:'StandardSystemView includeHostNameInLabel: ' , (StandardSystemView includeHostNameInLabel storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3946
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3947
      "/ claus - I dont think its a good idea to save those ...
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3948
      nextPutLine:'"/ Class updateChanges: ' , (Class updatingChanges storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3949
      nextPutLine:'"/ ObjectMemory nameForChanges: ' , (ObjectMemory nameForChanges storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3950
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3951
      nextPutLine:'StandardSystemView returnFocusWhenClosingModalBoxes: ' , (StandardSystemView returnFocusWhenClosingModalBoxes storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3952
      nextPutLine:'StandardSystemView takeFocusWhenMapped: ' , (StandardSystemView takeFocusWhenMapped storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3953
      nextPutLine:'MenuView showAcceleratorKeys: ' , (MenuView showAcceleratorKeys storeString) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3954
      nextPutLine:'Class tryLocalSourceFirst: ' , (Class tryLocalSourceFirst storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3955
    (Exception emergencyHandler == Launcher notifyingEmergencyHandler) ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3956
        s nextPutLine:'Exception emergencyHandler:(Launcher notifyingEmergencyHandler).'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3957
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3958
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3959
    s cr.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3960
    s nextPutLine:'"/'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3961
    s nextPutLine:'"/ Printer settings:'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3962
    s nextPutLine:'"/'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3963
    s nextPutLine:'Printer := ' , (Printer name) , '.';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3964
      nextPutLine:'Printer printCommand: ' , (Printer printCommand storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3965
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3966
    Printer supportsPageSizes ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3967
        s nextPutLine:'Printer pageFormat: ' , (Printer pageFormat storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3968
        s nextPutLine:'Printer landscape: ' , (Printer landscape storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3969
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3970
    Printer supportsMargins ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3971
        s nextPutLine:'Printer topMargin: ' , (Printer topMargin storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3972
        s nextPutLine:'Printer leftMargin: ' , (Printer leftMargin storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3973
        s nextPutLine:'Printer rightMargin: ' , (Printer rightMargin storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3974
        s nextPutLine:'Printer bottomMargin: ' , (Printer bottomMargin storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3975
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3976
    Printer supportsPostscript ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3977
        s nextPutLine:'Printer supportsColor: ' , (Printer supportsColor storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3978
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3979
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3980
    s cr.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3981
    s nextPutLine:'"/'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3982
    s nextPutLine:'"/ Font settings:'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3983
    s nextPutLine:'"/'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3984
    s nextPutLine:'View defaultFont: ' , (View defaultFont storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3985
    s nextPutLine:'Label defaultFont: ' , (Label defaultFont storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3986
    s nextPutLine:'Button defaultFont: ' , (Button defaultFont storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3987
    s nextPutLine:'Toggle defaultFont: ' , (Toggle defaultFont storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3988
    s nextPutLine:'SelectionInListView defaultFont: ' , (SelectionInListView defaultFont storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3989
    s nextPutLine:'MenuView defaultFont: ' , (MenuView defaultFont storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3990
    s nextPutLine:'PullDownMenu defaultFont: ' , (PullDownMenu defaultFont storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3991
    s nextPutLine:'TextView defaultFont: ' , (TextView defaultFont storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3992
    s nextPutLine:'EditTextView defaultFont: ' , (EditTextView defaultFont storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3993
    s nextPutLine:'CodeView defaultFont: ' , (CodeView defaultFont storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3994
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3995
    s cr.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3996
    s nextPutLine:'"/'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3997
    s nextPutLine:'"/ Language setting:'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3998
    s nextPutLine:'"/'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  3999
    s nextPutLine:'Smalltalk language: ' , (Smalltalk language storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4000
    s nextPutLine:'Smalltalk languageTerritory: ' , (Smalltalk languageTerritory storeString) , '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4001
    s close.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4002
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4003
    "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4004
     Transcript topView application saveSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4005
    " 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4006
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4007
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4008
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4009
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4010
sourceAndDebuggerSettings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4011
    "open a dialog on misc other settings"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4012
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4013
    |box check logDoits updChanges changeFileName
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4014
     useManager hasManager 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4015
     repository repositoryHolder localSourceFirst 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4016
     sourceCacheDir cacheEntry
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4017
     component localCheck oldIndent nm fn manager
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4018
     keepMethodHistory showErrorNotifier showVerboseStack|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4019
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4020
    "/ 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4021
    "/ extract relevant system settings ...
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4022
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4023
    keepMethodHistory := Class methodHistory notNil asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4024
    logDoits := Smalltalk logDoits asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4025
    updChanges := Class updatingChanges asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4026
    changeFileName := ObjectMemory nameForChanges asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4027
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4028
    hasManager := AbstractSourceCodeManager notNil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4029
                  and:[AbstractSourceCodeManager isLoaded].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4030
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4031
    hasManager ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4032
        useManager := (manager := Smalltalk at:#SourceCodeManager) notNil asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4033
        localSourceFirst := Class tryLocalSourceFirst asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4034
        manager notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4035
            repository := manager repositoryName.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4036
            repository notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4037
                repositoryHolder := repository asValue
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4038
            ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4039
                repositoryHolder := '' asValue
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4040
            ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4041
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4042
    ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4043
        useManager := false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4044
        localSourceFirst := false
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4045
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4046
    showErrorNotifier := (Exception emergencyHandler == Launcher notifyingEmergencyHandler) asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4047
    showVerboseStack := (DebugView defaultVerboseBacktrace ? false) asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4048
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4049
    sourceCacheDir := nil asValue.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4050
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4051
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4052
    "/ create a box on those values ...
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4053
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4054
    box := DialogBox new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4055
    box label:(resources string:'Source & Debugger settings').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4056
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4057
    box addCheckBox:(resources string:'remember changed methods (for previous method in browser)') on:keepMethodHistory.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4058
    box addCheckBox:(resources string:'log compiles in changes file') on:updChanges.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4059
    box addCheckBox:(resources string:'log doIts in changes file') on:logDoits.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4060
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4061
    component := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4062
                    addLabelledInputField:(resources string:'change file name:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4063
                    adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4064
                    on:changeFileName 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4065
                    tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4066
                    separateAtX:0.4.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4067
    component immediateAccept:true; acceptOnLeave:false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4068
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4069
"/    y := box yPosition.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4070
"/    component := box addTextLabel:(resources string:'change file name:').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4071
"/    component width:0.5; adjust:#right; borderWidth:0.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4072
"/    box yPosition:y.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4073
"/    component := box addInputFieldOn:changeFileName tabable:true.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4074
"/    component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4075
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4076
    box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4077
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4078
    hasManager ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4079
        check := box addCheckBox:(resources string:'sourcecode from sourcecode management') on:useManager.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4080
        oldIndent := box leftIndent.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4081
        box leftIndent:30.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4082
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4083
        repositoryHolder notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4084
            component := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4085
                            addLabelledInputField:(resources string:'repository:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4086
                            adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4087
                            on:repositoryHolder 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4088
                            tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4089
                            separateAtX:0.4.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4090
            component immediateAccept:true; acceptOnLeave:false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4091
            component enableChannel:useManager.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4092
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4093
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4094
        cacheEntry := box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4095
                        addLabelledInputField:(resources string:'source cache dir:')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4096
                        adjust:#right
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4097
                        on:sourceCacheDir 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4098
                        tabable:true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4099
                        separateAtX:0.4.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4100
        cacheEntry immediateAccept:true; acceptOnLeave:false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4101
        cacheEntry enableChannel:useManager.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4102
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4103
        localCheck := box addCheckBox:(resources string:'if present, use local source (suppress checkout)') on:localSourceFirst.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4104
        localCheck enableChannel:useManager.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4105
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4106
        box leftIndent:oldIndent.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4107
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4108
        (AbstractSourceCodeManager isNil 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4109
        or:[AbstractSourceCodeManager defaultManager isNil]) ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4110
            useManager value:false.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4111
            cacheEntry disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4112
            check disable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4113
            localCheck enable.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4114
        ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4115
            sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4116
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4117
        box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4118
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4119
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4120
    box addCheckBox:(resources string:'show error notifier before opening debugger') on:showErrorNotifier.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4121
    box addCheckBox:(resources string:'verbose backtrace by default in debugger') on:showVerboseStack.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4122
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4123
    box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4124
        addHelpButtonFor:'Launcher/sourceSettings.html';
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4125
        addAbortButton; 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4126
        addOkButton.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4127
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4128
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4129
    "/ show the box ...
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4130
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4131
    box open.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4132
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4133
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4134
    "/ update system settings
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4135
    "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4136
    box accepted ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4137
        Class keepMethodHistory:keepMethodHistory value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4138
        Smalltalk logDoits:logDoits value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4139
        Class updateChanges:updChanges value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4140
        ObjectMemory nameForChanges:changeFileName value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4141
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4142
        (hasManager and:[useManager value]) ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4143
            manager isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4144
                Smalltalk at:#SourceCodeManager put:(AbstractSourceCodeManager defaultManager).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4145
                manager := Smalltalk at:#SourceCodeManager.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4146
            ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4147
            Class tryLocalSourceFirst:(localSourceFirst value).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4148
            localSourceFirst value ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4149
                nm := sourceCacheDir value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4150
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4151
                (fn := nm asFilename) exists ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4152
                    (self confirm:('cache directory ''' , nm , ''' does not exists\create ?' withCRs)) ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4153
                        fn makeDirectory; 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4154
                           makeReadableForAll;
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4155
                           makeWritableForAll;
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4156
                           makeExecutableForAll.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4157
                    ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4158
                ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4159
                (fn exists 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4160
                and:[fn isDirectory
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4161
                and:[fn isReadable
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4162
                and:[fn isWritable]]]) ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4163
                    AbstractSourceCodeManager cacheDirectoryName:(sourceCacheDir value).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4164
                ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4165
            ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4166
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4167
            repositoryHolder notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4168
                repositoryHolder value size > 0 ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4169
                    manager initializeForRepository:repositoryHolder value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4170
                ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4171
            ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4172
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4173
            showErrorNotifier value ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4174
                Exception emergencyHandler:nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4175
            ] ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4176
                Exception emergencyHandler:(Launcher notifyingEmergencyHandler)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4177
            ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4178
            DebugView defaultVerboseBacktrace:(showVerboseStack value).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4179
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4180
        ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4181
            Smalltalk at:#SourceCodeManager put:nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4182
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4183
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4184
    box destroy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4185
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4186
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4187
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4188
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4189
viewStyleSetting 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4190
    "open a dialog on viewStyle related settings"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4191
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4192
    |listOfStyles resourceDir dir box 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4193
     list listView scrView infoLabel infoForwarder newStyle
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4194
     someRsrcFile b didApply|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4195
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4196
    "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4197
     search resources directory for a list of .style files ...
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4198
    "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4199
    someRsrcFile := Smalltalk getSystemFileName:('resources' asFilename constructString:'normal.style').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4200
    someRsrcFile notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4201
        resourceDir := someRsrcFile asFilename directoryName
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4202
    ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4203
        resourceDir := Smalltalk getSystemFileName:'resources'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4204
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4205
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4206
    resourceDir isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4207
        self warn:'no styles found (missing ''resources'' directory)'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4208
        ^ self
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4209
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4210
    dir := resourceDir asFilename directoryContents.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4211
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4212
    listOfStyles := dir select:[:aFileName | aFileName asFilename hasSuffix:'style'].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4213
    listOfStyles := listOfStyles collect:[:aFileName | aFileName asFilename withoutSuffix name].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4214
    Filename isCaseSensitive ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4215
        listOfStyles := listOfStyles collect:[:aStyleName | aStyleName asLowercase].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4216
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4217
    listOfStyles sort.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4218
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4219
"/ old code: used a standard ListSelectionBox
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4220
"/ changed to intercept selection and add info-output.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4221
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4222
"/    box := ListSelectionBox title:(resources string:'STYLE_MSG') withCRs.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4223
"/    box label:(resources string:'Style selection').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4224
"/    box list:listOfStyles.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4225
"/    box initialText:View defaultStyle.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4226
"/    box selectAction:[:newStyle |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4227
"/    ].    
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4228
"/    box action:[:newStyle |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4229
"/        transcript topView withCursor:Cursor wait do:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4230
"/            transcript showCR:'change style to ' , newStyle , ' ...'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4231
"/            View defaultStyle:newStyle asSymbol.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4232
"/        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4233
"/    ].    
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4234
"/    box showAtPointer
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4235
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4236
"/ new code: build box 'by 'hand'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4237
"/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4238
    infoForwarder := [
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4239
                        |nm sheet comment|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4240
                        nm := list selection.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4241
                        sheet := ViewStyle fromFile:(nm , '.style').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4242
                        comment := sheet at:#comment ifAbsent:''.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4243
                        infoLabel label:comment withCRs asStringCollection
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4244
                       ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4245
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4246
    list := SelectionInList with:listOfStyles.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4247
    list onChangeSend:#value to:infoForwarder.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4248
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4249
    box := Dialog new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4250
    box label:(resources string:'Style selection').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4251
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4252
    (box addTextLabel:(resources string:'STYLE_MSG') withCRs) adjust:#left.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4253
    listView := SelectionInListView on:list.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4254
    listView doubleClickAction:[:sel | box accept value:true. box hide].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4255
    scrView := box addComponent:(ScrollableView forView:listView) tabable:true.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4256
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4257
    box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4258
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4259
    (infoLabel := box addTextLabel:'\\' withCRs) adjust:#centerLeft.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4260
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4261
    box addAbortButton.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4262
    b := box addButton:(Button label:(resources string:'apply')).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4263
    b action:[didApply := true. self changeViewStyleTo:(list selection)].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4264
    box addOkButton.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4265
    list selection:(View defaultStyle).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4266
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4267
    box stickAtBottomWithVariableHeight:scrView.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4268
    box stickAtBottomWithFixHeight:infoLabel.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4269
    box open.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4270
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4271
    box accepted ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4272
        ((newStyle := list selection) ~= View defaultStyle
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4273
        or:[didApply ~~ true]) ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4274
            self changeViewStyleTo:newStyle.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4275
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4276
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4277
    box destroy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4278
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4279
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4280
! !
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4281
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4282
!NewLauncher methodsFor:'action - tools'!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4283
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4284
compressingGarbageCollect
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4285
    "perform a compressing garbageCollect"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4286
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4287
    ObjectMemory verboseGarbageCollect
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4288
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4289
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4290
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4291
deIconifyAllWindows
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4292
    |setOfViews|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4293
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4294
    setOfViews := Project current views asIdentitySet.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4295
    setOfViews addAll:(Project defaultProject views).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4296
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4297
    setOfViews do:[:aTopView |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4298
        aTopView device == Screen current ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4299
            aTopView expand
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4300
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4301
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4302
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4303
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4304
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4305
findAndDestroyWindow
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4306
    "find a window (by name) and destroy it"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4307
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4308
    |v|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4309
    v := self findWindow:'select view to close:'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4310
    v notNil ifTrue:[v destroy]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4311
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4312
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4313
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4314
findAndRaiseWindow
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4315
    "find a window (by name) and raise it"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4316
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4317
    |v|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4318
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4319
    v := self findWindow:'select view to raise deiconified:'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4320
    v notNil ifTrue:[v raiseDeiconified]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4321
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4322
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4323
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4324
fullScreenHardcopy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4325
    "after a second (to allow redraw of views under menu ...),
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4326
     save the contents of the whole screen."
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4327
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4328
    Processor 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4329
        addTimedBlock:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4330
                        self 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4331
                            saveScreenImage:(Image fromScreen) 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4332
                            defaultName:'screen'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4333
                      ] 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4334
        afterSeconds:1
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4335
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4336
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4337
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4338
garbageCollect
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4339
    "perform a non-compressing garbageCollect"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4340
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4341
    ObjectMemory reclaimSymbols
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4342
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4343
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4344
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4345
iconifyAllWindows
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4346
    |setOfViews|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4347
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4348
    setOfViews := Project current views asIdentitySet.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4349
    setOfViews addAll:(Project defaultProject views).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4350
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4351
    setOfViews do:[:aTopView |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4352
        aTopView device == Screen current ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4353
            aTopView collapse
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4354
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4355
    ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4356
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4357
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4358
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4359
pickAView
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4360
    "let user pick a view and return it"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4361
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4362
    |v|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4363
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4364
    (Delay forSeconds:1) wait.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4365
    v := Screen current viewFromUser.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4366
    v isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4367
        self warn:'Sorry, this is not a smalltalk view'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4368
        ^ nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4369
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4370
    ^ v
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4371
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4372
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4373
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4374
screenHardcopy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4375
    "after a second (to allow redraw of views under menu ...),
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4376
     let user specify a rectangular area on the screen
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4377
     and save its contents."
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4378
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4379
    |area|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4380
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4381
    Processor 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4382
        addTimedBlock:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4383
                        [Screen current leftButtonPressed] whileTrue:[Processor yield].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4384
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4385
                        area := Rectangle fromUser.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4386
                        (area width > 0 and:[area height > 0]) ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4387
                            self saveScreenImage:(Image fromScreen:area) defaultName:'hardcopy'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4388
                        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4389
                      ] 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4390
        afterSeconds:1
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4391
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4392
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4393
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4394
startLatencyMonitor
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4395
    "open an interruptLatencyMonitor view"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4396
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4397
    InterruptLatencyMonitor notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4398
        Autoload autoloadFailedSignal catch:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4399
            InterruptLatencyMonitor autoload.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4400
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4401
        InterruptLatencyMonitor isLoaded ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4402
            InterruptLatencyMonitor open.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4403
            ^ self.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4404
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4405
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4406
    self warn:'Sorry - the irq latency monitor is only available
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4407
in the full commercial release'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4408
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4409
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4410
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4411
startStopEventTrace
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4412
    "start/stop event tracing for a particular view"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4413
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4414
    |v wg|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4415
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4416
    v := Screen current viewFromUser.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4417
    v notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4418
        v := v topView.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4419
        wg := v windowGroup.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4420
        wg notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4421
            "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4422
            "/ toggle eventTrace in its windowGroup
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4423
            "/
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4424
            wg traceEvents:(wg preEventHook isNil)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4425
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4426
    ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4427
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4428
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4429
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4430
startWindowTreeView
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4431
    "open a windowTree view (on a topView)"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4432
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4433
    |v|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4434
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4435
    v := self pickAView.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4436
    v notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4437
        WindowTreeView openOn:v topView
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4438
    ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4439
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4440
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4441
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4442
viewDestroy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4443
    "let user pick a view and destroy it.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4444
     Even allow destroying non-smalltalk views
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4445
     (also for views which I forgot due to some error)"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4446
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4447
    |device v id i c|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4448
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4449
    (Delay forSeconds:1) wait.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4450
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4451
    device := Screen current.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4452
    i := Image fromFile:'bitmaps/xpmBitmaps/cursors/cross2.xpm'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4453
    i isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4454
        c := Cursor crossHair
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4455
    ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4456
        c := Cursor fromImage:i
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4457
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4458
    id := device viewIdFromPoint:(device pointFromUserShowing:c).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4459
    (v := device viewFromId:id) notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4460
        v topView destroy.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4461
        ^ self
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4462
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4463
    id = device rootView id ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4464
        ^ self
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4465
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4466
    (Dialog confirm:'mhmh, this may not a be smalltalk view\(Or I somehow forgot about it).\Destroy anyway ?' withCRs)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4467
    ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4468
        device destroyView:nil withId:id
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4469
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4470
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4471
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4472
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4473
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4474
viewHardcopy
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4475
    "after a second (to allow redraw of views under menu ...),
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4476
     let user specify a view and save its contents."
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4477
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4478
    Processor 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4479
        addTimedBlock:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4480
                        |v|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4481
                        (v := Screen current viewFromUser) notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4482
                            self saveScreenImage:(Image fromView:(v topView)) defaultName:'hardcopy'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4483
                        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4484
                      ] 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4485
        afterSeconds:1
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4486
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4487
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4488
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4489
viewInspect
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4490
    "let user pick a view and inspect it. Only smalltalk views are allowed"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4491
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4492
    |v|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4493
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4494
    (v := self pickAView) notNil 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4495
    ifTrue:
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4496
    [
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4497
        v inspect
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4498
    ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4499
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4500
! !
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4501
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4502
!NewLauncher methodsFor:'aspects'!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4503
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4504
enableDangerousMenuItemsInRemoteLauncher
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4505
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4506
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4507
    (holder := builder bindingAt:#enableDangerousMenuItemsInRemoteLauncher) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4508
        builder aspectAt:#enableDangerousMenuItemsInRemoteLauncher put:(holder :=  true asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4509
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4510
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4511
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4512
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4513
listOfProjects
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4514
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4515
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4516
    (holder := builder bindingAt:#listOfProjects) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4517
        builder aspectAt:#listOfProjects put:(holder :=  List withAll: Project allProjects).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4518
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4519
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4520
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4521
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4522
selectionOfProject
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4523
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4524
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4525
    (holder := builder bindingAt:#selectionOfProject) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4526
        builder aspectAt:#selectionOfProject put:(holder :=  1 asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4527
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4528
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4529
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4530
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4531
valueOfApplicationName
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4532
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4533
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4534
    (holder := builder bindingAt:#valueOfApplicationName) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4535
        builder aspectAt:#valueOfApplicationName put:(holder :=  'application' asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4536
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4537
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4538
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4539
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4540
valueOfBuildDate
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4541
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4542
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4543
    (holder := builder bindingAt:#valueOfBuildDate) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4544
        builder aspectAt:#valueOfBuildDate put:(holder :=  ValueHolder new).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4545
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4546
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4547
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4548
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4549
valueOfConfiguration
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4550
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4551
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4552
    (holder := builder bindingAt:#valueOfConfiguration) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4553
        builder aspectAt:#valueOfConfiguration put:(holder :=  Smalltalk configuration asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4554
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4555
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4556
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4557
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4558
valueOfDefaultLibs
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4559
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4560
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4561
    (holder := builder bindingAt:#valueOfDefaultLibs) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4562
        builder aspectAt:#valueOfDefaultLibs put:(holder :=  true asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4563
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4564
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4565
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4566
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4567
valueOfLibcomp
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4568
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4569
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4570
    (holder := builder bindingAt:#valueOfLibcomp) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4571
        builder aspectAt:#valueOfLibcomp put:(holder :=  false asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4572
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4573
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4574
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4575
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4576
valueOfLibhtml
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4577
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4578
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4579
    (holder := builder bindingAt:#valueOfLibhtml) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4580
        builder aspectAt:#valueOfLibhtml put:(holder :=  false asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4581
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4582
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4583
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4584
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4585
valueOfLibtool
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4586
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4587
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4588
    (holder := builder bindingAt:#valueOfLibtool) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4589
        builder aspectAt:#valueOfLibtool put:(holder :=  false asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4590
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4591
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4592
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4593
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4594
valueOfLibtool2
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4595
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4596
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4597
    (holder := builder bindingAt:#valueOfLibtool2) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4598
        builder aspectAt:#valueOfLibtool2 put:(holder :=  false asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4599
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4600
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4601
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4602
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4603
valueOfLibui
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4604
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4605
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4606
    (holder := builder bindingAt:#valueOfLibui) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4607
        builder aspectAt:#valueOfLibui put:(holder :=  false asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4608
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4609
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4610
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4611
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4612
valueOfLibwidg
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4613
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4614
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4615
    (holder := builder bindingAt:#valueOfLibwidg) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4616
        builder aspectAt:#valueOfLibwidg put:(holder :=  true asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4617
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4618
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4619
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4620
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4621
valueOfLibwidg2
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4622
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4623
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4624
    (holder := builder bindingAt:#valueOfLibwidg2) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4625
        builder aspectAt:#valueOfLibwidg2 put:(holder :=  true asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4626
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4627
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4628
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4629
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4630
valueOfStartupClass
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4631
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4632
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4633
    (holder := builder bindingAt:#valueOfStartupClass) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4634
        builder aspectAt:#valueOfStartupClass put:(holder :=  'Smalltalk' asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4635
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4636
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4637
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4638
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4639
valueOfStartupModule
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4640
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4641
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4642
    (holder := builder bindingAt:#valueOfStartupModule) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4643
        builder aspectAt:#valueOfStartupModule put:(holder :=  'librun/main.c' asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4644
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4645
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4646
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4647
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4648
valueOfStartupSelector
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4649
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4650
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4651
    (holder := builder bindingAt:#valueOfStartupSelector) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4652
        builder aspectAt:#valueOfStartupSelector put:(holder :=  'start' asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4653
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4654
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4655
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4656
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4657
valueOfSystemLibraries
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4658
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4659
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4660
    (holder := builder bindingAt:#valueOfSystemLibraries) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4661
        builder aspectAt:#valueOfSystemLibraries put:(holder :=  '/usr/lib/libc.a /home/tz/stx/support/VGL/vogl/src/libvogl.a' asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4662
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4663
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4664
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4665
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4666
valueOfTargetDirectory
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4667
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4668
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4669
    (holder := builder bindingAt:#valueOfTargetDirectory) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4670
        builder aspectAt:#valueOfTargetDirectory put:(holder :=  (Filename homeDirectory asFilename construct: 'application') name asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4671
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4672
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4673
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4674
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4675
valueOfTopDirectory
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4676
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4677
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4678
    (holder := builder bindingAt:#valueOfTopDirectory) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4679
        builder aspectAt:#valueOfTopDirectory put:(holder :=  ((PipeStream readingFrom: 'echo $STX_LIBDIR') nextLine, '/..') asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4680
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4681
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4682
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4683
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4684
valueOfUserLibraries
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4685
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4686
    |holder|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4687
    (holder := builder bindingAt:#valueOfUserLibraries) isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4688
        builder aspectAt:#valueOfUserLibraries put:(holder :=  '' asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4689
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4690
    ^ holder
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4691
! !
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4692
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4693
!NewLauncher methodsFor:'change & update'!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4694
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4695
update:something with:aParameter from:changedObject
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4696
    "care for project changes & update my infoView"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4697
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4698
    ((something == #currentProject) or:[changedObject == Project]) ifTrue: [self updateInfo]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4699
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4700
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4701
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4702
updateInfo
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4703
    "update the infoView from the current project"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4704
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4705
    |project projectName projectDir packageName defNameSpace msg args|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4706
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4707
    (Project isNil or:[(project := Project current) isNil]) ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4708
        projectName := '* none *'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4709
        projectDir := '.'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4710
        packageName := '* none *'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4711
    ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4712
        projectName := project name.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4713
        projectDir := project directory.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4714
        packageName := project packageName.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4715
        defNameSpace := project defaultNameSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4716
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4717
    defNameSpace isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4718
        defNameSpace := Smalltalk.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4719
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4720
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4721
    defNameSpace == Smalltalk ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4722
        msg := 'project: ''%1''  fileOut to: ''%3''  package: ''%2'''.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4723
        args := Array 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4724
                    with:projectName
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4725
                    with:packageName 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4726
                    with:(projectDir contractTo:30).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4727
    ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4728
        msg := 'project: ''%1''  fileOut to: ''%3''  package: ''%2''  nameSpace: %4'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4729
        args := Array 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4730
                        with:projectName
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4731
                        with:packageName 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4732
                        with:(projectDir contractTo:30)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4733
                        with:defNameSpace name.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4734
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4735
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4736
    self valueOfInfoLabel value:(resources string:msg withArgs:args)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4737
! !
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4738
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4739
!NewLauncher methodsFor:'private'!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4740
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4741
changeViewStyleTo:newStyle
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4742
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4743
    newStyle notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4744
        self withWaitCursorDo:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4745
            transcript showCR:'change style to ' , newStyle , ' ...'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4746
            View defaultStyle:newStyle asSymbol.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4747
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4748
        self reOpen
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4749
    ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4750
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4751
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4752
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4753
findWindow:title
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4754
    "a helper for find & destroy and find & raise operations;
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4755
     let user choose a view and return it; return nil on cancel"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4756
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4757
    |knownTopViews nameList box|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4758
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4759
    knownTopViews := IdentitySet new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4760
    Screen allScreens do:[:aScreen |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4761
        aScreen knownViews do:[:aView |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4762
            |top showIt wg|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4763
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4764
            aView notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4765
                top := aView topView.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4766
                (top isKindOf:DebugView) ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4767
                    "/ although modal, show it.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4768
                    showIt := top realized
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4769
                ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4770
                    wg := top windowGroup.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4771
                    showIt := (wg notNil and:[wg isModal not]).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4772
                ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4773
                showIt ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4774
                    knownTopViews add:top
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4775
                ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4776
            ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4777
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4778
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4779
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4780
    knownTopViews := knownTopViews asOrderedCollection.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4781
    knownTopViews sort:[:v1 :v2 | |l1 l2|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4782
                                l1 := v1 label ? 'aView'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4783
                                l2 := v2 label ? 'aView'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4784
                                l1 < l2
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4785
                       ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4786
    nameList := knownTopViews collect:[:v | 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4787
                                        |isDead wg p l|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4788
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4789
                                        l := v label ? 'aView'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4790
                                        ((wg := v windowGroup) notNil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4791
                                        and:[(p := wg process) notNil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4792
                                        and:[p state ~~ #dead]]) ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4793
                                            l  
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4794
                                        ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4795
                                            l , ' (dead ?)'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4796
                                        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4797
                                      ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4798
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4799
    box := ListSelectionBox new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4800
    box noEnterField.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4801
    box list:nameList.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4802
    box label:(resources string:'view selection').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4803
    box title:(resources string:title) withCRs.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4804
    box action:[:selection |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4805
        |v|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4806
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4807
        v := knownTopViews at:box selectionIndex.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4808
        box destroy.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4809
        ^ v
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4810
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4811
    box extent:400@300.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4812
    box showAtPointer.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4813
    ^ nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4814
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4815
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4816
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4817
fontBoxForEncoding:encodingMatch
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4818
    "open a fontBox, showing fonts which match some encoding
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4819
     (used when changing to japanese ...)"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4820
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4821
    |box y b
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4822
     labelDef buttonDef listDef menuDef textDef
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4823
     models labels allOfThem filter|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4824
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4825
    encodingMatch notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4826
        filter := [:f | f encoding notNil 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4827
                        and:[encodingMatch match:f encoding]].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4828
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4829
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4830
    models := OrderedCollection new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4831
    labels := OrderedCollection new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4832
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4833
    models add:(allOfThem := nil asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4834
    models add:(labelDef := Label defaultFont asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4835
    models add:(buttonDef := Button defaultFont asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4836
    models add:(listDef := SelectionInListView defaultFont asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4837
    models add:(menuDef := MenuView defaultFont asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4838
    models add:(textDef := TextView defaultFont asValue).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4839
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4840
    box := Dialog new.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4841
    box label:(resources string:'Font settings').
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4842
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4843
    models
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4844
    with:(resources array:#('all' 'labels' 'buttons' 'lists' 'menus' 'edit text'))
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4845
    do:[:model :title |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4846
        |y2 lbl f i|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4847
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4848
        f := model value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4849
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4850
        (box addTextLabel:title) adjust:#left.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4851
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4852
        y := box yPosition.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4853
        b := box addComponent:(Button label:(resources string:'change ...')) tabable:true.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4854
        b relativeExtent:nil; extent:(b preferredExtent).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4855
        y2 := box yPosition.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4856
        box yPosition:y.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4857
        i := box leftIndent.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4858
        box leftIndent:(b widthIncludingBorder + View viewSpacing).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4859
        (lbl := box addTextLabel:'')
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4860
            adjust:#left;
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4861
            font:(model value);
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4862
            labelChannel:(BlockValue 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4863
                            with:[:v | |f|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4864
                                f := v value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4865
                                f isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4866
                                    ''
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4867
                                ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4868
                                    f userFriendlyName
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4869
                                ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4870
                            ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4871
                            argument:model).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4872
        labels add:lbl.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4873
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4874
        box leftIndent:i.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4875
        box yPosition:(box yPosition max:y2).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4876
        box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4877
        box addHorizontalLine.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4878
        box addVerticalSpace.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4879
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4880
        b action:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4881
            |f|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4882
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4883
            f := FontPanel 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4884
                fontFromUserInitial:(model value) 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4885
                              title:(resources string:'font for %1' with:title)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4886
                             filter:filter.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4887
            f notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4888
                model == allOfThem ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4889
                    models do:[:m | m value:f].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4890
                    labels do:[:l | l font:f]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4891
                ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4892
                    model value:f.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4893
                    lbl font:f.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4894
                ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4895
            ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4896
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4897
        model == allOfThem ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4898
            box addVerticalSpace
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4899
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4900
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4901
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4902
    box addAbortButton; addOkButton.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4903
    (box addButton:(Button label:(resources string:'defaults')) before:nil)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4904
        action:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4905
            "/ fetch defaults
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4906
            View updateAllStyleCaches.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4907
            labelDef value: Label defaultFont.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4908
            buttonDef value: Button defaultFont.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4909
            listDef value: SelectionInListView defaultFont.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4910
            menuDef value: MenuView defaultFont.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4911
            textDef value: TextView defaultFont.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4912
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4913
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4914
    box open.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4915
    box accepted ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4916
        Label defaultFont:labelDef value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4917
        Button defaultFont:buttonDef value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4918
        Toggle defaultFont:buttonDef value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4919
        SelectionInListView defaultFont:listDef value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4920
        MenuView defaultFont:menuDef value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4921
        PullDownMenu defaultFont:menuDef value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4922
        TextView defaultFont:textDef value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4923
        EditTextView defaultFont:textDef value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4924
        CodeView defaultFont:textDef value.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4925
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4926
    box destroy.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4927
    ^ box accepted
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4928
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4929
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4930
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4931
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4932
openApplication: className
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4933
     "open an application, given by the classe name."
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4934
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4935
    self openApplication:className nameSpace:nil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4936
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4937
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4938
openApplication:className nameSpace:aNameSpace
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4939
    "open some application, given the classes name.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4940
     Look for it in Smalltalk and the given nameSpace"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4941
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4942
    self openApplication:className nameSpace:aNameSpace with:#open
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4943
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4944
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4945
openApplication:className nameSpace:aNameSpace with:aSelector
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4946
    "open some application, given the classes name.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4947
     Look for it in Smalltalk and the given nameSpace"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4948
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4949
    |cls|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4950
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4951
    cls := Smalltalk at:className asSymbol.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4952
    cls isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4953
        "/ look if its in the nameSpace
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4954
        aNameSpace notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4955
            cls := aNameSpace at:className asSymbol
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4956
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4957
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4958
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4959
    cls isNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4960
        self warn:(resources string:'Sorry, the %1 class is not available.' with:className).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4961
    ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4962
        Autoload autoloadFailedSignal handle:[:ex |
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4963
            self warn:(resources string:'Sorry, the %1 class seems to be not available.' with:className)
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4964
        ] do:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4965
            self withWaitCursorDo:[cls perform:aSelector]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4966
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4967
    ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4968
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4969
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4970
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4971
reOpen
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4972
    "reopen a new launcher.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4973
     for now (since style & language settings currently do
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4974
     not affect living views ...)"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4975
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4976
    |contents newLauncher|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4977
    contents := transcript endEntry; list.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4978
    newLauncher := self class open.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4979
    newLauncher window waitUntilVisible.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4980
    newLauncher transcript list:contents; hideCursor; scrollToBottom; cursorToEnd; showCursor.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4981
    DebugView newDebugger.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4982
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4983
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4984
reopenLauncher
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4985
    "reopen a new launcher.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4986
     for now (since style & language settings currently do
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4987
     not affect living views ...)"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4988
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4989
    |contents newLauncher|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4990
    contents := transcript endEntry; list.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4991
    newLauncher := self class open.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4992
    newLauncher window waitUntilVisible.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4993
    newLauncher transcript list:contents; hideCursor; scrollToBottom; cursorToEnd; showCursor
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4994
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4995
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4996
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4997
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4998
saveAllViews
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  4999
    "tell each topview that we are going to terminate and give it chance
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5000
     to save its contents."
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5001
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5002
    ObjectMemory changed:#aboutToExit
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5003
! !
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5004
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5005
!NewLauncher methodsFor:'queries'!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5006
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5007
processName
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5008
    "for monitors only - my name"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5009
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5010
    ^ 'ST/X Launcher'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5011
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5012
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5013
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5014
transcript
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5015
    "my transcript"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5016
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5017
    ^ transcript
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5018
! !
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5019
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5020
!NewLauncher methodsFor:'startup / release'!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5021
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5022
addTopViewsToCurrentProject
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5023
    "ignored here - the launcher is always global (i.e. not project private)."
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5024
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5025
    ^ self
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5026
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5027
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5028
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5029
close
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5030
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5031
    Display beep.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5032
    OpenLaunchers removeIdentical:self ifAbsent:nil.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5033
    Project notNil ifTrue:[Project removeDependent:self].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5034
    super close.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5035
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5036
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5037
closeRequest
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5038
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5039
    (self confirm:(resources string:'really close %1 ?' with:self class name)) ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5040
        super closeRequest
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5041
    ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5042
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5043
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5044
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5045
openInterface
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5046
    "sent by my superclass to open up my interface"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5047
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5048
    "/ if there is already a transcript on my device,
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5049
    "/ I am a slave launcher with limited functionality.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5050
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5051
    Transcript notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5052
        Transcript ~~ Stderr ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5053
            isMainLauncher := (Transcript graphicsDevice == device).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5054
            self enableDangerousMenuItemsInRemoteLauncher value: isMainLauncher.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5055
        ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5056
            isMainLauncher := true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5057
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5058
    ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5059
        isMainLauncher := true
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5060
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5061
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5062
    "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5063
     open with higher prio to allow interaction even while things
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5064
     are running ...
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5065
    "
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5066
    super openInterface.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5067
    self setupTranscript; updateInfo.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5068
    Project notNil ifTrue: [Project addDependent:self].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5069
    self builder window windowGroup process priority:(Processor userSchedulingPriority + 1).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5070
    self class OpenLaunchers add: self.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5071
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5072
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5073
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5074
restarted
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5075
    "image restart - since WindowGroup recreates the process with
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5076
     the default priority, we have to raise the prio again.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5077
     Mhmh - this looks like a bug to me ...
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5078
     Also, the cursor (which was stored as a write or waitCursor) must
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5079
     be reset to normal."
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5080
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5081
    Processor activeProcess priority:(Processor userSchedulingPriority + 1).
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5082
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5083
    super restarted
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5084
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5085
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5086
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5087
saveAndTerminateRequest
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5088
    "some windowManagers can send this, to shutDown an application
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5089
     but let it save its state before, for later restart. 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5090
     Although I have not yet encountered such a windowManager,
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5091
     we are already prepared for this ;-)"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5092
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5093
    self snapshot.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5094
    super saveAndTerminateRequest
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5095
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5096
!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5097
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5098
setupTranscript 
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5099
    "create the transcript view"
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5100
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5101
    |launcher oldLauncher|
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5102
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5103
    "/ check if this is an additional launcher on a remote display.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5104
    "/ if so, do not close the real launcher.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5105
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5106
    (Transcript notNil and:[Transcript ~~ Stderr]) ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5107
        isMainLauncher ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5108
            launcher := Transcript topView application
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5109
        ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5110
            launcher := self class current.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5111
        ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5112
        launcher notNil ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5113
            launcher window graphicsDevice == device ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5114
                self class OpenLaunchers removeIdentical:launcher ifAbsent:nil.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5115
                (oldLauncher := Smalltalk at: #Launcher) notNil
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5116
                    ifTrue: [oldLauncher OpenLaunchers removeIdentical:launcher ifAbsent:nil].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5117
                launcher close
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5118
            ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5119
        ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5120
    ].
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5121
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5122
    transcript := (builder componentAt: #transcriptView) subViews first.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5123
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5124
    isMainLauncher ifTrue:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5125
        transcript beTranscript.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5126
    ] ifFalse:[
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5127
        transcript showCR:'**************** Notice ***********************'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5128
        transcript showCR:'**       this is NOT the Transcript          **'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5129
        transcript showCR:'** The real Transcript is on the main screen **'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5130
        transcript showCR:'**                                           **'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5131
        transcript showCR:'** Menus affecting common state are disabled **'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5132
        transcript showCR:'***********************************************'.
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5133
    ]
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5134
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5135
! !
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5136
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5137
!NewLauncher class methodsFor:'documentation'!
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5138
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5139
version
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5140
    ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.4 1998-01-18 19:03:44 tz Exp $'
60e6a7d07c93 initial checkin
tz
parents:
diff changeset
  5141
! !