Launcher.st
author Claus Gittinger <cg@exept.de>
Thu, 30 May 1996 09:19:25 +0200
changeset 592 5a03a69bc5a3
parent 591 b06ede2544fb
child 594 01aba783dbc8
permissions -rw-r--r--
oops - menuAction is now called with arg if there is one
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
88
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
     1
"
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
     2
 COPYRIGHT (c) 1995 by Claus Gittinger
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
     3
	      All Rights Reserved
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
     4
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
     5
 This software is furnished under a license and may be used
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
     6
 only in accordance with the terms of that license and with the
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
     8
 be provided or otherwise made available to, or used by, any
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
     9
 other person.  No title to or ownership of the software is
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    10
 hereby transferred.
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    11
"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
    12
11b4ce85104e Initial revision
claus
parents:
diff changeset
    13
ApplicationModel subclass:#NewLauncher
281
7b73ea8b2faa more for international language support
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
    14
	instanceVariableNames:'myMenu buttonPanel transcript infoView infoProcess helpIsOn'
7b73ea8b2faa more for international language support
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
    15
	classVariableNames:'CachedAboutIcon'
7b73ea8b2faa more for international language support
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
    16
	poolDictionaries:''
7b73ea8b2faa more for international language support
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
    17
	category:'Interface-Smalltalk'
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
    18
!
11b4ce85104e Initial revision
claus
parents:
diff changeset
    19
88
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    20
!NewLauncher class methodsFor:'documentation'!
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    21
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    22
copyright
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    23
"
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    24
 COPYRIGHT (c) 1995 by Claus Gittinger
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    25
	      All Rights Reserved
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    26
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    27
 This software is furnished under a license and may be used
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    28
 only in accordance with the terms of that license and with the
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    29
 inclusion of the above copyright notice.   This software may not
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    30
 be provided or otherwise made available to, or used by, any
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    31
 other person.  No title to or ownership of the software is
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    32
 hereby transferred.
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    33
"
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    34
!
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    35
105
claus
parents: 104
diff changeset
    36
customization
claus
parents: 104
diff changeset
    37
"
claus
parents: 104
diff changeset
    38
    Of course, it is possible to change the NewLauncher class itself
claus
parents: 104
diff changeset
    39
    as appropriate, however, we suggest you create a subclass (say MyLauncher),
524
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    40
    define it as autoloaded in the patches file, and redefine some methods
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    41
    in that class. 
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    42
    That way, your changes are easier to reintroduce in case of an ST/X upgrade.
105
claus
parents: 104
diff changeset
    43
claus
parents: 104
diff changeset
    44
claus
parents: 104
diff changeset
    45
    adding more buttons to the button-panel:
claus
parents: 104
diff changeset
    46
claus
parents: 104
diff changeset
    47
      see the method #buttonPanelSpec;
524
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    48
        it defines a list of selectors and icons, which is used by 
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    49
        #setupButtonPanelIn:. 
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    50
        There, for each entry, a button with that icon is created, 
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    51
        which sends a selector-message to the launcher.
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    52
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    53
        Add entries to that list, and define appropriate methods.
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    54
        For example, to add a button which opens a drawTool,
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    55
        change #buttonPanelSpec to:
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    56
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    57
        buttonPanelSpec
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    58
            ^ #(
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    59
                #(startSystemBrowser  'SBrowser32x32.xbm')
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    60
                #(startFileBrowser    'FBrowser32x32.xbm')
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    61
                #(nil nil)
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    62
                #(startChangesBrowser 'CBrowser32x32.xbm')
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    63
                #(nil nil)
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    64
                #(nil nil)
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    65
                #(startDrawTool       'DrawTool.xbm')
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    66
             )
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    67
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    68
        the panel adjusts its height as appropriate - you may want to
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    69
        create new (small) icons for a good look.
105
claus
parents: 104
diff changeset
    70
claus
parents: 104
diff changeset
    71
    adding an entry to a menu:
claus
parents: 104
diff changeset
    72
524
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    73
        see the #setupMenu method; either add another top-menu, or
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    74
        add entries to an existing menu.
88
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    75
"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    76
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    77
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    78
documentation
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    79
"
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    80
    a new launcher, combining old Launchers menu and transcript into
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    81
    one view. (you no longer have to move two views around all the time ...).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    82
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    83
    Also, this app makes first use of the new compatibility framework;
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    84
    you will notice, that this is a subclass of ApplicationModel.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    85
    New applications will no longer be built as subclasses of standardSystemView.
511
1e00846b87e5 documentation
Claus Gittinger <cg@exept.de>
parents: 505
diff changeset
    86
1e00846b87e5 documentation
Claus Gittinger <cg@exept.de>
parents: 505
diff changeset
    87
    [author:]
1e00846b87e5 documentation
Claus Gittinger <cg@exept.de>
parents: 505
diff changeset
    88
        Claus Gittinger
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    89
"
88
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    90
! !
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    91
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
    92
!NewLauncher class methodsFor:'defaults'!
11b4ce85104e Initial revision
claus
parents:
diff changeset
    93
11b4ce85104e Initial revision
claus
parents:
diff changeset
    94
aboutIcon
11b4ce85104e Initial revision
claus
parents:
diff changeset
    95
    |image|
11b4ce85104e Initial revision
claus
parents:
diff changeset
    96
11b4ce85104e Initial revision
claus
parents:
diff changeset
    97
    CachedAboutIcon notNil ifTrue:[^ CachedAboutIcon].
11b4ce85104e Initial revision
claus
parents:
diff changeset
    98
11b4ce85104e Initial revision
claus
parents:
diff changeset
    99
    image := Image fromFile:'SmalltalkX.xbm'.
92
claus
parents: 91
diff changeset
   100
    image notNil ifTrue:[
580
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   101
        |green dark|
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   102
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   103
        Display hasColors ifTrue:[
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   104
            green := (Color red:0 green:80 blue:20) "darkened".
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   105
            dark := Color gray:10.
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   106
            image photometric:#palette.
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   107
        ] ifFalse:[
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   108
            dark := Color black.
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   109
            green := Color white.
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   110
            image photometric:#blackIs0.
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   111
        ].
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   112
        image colorMap:(Array with:dark with:green).
144
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   113
"/        Display depth > 2 ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   114
"/            image := (Image implementorForDepth:Display depth) fromImage:image.
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   115
"/        ]
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
   116
    ].
11b4ce85104e Initial revision
claus
parents:
diff changeset
   117
    CachedAboutIcon := image.
11b4ce85104e Initial revision
claus
parents:
diff changeset
   118
    ^ image
11b4ce85104e Initial revision
claus
parents:
diff changeset
   119
11b4ce85104e Initial revision
claus
parents:
diff changeset
   120
    "
92
claus
parents: 91
diff changeset
   121
     CachedAboutIcon := nil.
claus
parents: 91
diff changeset
   122
     NewLauncher aboutIcon
claus
parents: 91
diff changeset
   123
    "
144
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   124
580
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   125
    "Modified: 28.5.1996 / 20:55:15 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   126
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   127
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
   128
buttonImageSize
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   129
    "images in buttonPanel are sized to this.
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   130
     Can be redefined in subclasses to return nil (no scaling)
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   131
     or any other useful size"
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   132
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   133
    ^ 32@32
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   134
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   135
    "Modified: 19.4.1996 / 16:36:17 / cg"
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
   136
!
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
   137
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   138
smallAboutIcon
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   139
    |image|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   140
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   141
    image := self aboutIcon.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   142
    image notNil ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   143
	image := image magnifiedBy:0.4.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   144
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   145
    ^ image
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   146
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   147
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   148
     CachedAboutIcon := nil.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   149
     NewLauncher aboutIcon.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   150
     NewLauncher smallAboutIcon.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   151
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   152
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   153
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   154
!NewLauncher methodsFor:'actions - about & help'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   155
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   156
about
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   157
    |box|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   158
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   159
    box := AboutBox new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   160
    box autoHideAfter:10 with:[].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   161
    box showAtCenter
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   162
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   163
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   164
showDocumentation:aRelativeDocFilePath
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   165
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   166
     although that one is not yet finished,
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   167
     its better than nothing ...
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   168
    "
555
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   169
    HTMLDocumentView notNil ifTrue:[
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   170
        "
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   171
         temporary kludge;
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   172
         not all machines can autoload binaries;
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   173
         however, on my SGI (which can) we want it
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   174
         to load automatically.
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   175
        "
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   176
        HTMLDocumentView isLoaded ifFalse:[
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   177
            ErrorSignal catch:[HTMLDocumentView autoload]
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   178
        ].
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   179
        HTMLDocumentView isLoaded ifTrue:[
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   180
            HTMLDocumentView openFullOnDocumentationFile:aRelativeDocFilePath. 
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   181
            ^ self
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   182
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   183
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   184
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   185
    self warn:'Sorry, the ST/X HTML reader is not (yet) 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   186
included in this architectures release.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   187
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   188
Please use Mosaic, netscape, chimera or any
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   189
other HTML viewer to see the documentation.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   190
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   191
The documentation is found in the ''doc/online'' directory.'.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   192
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   193
    "Modified: 31.8.1995 / 13:11:08 / claus"
555
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   194
    "Modified: 21.5.1996 / 14:15:57 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   195
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   196
496
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   197
startClassDocumentation
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   198
    self showDocumentation:'classDoc/TOP.html'
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   199
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   200
    "Modified: 31.8.1995 / 13:11:28 / claus"
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   201
    "Created: 22.4.1996 / 21:03:56 / cg"
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   202
!
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   203
483
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   204
startDocumentationIndex
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   205
    self showDocumentation:'index.html'
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   206
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   207
    "Modified: 31.8.1995 / 13:11:28 / claus"
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   208
    "Created: 17.4.1996 / 22:08:55 / cg"
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   209
!
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   210
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   211
startDocumentationTool
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   212
    self showDocumentation:'TOP.html'
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   213
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   214
    "Modified: 31.8.1995 / 13:11:28 / claus"
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   215
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   216
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   217
toggleActiveHelp:aBoolean
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   218
    ActiveHelp notNil ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   219
	helpIsOn := aBoolean.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   220
	helpIsOn ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   221
	    ActiveHelp start
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   222
	] ifFalse:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   223
	    ActiveHelp stop
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   224
	]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   225
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   226
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   227
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   228
!NewLauncher methodsFor:'actions - classes'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   229
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   230
browseImplementors
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   231
    |enterBox|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   232
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   233
    enterBox := EnterBox title:(resources at:'Browse implementors of:') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   234
    enterBox okText:(resources at:'browse').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   235
    enterBox action:[:selectorName |
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   236
	|cls|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   237
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   238
	self withWaitCursorDo:[SystemBrowser browseImplementorsOf:selectorName]  
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   239
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   240
    enterBox showAtPointer
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   241
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   242
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   243
browseResources
589
ce36a65f07a1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
   244
    |enterBox t|
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   245
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   246
    enterBox := EnterBox title:(resources at:'Resource symbol (nil for any):') withCRs.
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   247
    enterBox okText:(resources at:'browse').
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   248
    enterBox action:[:resourceName |
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   249
        |rsc|
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   250
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   251
        (resourceName isNil or:[resourceName isEmpty]) ifTrue:[
589
ce36a65f07a1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
   252
            t := 'methods with any resource'.
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   253
            rsc := nil
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   254
        ] ifFalse:[
589
ce36a65f07a1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
   255
            t := 'methods with ' , resourceName , '-resource'.
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   256
            rsc := resourceName asSymbolIfInterned.
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   257
        ].
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   258
        self withWaitCursorDo:[
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   259
            SystemBrowser browseForResource:rsc
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   260
                          in:(Smalltalk allClasses)
589
ce36a65f07a1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
   261
                          title:t
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   262
        ]  
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   263
    ].
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   264
    enterBox showAtPointer
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   265
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   266
    "Created: 28.5.1996 / 13:15:16 / cg"
589
ce36a65f07a1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
   267
    "Modified: 29.5.1996 / 17:30:38 / cg"
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   268
!
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   269
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   270
browseSenders
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   271
    |enterBox|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   272
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   273
    enterBox := EnterBox title:(resources at:'Browse senders of:') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   274
    enterBox okText:(resources at:'browse').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   275
    enterBox action:[:selectorName |
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   276
	|cls|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   277
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   278
	self withWaitCursorDo:[SystemBrowser browseAllCallsOn:selectorName]  
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   279
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   280
    enterBox showAtPointer
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   281
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   282
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   283
startChangesBrowser
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   284
    self withWaitCursorDo:[ChangesBrowser open]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   285
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   286
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   287
startClassBrowser
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   288
    SystemBrowser askThenBrowseClass
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   289
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   290
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   291
startClassHierarchyBrowser
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   292
    SystemBrowser askThenBrowseClassHierarchy
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   293
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   294
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   295
startClassTreeView
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   296
    self withWaitCursorDo:[ClassTreeGraphView open]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   297
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   298
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   299
startFileBrowser
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   300
    self withWaitCursorDo:[FileBrowser open]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   301
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   302
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   303
startFullClassBrowser
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   304
    SystemBrowser askThenBrowseFullClassProtocol
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   305
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   306
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   307
startJavaBrowser
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   308
    JavaBrowser notNil ifTrue:[
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   309
        self withWaitCursorDo:[JavaBrowser open]
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   310
    ]
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   311
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   312
    "Created: 18.4.1996 / 15:55:44 / cg"
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   313
    "Modified: 19.4.1996 / 16:39:08 / cg"
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   314
!
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   315
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   316
startSystemBrowser
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   317
    self withWaitCursorDo:[SystemBrowser open]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   318
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   319
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   320
startWorkspace
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   321
    Workspace open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   322
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   323
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   324
!NewLauncher methodsFor:'actions - demos'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   325
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   326
openDemo:className
536
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   327
    |cls|
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   328
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   329
    cls := Smalltalk at:className.
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   330
    cls isNil ifTrue:[
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   331
        self warn:'sorry, the ' , className , ' class is not available.'.
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   332
    ] ifFalse:[
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   333
        Autoload autoloadFailedSignal handle:[:ex |
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   334
            self warn:'sorry, the ' , className , ' class seems to be not available.'
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   335
        ] do:[
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   336
            (Smalltalk at:className) open
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   337
        ]
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   338
    ]
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   339
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   340
    "Modified: 10.5.1996 / 15:56:47 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   341
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   342
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   343
startTetris
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   344
    Tetris open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   345
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   346
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   347
startTicTacToe
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   348
    TicTacToeGame open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   349
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   350
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   351
startTicTacToe2
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   352
    TicTacToeGame open2UserGame
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   353
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   354
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   355
!NewLauncher methodsFor:'actions - file'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   356
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   357
exit
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   358
    (self confirm:(resources string:'Are you certain you want to exit without saving ?'))
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   359
    ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   360
	self saveAllViews.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   361
	Smalltalk exit
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   362
    ]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   363
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   364
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   365
objectModuleDialog
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   366
    |allModules moduleNames
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   367
     allObjects methodObjects methodNames 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   368
     box l unloadButton
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   369
     list1 list2 listView1 listView2
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   370
     y panel showBuiltIn showModules showMethods moduleListUpdater check|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   371
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   372
    showBuiltIn := true asValue. 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   373
    showModules := ObjectFileLoader notNil asValue. 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   374
    showMethods := ObjectFileLoader notNil asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   375
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   376
    moduleListUpdater := Plug new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   377
    moduleListUpdater 
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   378
        respondTo:#getModules 
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   379
        with:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   380
            |l|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   381
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   382
            l := Array new.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   383
            (showModules value or:[showBuiltIn value]) ifTrue:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   384
                allModules := ObjectMemory binaryModuleInfo asOrderedCollection.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   385
                (showBuiltIn value and:[showModules value]) ifFalse:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   386
                    allModules := allModules select:[:i |
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   387
                        |wantToSee|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   388
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   389
                        wantToSee := (i at:#dynamic).
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   390
                        showBuiltIn value ifTrue:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   391
                            wantToSee := wantToSee not
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   392
                        ].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   393
                        wantToSee
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   394
                    ]
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   395
                ].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   396
                "/ sorting by reverse id brings newest ones to the top (a side effect)
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   397
                allModules sort:[:a :b | (a at:#id) > (b at:#id)].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   398
                moduleNames := allModules collect:[:entry | (entry at:#name)].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   399
                l := l , moduleNames.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   400
            ].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   401
            showMethods value ifTrue:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   402
                allObjects := ObjectFileLoader loadedObjectHandles.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   403
                methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   404
                methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   405
                                                                'compiled method - removed' , ' (in ' , mH pathName , ')'
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   406
                                                            ] ifFalse:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   407
                                                                'compiled method ' , mH method whoString , ' (in ' , mH pathName , ')'
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   408
                                                            ].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   409
                                                     ].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   410
                l := l , methodNames.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   411
            ].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   412
            list1 list:l.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   413
            unloadButton disable.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   414
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   415
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   416
    list1 := SelectionInList new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   417
    list2 := SelectionInList new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   418
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   419
    showBuiltIn onChangeSend:#getModules to:moduleListUpdater.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   420
    showModules onChangeSend:#getModules to:moduleListUpdater.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   421
    showMethods onChangeSend:#getModules to:moduleListUpdater.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   422
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   423
    box := Dialog new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   424
    box label:(resources string:'Module dialog').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   425
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   426
    listView1 := HVScrollableView for:SelectionInListView miniScrollerH:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   427
    listView1 model:list1.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   428
    listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   429
    listView1 action:[:sel |
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   430
        |info classNames tabs|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   431
467
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   432
        box withWaitCursorDo:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   433
            (showModules value or:[showBuiltIn value]) ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   434
                info := allModules at:sel ifAbsent:nil.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   435
            ].
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   436
            info isNil ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   437
                "/ selected a method
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   438
                list2 list:#().
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   439
                unloadButton enable.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   440
            ] ifFalse:[
467
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   441
                "/ selected a package
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   442
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   443
                tabs := TabulatorSpecification unit:#inch positions:#(0 2.6).
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   444
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   445
                "/ fill bottom list with class-info
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   446
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   447
                classNames := (info at:#classNames) asSortedCollection.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   448
                classNames := classNames collect:[:cName |
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   449
                                |cls entry rev listEntry|
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   450
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   451
                                listEntry := MultiColListEntry new:2 tabulatorSpecification:tabs.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   452
                                listEntry colAt:1 put:cName.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   453
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   454
                                cls := Smalltalk classNamed:cName.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   455
                                cls isNil ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   456
                                    listEntry colAt:2 put:'(class removed)'.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   457
                                ] ifFalse:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   458
                                    rev := cls binaryRevision.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   459
                                    rev notNil ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   460
                                        cls isLoaded ifFalse:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   461
                                            entry := '(stub for: ' , rev.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   462
                                        ] ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   463
                                            entry :='(bin: ' , rev.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   464
                                        ].    
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   465
                                        cls revision ~= rev ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   466
                                            entry := entry , ' / src: ' , cls revision    
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   467
                                        ].
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   468
                                        listEntry colAt:2 put:entry , ')'
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   469
                                    ] ifFalse:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   470
                                       cls revision notNil ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   471
                                            listEntry colAt:2 put:'(overloaded by: ' , cls revision , ')' 
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   472
                                       ]
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   473
                                    ]
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   474
                                ].
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   475
                                listEntry
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   476
                              ].
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   477
                list2 list:classNames.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   478
                (info at:#dynamic) ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   479
                    unloadButton enable.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   480
                ] ifFalse:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   481
                    unloadButton disable.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   482
                ].
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   483
            ]
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   484
        ]
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   485
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   486
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   487
    panel := HorizontalPanelView new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   488
245
87fc74d6ea91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
   489
    panel add:(l := Label label:'modules shown:').
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   490
    l adjust:#left; borderWidth:0.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   491
    panel add:(check := CheckBox label:'builtin' model:showBuiltIn).
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   492
    box makeTabable:check.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   493
    panel add:(check := CheckBox label:'modules' model:showModules).
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   494
    ObjectFileLoader isNil ifTrue:[
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   495
        check disable
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   496
    ] ifFalse:[
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   497
        box makeTabable:check.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   498
    ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   499
    panel add:(check := CheckBox label:'methods' model:showMethods).
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   500
    ObjectFileLoader isNil ifTrue:[
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   501
        check disable
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   502
    ] ifFalse:[
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   503
        box makeTabable:check.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   504
    ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   505
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   506
    panel horizontalLayout:#fitSpace.
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   507
    "/ panel horizontalLayout:#leftSpace.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   508
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   509
    box addComponent:panel tabable:false.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   510
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   511
    box addVerticalSpace.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   512
    box addComponent:listView1 tabable:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   513
    listView1 topInset:(View viewSpacing + panel preferredExtent y).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   514
    listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   515
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   516
    l := box addTextLabel:(resources string:'contained classes/subsets:').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   517
    l adjust:#left; borderWidth:0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   518
    l origin:0.0@0.4 corner:1.0@0.4.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   519
    l topInset:(View viewSpacing).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   520
    l bottomInset:((l preferredExtent y) negated - View viewSpacing).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   521
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   522
    listView2 := HVScrollableView for:SelectionInListView  miniScrollerH:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   523
    listView2 model:list2; printItems:false.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   524
    box addComponent:listView2 tabable:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   525
    listView2 origin:0.0@0.4 corner:1.0@1.0. "/ ; inset:2.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   526
    listView2 disable.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   527
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   528
    unloadButton := Button label:(resources string:'unload').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   529
    unloadButton action:[
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   530
        self withWaitCursorDo:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   531
            box withWaitCursorDo:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   532
                |info idx pathName|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   533
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   534
                idx := list1 selectionIndex.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   535
                info := allModules at:idx ifAbsent:nil.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   536
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   537
                info isNil ifTrue:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   538
                    "/ selected a method
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   539
                    idx := idx - allModules size.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   540
                    pathName := (methodObjects at:idx) pathName.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   541
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   542
                ] ifFalse:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   543
                    "/ selected a package
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   544
                    pathName := (info at:#pathName).
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   545
                ].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   546
                ObjectFileLoader unloadObjectFile:pathName.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   547
                moduleListUpdater getModules.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   548
                unloadButton disable.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   549
            ]
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   550
        ]
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   551
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   552
    moduleListUpdater getModules.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   553
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   554
    box addButton:unloadButton.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   555
    box addAbortButtonLabelled:(resources string:'close').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   556
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   557
    y := box yPosition.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   558
    listView2 topInset:(l preferredExtent y + 5).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   559
    listView2 bottomInset:(box preferredExtent y - y).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   560
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   561
"/    box width:(400 min:(box device width * 2 // 3)); 
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   562
"/        height:(450 min:(box device height - 50)); 
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   563
"/        sizeFixed:true.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   564
    box open.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   565
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
   566
    box destroy.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   567
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   568
    "Modified: 17.9.1995 / 16:47:50 / claus"
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   569
    "Modified: 29.5.1996 / 14:17:07 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   570
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   571
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   572
snapshot
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   573
    |fileName|
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   574
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   575
    fileName := DialogBox
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   576
                    request:(resources at:'filename for image:') withCRs
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   577
              initialAnswer:(ObjectMemory nameForSnapshot) 
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   578
                    okLabel:(resources at:'save')
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   579
                      title:(resources string:'save image')
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   580
                   onCancel:nil.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   581
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   582
    fileName notNil ifTrue:[
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   583
        self withCursor:Cursor write do:[
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   584
            (ObjectMemory snapShotOn:fileName) ifFalse:[
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   585
                "
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   586
                 snapshot failed for some reason (disk full, no permission etc.)
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   587
                "
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   588
                self warn:(resources string:'failed to save snapshot image (disk full or not writable)').
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   589
            ]
404
4960628225e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 403
diff changeset
   590
        ]
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   591
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   592
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   593
    "Modified: 29.5.1996 / 15:02:39 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   594
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   595
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   596
snapshotAndExit
590
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   597
    |fileName ok|
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   598
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   599
    fileName := DialogBox
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   600
                    request:(resources at:'filename for image:') withCRs
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   601
              initialAnswer:(ObjectMemory nameForSnapshot) 
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   602
                    okLabel:(resources at:'save & exit')
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   603
                      title:(resources string:'save image & exit')
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   604
                   onCancel:nil.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   605
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   606
    fileName notNil ifTrue:[
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   607
        self withCursor:Cursor write do:[
590
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   608
            ok := ObjectMemory snapShotOn:fileName.
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   609
        ].
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   610
        ok ifFalse:[
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   611
            "
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   612
             snapshot failed for some reason (disk full, no permission etc.)
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   613
             Do NOT exit in this case.
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   614
            "
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   615
            self warn:(resources string:'failed to save snapshot image (disk full or not writable)').
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   616
        ] ifTrue:[
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   617
            "
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   618
             saveAllViews tells all views to shutdown neatly 
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   619
             (i.e. offer a chance to save the contents to a file).
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   620
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   621
             This is NOT required - all data should be in the snapshot ...
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   622
             ... however, if remote disks/mountable filesystems are involved,
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   623
             which may not be present the next time, it may make sense to 
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   624
             uncomment it and query for saving - time will show which is better.
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   625
            "
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   626
"
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   627
            self saveAllViews.
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   628
"
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   629
            Smalltalk exit
404
4960628225e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 403
diff changeset
   630
        ]
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   631
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   632
590
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   633
    "Modified: 29.5.1996 / 19:21:01 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   634
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   635
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   636
!NewLauncher methodsFor:'actions - goodies'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   637
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   638
startCalendar
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   639
    Calendar open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   640
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   641
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   642
startClock
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   643
    RoundClock open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   644
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   645
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   646
startMailTool
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   647
    MailView open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   648
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   649
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   650
startNewsTool
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   651
    NewsView open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   652
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   653
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   654
!NewLauncher methodsFor:'actions - projects'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   655
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   656
newProject 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   657
    Project notNil ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   658
	(ProjectView for:(Project new)) open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   659
    ]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   660
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   661
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   662
selectProject
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   663
    |list box|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   664
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   665
    Project notNil ifTrue:[
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   666
        list := Project allInstances.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   667
        box := ListSelectionBox new.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   668
        box list:(list collect:[:p | p name]).
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   669
        box title:(resources string:'select a project').
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   670
        box action:[:selection |
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   671
            |project|
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   672
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   673
            project := list detect:[:p | p name = selection] ifNone:[nil].
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   674
            project isNil ifTrue:[
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   675
                Transcript showCR:'no such project.'
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   676
            ] ifFalse:[
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   677
                project showViews.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   678
                Project current:project
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   679
            ]
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   680
        ].
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   681
        box showAtPointer.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   682
        box destroy
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   683
    ]
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   684
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   685
    "Modified: 18.5.1996 / 15:43:19 / cg"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
   686
! !
11b4ce85104e Initial revision
claus
parents:
diff changeset
   687
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   688
!NewLauncher methodsFor:'actions - settings'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   689
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   690
compilerSettings
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   691
    |box warnings warnSTX warnUnderscore warnOldStyle allowUnderscore immutableArrays
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   692
     warnSTXBox warnUnderscoreBox warnOldStyleBox 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   693
     stcCompilation compilationList stcCompilationOptions stcIncludes stcDefines stcOptions
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   694
     stcLibraries historyLines sourceMode catchRedefs keepSourceOptions keepSource  
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   695
     foldConstants constantFoldingOptions constantFolding
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   696
     warnEnabler check component oldIndent|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   697
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   698
    warnings := Compiler warnings asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   699
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   700
    warnSTX := Compiler warnSTXSpecials asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   701
    warnUnderscore := Compiler warnUnderscoreInIdentifier asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   702
    warnOldStyle := Compiler warnOldStyleAssignment asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   703
    allowUnderscore := Compiler allowUnderscoreInIdentifier asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   704
    immutableArrays := Compiler arraysAreImmutable asValue.
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   705
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   706
    constantFoldingOptions := #( nil #level1 #level2 #full ).
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   707
    constantFolding := SelectionInList new list:(resources array:#('disabled' 'level1 (always safe)' 'level2 (usually safe)' 'full')).
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   708
    constantFolding selectionIndex:3.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   709
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   710
    stcCompilationOptions := #( always default never).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   711
    stcCompilation := SelectionInList new list:(resources array:#('always' 'primitive code only' 'never')).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   712
    stcCompilation selectionIndex:2.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   713
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   714
    stcIncludes := Compiler stcCompilationIncludes asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   715
    stcDefines := Compiler stcCompilationDefines asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   716
    stcOptions := Compiler stcCompilationOptions asValue.
232
926e657541c9 *** empty log message ***
chrisy
parents: 230
diff changeset
   717
    ObjectFileLoader notNil ifTrue:[
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   718
        stcLibraries := (String fromStringCollection:ObjectFileLoader searchedLibraries separatedBy:' ') asValue.
232
926e657541c9 *** empty log message ***
chrisy
parents: 230
diff changeset
   719
    ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   720
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   721
    catchRedefs := Class catchMethodRedefinitions asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   722
    historyLines := (HistoryManager notNil and:[HistoryManager isActive]) asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   723
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   724
    keepSourceOptions := #( keep reference absReference sourceReference discard ).
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   725
    keepSource := SelectionInList new list:(resources array:#('keep as string' 'reference to filename' 'reference to full path' 'append and ref in `st.src''' 'discard' )).
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   726
    keepSource selectionIndex:1.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   727
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   728
    warnEnabler := Plug new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   729
    warnEnabler
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   730
        respondTo:#check 
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   731
        with:[warnings value ifTrue:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   732
                warnSTXBox enable. 
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   733
                warnOldStyleBox enable.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   734
                allowUnderscore value ifTrue:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   735
                    warnUnderscoreBox enable.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   736
                ] ifFalse:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   737
                    warnUnderscoreBox disable.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   738
                ].
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   739
              ] ifFalse:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   740
                warnSTXBox disable. 
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   741
                warnUnderscoreBox disable.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   742
                warnOldStyleBox disable.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   743
              ]].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   744
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   745
    warnings onChangeSend:#check to:warnEnabler.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   746
    allowUnderscore onChangeSend:#check to:warnEnabler.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   747
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   748
    box := DialogBox new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   749
    box label:(resources string:'Compiler settings').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   750
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   751
    box addCheckBox:(resources string:'catch method redefinitions') on:catchRedefs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   752
    check := box addCheckBox:(resources string:'keep history line in methods') on:historyLines.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   753
    HistoryManager isNil ifTrue:[check disable].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   754
378
7e17a9941cca added ...'s
Claus Gittinger <cg@exept.de>
parents: 377
diff changeset
   755
    box addPopUpList:(resources string:'fileIn source mode:') on:keepSource.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   756
    keepSource selectionIndex:( keepSourceOptions indexOf:(ClassCategoryReader sourceMode) ifAbsent:1).
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   757
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   758
    box addHorizontalLine.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   759
232
926e657541c9 *** empty log message ***
chrisy
parents: 230
diff changeset
   760
    ObjectFileLoader notNil ifTrue:[
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   761
        compilationList := box addPopUpList:(resources string:'compilation to machine code') on:stcCompilation.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   762
        stcCompilation selectionIndex:( stcCompilationOptions indexOf:(Compiler stcCompilation) ifAbsent:2).
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   763
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   764
        component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   765
                        addLabelledInputField:(resources string:'stc include directories:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   766
                        adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   767
                        on:stcIncludes 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   768
                        tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   769
                        separateAtX:0.5.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   770
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   771
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   772
"/        y := box yPosition.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   773
"/        component := box addTextLabel:(resources string:'stc include directories:').
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   774
"/        component width:0.5; adjust:#right; borderWidth:0.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   775
"/        box yPosition:y.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   776
"/        component := box addInputFieldOn:stcIncludes tabable:true.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   777
"/        component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   778
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   779
        box addVerticalSpace.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   780
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   781
        component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   782
                        addLabelledInputField:(resources string:'stc defines:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   783
                        adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   784
                        on:stcDefines 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   785
                        tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   786
                        separateAtX:0.5.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   787
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   788
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   789
"/        y := box yPosition.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   790
"/        component := box addTextLabel:'stc defines:'.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   791
"/        component width:0.5; adjust:#right; borderWidth:0.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   792
"/        box yPosition:y.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   793
"/        component := box addInputFieldOn:stcDefines tabable:true.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   794
"/        component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   795
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   796
        box addVerticalSpace.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   797
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   798
        component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   799
                        addLabelledInputField:(resources string:'stc options:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   800
                        adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   801
                        on:stcOptions 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   802
                        tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   803
                        separateAtX:0.5.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   804
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   805
"/        y := box yPosition.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   806
"/        component := box addTextLabel:'stc options:'.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   807
"/        component width:0.5; adjust:#right; borderWidth:0.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   808
"/        box yPosition:y.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   809
"/        component := box addInputFieldOn:stcOptions tabable:true.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   810
"/        component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   811
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   812
        box addVerticalSpace.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   813
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   814
        component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   815
                        addLabelledInputField:(resources string:'stc C-libraries:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   816
                        adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   817
                        on:stcLibraries 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   818
                        tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   819
                        separateAtX:0.5.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   820
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   821
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   822
"/        y := box yPosition.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   823
"/        component := box addTextLabel:'stc C-libraries:'.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   824
"/        component width:0.5; adjust:#right; borderWidth:0.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   825
"/        box yPosition:y.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   826
"/        component := box addInputFieldOn:stcLibraries tabable:true.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   827
"/        component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   828
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   829
        box addVerticalSpace.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   830
        box addHorizontalLine.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   831
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   832
        "/ if there is no compiler around,
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   833
        "/ change to compile nothing, and disable the checkBoxes
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   834
        Compiler canCreateMachineCode ifFalse:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   835
            stcCompilation selectionIndex:3.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   836
            compilationList disable.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   837
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   838
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   839
378
7e17a9941cca added ...'s
Claus Gittinger <cg@exept.de>
parents: 377
diff changeset
   840
    box addPopUpList:(resources string:'constant folding:') on:constantFolding.
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   841
    constantFolding selectionIndex:( constantFoldingOptions indexOf:(Compiler foldConstants) ifAbsent:1).
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   842
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   843
    box addVerticalSpace.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   844
    box addCheckBox:(resources string:'allow underscore in identifiers') on:allowUnderscore.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   845
    box addVerticalSpace.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   846
    box addCheckBox:(resources string:'literal arrays are immutable') on:immutableArrays.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   847
    box addHorizontalLine.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   848
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   849
    box addCheckBox:(resources string:'warnings') on:warnings.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   850
    box addVerticalSpace.
343
569baf25f549 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 342
diff changeset
   851
    oldIndent := box leftIndent.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   852
    box leftIndent:30.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   853
    warnSTXBox := box addCheckBox:(resources string:'ST/X language extensions') on:warnSTX.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   854
    box addVerticalSpace.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   855
    warnUnderscoreBox := box addCheckBox:(resources string:'underscores in identifiers') on:warnUnderscore.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   856
    box addVerticalSpace.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   857
    warnOldStyleBox := box addCheckBox:(resources string:'oldStyle assignment') on:warnOldStyle.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   858
    box addVerticalSpace.
343
569baf25f549 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 342
diff changeset
   859
    box leftIndent:oldIndent.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   860
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   861
    box 
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   862
        addHelpButtonFor:'NewLauncher/compilerSettings.html';
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   863
        addAbortButton; 
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   864
        addOkButton.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   865
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   866
    warnEnabler check.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   867
    box open.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   868
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   869
    box accepted ifTrue:[
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   870
        HistoryManager notNil ifTrue:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   871
            historyLines value ifTrue:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   872
                HistoryManager activate
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   873
            ] ifFalse:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   874
                HistoryManager deactivate
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   875
            ].
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   876
        ].
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   877
        Class catchMethodRedefinitions:catchRedefs value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   878
        ClassCategoryReader sourceMode:(keepSourceOptions at:keepSource selectionIndex).
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   879
        Compiler warnings:warnings value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   880
        Compiler warnSTXSpecials:warnSTX value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   881
        Compiler warnOldStyleAssignment:warnOldStyle value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   882
        Compiler warnUnderscoreInIdentifier:warnUnderscore value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   883
        Compiler allowUnderscoreInIdentifier:allowUnderscore value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   884
        Compiler arraysAreImmutable:immutableArrays value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   885
        Compiler stcCompilation:(stcCompilationOptions at:stcCompilation selectionIndex).
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   886
        Compiler stcCompilationIncludes:stcIncludes value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   887
        Compiler stcCompilationDefines:stcDefines value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   888
        Compiler stcCompilationOptions:stcOptions value.
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   889
        Compiler foldConstants:(constantFoldingOptions at:constantFolding selectionIndex).
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   890
        ObjectFileLoader notNil ifTrue:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   891
            ObjectFileLoader searchedLibraries:(stcLibraries value asCollectionOfWords).
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   892
        ]
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
   893
    ].
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
   894
    box destroy
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   895
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   896
    "Modified: 10.9.1995 / 19:19:18 / claus"
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   897
    "Modified: 29.5.1996 / 14:16:44 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   898
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   899
398
001d78a6cacd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
   900
fontSettings
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   901
    (self fontBoxForEncoding:nil) ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   902
        self reopenLauncher.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   903
    ]
397
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   904
398
001d78a6cacd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
   905
    "Created: 26.2.1996 / 22:52:51 / cg"
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
   906
    "Modified: 27.2.1996 / 02:05:05 / cg"
397
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   907
!
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   908
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   909
keyboardSetting 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   910
    |mappings listOfRawKeys listOfFunctions
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   911
     box l
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   912
     list1 list2 listView1 listView2 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   913
     frame selectionForwarder macroForwarder macroTextView y|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   914
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   915
    mappings := Screen current keyboardMap.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   916
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   917
    listOfRawKeys := (mappings keys asArray collect:[:key | key asString]) sort.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   918
    listOfFunctions := (mappings values asSet asArray collect:[:key | key asString]) sort.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   919
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   920
    selectionForwarder := Plug new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   921
    selectionForwarder respondTo:#showFunction
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   922
                  with:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   923
                        |raw|
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   924
                        raw := list1 selection.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   925
                        list2 retractInterestsFor:selectionForwarder.
568
58d7e4157f23 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
   926
                        list2 selection:(mappings at:raw asSymbol) asString.
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   927
                        list2 onChangeSend:#showRawKey to:selectionForwarder.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   928
                       ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   929
    selectionForwarder respondTo:#showRawKey
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   930
                  with:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   931
                        |f raw|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   932
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   933
                        f := list2 selection.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   934
                        list1 retractInterestsFor:selectionForwarder.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   935
                        raw := mappings keyAtValue:f asString.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   936
                        raw isNil ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   937
                            raw := mappings keyAtValue:f first.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   938
                            raw isNil ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   939
                                raw := mappings keyAtValue:f asSymbol.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   940
                            ]
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   941
                        ].
568
58d7e4157f23 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
   942
                        list1 selection:raw.
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   943
                        list1 onChangeSend:#showFunction to:selectionForwarder.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   944
                       ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   945
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   946
    macroForwarder := Plug new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   947
    macroForwarder respondTo:#showMacro
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   948
                  with:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   949
                        |f macro indent|
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   950
                        f := list2 selection.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   951
                        (f startsWith:'Cmd') ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   952
                            f := f copyFrom:4
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   953
                        ].
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   954
                        macro := FunctionKeySequences at:(f asSymbol) ifAbsent:nil.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   955
                        macro notNil ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   956
                            macro := macro asStringCollection.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   957
                            indent := macro
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   958
                                         inject:99999 into:[:min :element |
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   959
                                             |stripped|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   960
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   961
                                             stripped := element withoutLeadingSeparators.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   962
                                             stripped size == 0 ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   963
                                                 min
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   964
                                             ] ifFalse:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   965
                                                 min min:(element size - stripped size)
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   966
                                             ]
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   967
                                         ].
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   968
                            indent ~~ 0 ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   969
                                macro := macro collect:[:line | 
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   970
                                             line size > indent ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   971
                                                line copyFrom:indent+1
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   972
                                             ] ifFalse:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   973
                                                line
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   974
                                             ].
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   975
                                        ]
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   976
                            ].                        
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   977
                        ].
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   978
                        macroTextView contents:macro.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
   979
                       ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   980
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   981
    list1 := SelectionInList with:listOfRawKeys.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   982
    list1 onChangeSend:#showFunction to:selectionForwarder.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   983
    list2 := SelectionInList with:listOfFunctions.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   984
    list2 onChangeSend:#showRawKey to:selectionForwarder.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   985
    list2 onChangeSend:#showMacro to:macroForwarder.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   986
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   987
    box := Dialog new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   988
    box label:(resources string:'Keyboard mappings').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   989
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   990
    l := box addTextLabel:(resources string:'KEY_MSG') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   991
    l adjust:#left; borderWidth:0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   992
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   993
    frame := View new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   994
    frame extent:300 @ 300.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   995
    frame borderWidth:0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   996
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   997
    listView1 := ScrollableView for:SelectionInListView in:frame.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   998
    listView1 model:list1.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   999
    listView1 origin:0.0@0.0 corner:0.5@1.0; inset:2.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1000
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1001
    listView2 := ScrollableView for:SelectionInListView in:frame.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1002
    listView2 model:list2.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1003
    listView2 origin:0.5@0.0 corner:1.0@1.0; inset:2.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1004
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1005
    frame topInset:box yPosition.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1006
    box addComponent:frame withExtent:350@200.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1007
    box makeTabable:listView1. 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1008
    box makeTabable:listView2. 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1009
    frame origin:0.0@0.0 corner:1.0@0.6.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1010
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1011
    box addVerticalSpace.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1012
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1013
    l := box addTextLabel:(resources string:'Macro text (if any):') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1014
    l adjust:#left; borderWidth:0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1015
    l origin:0.0@0.6 corner:1.0@0.6.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1016
    l topInset:(View viewSpacing).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1017
    l bottomInset:(l preferredExtent y negated - View viewSpacing).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1018
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1019
    macroTextView := HVScrollableView for:TextView miniScroller:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1020
    box addComponent:macroTextView tabable:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1021
    macroTextView origin:0.0@0.6 corner:1.0@1.0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1022
    y := box yPosition.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1023
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1024
    box
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1025
        addHelpButtonFor:'NewLauncher/keyboardSetting.html';
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1026
        "addAbortButton;" 
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1027
        addOkButton.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1028
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1029
    macroTextView topInset:(l preferredExtent y + 5).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1030
    macroTextView bottomInset:(box preferredExtent y - y).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1031
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1032
    box open.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1033
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1034
    box accepted ifTrue:[
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1035
        "no action yet ..."
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1036
    ].
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1037
    box destroy
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1038
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1039
    "Modified: 29.5.1996 / 14:16:35 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1040
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1041
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1042
languageSetting 
281
7b73ea8b2faa more for international language support
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
  1043
    |listOfLanguages translatedLanguages idx language  box|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1044
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1045
    "
410
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1046
     get list of supported languages from the launchers resources ...
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1047
    "
410
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1048
    listOfLanguages := resources at:'LIST_OF_OFFERED_LANGUAGES' default:#('default').
281
7b73ea8b2faa more for international language support
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
  1049
    translatedLanguages := resources array:listOfLanguages.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1050
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1051
    box := ListSelectionBox title:(resources string:'LANG_MSG') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1052
    box label:(resources string:'Language selection').
281
7b73ea8b2faa more for international language support
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
  1053
    box list:translatedLanguages.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1054
    box initialText:(Language).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1055
    box action:[:newLanguage |
410
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1056
        self withWaitCursorDo:[
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1057
            Transcript showCR:'change language to ' , newLanguage , ' ...'.
410
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1058
            idx := translatedLanguages indexOf:newLanguage withoutSeparators.
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1059
            idx ~~ 0 ifTrue:[
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1060
                language := listOfLanguages at:idx
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1061
            ] ifFalse:[
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1062
                language := newLanguage
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1063
            ].
514
e48fbcbc358d do not directly access the Language variable
Claus Gittinger <cg@exept.de>
parents: 511
diff changeset
  1064
            Smalltalk language:language asSymbol.
410
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1065
            ResourcePack flushCachedResourcePacks
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1066
        ].
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1067
        self reopenLauncher.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1068
    ].    
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1069
    box
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1070
        addHelpButtonFor:'NewLauncher/languageSetting.html'.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1071
    box open.
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1072
    box destroy
281
7b73ea8b2faa more for international language support
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
  1073
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1074
    "Modified: 29.5.1996 / 14:16:29 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1075
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1076
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1077
memorySettings
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1078
    |box check igcLimit igcFreeLimit igcFreeAmount newSpaceSize
440
afdf9ea91d26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 434
diff changeset
  1079
     compressLimit
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1080
     oldIncr component fields|
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1081
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1082
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1083
    "/ extract relevant system settings ...
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1084
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1085
    igcLimit := ObjectMemory incrementalGCLimit asValue.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1086
    igcFreeLimit := ObjectMemory freeSpaceGCLimit asValue.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1087
    igcFreeAmount := ObjectMemory freeSpaceGCAmount asValue.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1088
    newSpaceSize := ObjectMemory newSpaceSize asValue.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1089
    oldIncr := ObjectMemory oldSpaceIncrement asValue.
440
afdf9ea91d26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 434
diff changeset
  1090
    compressLimit := ObjectMemory oldSpaceCompressLimit asValue.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1091
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1092
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1093
    "/ create a box on those values ...
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1094
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1095
    fields := OrderedCollection new.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1096
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1097
    box := DialogBox new.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1098
    box label:(resources string:'Memory manager settings').
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1099
345
3bb0d27efc7a changed memorySettings texts
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
  1100
    box addTextLabel:'Warning - invalid settings may result in poor performance.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1101
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1102
You have been warned.'.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1103
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1104
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1105
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1106
                    addLabelledInputField:(resources string:'size of newSpace:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1107
                    adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1108
                    on:newSpaceSize 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1109
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1110
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1111
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1112
    component converter:(PrintConverter new initForNumber).
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1113
    fields add:component.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1114
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1115
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1116
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1117
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1118
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1119
                    addLabelledInputField:(resources string:'incremental GC allocation trigger:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1120
                    adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1121
                    on:igcLimit 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1122
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1123
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1124
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1125
    component converter:(PrintConverter new initForNumber).
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1126
    fields add:component.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1127
345
3bb0d27efc7a changed memorySettings texts
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
  1128
    box addTextLabel:'(start IGC whenever this amount has been allocated)'.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1129
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1130
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1131
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1132
                    addLabelledInputField:(resources string:'incremental GC freespace trigger:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1133
                    adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1134
                    on:igcFreeLimit 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1135
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1136
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1137
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1138
    component converter:(PrintConverter new initForNumber).
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1139
    fields add:component.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1140
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1141
    box addTextLabel:'(start IGC whenever freespace drops below this)'.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1142
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1143
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1144
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1145
                    addLabelledInputField:(resources string:'incremental GC amount:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1146
                    adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1147
                    on:igcFreeAmount 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1148
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1149
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1150
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1151
    component converter:(PrintConverter new initForNumber).
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1152
    fields add:component.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1153
345
3bb0d27efc7a changed memorySettings texts
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
  1154
    box addTextLabel:'(try to keep this amount for peak requests)'.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1155
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1156
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1157
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1158
                    addLabelledInputField:(resources string:'oldspace increment:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1159
                    adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1160
                    on:oldIncr 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1161
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1162
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1163
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1164
    component converter:(PrintConverter new initForNumber).
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1165
    fields add:component.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1166
345
3bb0d27efc7a changed memorySettings texts
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
  1167
    box addTextLabel:'(increase oldSpace in chunks of this size)'.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1168
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1169
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1170
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1171
                    addLabelledInputField:(resources string:'oldspace compress limit:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1172
                    adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1173
                    on:compressLimit 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1174
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1175
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1176
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1177
    component converter:(PrintConverter new initForNumber).
440
afdf9ea91d26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 434
diff changeset
  1178
    fields add:component.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1179
440
afdf9ea91d26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 434
diff changeset
  1180
    box addTextLabel:'(suppress compressing GC if more memory is in use)'.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1181
    box addHorizontalLine.
440
afdf9ea91d26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 434
diff changeset
  1182
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1183
    box addAbortButton; addOkButton.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1184
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1185
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1186
    "/ show the box ...
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1187
    "/
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1188
    box open.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1189
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1190
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1191
    "/ update system settings
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1192
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1193
    box accepted ifTrue:[
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1194
        fields do:[:comp | comp accept].
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1195
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1196
        igcFreeAmount value ~~ ObjectMemory freeSpaceGCAmount ifTrue:[
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1197
            ObjectMemory freeSpaceGCAmount:igcFreeAmount value.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1198
        ].
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1199
        igcFreeLimit value ~~ ObjectMemory freeSpaceGCLimit ifTrue:[
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1200
            ObjectMemory freeSpaceGCLimit:igcFreeLimit value.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1201
        ].
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1202
        igcLimit value ~~ ObjectMemory incrementalGCLimit ifTrue:[
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1203
            ObjectMemory incrementalGCLimit:igcLimit value.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1204
        ].
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1205
        newSpaceSize value ~~ ObjectMemory newSpaceSize ifTrue:[
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1206
            ObjectMemory newSpaceSize:newSpaceSize value.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1207
        ].
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1208
        oldIncr value ~~ ObjectMemory oldSpaceIncrement ifTrue:[
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1209
            ObjectMemory oldSpaceIncrement:oldIncr value.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1210
        ].
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1211
        ObjectMemory oldSpaceCompressLimit:compressLimit value.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1212
    ].
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1213
    box destroy
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1214
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1215
    "Modified: 29.5.1996 / 14:16:24 / cg"
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1216
!
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1217
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1218
messageSettings
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1219
    |box vmInfo vmErrors displayErrors classInfos|
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1220
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1221
    vmInfo := ObjectMemory infoPrinting asValue.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1222
    vmErrors := ObjectMemory debugPrinting asValue.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1223
    classInfos := Object infoPrinting asValue.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1224
    displayErrors := DeviceWorkstation errorPrinting asValue.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1225
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1226
    box := DialogBox new.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1227
    box label:(resources string:'Messages').
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1228
"/    box extent:200@300.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1229
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1230
    box addCheckBox:(resources string:'VM info messages') on:vmInfo.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1231
    box addCheckBox:(resources string:'VM error messages') on:vmErrors.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1232
    box addHorizontalLine.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1233
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1234
    box addCheckBox:(resources string:'Display error messages (Xlib, Xtlib ...)') on:displayErrors.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1235
    box addCheckBox:(resources string:'Other info messages') on:classInfos.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1236
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1237
    box addAbortButton; addOkButton.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1238
    box open.
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1239
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1240
    box accepted ifTrue:[
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1241
        ObjectMemory infoPrinting:vmInfo value.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1242
        ObjectMemory debugPrinting:vmErrors value.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1243
        Object infoPrinting:classInfos value.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1244
        DeviceWorkstation errorPrinting:displayErrors value.
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1245
    ].
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1246
    box destroy
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1247
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1248
    "Modified: 29.5.1996 / 14:16:19 / cg"
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1249
!
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1250
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1251
miscSettings
327
44a25cae2645 allow setting of dialog-focus behavior
ca
parents: 319
diff changeset
  1252
    |box check logDoits shadows updChanges changeFileName returnFocus
335
c725e5d99819 localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents: 327
diff changeset
  1253
     loadBinaries compileLazy hostNameInLabel useManager localSourceFirst 
491
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1254
     showAccelerators sourceCacheDir cacheEntry
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1255
     component localCheck oldIndent nm fn|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1256
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1257
    "/
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1258
    "/ extract relevant system settings ...
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1259
    "/
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1260
    logDoits := Smalltalk logDoits asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1261
    shadows := PopUpView shadows asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1262
    hostNameInLabel := StandardSystemView includeHostNameInLabel asValue.
327
44a25cae2645 allow setting of dialog-focus behavior
ca
parents: 319
diff changeset
  1263
    returnFocus := Dialog returnFocusWhenClosingModalBoxes asValue.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1264
    updChanges := Class updatingChanges asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1265
    changeFileName := ObjectMemory nameForChanges asValue.
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1266
    useManager := (Smalltalk at:#SourceCodeManager) notNil asValue.
335
c725e5d99819 localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents: 327
diff changeset
  1267
    localSourceFirst := Class tryLocalSourceFirst asValue.
420
2c169931d1ab allow turning of of accelerator display
Claus Gittinger <cg@exept.de>
parents: 410
diff changeset
  1268
    showAccelerators := MenuView showAcceleratorKeys asValue.
491
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1269
    sourceCacheDir := nil asValue.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1270
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1271
    loadBinaries := Smalltalk loadBinaries asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1272
    compileLazy := Autoload compileLazy asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1273
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1274
    "/
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1275
    "/ create a box on those values ...
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1276
    "/
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1277
    box := DialogBox new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1278
    box label:(resources string:'Other settings').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1279
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1280
    box addCheckBox:(resources string:'log compiles in changes file') on:updChanges.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1281
    box addCheckBox:(resources string:'log doIts in changes file') on:logDoits.
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1282
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1283
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1284
                    addLabelledInputField:(resources string:'change file name:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1285
                    adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1286
                    on:changeFileName 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1287
                    tabable:true
492
829b4872bca3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
  1288
                    separateAtX:0.4.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1289
    component immediateAccept:true; acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1290
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1291
"/    y := box yPosition.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1292
"/    component := box addTextLabel:(resources string:'change file name:').
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1293
"/    component width:0.5; adjust:#right; borderWidth:0.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1294
"/    box yPosition:y.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1295
"/    component := box addInputFieldOn:changeFileName tabable:true.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1296
"/    component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1297
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1298
    box addHorizontalLine.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1299
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1300
    box addCheckBox:(resources string:'lazy compilation when autoloading') on:compileLazy.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1301
    check := box addCheckBox:(resources string:'if present, load binary objects when autoloading') on:loadBinaries.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1302
    ObjectFileLoader isNil ifTrue:[
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1303
        loadBinaries value:false.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1304
        check disable
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1305
    ].
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1306
250
16612cb1c470 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 249
diff changeset
  1307
    check := box addCheckBox:(resources string:'sourcecode from sourcecode management') on:useManager.
343
569baf25f549 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 342
diff changeset
  1308
    oldIndent := box leftIndent.
335
c725e5d99819 localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents: 327
diff changeset
  1309
    box leftIndent:30.
c725e5d99819 localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents: 327
diff changeset
  1310
    localCheck := box addCheckBox:(resources string:'if present, use local source (suppress checkout)') on:localSourceFirst.
491
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1311
    localCheck enableChannel:useManager.
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1312
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1313
    cacheEntry := box 
493
eddc0d77d99e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 492
diff changeset
  1314
                    addLabelledInputField:(resources string:'source cache dir:')
491
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1315
                    adjust:#right
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1316
                    on:sourceCacheDir 
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1317
                    tabable:true
492
829b4872bca3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
  1318
                    separateAtX:0.4.
491
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1319
    cacheEntry immediateAccept:true; acceptOnLeave:false.
343
569baf25f549 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 342
diff changeset
  1320
    box leftIndent:oldIndent.
521
14e0be643785 disable cacheDir field if no sourceCodeManager
Claus Gittinger <cg@exept.de>
parents: 514
diff changeset
  1321
    cacheEntry enableChannel:useManager.
335
c725e5d99819 localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents: 327
diff changeset
  1322
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1323
    (AbstractSourceCodeManager isNil 
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1324
    or:[AbstractSourceCodeManager defaultManager isNil]) ifTrue:[
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1325
        useManager value:false.
491
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1326
        cacheEntry disable.
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1327
        check disable.
505
a7f41006fb0b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 503
diff changeset
  1328
        localCheck enable.
491
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1329
    ] ifFalse:[
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1330
        sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName).
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1331
    ].
335
c725e5d99819 localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents: 327
diff changeset
  1332
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1333
    box addHorizontalLine.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1334
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1335
    box addCheckBox:(resources string:'shadows under popup views') on:shadows.
327
44a25cae2645 allow setting of dialog-focus behavior
ca
parents: 319
diff changeset
  1336
    box addCheckBox:(resources string:'boxes return focus to previously active view') on:returnFocus.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1337
    box addCheckBox:(resources string:'hostname in window labels') on:hostNameInLabel.
443
ea8f82ba103c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 440
diff changeset
  1338
    box addCheckBox:(resources string:'show accelerator keys in menus') on:showAccelerators.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1339
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1340
    box 
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1341
        addHelpButtonFor:'NewLauncher/miscSettings.html';
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1342
        addAbortButton; 
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1343
        addOkButton.
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1344
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1345
    "/
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1346
    "/ show the box ...
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1347
    "/
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1348
    box open.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1349
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1350
    "/
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1351
    "/ update system settings
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1352
    "/
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1353
    box accepted ifTrue:[
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1354
        Smalltalk logDoits:logDoits value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1355
        PopUpView shadows:shadows value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1356
        Class updateChanges:updChanges value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1357
        Autoload compileLazy:compileLazy value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1358
        Smalltalk loadBinaries:loadBinaries value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1359
        StandardSystemView includeHostNameInLabel:hostNameInLabel value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1360
        ObjectMemory nameForChanges:changeFileName value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1361
        Dialog returnFocusWhenClosingModalBoxes:returnFocus value.
420
2c169931d1ab allow turning of of accelerator display
Claus Gittinger <cg@exept.de>
parents: 410
diff changeset
  1362
        MenuView showAcceleratorKeys:showAccelerators value.
327
44a25cae2645 allow setting of dialog-focus behavior
ca
parents: 319
diff changeset
  1363
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1364
        useManager value ifTrue:[
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1365
            (Smalltalk at:#SourceCodeManager) isNil ifTrue:[
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1366
                Smalltalk at:#SourceCodeManager put:(AbstractSourceCodeManager defaultManager)
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1367
            ].
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1368
            Class tryLocalSourceFirst:(localSourceFirst value).
491
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1369
            nm := sourceCacheDir value.
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1370
            (fn := nm asFilename) exists ifFalse:[
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1371
                (self confirm:(nm , ' does not exists\create ?' withCRs)) ifTrue:[
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1372
                    fn makeDirectory; 
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1373
                       makeReadableForAll;
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1374
                       makeWritableForAll;
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1375
                       makeExecutableForAll.
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1376
                ]
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1377
            ].
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1378
            (fn exists 
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1379
            and:[fn isDirectory
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1380
            and:[fn isReadable
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1381
            and:[fn isWritable]]]) ifTrue:[
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1382
                AbstractSourceCodeManager cacheDirectoryName:(sourceCacheDir value).
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1383
            ]
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1384
        ] ifFalse:[
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1385
            Smalltalk at:#SourceCodeManager put:nil
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1386
        ]
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1387
    ].
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1388
    box destroy
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1389
590
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
  1390
    "Modified: 29.5.1996 / 18:37:26 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1391
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1392
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1393
printerSettings
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1394
    |box 
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1395
     possiblePrinters possibleTypes printerType printCommand printerList
499
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1396
     check y component oldIndent commandList|
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1397
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1398
    possiblePrinters := PrinterStream withAllSubclasses asArray.
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1399
    possibleTypes := possiblePrinters collect:[:cls | cls printerTypeName].
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1400
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1401
    printerType := SelectionInList new list:(resources array:possibleTypes).
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1402
    printerType selectionIndex:(possiblePrinters identityIndexOf:Printer).
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1403
    printCommand := Printer printCommand asValue.
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1404
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1405
    box := DialogBox new.
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1406
    box label:(resources string:'Printer settings').
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1407
378
7e17a9941cca added ...'s
Claus Gittinger <cg@exept.de>
parents: 377
diff changeset
  1408
    printerList := box addPopUpList:(resources string:'printer type:') on:printerType.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1409
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1410
    y := box yPosition.
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1411
    component := box addTextLabel:(resources string:'print command:').
362
d5d99cdda74c use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents: 359
diff changeset
  1412
    component width:0.3; adjust:#right; borderWidth:0.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1413
    box yPosition:y.
362
d5d99cdda74c use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents: 359
diff changeset
  1414
    component := box addComboBoxOn:printCommand tabable:true.
d5d99cdda74c use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents: 359
diff changeset
  1415
"/    component := box addInputFieldOn:printCommand tabable:true.
d5d99cdda74c use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents: 359
diff changeset
  1416
    component width:0.7; left:0.3; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
d5d99cdda74c use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents: 359
diff changeset
  1417
    "/ some common print commands ...
499
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1418
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1419
    commandList := resources at:'PRINT_COMMANDS' ifAbsent:nil.
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1420
    commandList isNil ifTrue:[
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1421
        commandList := PrinterStream defaultCommands.
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1422
        commandList isNil ifTrue:[
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1423
            commandList := #('lpr' 
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1424
                             'lpr -P<your-printer>' 
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1425
                             'cat | rsh <printHost> lpr -h' 
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1426
                             'cat >xxx ; ghostview xxx'
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1427
                             'cat > printfile'
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1428
                            ).
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1429
        ]
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1430
    ].
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1431
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1432
    component list:commandList.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1433
    box addVerticalSpace.
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1434
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1435
    box addAbortButton; addOkButton.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1436
    box open.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1437
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1438
    box accepted ifTrue:[
362
d5d99cdda74c use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents: 359
diff changeset
  1439
        Printer printCommand:printCommand value.
d5d99cdda74c use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents: 359
diff changeset
  1440
        Printer := possiblePrinters at:(printerType selectionIndex).
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1441
    ].
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1442
    box destroy
362
d5d99cdda74c use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents: 359
diff changeset
  1443
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1444
    "Modified: 29.5.1996 / 14:15:46 / cg"
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1445
!
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1446
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1447
viewStyleSetting 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1448
    |listOfStyles resourceDir dir box 
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1449
     list listView scrView infoLabel infoForwarder newStyle|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1450
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1451
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1452
     search resources directory for a list of .style files ...
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1453
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1454
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1455
    resourceDir := Smalltalk getSystemFileName:'resources'.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1456
    resourceDir isNil ifTrue:[
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1457
        self warn:'no styles found (missing ''resources'' directory)'.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1458
        ^ self
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1459
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1460
    dir := FileDirectory directoryNamed:resourceDir.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1461
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1462
    listOfStyles := dir select:[:aFileName | aFileName endsWith:'.style'].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1463
    listOfStyles := listOfStyles collect:[:aFileName | aFileName copyWithoutLast:6].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1464
    listOfStyles sort.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1465
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1466
"/ old code: used a standard ListSelectionBox
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1467
"/ changed to intercept selection and add info-output.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1468
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1469
"/    box := ListSelectionBox title:(resources string:'STYLE_MSG') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1470
"/    box label:(resources string:'Style selection').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1471
"/    box list:listOfStyles.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1472
"/    box initialText:View defaultStyle.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1473
"/    box selectAction:[:newStyle |
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1474
"/    ].    
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1475
"/    box action:[:newStyle |
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1476
"/        transcript topView withCursor:Cursor wait do:[
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1477
"/            Transcript showCR:'change style to ' , newStyle , ' ...'.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1478
"/            View defaultStyle:newStyle asSymbol.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1479
"/        ]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1480
"/    ].    
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1481
"/    box showAtPointer
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1482
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1483
"/ new code: build box 'by 'hand'
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1484
"/
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1485
    infoForwarder := Plug new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1486
    infoForwarder respondTo:#showInfo
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1487
                  with:[
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1488
                        |nm sheet comment|
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1489
                        nm := list selection.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1490
                        sheet := ViewStyle fromFile:(nm , '.style').
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1491
                        comment := sheet at:#comment ifAbsent:''.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1492
                        infoLabel label:comment withCRs asStringCollection
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1493
                       ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1494
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1495
    list := SelectionInList with:listOfStyles.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1496
    list onChangeSend:#showInfo to:infoForwarder.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1497
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1498
    box := Dialog new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1499
    box label:(resources string:'Style selection').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1500
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1501
    (box addTextLabel:(resources string:'STYLE_MSG') withCRs) adjust:#left.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1502
    listView := SelectionInListView on:list.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1503
    listView doubleClickAction:[:sel | box accept value:true. box hide].
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1504
    scrView := box addComponent:(ScrollableView forView:listView) tabable:true.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1505
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1506
    box addVerticalSpace.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1507
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1508
    (infoLabel := box addTextLabel:'\\' withCRs) adjust:#centerLeft.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1509
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1510
    box addAbortButton; addOkButton.
568
58d7e4157f23 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
  1511
    list selection:(View defaultStyle).
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1512
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1513
    box stickAtBottomWithVariableHeight:scrView.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1514
    box stickAtBottomWithFixHeight:infoLabel.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1515
    box open.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1516
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1517
    box accepted ifTrue:[
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1518
        newStyle := list selection.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1519
        newStyle notNil ifTrue:[
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1520
            self withWaitCursorDo:[
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1521
                Transcript showCR:'change style to ' , newStyle , ' ...'.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1522
                View defaultStyle:newStyle asSymbol.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1523
            ].
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1524
            self reopenLauncher.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1525
        ]
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1526
    ].
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1527
    box destroy
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1528
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1529
    "Modified: 29.5.1996 / 14:16:04 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1530
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1531
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1532
!NewLauncher methodsFor:'actions - tools'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1533
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  1534
compressingGarbageCollect
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  1535
    ObjectMemory verboseGarbageCollect
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  1536
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  1537
    "Created: 12.5.1996 / 15:30:15 / cg"
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  1538
!
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  1539
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1540
fullScreenHardcopy
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1541
    "after a second (to allow redraw of views under menu ...),
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1542
     save the contents of the whole screen."
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1543
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1544
    Processor addTimedBlock:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1545
	self saveScreenImage:(Image fromScreen) defaultName:'screen'
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1546
    ] afterSeconds:1
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1547
!
99
claus
parents: 98
diff changeset
  1548
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  1549
garbageCollect
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  1550
    ObjectMemory reclaimSymbols
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  1551
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  1552
    "Created: 12.5.1996 / 15:28:03 / cg"
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  1553
!
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  1554
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  1555
globalGarbageCollect
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  1556
    ObjectMemory reclaimSymbols
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  1557
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  1558
    "Created: 12.5.1996 / 15:28:13 / cg"
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  1559
!
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  1560
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1561
removeAllBreakAndTracePoints
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1562
    MessageTracer cleanup
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1563
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1564
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1565
screenHardcopy
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1566
    "after a second (to allow redraw of views under menu ...),
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1567
     let user specify a rectangular area on the screen
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1568
     and save its contents."
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1569
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1570
    |area|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1571
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1572
    Processor addTimedBlock:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1573
	area := Rectangle fromUser.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1574
	(area width > 0 and:[area height > 0]) ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1575
	    self saveScreenImage:(Image fromScreen:area) defaultName:'hardcopy'
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1576
	]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1577
    ] afterSeconds:1
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1578
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1579
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1580
startEventMonitor
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1581
    EventMonitor open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1582
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1583
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1584
startFullWindowTreeView
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1585
    WindowTreeView open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1586
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1587
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1588
startMemoryMonitor
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1589
    MemoryMonitor open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1590
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1591
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1592
startMemoryUsageView
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1593
    MemoryUsageView open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1594
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1595
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1596
startProcessMonitor
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1597
    ProcessMonitor open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1598
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1599
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1600
startStopEventTrace
503
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  1601
    |v wg|
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1602
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1603
    v := Screen current viewFromUser.
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1604
    v notNil ifTrue:[
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1605
        v := v topView.
503
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  1606
        wg := v windowGroup.
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  1607
        wg notNil ifTrue:[
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  1608
            "/
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  1609
            "/ toggle eventTrace in its windowGroup
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  1610
            "/
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  1611
            wg traceEvents:(wg preEventHook isNil)
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1612
        ]
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1613
    ]
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1614
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1615
    "Created: 7.3.1996 / 14:44:22 / cg"
503
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  1616
    "Modified: 24.4.1996 / 10:27:11 / cg"
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1617
!
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  1618
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1619
startWindowTreeView
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1620
    |v|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1621
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1622
    v := self pickAView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1623
    v notNil ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1624
	WindowTreeView openOn:v topView
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1625
    ]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1626
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1627
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1628
viewDestroy
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1629
    "let user pick a view and destroy it.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1630
     Even allow destroying non-smalltalk views
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1631
     (also for views which I forgot due to some error)"
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1632
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1633
    |device p v id|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1634
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1635
    (Delay forSeconds:1) wait.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1636
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1637
    device := Screen current.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1638
    p :=  device pointFromUser.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1639
    id := device viewIdFromPoint:p.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1640
    v := device viewFromId:id.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1641
    v notNil ifTrue:[
304
49dc8c0e733e interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
  1642
	v topView destroy.
49dc8c0e733e interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
  1643
	^ self
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1644
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1645
    id = device rootView id ifTrue:[
304
49dc8c0e733e interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
  1646
	^ self
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1647
    ].
298
d1212fc486b9 message string changed
Claus Gittinger <cg@exept.de>
parents: 281
diff changeset
  1648
    (Dialog confirm:'mhmh, this may not a be smalltalk view\(Or I somehow forgot about it).\Destroy anyway ?' withCRs)
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1649
    ifTrue:[
304
49dc8c0e733e interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
  1650
	device destroyView:nil withId:id
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1651
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1652
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1653
    "Modified: 18.9.1995 / 23:13:32 / claus"
298
d1212fc486b9 message string changed
Claus Gittinger <cg@exept.de>
parents: 281
diff changeset
  1654
    "Modified: 14.12.1995 / 22:02:26 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1655
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1656
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1657
viewHardcopy
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1658
    "after a second (to allow redraw of views under menu ...),
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1659
     let user specify a view and save its contents."
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1660
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1661
    Processor addTimedBlock:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1662
	|v|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1663
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1664
	v := Screen current viewFromUser.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1665
	v notNil ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1666
	    self saveScreenImage:(Image fromView:(v topView)) defaultName:'hardcopy'
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1667
	]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1668
    ] afterSeconds:1
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1669
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1670
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1671
viewInspect
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1672
    "let user pick a view and inspect it. Only smalltalk views are allowed"
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1673
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1674
    |v|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1675
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1676
    v := self pickAView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1677
    v notNil ifTrue:[
226
4b050498fe46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
  1678
"/        v topView inspect
4b050498fe46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
  1679
	v inspect
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1680
    ]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1681
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1682
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1683
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1684
!NewLauncher methodsFor:'change & update'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1685
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1686
update:something with:aParameter from:changedObject
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1687
    ((something == #currentProject)
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1688
    or:[changedObject == Project]) ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1689
	self changed:#info.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1690
	^ self
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1691
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1692
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1693
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1694
!NewLauncher methodsFor:'help'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1695
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1696
helpTextFor:aComponent
399
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  1697
    |sel s buttons|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1698
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1699
    aComponent == transcript ifTrue:[
399
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  1700
        s := 'TRANSCRIPT_HELP'
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1701
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1702
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1703
    aComponent == infoView ifTrue:[
399
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  1704
        s := 'INFOVIEW_HELP'
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1705
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1706
399
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  1707
    buttons := buttonPanel subViews.
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  1708
    (buttons notNil and:[buttons includes:aComponent]) ifTrue:[
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  1709
        "kludge: look for its change selector"
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  1710
        sel := aComponent changeMessage.
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  1711
        sel == #startSystemBrowser ifTrue:[
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  1712
            s := 'SBROWSER_BUTTON_HELP'
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  1713
        ].
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  1714
        sel == #startFileBrowser ifTrue:[
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  1715
            s := 'FBROWSER_BUTTON_HELP'
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  1716
        ].
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  1717
        sel == #startChangesBrowser ifTrue:[
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  1718
            s := 'CBROWSER_BUTTON_HELP'
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  1719
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1720
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1721
    s notNil ifTrue:[
399
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  1722
        ^ resources string:s
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1723
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1724
    ^ nil
399
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  1725
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  1726
    "Modified: 26.2.1996 / 23:08:19 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1727
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1728
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1729
!NewLauncher methodsFor:'infoview update'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1730
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1731
info
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1732
    |project projectName projectDir packageName|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1733
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1734
    (Project isNil or:[(project := Project current) isNil]) ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1735
	projectName := '* none *'.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1736
	projectDir := '.'.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1737
	packageName := '* none *'.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1738
    ] ifFalse:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1739
	projectName := project name.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1740
	projectDir := project directory.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1741
	packageName := project packageName.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1742
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1743
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1744
    ^ resources
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1745
	string:'project: ''%1''  fileOut to: ''%3''  package: ''%2'''
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1746
	  withArgs:(Array 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1747
			with:projectName
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1748
			with:packageName 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1749
			with:(projectDir contractTo:30))
319
a39350103cb2 forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
  1750
!
a39350103cb2 forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
  1751
a39350103cb2 forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
  1752
showActivity:someMessage
500
6824f44e589b commentary
Claus Gittinger <cg@exept.de>
parents: 499
diff changeset
  1753
    "some activityNotification to be forwarded to the user;
6824f44e589b commentary
Claus Gittinger <cg@exept.de>
parents: 499
diff changeset
  1754
     show it in the transcript here."
6824f44e589b commentary
Claus Gittinger <cg@exept.de>
parents: 499
diff changeset
  1755
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1756
    Transcript showCR:someMessage; endEntry
319
a39350103cb2 forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
  1757
a39350103cb2 forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
  1758
    "Created: 23.12.1995 / 12:38:29 / cg"
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1759
    "Modified: 18.5.1996 / 15:43:21 / cg"
99
claus
parents: 98
diff changeset
  1760
! !
claus
parents: 98
diff changeset
  1761
93
claus
parents: 92
diff changeset
  1762
!NewLauncher methodsFor:'initialize / release'!
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1763
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1764
addTopViewsToCurrentProject
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1765
    "ignored here - the launcher is always global (i.e. not project private)."
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1766
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1767
    ^ self
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1768
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1769
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1770
buttonPanelSpec
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1771
    "return a spec for the buttons in the panel;
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1772
     entries consists of selector and bitmap-filename.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1773
     nil selectors are taken as separators (see setupButtonPanel)"
98
claus
parents: 96
diff changeset
  1774
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1775
    ^ #(
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1776
        #(startSystemBrowser 'SBrowser32x32.xbm')
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1777
        #(startFileBrowser   'FBrowser32x32.xbm')
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1778
"/        #(startWorkspace      'Workspace32x32.xbm')
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1779
        #(nil nil)
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1780
        #(startChangesBrowser 'CBrowser32x32.xbm')
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1781
"/        #(nil nil)
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1782
"/        #(nil nil)
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1783
"/        #(startDocumentationTool 'book11.ico')
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1784
     )
230
6be247b9d815 workspace button
Claus Gittinger <cg@exept.de>
parents: 228
diff changeset
  1785
6be247b9d815 workspace button
Claus Gittinger <cg@exept.de>
parents: 228
diff changeset
  1786
    "Created: 4.12.1995 / 20:16:18 / cg"
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1787
    "Modified: 19.4.1996 / 16:37:46 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1788
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1789
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1790
closeRequest
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1791
    (self confirm:(resources string:'really close %1 ?' with:self class name)) ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1792
	super closeRequest
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1793
    ]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1794
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1795
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1796
focusSequence
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1797
    ^ (Array with:myMenu) 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1798
      , 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1799
      (buttonPanel subViews select:[:element | element isKindOf:Button])
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1800
"/      , (Array with:Transcript)
98
claus
parents: 96
diff changeset
  1801
!
claus
parents: 96
diff changeset
  1802
93
claus
parents: 92
diff changeset
  1803
openInterface
98
claus
parents: 96
diff changeset
  1804
    "sent by my superclass to open up my interface"
93
claus
parents: 92
diff changeset
  1805
claus
parents: 92
diff changeset
  1806
    |top icn w|
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1807
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1808
    top := StandardSystemView new.
205
e3952eceab14 set iconLabel
Claus Gittinger <cg@exept.de>
parents: 192
diff changeset
  1809
    top label:'Smalltalk/X'; iconLabel:'ST/X Launcher'.
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1810
    top extent:(400@300 ).
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1811
92
claus
parents: 91
diff changeset
  1812
    "
claus
parents: 91
diff changeset
  1813
     temporary kludge for SGI;
claus
parents: 91
diff changeset
  1814
     this will be moved into StandardSystemView and be done
claus
parents: 91
diff changeset
  1815
     automatically soon ...
claus
parents: 91
diff changeset
  1816
    "
106
claus
parents: 105
diff changeset
  1817
    Screen current serverVendor = 'Silicon Graphics' ifTrue:[
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1818
        icn := self class aboutIcon.
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1819
        icn notNil ifTrue:[
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1820
            icn := icn magnifiedTo:86@68.
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1821
            w := View extent:86@68. "/ icn extent.
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1822
            w viewBackground:icn.
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1823
            top iconView:w
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1824
        ]
92
claus
parents: 91
diff changeset
  1825
    ].
claus
parents: 91
diff changeset
  1826
93
claus
parents: 92
diff changeset
  1827
    self setupViewsIn:top.
98
claus
parents: 96
diff changeset
  1828
claus
parents: 96
diff changeset
  1829
    top application:self.   
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1830
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1831
    "
92
claus
parents: 91
diff changeset
  1832
     open with higher prio to allow interaction even while things
claus
parents: 91
diff changeset
  1833
     are running ...
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1834
    "
92
claus
parents: 91
diff changeset
  1835
    top openWithPriority:(Processor userSchedulingPriority + 1).
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1836
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1837
    "Modified: 18.4.1996 / 14:56:11 / cg"
93
claus
parents: 92
diff changeset
  1838
!
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1839
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1840
release
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1841
    infoProcess notNil ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1842
	infoProcess terminate.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1843
	infoProcess := nil.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1844
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1845
    super release
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1846
!
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1847
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1848
restarted
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1849
    "image restart - since WindowGroup recreates the process with
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1850
     default prio, we have to raise the prio again.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1851
     Mhmh - this looks like a bug to me ..."
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1852
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1853
    Processor activeProcess priority:(Processor userSchedulingPriority + 1).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1854
    super restarted
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1855
!
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1856
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1857
saveAndTerminate
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1858
    "
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1859
     some windowManagers can send this, to shutDown an application
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1860
     but let it save its state before, for restart. We are already
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1861
     prepared for this ;-)"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1862
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1863
    self snapshot.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1864
    super saveAndTerminate
103
claus
parents: 102
diff changeset
  1865
!
claus
parents: 102
diff changeset
  1866
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1867
setupButtonPanelIn:aTopView
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1868
    "create the buttonPanel"
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1869
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  1870
    |spc mh buttonSize|
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1871
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1872
    spc := View viewSpacing // 2.
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1873
    buttonPanel := HorizontalPanelView in:aTopView.
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1874
    buttonPanel level:-1; borderWidth:0.
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1875
    buttonPanel horizontalLayout:#leftSpace.
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1876
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  1877
    buttonSize := self class buttonImageSize.
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  1878
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1879
    "/
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1880
    "/ the buttonSpec is a collection of:
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1881
    "/   #( selector  iconFileName )
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1882
    "/ or:
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1883
    "/   #( selector  (className iconQuerySelector) )
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1884
    "/ or"
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1885
    "/   #( nil )
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1886
    "/
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1887
    self buttonPanelSpec do:[:entry |
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1888
        |sel b sep img iconSpec|
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1889
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  1890
        sel := entry at:1.
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  1891
        sel isNil ifTrue:[
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  1892
            sep := View in:buttonPanel.
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  1893
            sep extent:32@1; borderWidth:0.
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  1894
        ] ifFalse:[
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  1895
            b := Button in:buttonPanel.
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1896
            iconSpec := entry at:2.
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1897
            iconSpec isArray ifTrue:[
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1898
                img := (Smalltalk classNamed:(iconSpec at:1)) perform:(iconSpec at:2).
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1899
            ] ifFalse:[
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1900
                img := Image fromFile:iconSpec.
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1901
            ].
591
b06ede2544fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 590
diff changeset
  1902
            (img notNil and:[buttonSize notNil]) ifTrue:[
b06ede2544fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 590
diff changeset
  1903
                img extent ~= buttonSize ifTrue:[
b06ede2544fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 590
diff changeset
  1904
                    img := img magnifiedTo:buttonSize       
b06ede2544fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 590
diff changeset
  1905
                ]
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  1906
            ].
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  1907
            b form:img.
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  1908
            b model:self; changeMessage:sel
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  1909
        ]
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1910
    ].
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1911
100
claus
parents: 99
diff changeset
  1912
    mh := myMenu height.
claus
parents: 99
diff changeset
  1913
    buttonPanel origin:0.0 @ (mh + spc)
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  1914
                corner:(1.0 @ (mh + spc + buttonPanel preferredExtent y)).
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1915
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1916
    buttonPanel leftInset:spc; rightInset:spc.
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  1917
591
b06ede2544fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 590
diff changeset
  1918
    "Modified: 29.5.1996 / 19:23:04 / cg"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1919
!
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1920
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1921
setupDemoMenu
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1922
    "setup the demo pulldown menu"
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1923
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1924
    |m|
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1925
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1926
    myMenu at:#demos 
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1927
           putLabels:(resources array:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1928
                                        'goodies'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1929
                                        'games'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1930
                                        'geometric designs'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1931
                                        'simple animations'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1932
                                        '3D graphics'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1933
                                        'graphic editors'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1934
                                       ))
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1935
           selectors:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1936
                                        goodies
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1937
                                        games
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1938
                                        geometricDesigns
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1939
                                        simpleAnimations
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1940
                                        #'3Dgraphics'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1941
                                        #graphicEditors
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1942
                      )
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1943
           receiver:self.
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1944
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1945
    "
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1946
     only to show two different ways of defining a popUpMenu,
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1947
     we use labels:selectors:receiver: here:
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1948
    "
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1949
    m := myMenu menuAt:#demos.
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1950
    m subMenuAt:#games
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1951
      put:(PopUpMenu
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1952
                labels:(resources array:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1953
                                           'Tetris'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1954
                                           'Tic Tac Toe'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1955
                                           'Tic Tac Toe (2 players)'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1956
                                         ))
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1957
                selectors:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1958
                                           startTetris
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1959
                                           startTicTacToe
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1960
                                           startTicTacToe2
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1961
                           )
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1962
                receiver:self).
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1963
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1964
    "
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1965
     and labels:selector:args:receiver: here:
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1966
    "
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1967
    m subMenuAt:#geometricDesigns
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1968
      put:(PopUpMenu
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1969
                labels:(resources array:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1970
                                           'Pen demo'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1971
                                           'Commander demo'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1972
                                           '-'     
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1973
                                           'Fractal plants demo'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1974
                                           'Fractal patterns demo'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1975
                                         ))
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1976
                selector:#openDemo:
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1977
                args:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1978
                                           PenDemo
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1979
                                           CommanderDemo
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1980
                                           nil
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1981
                                           FractalPlantsDemo
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1982
                                           FractalPatternsDemo
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1983
                      )
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1984
                receiver:self).
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1985
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1986
    m subMenuAt:#simpleAnimations 
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1987
      put:(PopUpMenu
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1988
                labels:(resources array:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1989
                                           'Animation'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1990
                                           'Globe demo'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1991
                                         ))
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1992
                selector:#openDemo:
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1993
                args:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1994
                                           Animation
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1995
                                           GlobeDemo
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1996
                      )
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  1997
                receiver:self).
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1998
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  1999
    m subMenuAt:#'3Dgraphics' 
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2000
      put:(PopUpMenu
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2001
                labels:(resources 
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2002
                            array:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2003
                                'plane'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2004
                                'tetra'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2005
                                'cube (wireframe)'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2006
                                'cube (solid)'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2007
                                'sphere (wireframe)'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2008
                                'doughnut (wireframe)'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2009
                                'planet'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2010
                                'teapot'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2011
                                'logo'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2012
                                'rubics cube'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2013
                                'x/y graph'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2014
                                '-'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2015
                                'cube (light)'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2016
                                'cube (light & texture)'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2017
                                'sphere (light)'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2018
                                'colored octahedron'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2019
                             ))
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2020
                selector:#openDemo:
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2021
                args:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2022
                                GLPlaneDemoView2
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2023
                                GLTetraDemoView
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2024
                                GLWireCubeDemoView
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2025
                                GLCubeDemoView
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2026
                                GLWireSphereDemoView
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2027
                                GLDoughnutDemoView
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2028
                                GLPlanetDemoView
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2029
                                GLTeapotDemo
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2030
                                Logo3DView1
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2031
                                RubicsCubeView
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2032
                                GLXYGraph
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2033
                                nil
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2034
                                GLCubeDemoView2
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2035
                                GLBrickCubeDemoView
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2036
                                GLSphereDemoView2
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2037
                                GLOctaHedronDemoView
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2038
                      )
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2039
                receiver:self).
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2040
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2041
    m subMenuAt:#graphicEditors 
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2042
      put:(PopUpMenu
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2043
                labels:(resources array:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2044
                                           'DrawTool'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2045
                                           'LogicTool'
464
998161ce250d added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents: 458
diff changeset
  2046
                                           'Paint Demo'
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2047
                                         ))
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2048
                selector:#openDemo:
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2049
                args:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2050
                                           DrawTool
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2051
                                           LogicTool
464
998161ce250d added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents: 458
diff changeset
  2052
                                           ColorDrawDemo3
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2053
                      )
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2054
                receiver:self).
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2055
91
claus
parents: 90
diff changeset
  2056
    m subMenuAt:#goodies 
claus
parents: 90
diff changeset
  2057
      put:(PopUpMenu
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2058
                labels:(resources array:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2059
                                        'clock'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2060
                                        'calendar'
464
998161ce250d added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents: 458
diff changeset
  2061
                                        'calculator'
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2062
                                        '-'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2063
                                        'mail tool'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2064
                                        'news tool'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2065
                                        ))
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2066
                selector:#openDemo:
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2067
                args:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2068
                                        Clock 
464
998161ce250d added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents: 458
diff changeset
  2069
                                        Calendar
998161ce250d added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents: 458
diff changeset
  2070
                                        CalculatorView
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2071
                                        nil
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2072
                                        MailView 
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2073
                                        NewsView
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2074
                      )
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2075
                receiver:self).
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2076
464
998161ce250d added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents: 458
diff changeset
  2077
    "Modified: 11.4.1996 / 00:21:46 / cg"
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2078
!
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2079
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2080
setupInfoViewIn:topView 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2081
    |spc halfSpc|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2082
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2083
    spc := View viewSpacing.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2084
    infoView := Label label:'' in:topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2085
    infoView adjust:#left; borderWidth:0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2086
    infoView level:-1.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2087
    transcript superView bottomInset:(infoView height + spc).
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2088
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2089
    infoView is3D ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2090
	halfSpc := spc // 2.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2091
    ] ifFalse:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2092
	halfSpc := 0
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2093
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2094
    infoView topInset:(infoView height negated - spc + transcript borderWidth);
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2095
	     bottomInset:halfSpc;
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2096
	     leftInset:halfSpc; 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2097
	     rightInset:halfSpc.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2098
    infoView origin:0.0 @ 1.0 corner:1.0 @ 1.0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2099
    infoView model:self; aspect:#info; labelMessage:#info.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2100
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2101
    Project notNil ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2102
	Project addDependent:self.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2103
    ]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2104
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2105
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2106
     NewLauncher open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2107
    "
93
claus
parents: 92
diff changeset
  2108
!
claus
parents: 92
diff changeset
  2109
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2110
setupMenu
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2111
    "setup the pulldown menu"
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2112
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2113
    |l s icon|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2114
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2115
    myMenu labels:(resources array:#(
379
b7adadee426a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
  2116
                                     about
b7adadee426a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
  2117
                                     file
b7adadee426a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
  2118
                                     classes
b7adadee426a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
  2119
                                     tools
b7adadee426a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
  2120
                                     projects
b7adadee426a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
  2121
                                     settings
b7adadee426a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
  2122
                                     demos
b7adadee426a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
  2123
                                     help)).
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2124
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2125
     if there is a bitmap, change 'about' to the ST/X icon
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2126
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2127
    icon := self class smallAboutIcon.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2128
    icon notNil ifTrue:[
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2129
        myMenu labels at:1 put:icon.
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2130
        myMenu height:(myMenu height max:(icon height + (View viewSpacing * 2)))
93
claus
parents: 92
diff changeset
  2131
    ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2132
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2133
    myMenu selectors:#(
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2134
                                     #about
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2135
                                     #file
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2136
                                     #classes 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2137
                                     #tools 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2138
                                     #projects 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2139
                                     #settings
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2140
                                     #demos
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2141
                                     #help).
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2142
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2143
    myMenu at:#about 
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2144
           putLabels:(resources array:#(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2145
                                        'about Smalltalk/X ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2146
                                       ))
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2147
           selectors:#(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2148
                                        #about 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2149
                      )
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2150
           receiver:self.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2151
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2152
    l := #(
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2153
                'file browser'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2154
                '-'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2155
                'modules ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2156
                '-'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2157
                'snapshot ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2158
                'snapshot & exit ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2159
                'exit smalltalk ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2160
         ).
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2161
    s := #(
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2162
                #startFileBrowser
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2163
                nil
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2164
                #objectModuleDialog 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2165
                nil
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2166
                #snapshot
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2167
                #snapshotAndExit
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2168
                #exit
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2169
         ).
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2170
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2171
    myMenu at:#file
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2172
           putLabels:(resources array:l)
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2173
           selectors:s
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2174
           receiver:self.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2175
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2176
    myMenu at:#classes 
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2177
           putLabels:(resources array:#(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2178
                                        'system browser'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2179
                                        'class browser ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2180
                                        'full class browser ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2181
                                        'class hierarchy browser ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2182
                                        'class tree'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2183
                                        '-'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2184
                                        'implementors ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2185
                                        'senders ...'
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
  2186
                                        'resource ...'
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2187
                                        '-'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2188
                                        'change browser'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2189
                                        ))
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2190
           selectors:#(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2191
                                        #startSystemBrowser 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2192
                                        #startClassBrowser 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2193
                                        #startFullClassBrowser 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2194
                                        #startClassHierarchyBrowser 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2195
                                        #startClassTreeView 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2196
                                        nil
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2197
                                        #browseImplementors 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2198
                                        #browseSenders 
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
  2199
                                        #browseResources 
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2200
                                        nil
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2201
                                        #startChangesBrowser 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2202
                      )
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2203
           receiver:self.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2204
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2205
    JavaBrowser notNil ifTrue:[
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2206
        (myMenu subMenuAt:#classes)
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2207
            addLabels:(resources array:#('-' 'java browser'))
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2208
            selectors:#(nil startJavaBrowser)
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2209
            after:#startClassTreeView
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2210
    ].
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2211
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2212
    myMenu at:#projects 
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2213
           putLabels:(resources array:#(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2214
                                        'new project'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2215
                                        '-'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2216
                                        'select project ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2217
                                        ))
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2218
           selectors:#(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2219
                                        #newProject 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2220
                                        nil
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2221
                                        #selectProject 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2222
                      )
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2223
           receiver:self.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2224
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2225
    myMenu at:#settings 
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2226
           putLabels:(resources array:#(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2227
                                        'language ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2228
                                        'show keyboard mappings ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2229
                                        'view style ...'
398
001d78a6cacd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
  2230
                                        'fonts ...'
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2231
                                        'printer ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2232
                                        'messages ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2233
                                        'compilation ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2234
                                        'object memory ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2235
                                        'misc ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2236
                                        ))
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2237
           selectors:#(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2238
                                        #languageSetting 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2239
                                        #keyboardSetting 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2240
                                        #viewStyleSetting 
398
001d78a6cacd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
  2241
                                        #fontSettings 
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2242
                                        #printerSettings 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2243
                                        #messageSettings 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2244
                                        #compilerSettings 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2245
                                        #memorySettings 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2246
                                        #miscSettings 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2247
                      )
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2248
           receiver:self.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2249
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2250
    self setupToolsMenu.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2251
    self setupDemoMenu.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2252
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2253
    ActiveHelp notNil ifTrue:[
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2254
        l := #(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2255
                'ST/X documentation'
497
b2fb9ca947d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 496
diff changeset
  2256
                'class documentation'
483
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
  2257
                'index'
538
43effd124313 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  2258
                '-'
43effd124313 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  2259
                'active help \c'
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2260
              ).
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2261
        s := #(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2262
                #startDocumentationTool
496
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
  2263
                #startClassDocumentation
483
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
  2264
                #startDocumentationIndex
538
43effd124313 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  2265
                nil
43effd124313 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  2266
                #toggleActiveHelp:
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2267
              )
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2268
    ] ifFalse:[
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2269
        l := #(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2270
                'ST/X documentation'
497
b2fb9ca947d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 496
diff changeset
  2271
                'class documentation'
483
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
  2272
                'index'
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2273
              ).
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2274
        s := #(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2275
                #startDocumentationTool
496
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
  2276
                #startClassDocumentation
483
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
  2277
                #startDocumentationIndex
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2278
              )
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2279
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2280
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2281
    myMenu at:#help 
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2282
           putLabels:(resources array:l)
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2283
           selectors:s
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2284
           receiver:self.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2285
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2286
    (ActiveHelp notNil
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2287
    and:[ActiveHelp isActive]) ifTrue:[
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2288
        (myMenu menuAt:#help) checkToggleAt:#toggleActiveHelp: put:true
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2289
    ].
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2290
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
  2291
    "Modified: 28.5.1996 / 13:15:40 / cg"
93
claus
parents: 92
diff changeset
  2292
!
claus
parents: 92
diff changeset
  2293
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2294
setupOtherViewsIn:aTopView
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2295
    "a hook - allows redefinition in your personal subclass.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2296
     For example, add a clock:"
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2297
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2298
"
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2299
    |sz clock space halfSpace|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2300
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2301
    sz := buttonPanel innerHeight - (buttonPanel level abs*2).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2302
    space := View viewSpacing.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2303
    halfSpace := space // 2.
93
claus
parents: 92
diff changeset
  2304
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2305
    buttonPanel rightInset:sz+(space  * 2).
93
claus
parents: 92
diff changeset
  2306
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2307
    clock := ClockView in:buttonPanel topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2308
    clock borderWidth:1.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2309
    clock showSeconds:false.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2310
    clock extent:(sz @ sz).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2311
    clock origin:(1.0 @ (buttonPanel origin y + halfSpace)).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2312
    clock leftInset:sz negated - 2 - halfSpace.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2313
    clock rightInset:halfSpace.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2314
    clock level:1.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2315
"
93
claus
parents: 92
diff changeset
  2316
!
claus
parents: 92
diff changeset
  2317
claus
parents: 92
diff changeset
  2318
setupToolsMenu
claus
parents: 92
diff changeset
  2319
    "setup the tools pulldown menu"
claus
parents: 92
diff changeset
  2320
claus
parents: 92
diff changeset
  2321
    |m|
claus
parents: 92
diff changeset
  2322
claus
parents: 92
diff changeset
  2323
    myMenu at:#tools 
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2324
           putLabels:(resources array:#(
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2325
                                        'workspace'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2326
                                        '-'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2327
                                        'monitors'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2328
                                        '-'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2329
                                        'view tree (all views)'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2330
                                        'view tree'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2331
                                        'inspect view'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2332
                                        'destroy view'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2333
                                        '-'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2334
                                        'hardcopy'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2335
                                        '-'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2336
                                        'misc'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2337
                                        ))
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2338
           selectors:#(
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2339
                                        #startWorkspace 
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2340
                                        nil
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2341
                                        #monitors
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2342
                                        nil
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2343
                                        #startFullWindowTreeView 
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2344
                                        #startWindowTreeView 
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2345
                                        #viewInspect 
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2346
                                        #viewDestroy 
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2347
                                        nil
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2348
                                        #hardcopy 
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2349
                                        nil
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2350
                                        #misc 
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2351
                      )
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2352
           receiver:self.
93
claus
parents: 92
diff changeset
  2353
claus
parents: 92
diff changeset
  2354
claus
parents: 92
diff changeset
  2355
    m := myMenu menuAt:#tools.
claus
parents: 92
diff changeset
  2356
    m subMenuAt:#monitors 
claus
parents: 92
diff changeset
  2357
      put:(PopUpMenu
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2358
                labels:(resources array:#(
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2359
                                           'process'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2360
                                           'memory'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2361
                                           'event view'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2362
                                           'event trace'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2363
                                           '-'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2364
                                           'memory usage'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2365
                                         ))
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2366
                selectors:#(
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2367
                                        #startProcessMonitor
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2368
                                        #startMemoryMonitor 
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2369
                                        #startEventMonitor 
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2370
                                        #startStopEventTrace
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2371
                                        nil
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2372
                                        #startMemoryUsageView 
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2373
                           )
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2374
                receiver:self).
93
claus
parents: 92
diff changeset
  2375
120
claus
parents: 119
diff changeset
  2376
    m subMenuAt:#misc 
claus
parents: 119
diff changeset
  2377
      put:(PopUpMenu
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2378
                labels:(resources array:#(
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2379
                                           'garbage collect'
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2380
                                           'garbage collect & compress'
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2381
                                           '-'
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2382
                                           'remove all break/trace points'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2383
                                         ))
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2384
                selectors:#(
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2385
                                        #garbageCollect
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2386
                                        #compressingGarbageCollect
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2387
                                        nil
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2388
                                        #removeAllBreakAndTracePoints                                        
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2389
                           )
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2390
                receiver:self).
120
claus
parents: 119
diff changeset
  2391
93
claus
parents: 92
diff changeset
  2392
    m subMenuAt:#hardcopy 
claus
parents: 92
diff changeset
  2393
      put:(PopUpMenu
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2394
                labels:(resources array:#(
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2395
                                           'screen'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2396
                                           'area'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2397
                                           'view'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2398
                                         ))
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2399
                selectors:#(
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2400
                                        #fullScreenHardcopy
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2401
                                        #screenHardcopy
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2402
                                        #viewHardcopy
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2403
                           )
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2404
                receiver:self).
93
claus
parents: 92
diff changeset
  2405
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2406
    "Modified: 12.5.1996 / 15:29:46 / cg"
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2407
!
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2408
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2409
setupTranscriptIn:aView 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2410
    |v|
107
claus
parents: 106
diff changeset
  2411
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2412
    (Transcript notNil and:[Transcript ~~ Stderr]) ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2413
	Transcript topView destroy.
110
claus
parents: 109
diff changeset
  2414
    ].
claus
parents: 109
diff changeset
  2415
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2416
    v := HVScrollableView 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2417
		for:TextCollector
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2418
		miniScrollerH:true 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2419
		miniScrollerV:false 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2420
		in:aView.
93
claus
parents: 92
diff changeset
  2421
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2422
    v origin:(0.0 @ (buttonPanel corner y + View viewSpacing)) 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2423
      corner:(1.0 @ 1.0).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2424
    transcript := v scrolledView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2425
    transcript beTranscript.
94
claus
parents: 93
diff changeset
  2426
!
claus
parents: 93
diff changeset
  2427
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2428
setupViewsIn:topView 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2429
    "create the pulldown menu, buttonPanel and transcript view"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2430
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2431
    |tFont|
131
claus
parents: 128
diff changeset
  2432
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2433
    topView model:self.
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2434
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2435
    myMenu := PullDownMenu in:topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2436
    myMenu origin:0.0 @ 0.0 corner:(1.0 @ myMenu height).
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2437
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2438
    self setupMenu.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2439
    self setupButtonPanelIn:topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2440
    self setupTranscriptIn:topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2441
    self setupInfoViewIn:topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2442
    self setupOtherViewsIn:topView.
118
claus
parents: 117
diff changeset
  2443
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2444
    tFont := transcript font.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2445
    topView extent:(((tFont widthOf:'3')*60) max:myMenu preferredExtent x)
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2446
		    @ 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2447
		    ((tFont height) * 20).
118
claus
parents: 117
diff changeset
  2448
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2449
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2450
     NewLauncher open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2451
    "
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2452
! !
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2453
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2454
!NewLauncher methodsFor:'private'!
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2455
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2456
fontBoxForEncoding:encodingMatch
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2457
    |box defaultFont y b
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2458
     labelDef buttonDef listDef menuDef textDef
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2459
     models labels allOfThem filter|
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2460
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2461
    encodingMatch notNil ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2462
        filter := [:f | f encoding notNil 
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2463
                        and:[encodingMatch match:f encoding]].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2464
    ].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2465
        
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2466
    models := OrderedCollection new.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2467
    labels := OrderedCollection new.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2468
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2469
    models add:(allOfThem := nil asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2470
    models add:(labelDef := Label defaultFont asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2471
    models add:(buttonDef := Button defaultFont asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2472
    models add:(listDef := SelectionInListView defaultFont asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2473
    models add:(menuDef := MenuView defaultFont asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2474
    models add:(textDef := TextView defaultFont asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2475
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2476
    box := Dialog new.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2477
    box label:(resources string:'Font settings').
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2478
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2479
    models
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2480
    with:(resources array:#('all' 'labels' 'buttons' 'lists' 'menus' 'edit text'))
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2481
    do:[:model :title |
427
3ad00ff692b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 421
diff changeset
  2482
        |y2 lbl f i|
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2483
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2484
        f := model value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2485
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2486
        (box addTextLabel:title) adjust:#left.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2487
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2488
        y := box yPosition.
427
3ad00ff692b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 421
diff changeset
  2489
        b := box addComponent:(Button label:(resources string:'change')) tabable:true.
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2490
        b relativeExtent:nil; extent:(b preferredExtent).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2491
        y2 := box yPosition.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2492
        box yPosition:y.
427
3ad00ff692b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 421
diff changeset
  2493
        i := box leftIndent.
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2494
        box leftIndent:(b widthIncludingBorder + View viewSpacing).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2495
        (lbl := box addTextLabel:'')
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2496
            adjust:#left;
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2497
            font:(model value);
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2498
            labelChannel:(BlockValue 
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2499
                            with:[:v | |f|
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2500
                                f := v value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2501
                                f isNil ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2502
                                    ''
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2503
                                ] ifFalse:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2504
                                    f userFriendlyName
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2505
                                ]
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2506
                            ]
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2507
                            argument:model).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2508
        labels add:lbl.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2509
427
3ad00ff692b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 421
diff changeset
  2510
        box leftIndent:i.
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2511
        box yPosition:(box yPosition max:y2).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2512
        box addVerticalSpace.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2513
        box addHorizontalLine.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2514
        box addVerticalSpace.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2515
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2516
        b action:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2517
            |f|
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2518
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2519
            f := FontPanel 
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2520
                fontFromUserInitial:(model value) 
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2521
                              title:(resources string:'font for %1' with:title)
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2522
                             filter:filter.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2523
            f notNil ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2524
                model == allOfThem ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2525
                    models do:[:m | m value:f].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2526
                    labels do:[:l | l font:f]
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2527
                ] ifFalse:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2528
                    model value:f.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2529
                    lbl font:f.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2530
                ].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2531
            ]
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2532
        ].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2533
        model == allOfThem ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2534
            box addVerticalSpace
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2535
        ]
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2536
    ].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2537
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2538
    box addAbortButton; addOkButton.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2539
    (box addButton:(Button label:(resources string:'defaults')) before:nil)
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2540
        action:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2541
            "/ fetch defaults
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2542
            View updateAllStyleCaches.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2543
            labelDef value: Label defaultFont.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2544
            buttonDef value: Button defaultFont.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2545
            listDef value: SelectionInListView defaultFont.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2546
            menuDef value: MenuView defaultFont.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2547
            textDef value: TextView defaultFont.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2548
        ].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2549
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2550
    box open.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2551
    box accepted ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2552
        Label defaultFont:labelDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2553
        Button defaultFont:buttonDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2554
        Toggle defaultFont:buttonDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2555
        SelectionInListView defaultFont:listDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2556
        MenuView defaultFont:menuDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2557
        PullDownMenu defaultFont:menuDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2558
        TextView defaultFont:textDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2559
        EditTextView defaultFont:textDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2560
        CodeView defaultFont:textDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2561
    ].
592
5a03a69bc5a3 oops - menuAction is now called with arg if there is one
Claus Gittinger <cg@exept.de>
parents: 591
diff changeset
  2562
    box destroy.
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2563
    ^ box accepted
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2564
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2565
    "Created: 27.2.1996 / 01:44:16 / cg"
592
5a03a69bc5a3 oops - menuAction is now called with arg if there is one
Claus Gittinger <cg@exept.de>
parents: 591
diff changeset
  2566
    "Modified: 30.5.1996 / 09:18:57 / cg"
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2567
!
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2568
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2569
pickAView
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2570
    |v|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2571
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2572
    (Delay forSeconds:1) wait.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2573
    v := Screen current viewFromUser.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2574
    v isNil ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2575
	self warn:'sorry, this is not a smalltalk view'.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2576
	^ nil
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2577
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2578
    ^ v
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2579
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2580
106
claus
parents: 105
diff changeset
  2581
reopenLauncher
claus
parents: 105
diff changeset
  2582
    "for now (since style & language settings currently do
claus
parents: 105
diff changeset
  2583
     not affect living views ...)"
claus
parents: 105
diff changeset
  2584
397
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  2585
    |contents fontPref enc fontList newDefault|
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  2586
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  2587
    fontPref := self class classResources at:'PREFERRED_FONT_ENCODING'.
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  2588
    enc := MenuView defaultFont encoding.
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  2589
    (fontPref match:enc) ifFalse:[
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  2590
        (self confirm:'menu font is not ' , fontPref , '-encoded.\\Change it ?' withCRs)
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  2591
        ifTrue:[
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  2592
            self fontBoxForEncoding:fontPref
397
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  2593
        ]
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  2594
    ].
106
claus
parents: 105
diff changeset
  2595
558
e5afcf45eda7 use #list in reopenLauncher
Claus Gittinger <cg@exept.de>
parents: 555
diff changeset
  2596
    contents := Transcript endEntry; list.
106
claus
parents: 105
diff changeset
  2597
    self class open.
558
e5afcf45eda7 use #list in reopenLauncher
Claus Gittinger <cg@exept.de>
parents: 555
diff changeset
  2598
    Transcript list:contents; hideCursor; scrollToBottom; cursorToEnd; showCursor
e5afcf45eda7 use #list in reopenLauncher
Claus Gittinger <cg@exept.de>
parents: 555
diff changeset
  2599
e5afcf45eda7 use #list in reopenLauncher
Claus Gittinger <cg@exept.de>
parents: 555
diff changeset
  2600
    "Modified: 21.5.1996 / 16:22:37 / cg"
106
claus
parents: 105
diff changeset
  2601
!
claus
parents: 105
diff changeset
  2602
100
claus
parents: 99
diff changeset
  2603
saveAllViews
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2604
    "tell each topview that we are going to terminate and give it chance
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2605
     to save its contents."
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2606
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2607
    ObjectMemory changed:#aboutToExit
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2608
!
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2609
93
claus
parents: 92
diff changeset
  2610
saveScreenImage:anImage defaultName:defaultName
claus
parents: 92
diff changeset
  2611
    "save an image into a file 
claus
parents: 92
diff changeset
  2612
     - ask user for filename using a fileSelectionBox."
claus
parents: 92
diff changeset
  2613
claus
parents: 92
diff changeset
  2614
    |fileName|
claus
parents: 92
diff changeset
  2615
claus
parents: 92
diff changeset
  2616
    fileName := Dialog
382
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  2617
                    requestFileName:(resources string:'save image in:')
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  2618
                    default:(defaultName , '.tiff')
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  2619
                    ok:(resources string:'save')
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  2620
                    abort:(resources string:'cancel')
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  2621
                    pattern:'*.tiff'.
93
claus
parents: 92
diff changeset
  2622
claus
parents: 92
diff changeset
  2623
    fileName notNil ifTrue:[
382
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  2624
        anImage saveOn:fileName
93
claus
parents: 92
diff changeset
  2625
    ].
382
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  2626
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  2627
    "Modified: 21.2.1996 / 13:09:28 / cg"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2628
! !
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2629
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2630
!NewLauncher methodsFor:'queries'!
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2631
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2632
processName
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2633
    "for monitors only - my name"
142
claus
parents: 140
diff changeset
  2634
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2635
    ^ 'ST/X Launcher'
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2636
! !
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2637
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2638
!NewLauncher class methodsFor:'documentation'!
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2639
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2640
version
592
5a03a69bc5a3 oops - menuAction is now called with arg if there is one
Claus Gittinger <cg@exept.de>
parents: 591
diff changeset
  2641
    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.135 1996-05-30 07:19:25 cg Exp $'
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2642
! !