Launcher.st
author Claus Gittinger <cg@exept.de>
Fri, 02 Aug 1996 21:05:34 +0200
changeset 690 c3fb26a81b59
parent 688 b695a9f1a456
child 695 bb9142257343
permissions -rw-r--r--
disable objectModule buttons, if ObjFileLoader is not functioning (but present)
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
658
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
    14
	instanceVariableNames:'myMenu buttonPanel transcript infoView infoProcess helpIsOn
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
    15
		isMainLauncher'
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
    16
	classVariableNames:'CachedAboutIcon OpenLaunchers'
281
7b73ea8b2faa more for international language support
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
    17
	poolDictionaries:''
7b73ea8b2faa more for international language support
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
    18
	category:'Interface-Smalltalk'
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
    19
!
11b4ce85104e Initial revision
claus
parents:
diff changeset
    20
635
2b0ae1f2cf0e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 632
diff changeset
    21
!NewLauncher  class methodsFor:'documentation'!
88
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    22
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    23
copyright
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    24
"
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    25
 COPYRIGHT (c) 1995 by Claus Gittinger
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    26
	      All Rights Reserved
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    27
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    28
 This software is furnished under a license and may be used
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    29
 only in accordance with the terms of that license and with the
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    31
 be provided or otherwise made available to, or used by, any
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    32
 other person.  No title to or ownership of the software is
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    33
 hereby transferred.
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    34
"
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    35
!
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    36
105
claus
parents: 104
diff changeset
    37
customization
claus
parents: 104
diff changeset
    38
"
claus
parents: 104
diff changeset
    39
    Of course, it is possible to change the NewLauncher class itself
claus
parents: 104
diff changeset
    40
    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
    41
    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
    42
    in that class. 
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    43
    That way, your changes are easier to reintroduce in case of an ST/X upgrade.
105
claus
parents: 104
diff changeset
    44
claus
parents: 104
diff changeset
    45
claus
parents: 104
diff changeset
    46
    adding more buttons to the button-panel:
claus
parents: 104
diff changeset
    47
claus
parents: 104
diff changeset
    48
      see the method #buttonPanelSpec;
524
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    49
        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
    50
        #setupButtonPanelIn:. 
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    51
        There, for each entry, a button with that icon is created, 
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    52
        which sends a selector-message to the launcher.
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    53
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    54
        Add entries to that list, and define appropriate methods.
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    55
        For example, to add a button which opens a drawTool,
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    56
        change #buttonPanelSpec to:
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    57
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    58
        buttonPanelSpec
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    59
            ^ #(
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    60
                #(startSystemBrowser  'SBrowser32x32.xbm')
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    61
                #(startFileBrowser    'FBrowser32x32.xbm')
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    62
                #(nil nil)
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    63
                #(startChangesBrowser 'CBrowser32x32.xbm')
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
                #(nil nil)
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    66
                #(startDrawTool       'DrawTool.xbm')
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
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    69
        the panel adjusts its height as appropriate - you may want to
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    70
        create new (small) icons for a good look.
105
claus
parents: 104
diff changeset
    71
claus
parents: 104
diff changeset
    72
    adding an entry to a menu:
claus
parents: 104
diff changeset
    73
524
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    74
        see the #setupMenu method; either add another top-menu, or
72d2fa78dd49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 521
diff changeset
    75
        add entries to an existing menu.
88
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    76
"
219
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
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    79
documentation
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    80
"
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    81
    a new launcher, combining old Launchers menu and transcript into
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    82
    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
    83
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    84
    Also, this app makes first use of the new compatibility framework;
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    85
    you will notice, that this is a subclass of ApplicationModel.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    86
    New applications will no longer be built as subclasses of standardSystemView.
511
1e00846b87e5 documentation
Claus Gittinger <cg@exept.de>
parents: 505
diff changeset
    87
1e00846b87e5 documentation
Claus Gittinger <cg@exept.de>
parents: 505
diff changeset
    88
    [author:]
1e00846b87e5 documentation
Claus Gittinger <cg@exept.de>
parents: 505
diff changeset
    89
        Claus Gittinger
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    90
"
88
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    91
! !
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    92
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
    93
!NewLauncher  class methodsFor:'accessing'!
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
    94
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
    95
current
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
    96
    "return the launcher running on the current screen.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
    97
     (for access via addMenu/ removeMenu)"
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
    98
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
    99
    |screen|
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   100
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   101
    OpenLaunchers do:[:aLauncher |
662
b5efd05fa256 use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents: 661
diff changeset
   102
        aLauncher window graphicsDevice == Screen current ifTrue:[
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   103
            ^ aLauncher
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   104
        ]
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   105
    ].
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   106
    ^ nil.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   107
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   108
    "
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   109
     NewLauncher current
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   110
    "
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   111
662
b5efd05fa256 use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents: 661
diff changeset
   112
    "Modified: 5.7.1996 / 17:55:28 / cg"
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   113
! !
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   114
635
2b0ae1f2cf0e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 632
diff changeset
   115
!NewLauncher  class methodsFor:'defaults'!
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
   116
11b4ce85104e Initial revision
claus
parents:
diff changeset
   117
aboutIcon
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
    CachedAboutIcon notNil ifTrue:[^ CachedAboutIcon].
11b4ce85104e Initial revision
claus
parents:
diff changeset
   121
11b4ce85104e Initial revision
claus
parents:
diff changeset
   122
    image := Image fromFile:'SmalltalkX.xbm'.
92
claus
parents: 91
diff changeset
   123
    image notNil ifTrue:[
580
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   124
        |green dark|
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   125
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
   126
        Screen current hasColors ifTrue:[
580
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   127
            green := (Color red:0 green:80 blue:20) "darkened".
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   128
            dark := Color gray:10.
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   129
            image photometric:#palette.
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   130
        ] ifFalse:[
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   131
            dark := Color black.
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   132
            green := Color white.
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   133
            image photometric:#blackIs0.
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   134
        ].
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   135
        image colorMap:(Array with:dark with:green).
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
   136
"/        Screen current depth > 2 ifTrue:[
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
   137
"/            image := (Image implementorForDepth:Screen current depth) fromImage:image.
144
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   138
"/        ]
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
   139
    ].
11b4ce85104e Initial revision
claus
parents:
diff changeset
   140
    CachedAboutIcon := image.
11b4ce85104e Initial revision
claus
parents:
diff changeset
   141
    ^ image
11b4ce85104e Initial revision
claus
parents:
diff changeset
   142
11b4ce85104e Initial revision
claus
parents:
diff changeset
   143
    "
92
claus
parents: 91
diff changeset
   144
     CachedAboutIcon := nil.
claus
parents: 91
diff changeset
   145
     NewLauncher aboutIcon
claus
parents: 91
diff changeset
   146
    "
144
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   147
580
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   148
    "Modified: 28.5.1996 / 20:55:15 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   149
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   150
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
   151
buttonImageSize
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   152
    "images in buttonPanel are sized to this.
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   153
     Can be redefined in subclasses to return nil (no scaling)
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   154
     or any other useful size"
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   155
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   156
    ^ 32@32
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   157
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   158
    "Modified: 19.4.1996 / 16:36:17 / cg"
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
   159
!
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
   160
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   161
smallAboutIcon
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   162
    |image|
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
    image := self aboutIcon.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   165
    image notNil ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   166
	image := image magnifiedBy:0.4.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   167
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   168
    ^ image
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   169
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   170
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   171
     CachedAboutIcon := nil.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   172
     NewLauncher aboutIcon.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   173
     NewLauncher smallAboutIcon.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   174
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   175
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   176
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   177
!NewLauncher methodsFor:'actions - about & help'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   178
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   179
about
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   180
    |box|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   181
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   182
    box := AboutBox new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   183
    box autoHideAfter:10 with:[].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   184
    box showAtCenter
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   185
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   186
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   187
showDocumentation:aRelativeDocFilePath
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   188
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   189
     although that one is not yet finished,
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   190
     its better than nothing ...
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   191
    "
555
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   192
    HTMLDocumentView notNil ifTrue:[
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   193
        "
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   194
         temporary kludge;
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   195
         not all machines can autoload binaries;
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   196
         however, on my SGI (which can) we want it
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   197
         to load automatically.
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   198
        "
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   199
        HTMLDocumentView isLoaded ifFalse:[
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   200
            ErrorSignal catch:[HTMLDocumentView autoload]
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   201
        ].
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   202
        HTMLDocumentView isLoaded ifTrue:[
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   203
            HTMLDocumentView openFullOnDocumentationFile:aRelativeDocFilePath. 
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   204
            ^ self
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   205
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   206
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   207
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   208
    self warn:'Sorry, the ST/X HTML reader is not (yet) 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   209
included in this architectures release.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   210
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   211
Please use Mosaic, netscape, chimera or any
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   212
other HTML viewer to see the documentation.
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
The documentation is found in the ''doc/online'' directory.'.
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
    "Modified: 31.8.1995 / 13:11:08 / claus"
555
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   217
    "Modified: 21.5.1996 / 14:15:57 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   218
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   219
496
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   220
startClassDocumentation
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   221
    self showDocumentation:'classDoc/TOP.html'
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   222
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   223
    "Modified: 31.8.1995 / 13:11:28 / claus"
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   224
    "Created: 22.4.1996 / 21:03:56 / cg"
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   225
!
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   226
483
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   227
startDocumentationIndex
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   228
    self showDocumentation:'index.html'
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   229
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   230
    "Modified: 31.8.1995 / 13:11:28 / claus"
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   231
    "Created: 17.4.1996 / 22:08:55 / cg"
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   232
!
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   233
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   234
startDocumentationTool
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   235
    self showDocumentation:'TOP.html'
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   236
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   237
    "Modified: 31.8.1995 / 13:11:28 / claus"
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   238
!
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
toggleActiveHelp:aBoolean
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   241
    ActiveHelp notNil ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   242
	helpIsOn := aBoolean.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   243
	helpIsOn ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   244
	    ActiveHelp start
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   245
	] ifFalse:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   246
	    ActiveHelp stop
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   247
	]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   248
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   249
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   250
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   251
!NewLauncher methodsFor:'actions - classes'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   252
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   253
browseImplementors
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   254
    |enterBox|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   255
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   256
    enterBox := EnterBox title:(resources at:'Browse implementors of:') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   257
    enterBox okText:(resources at:'browse').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   258
    enterBox action:[:selectorName |
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   259
	|cls|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   260
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   261
	self withWaitCursorDo:[SystemBrowser browseImplementorsOf:selectorName]  
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   262
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   263
    enterBox showAtPointer
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   264
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   265
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   266
browseResources
589
ce36a65f07a1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
   267
    |enterBox t|
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
    enterBox := EnterBox title:(resources at:'Resource symbol (nil for any):') withCRs.
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   270
    enterBox okText:(resources at:'browse').
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   271
    enterBox action:[:resourceName |
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   272
        |rsc|
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   273
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   274
        (resourceName isNil or:[resourceName isEmpty]) ifTrue:[
589
ce36a65f07a1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
   275
            t := 'methods with any resource'.
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   276
            rsc := nil
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   277
        ] ifFalse:[
589
ce36a65f07a1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
   278
            t := 'methods with ' , resourceName , '-resource'.
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   279
            rsc := resourceName asSymbolIfInterned.
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   280
        ].
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   281
        self withWaitCursorDo:[
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   282
            SystemBrowser browseForResource:rsc
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   283
                          in:(Smalltalk allClasses)
589
ce36a65f07a1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
   284
                          title:t
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   285
        ]  
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   286
    ].
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   287
    enterBox showAtPointer
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   288
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   289
    "Created: 28.5.1996 / 13:15:16 / cg"
589
ce36a65f07a1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
   290
    "Modified: 29.5.1996 / 17:30:38 / cg"
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   291
!
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   292
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   293
browseSenders
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   294
    |enterBox|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   295
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   296
    enterBox := EnterBox title:(resources at:'Browse senders of:') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   297
    enterBox okText:(resources at:'browse').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   298
    enterBox action:[:selectorName |
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   299
	|cls|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   300
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   301
	self withWaitCursorDo:[SystemBrowser browseAllCallsOn:selectorName]  
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
    enterBox showAtPointer
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   304
!
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
startChangesBrowser
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   307
    self withWaitCursorDo:[ChangesBrowser open]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   308
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   309
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   310
startClassBrowser
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   311
    SystemBrowser askThenBrowseClass
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   312
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   313
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   314
startClassHierarchyBrowser
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   315
    SystemBrowser askThenBrowseClassHierarchy
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   316
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   317
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   318
startClassTreeView
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   319
    self withWaitCursorDo:[ClassTreeGraphView open]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   320
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   321
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   322
startFileBrowser
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   323
    self withWaitCursorDo:[FileBrowser open]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   324
!
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
startFullClassBrowser
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   327
    SystemBrowser askThenBrowseFullClassProtocol
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   328
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   329
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   330
startJavaBrowser
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   331
    JavaBrowser notNil ifTrue:[
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   332
        self withWaitCursorDo:[JavaBrowser open]
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   333
    ]
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   334
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   335
    "Created: 18.4.1996 / 15:55:44 / cg"
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   336
    "Modified: 19.4.1996 / 16:39:08 / cg"
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   337
!
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   338
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   339
startSystemBrowser
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   340
    self withWaitCursorDo:[SystemBrowser open]
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
startWorkspace
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   344
    Workspace 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
!NewLauncher methodsFor:'actions - demos'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   348
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   349
openDemo:className
536
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   350
    |cls|
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   351
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   352
    cls := Smalltalk at:className.
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   353
    cls isNil ifTrue:[
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   354
        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
   355
    ] ifFalse:[
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   356
        Autoload autoloadFailedSignal handle:[:ex |
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   357
            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
   358
        ] do:[
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   359
            (Smalltalk at:className) open
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   360
        ]
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   361
    ]
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   362
a56ee0a5abdd show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents: 524
diff changeset
   363
    "Modified: 10.5.1996 / 15:56:47 / cg"
219
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
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   366
startTetris
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   367
    Tetris open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   368
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   369
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   370
startTicTacToe
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   371
    TicTacToeGame open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   372
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   373
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   374
startTicTacToe2
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   375
    TicTacToeGame open2UserGame
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   376
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   377
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   378
!NewLauncher methodsFor:'actions - file'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   379
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   380
exit
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   381
    (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
   382
    ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   383
	self saveAllViews.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   384
	Smalltalk exit
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   385
    ]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   386
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   387
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   388
objectModuleDialog
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   389
    |allModules moduleNames
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   390
     allObjects methodObjects methodNames 
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   391
     cObjects cObjectNames cFunctionNames
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   392
     otherObjects otherObjectNames
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   393
     box l handles unloadButton
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   394
     list1 list2 listView1 listView2
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   395
     y panel 
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   396
     showBuiltIn showModules showMethods showCObjects showOthers
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   397
     moduleListUpdater check canDoIt menu|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   398
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   399
    showBuiltIn := true asValue. 
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   400
    canDoIt := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   401
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   402
    showModules := canDoIt asValue. 
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   403
    showMethods := canDoIt asValue.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   404
    showCObjects := canDoIt asValue.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   405
    showOthers := canDoIt asValue.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   406
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
   407
    moduleListUpdater := [
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   408
            |l|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   409
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   410
            list2 list:nil.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   411
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   412
            l := Array new.
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   413
            handles := Array new.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   414
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   415
            (showModules value or:[showBuiltIn value]) ifTrue:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   416
                allModules := ObjectMemory binaryModuleInfo asOrderedCollection.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   417
                (showBuiltIn value and:[showModules value]) ifFalse:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   418
                    allModules := allModules select:[:i |
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   419
                        |wantToSee|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   420
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   421
                        wantToSee := (i at:#dynamic).
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   422
                        showBuiltIn value ifTrue:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   423
                            wantToSee := wantToSee not
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   424
                        ].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   425
                        wantToSee
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   426
                    ]
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   427
                ].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   428
                "/ 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
   429
                allModules sort:[:a :b | (a at:#id) > (b at:#id)].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   430
                moduleNames := allModules collect:[:entry | (entry at:#name)].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   431
                l := l , moduleNames.
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   432
                handles := handles , allModules.
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   433
            ].
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   434
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   435
            showMethods value ifTrue:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   436
                allObjects := ObjectFileLoader loadedObjectHandles.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   437
                methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   438
                methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   439
                                                                'compiled method - removed' , ' (in ' , mH pathName , ')'
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   440
                                                            ] ifFalse:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   441
                                                                'compiled method ' , mH method whoString , ' (in ' , mH pathName , ')'
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   442
                                                            ].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   443
                                                     ].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   444
                l := l , methodNames.
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   445
                handles := handles , methodObjects.
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   446
            ].
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   447
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   448
            showCObjects value ifTrue:[
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   449
                allObjects := ObjectFileLoader loadedObjectHandles.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   450
                cObjects := (allObjects select:[:h | h isFunctionObjectHandle]) asArray.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   451
                cObjectNames := cObjects collect:[:entry | entry pathName].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   452
                l := l , cObjectNames.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   453
                handles := handles , cObjects.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   454
            ].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   455
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   456
            showOthers value ifTrue:[
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   457
                allObjects := ObjectFileLoader loadedObjectHandles.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   458
                otherObjects := (allObjects select:[:h | (h isFunctionObjectHandle
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   459
                                                         or:[h isMethodHandle
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   460
                                                         or:[h isClassLibHandle]]) not]) asArray.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   461
                otherObjectNames := otherObjects collect:[:entry | entry pathName].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   462
                l := l , otherObjectNames.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   463
                handles := handles , otherObjects.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   464
            ].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   465
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   466
            list1 list:l.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   467
            unloadButton disable.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   468
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   469
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   470
    list1 := SelectionInList new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   471
    list2 := SelectionInList new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   472
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
   473
    showBuiltIn onChangeSend:#value to:moduleListUpdater.
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
   474
    showModules onChangeSend:#value to:moduleListUpdater.
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
   475
    showMethods onChangeSend:#value to:moduleListUpdater.
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   476
    showCObjects onChangeSend:#value to:moduleListUpdater.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   477
    showOthers onChangeSend:#value to:moduleListUpdater.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   478
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   479
    box := Dialog new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   480
    box label:(resources string:'Module dialog').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   481
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   482
    listView1 := HVScrollableView for:SelectionInListView miniScrollerH:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   483
    listView1 model:list1.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   484
    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
   485
    listView1 action:[:sel |
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   486
        |info classNames tabs module|
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   487
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   488
        listView1 middleButtonMenu:nil.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   489
467
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   490
        box withWaitCursorDo:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   491
            |nm fileName addr entry1 entry2 entry3 method|
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   492
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   493
            tabs := TabulatorSpecification unit:#inch positions:#(0 2.6).
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   494
467
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   495
            (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
   496
                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
   497
            ].
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   498
            info isNil ifTrue:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   499
                "/ selected a method, cObject or unknown
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   500
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   501
                module := handles at:sel.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   502
                fileName := module pathName.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   503
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   504
                module isMethodHandle ifTrue:[
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   505
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   506
                    (method := module method) isNil ifTrue:[
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   507
                        nm := '** removed **'.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   508
                    ] ifFalse:[
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   509
                        menu := PopUpMenu
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   510
                                    labels:#('inspect' 'browse')
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   511
                                    selectors:#(inspect browse).
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   512
                        menu actionAt:#inspect put:[ method inspect ].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   513
                        menu actionAt:#browse put:[ SystemBrowser openInClass:(method who at:1) selector:(method who at:2) ].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   514
                        listView1 middleButtonMenu:menu.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   515
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   516
                        nm := (method whoString) asText emphasizeAllWith:(#color->Color blue).
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   517
                    ].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   518
                    entry1 := MultiColListEntry new:2 tabulatorSpecification:tabs.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   519
                    entry1 colAt:1 put:'compiled method'; colAt:2 put:nm.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   520
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   521
                    entry2 := MultiColListEntry new:2 tabulatorSpecification:tabs.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   522
                    entry2 colAt:1 put:'path'; colAt:2 put:fileName.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   523
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   524
                    entry3 := MultiColListEntry new:2 tabulatorSpecification:tabs.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   525
                    entry3 colAt:1 put:'address'; colAt:2 put:('(16r) ' , (method code hexPrintString leftPaddedTo:8 with:$0)).
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   526
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   527
                    list2 list:(Array with:entry1 with:entry2 with:entry3).
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   528
                ] ifFalse:[
673
c227d07d31bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 672
diff changeset
   529
                    (module isFunctionObjectHandle 
c227d07d31bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 672
diff changeset
   530
                    and:[module functions notEmpty]) ifTrue:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   531
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   532
                        menu := PopUpMenu
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   533
                                    labels:#('inspect')
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   534
                                    selectors:#(inspect).
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   535
                        menu actionAt:#inspect put:[ module functions inspect  ].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   536
                        listView1 middleButtonMenu:menu.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   537
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   538
                        list2 list:((module functions select:[:f | f notNil])
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   539
                                        collect:[:f | |entry|
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   540
                                                        entry := MultiColListEntry new:2 tabulatorSpecification:tabs.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   541
                                                        entry colAt:1 put:(f name asText emphasizeAllWith:(#color->Color blue)).
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   542
                                                        entry colAt:2 put:('address: (16r) ' , (f code hexPrintString leftPaddedTo:8 with:$0)).
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   543
                                                        entry
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   544
                                                ]).
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   545
                    ] ifFalse:[
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   546
                        list2 list:#('nothing known about contents (no functions have been extracted)').    
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   547
                    ]
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   548
                ].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   549
                
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   550
                unloadButton enable.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   551
            ] ifFalse:[
467
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   552
                "/ selected a package
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   553
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   554
                "/ 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
   555
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   556
                classNames := (info at:#classNames) asSortedCollection.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   557
                classNames := classNames collect:[:cName |
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   558
                                |cls entry rev listEntry|
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   559
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   560
                                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
   561
                                listEntry colAt:1 put:cName.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   562
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   563
                                cls := Smalltalk classNamed:cName.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   564
                                cls isNil ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   565
                                    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
   566
                                ] ifFalse:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   567
                                    rev := cls binaryRevision.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   568
                                    rev notNil ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   569
                                        cls isLoaded ifFalse:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   570
                                            entry := '(stub for: ' , rev.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   571
                                        ] ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   572
                                            entry :='(bin: ' , rev.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   573
                                        ].    
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   574
                                        cls revision ~= rev ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   575
                                            entry := entry , ' / src: ' , cls revision    
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   576
                                        ].
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   577
                                        listEntry colAt:2 put:entry , ')'
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   578
                                    ] ifFalse:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   579
                                       cls revision notNil ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   580
                                            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
   581
                                       ]
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   582
                                    ]
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   583
                                ].
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   584
                                listEntry
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   585
                              ].
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   586
                list2 list:classNames.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   587
                (info at:#dynamic) ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   588
                    unloadButton enable.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   589
                ] ifFalse:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   590
                    unloadButton disable.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   591
                ].
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   592
            ]
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   593
        ]
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
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   596
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   597
    panel := HorizontalPanelView new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   598
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   599
    panel add:(l := Label label:'show:').
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   600
    l adjust:#left; borderWidth:0.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   601
    panel add:(check := CheckBox label:'builtin' model:showBuiltIn).
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   602
    box makeTabable:check.
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   603
    panel add:(check := CheckBox label:'classLibs' model:showModules).
690
c3fb26a81b59 disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   604
    canDoIt ifFalse:[
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   605
        check disable
690
c3fb26a81b59 disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   606
    ] ifTrue:[
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   607
        box makeTabable:check.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   608
    ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   609
    panel add:(check := CheckBox label:'methods' model:showMethods).
690
c3fb26a81b59 disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   610
    canDoIt ifFalse:[
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   611
        check disable
690
c3fb26a81b59 disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   612
    ] ifTrue:[
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   613
        box makeTabable:check.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   614
    ].
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   615
    panel add:(check := CheckBox label:'c-objects' model:showCObjects).
690
c3fb26a81b59 disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   616
    canDoIt ifFalse:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   617
        check disable
690
c3fb26a81b59 disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   618
    ] ifTrue:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   619
        box makeTabable:check.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   620
    ].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   621
    panel add:(check := CheckBox label:'others' model:showOthers).
690
c3fb26a81b59 disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   622
    canDoIt ifFalse:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   623
        check disable
690
c3fb26a81b59 disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   624
    ] ifTrue:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   625
        box makeTabable:check.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   626
    ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   627
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   628
    panel horizontalLayout:#fitSpace.
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   629
    "/ panel horizontalLayout:#leftSpace.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   630
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   631
    box addComponent:panel tabable:false.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   632
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   633
    box addVerticalSpace.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   634
    box addComponent:listView1 tabable:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   635
    listView1 topInset:(View viewSpacing + panel preferredExtent y).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   636
    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
   637
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   638
    l := box addTextLabel:(resources string:'contained classes/subsets:').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   639
    l adjust:#left; borderWidth:0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   640
    l origin:0.0@0.4 corner:1.0@0.4.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   641
    l topInset:(View viewSpacing).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   642
    l bottomInset:((l preferredExtent y) negated - View viewSpacing).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   643
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   644
    listView2 := HVScrollableView for:SelectionInListView  miniScrollerH:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   645
    listView2 model:list2; printItems:false.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   646
    box addComponent:listView2 tabable:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   647
    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
   648
    listView2 disable.
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
    unloadButton := Button label:(resources string:'unload').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   651
    unloadButton action:[
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   652
        self withWaitCursorDo:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   653
            box withWaitCursorDo:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   654
                |info idx pathName|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   655
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   656
                idx := list1 selectionIndex.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   657
                info := allModules at:idx ifAbsent:nil.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   658
672
9e8c6ef412b1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   659
                list1 selectionIndex:nil.
9e8c6ef412b1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   660
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   661
                info isNil ifTrue:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   662
                    "/ selected a method
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   663
                    idx := idx - allModules size.
672
9e8c6ef412b1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   664
                    pathName := (handles at:idx) pathName.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   665
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   666
                ] ifFalse:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   667
                    "/ selected a package
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   668
                    pathName := (info at:#pathName).
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   669
                ].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   670
                ObjectFileLoader unloadObjectFile:pathName.
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
   671
                moduleListUpdater value.
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   672
                unloadButton disable.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   673
            ]
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   674
        ]
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   675
    ].
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
   676
    moduleListUpdater value.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   677
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   678
    box addButton:unloadButton.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   679
    box addAbortButtonLabelled:(resources string:'close').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   680
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   681
    y := box yPosition.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   682
    listView2 topInset:(l preferredExtent y + 5).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   683
    listView2 bottomInset:(box preferredExtent y - y).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   684
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   685
"/    box width:(400 min:(box device width * 2 // 3)); 
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   686
"/        height:(450 min:(box device height - 50)); 
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   687
"/        sizeFixed:true.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   688
    box open.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   689
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
   690
    box destroy.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   691
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   692
    "Modified: 17.9.1995 / 16:47:50 / claus"
690
c3fb26a81b59 disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   693
    "Modified: 2.8.1996 / 21:04:46 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   694
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   695
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   696
snapshot
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   697
    |fileName|
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   698
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   699
    fileName := DialogBox
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   700
                    request:(resources at:'filename for image:') withCRs
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   701
              initialAnswer:(ObjectMemory nameForSnapshot) 
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   702
                    okLabel:(resources at:'save')
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   703
                      title:(resources string:'save image')
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   704
                   onCancel:nil.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   705
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   706
    fileName notNil ifTrue:[
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   707
        self showCursor:Cursor write.
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   708
        [
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   709
            (ObjectMemory snapShotOn:fileName) ifFalse:[
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   710
                "
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   711
                 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
   712
                "
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   713
                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
   714
            ]
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   715
        ] valueNowOrOnUnwindDo:[
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   716
            self restoreCursors.
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   717
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   718
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   719
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   720
    "Modified: 1.6.1996 / 17:02:45 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   721
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   722
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   723
snapshotAndExit
590
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   724
    |fileName ok|
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   725
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   726
    fileName := DialogBox
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   727
                    request:(resources at:'filename for image:') withCRs
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   728
              initialAnswer:(ObjectMemory nameForSnapshot) 
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   729
                    okLabel:(resources at:'save & exit')
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   730
                      title:(resources string:'save image & exit')
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   731
                   onCancel:nil.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   732
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   733
    fileName notNil ifTrue:[
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   734
        self showCursor:Cursor write.
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   735
        [
590
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   736
            ok := ObjectMemory snapShotOn:fileName.
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   737
        ] valueNowOrOnUnwindDo:[
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   738
            self restoreCursors.
590
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   739
        ].
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   740
590
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   741
        ok ifFalse:[
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   742
            "
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   743
             snapshot failed for some reason (disk full, no permission etc.)
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   744
             Do NOT exit in this case.
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   745
            "
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   746
            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
   747
        ] ifTrue:[
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   748
            "
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   749
             saveAllViews tells all views to shutdown neatly 
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   750
             (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
   751
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   752
             This is NOT required - all data should be in the snapshot ...
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   753
             ... however, if remote disks/mountable filesystems are involved,
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   754
             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
   755
             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
   756
            "
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   757
"
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   758
            self saveAllViews.
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   759
"
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   760
            Smalltalk exit
404
4960628225e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 403
diff changeset
   761
        ]
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   762
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   763
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   764
    "Modified: 1.6.1996 / 17:02:07 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   765
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   766
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   767
!NewLauncher methodsFor:'actions - goodies'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   768
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   769
startCalendar
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   770
    Calendar open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   771
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   772
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   773
startClock
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   774
    RoundClock open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   775
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   776
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   777
startMailTool
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   778
    MailView open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   779
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   780
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   781
startNewsTool
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   782
    NewsView open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   783
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   784
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   785
!NewLauncher methodsFor:'actions - projects'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   786
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   787
newProject 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   788
    Project notNil ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   789
	(ProjectView for:(Project new)) open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   790
    ]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   791
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   792
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   793
selectProject
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   794
    |list box|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   795
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   796
    Project notNil ifTrue:[
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   797
        list := Project allInstances.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   798
        box := ListSelectionBox new.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   799
        box list:(list collect:[:p | p name]).
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   800
        box title:(resources string:'select a project').
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   801
        box action:[:selection |
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   802
            |project|
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   803
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   804
            project := list detect:[:p | p name = selection] ifNone:[nil].
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   805
            project isNil ifTrue:[
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
   806
                transcript showCR:'no such project.'
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   807
            ] ifFalse:[
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   808
                project showViews.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   809
                Project current:project
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   810
            ]
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   811
        ].
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   812
        box showAtPointer.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   813
        box destroy
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   814
    ]
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   815
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
   816
    "Modified: 5.7.1996 / 13:12:53 / cg"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
   817
! !
11b4ce85104e Initial revision
claus
parents:
diff changeset
   818
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   819
!NewLauncher methodsFor:'actions - settings'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   820
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   821
compilerSettings
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   822
    |box warnings warnSTX warnUnderscore warnOldStyle allowUnderscore immutableArrays
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
   823
     warnSTXBox warnUnderscoreBox warnOldStyleBox warnCommonMistakes warnCommonMistakesBox
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   824
     stcCompilation compilationList stcCompilationOptions stcIncludes stcDefines stcOptions
688
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   825
     stcLibraries stcLibraryPath historyLines sourceMode catchRedefs keepSourceOptions keepSource  
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   826
     foldConstants constantFoldingOptions constantFolding
688
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   827
     warnEnabler check component oldIndent t|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   828
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   829
    warnings := Compiler warnings asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   830
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   831
    warnSTX := Compiler warnSTXSpecials asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   832
    warnUnderscore := Compiler warnUnderscoreInIdentifier asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   833
    warnOldStyle := Compiler warnOldStyleAssignment asValue.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
   834
    warnCommonMistakes := Compiler warnCommonMistakes asValue.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   835
    allowUnderscore := Compiler allowUnderscoreInIdentifier asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   836
    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
   837
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   838
    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
   839
    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
   840
    constantFolding selectionIndex:3.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   841
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   842
    stcCompilationOptions := #( always default never).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   843
    stcCompilation := SelectionInList new list:(resources array:#('always' 'primitive code only' 'never')).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   844
    stcCompilation selectionIndex:2.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   845
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   846
    stcIncludes := Compiler stcCompilationIncludes asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   847
    stcDefines := Compiler stcCompilationDefines asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   848
    stcOptions := Compiler stcCompilationOptions asValue.
232
926e657541c9 *** empty log message ***
chrisy
parents: 230
diff changeset
   849
    ObjectFileLoader notNil ifTrue:[
688
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   850
        (t := ObjectFileLoader searchedLibraries) notNil ifTrue:[
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   851
            stcLibraries := (String fromStringCollection:t separatedBy:' ') asValue.
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   852
        ].
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   853
        (t := ObjectFileLoader libPath) notNil ifTrue:[
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   854
            stcLibraryPath := t asValue.
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   855
        ]
232
926e657541c9 *** empty log message ***
chrisy
parents: 230
diff changeset
   856
    ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   857
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   858
    catchRedefs := Class catchMethodRedefinitions asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   859
    historyLines := (HistoryManager notNil and:[HistoryManager isActive]) asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   860
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   861
    keepSourceOptions := #( keep reference absReference sourceReference discard ).
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   862
    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
   863
    keepSource selectionIndex:1.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   864
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
   865
    warnEnabler := [
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
   866
              warnings value ifTrue:[
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   867
                warnSTXBox enable. 
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   868
                warnOldStyleBox enable.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
   869
                warnCommonMistakesBox enable.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   870
                allowUnderscore value ifTrue:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   871
                    warnUnderscoreBox enable.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   872
                ] ifFalse:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   873
                    warnUnderscoreBox disable.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   874
                ].
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   875
              ] ifFalse:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   876
                warnSTXBox disable. 
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   877
                warnUnderscoreBox disable.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   878
                warnOldStyleBox disable.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
   879
                warnCommonMistakesBox disable.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   880
              ]].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   881
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
   882
    warnings onChangeSend:#value to:warnEnabler.
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
   883
    allowUnderscore onChangeSend:#value to:warnEnabler.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   884
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   885
    box := DialogBox new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   886
    box label:(resources string:'Compiler settings').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   887
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   888
    box addCheckBox:(resources string:'catch method redefinitions') on:catchRedefs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   889
    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
   890
    HistoryManager isNil ifTrue:[check disable].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   891
378
7e17a9941cca added ...'s
Claus Gittinger <cg@exept.de>
parents: 377
diff changeset
   892
    box addPopUpList:(resources string:'fileIn source mode:') on:keepSource.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   893
    keepSource selectionIndex:( keepSourceOptions indexOf:(ClassCategoryReader sourceMode) ifAbsent:1).
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   894
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   895
    box addHorizontalLine.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   896
232
926e657541c9 *** empty log message ***
chrisy
parents: 230
diff changeset
   897
    ObjectFileLoader notNil ifTrue:[
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   898
        compilationList := box addPopUpList:(resources string:'compilation to machine code') on:stcCompilation.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   899
        stcCompilation selectionIndex:( stcCompilationOptions indexOf:(Compiler stcCompilation) ifAbsent:2).
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   900
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   901
        component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   902
                        addLabelledInputField:(resources string:'stc include directories:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   903
                        adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   904
                        on:stcIncludes 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   905
                        tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   906
                        separateAtX:0.5.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   907
        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
   908
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   909
        box addVerticalSpace.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   910
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   911
        component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   912
                        addLabelledInputField:(resources string:'stc defines:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   913
                        adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   914
                        on:stcDefines 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   915
                        tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   916
                        separateAtX:0.5.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   917
        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
   918
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   919
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   920
        box addVerticalSpace.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   921
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   922
        component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   923
                        addLabelledInputField:(resources string:'stc options:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   924
                        adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   925
                        on:stcOptions 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   926
                        tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   927
                        separateAtX:0.5.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
   928
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
688
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   929
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   930
        stcLibraries notNil ifTrue:[
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   931
            box addVerticalSpace.
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   932
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   933
            component := box 
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   934
                            addLabelledInputField:(resources string:'stc C-libraries:')
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   935
                            adjust:#right
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   936
                            on:stcLibraries 
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   937
                            tabable:true
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   938
                            separateAtX:0.5.
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   939
            component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   940
        ].
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   941
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   942
        stcLibraryPath notNil ifTrue:[
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   943
            box addVerticalSpace.
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   944
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   945
            component := box 
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   946
                            addLabelledInputField:(resources string:'stc libPath:')
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   947
                            adjust:#right
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   948
                            on:stcLibraryPath 
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   949
                            tabable:true
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   950
                            separateAtX:0.5.
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   951
            component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
   952
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   953
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   954
        box addVerticalSpace.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   955
        box addHorizontalLine.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   956
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   957
        "/ if there is no compiler around,
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   958
        "/ change to compile nothing, and disable the checkBoxes
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   959
        Compiler canCreateMachineCode ifFalse:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   960
            stcCompilation selectionIndex:3.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   961
            compilationList disable.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   962
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   963
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   964
378
7e17a9941cca added ...'s
Claus Gittinger <cg@exept.de>
parents: 377
diff changeset
   965
    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
   966
    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
   967
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
   968
    box addVerticalSpace.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   969
    box addCheckBox:(resources string:'allow underscore in identifiers') on:allowUnderscore.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   970
    box addVerticalSpace.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   971
    box addCheckBox:(resources string:'literal arrays are immutable') on:immutableArrays.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   972
    box addHorizontalLine.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   973
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   974
    box addCheckBox:(resources string:'warnings') on:warnings.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   975
    box addVerticalSpace.
343
569baf25f549 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 342
diff changeset
   976
    oldIndent := box leftIndent.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   977
    box leftIndent:30.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
   978
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   979
    warnSTXBox := box addCheckBox:(resources string:'ST/X language extensions') on:warnSTX.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   980
    box addVerticalSpace.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
   981
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   982
    warnUnderscoreBox := box addCheckBox:(resources string:'underscores in identifiers') on:warnUnderscore.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   983
    box addVerticalSpace.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
   984
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   985
    warnOldStyleBox := box addCheckBox:(resources string:'oldStyle assignment') on:warnOldStyle.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   986
    box addVerticalSpace.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
   987
679
c9613b350e05 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
   988
    warnCommonMistakesBox := box addCheckBox:(resources string:'common mistakes') on:warnCommonMistakes.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
   989
    box addVerticalSpace.
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
   990
343
569baf25f549 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 342
diff changeset
   991
    box leftIndent:oldIndent.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   992
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   993
    box 
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   994
        addHelpButtonFor:'NewLauncher/compilerSettings.html';
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   995
        addAbortButton; 
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   996
        addOkButton.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   997
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
   998
    warnEnabler value.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   999
    box open.
219
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
    box accepted ifTrue:[
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1002
        HistoryManager notNil ifTrue:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1003
            historyLines value ifTrue:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1004
                HistoryManager activate
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1005
            ] ifFalse:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1006
                HistoryManager deactivate
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1007
            ].
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1008
        ].
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1009
        Class catchMethodRedefinitions:catchRedefs value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1010
        ClassCategoryReader sourceMode:(keepSourceOptions at:keepSource selectionIndex).
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1011
        Compiler warnings:warnings value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1012
        Compiler warnSTXSpecials:warnSTX value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1013
        Compiler warnOldStyleAssignment:warnOldStyle value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1014
        Compiler warnUnderscoreInIdentifier:warnUnderscore value.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1015
        Compiler warnCommonMistakes:warnCommonMistakes value.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1016
        Compiler allowUnderscoreInIdentifier:allowUnderscore value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1017
        Compiler arraysAreImmutable:immutableArrays value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1018
        Compiler stcCompilation:(stcCompilationOptions at:stcCompilation selectionIndex).
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1019
        Compiler stcCompilationIncludes:stcIncludes value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1020
        Compiler stcCompilationDefines:stcDefines value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1021
        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
  1022
        Compiler foldConstants:(constantFoldingOptions at:constantFolding selectionIndex).
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1023
        ObjectFileLoader notNil ifTrue:[
688
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1024
            stcLibraries notNil ifTrue:[
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1025
                ObjectFileLoader searchedLibraries:(stcLibraries value asCollectionOfWords).
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1026
            ].
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1027
            stcLibraryPath notNil ifTrue:[
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1028
                ObjectFileLoader libPath:(stcLibraryPath value).
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1029
            ]
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1030
        ]
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1031
    ].
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1032
    box destroy
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
    "Modified: 10.9.1995 / 19:19:18 / claus"
688
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1035
    "Modified: 29.7.1996 / 14:59:09 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1036
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1037
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1038
displaySettings
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1039
    |box 
614
561229d704f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 608
diff changeset
  1040
     sizes sizeNames sizeList sizeX sizeY deepIcons
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1041
     isColorMonitor useFixPalette dither idx ditherStyles ditherSyms ditherList
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1042
     check y component oldIndent commandList screen visual|
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1043
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1044
    sizeNames := #(
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1045
                        '9''    (212mm x 160mm) GAS plasma/LCD'
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1046
                        '11.3'' (235mm x 175mm) LCD'
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1047
                        '16''   (275mm x 208mm)'
636
12296c4a31b9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 635
diff changeset
  1048
                        '17''   (315mm x 245mm) SUN ELC'
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1049
                        '17''   (325mm x 245mm)'
635
2b0ae1f2cf0e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 632
diff changeset
  1050
                        '19''   (340mm x 270mm) (NCD)'
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1051
                        '20''   (350mm x 280mm) (SGI)'
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1052
                        '21''   (365mm x 285mm) (Eizo / Nanao)'
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1053
                       ).
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1054
    sizes := #(      (212 160)
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1055
                     (235 175)
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1056
                     (275 208)
636
12296c4a31b9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 635
diff changeset
  1057
                     (315 245)
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1058
                     (325 245)
635
2b0ae1f2cf0e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 632
diff changeset
  1059
                     (340 270)
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1060
                     (350 280)
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1061
                     (365 285)
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1062
                   ).
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1063
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1064
    screen := Screen current.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1065
    visual := screen visualType.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1066
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1067
    isColorMonitor := screen hasColors asValue.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1068
    deepIcons := screen supportsDeepIcons asValue.
670
7c958acbc5e8 fixColor and ditherColor stuff moved from Color
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
  1069
    useFixPalette := screen fixColors notNil asValue.
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1070
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1071
    sizeList := SelectionInList with:sizeNames.
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1072
    sizeX := screen widthInMillimeter asValue.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1073
    sizeY := screen heightInMillimeter asValue.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1074
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1075
    ditherList := SelectionInList with:sizeNames.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1076
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1077
    (visual == #StaticGray or:[visual == #GrayScale]) ifTrue:[
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1078
        ditherStyles := #('threshold' 'ordered dither' 'error diffusion').
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1079
        ditherSyms := #(threshold ordered floydSteinberg).
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1080
    ] ifFalse:[
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1081
        visual ~~ #TrueColor ifTrue:[
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1082
            ditherStyles := #('nearest color' 'error diffusion').
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1083
            ditherSyms := #(ordered floydSteinberg).
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1084
        ]
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1085
    ].
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1086
    ditherSyms notNil ifTrue:[    
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1087
        ditherList list:ditherStyles.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1088
        ditherList selectionIndex:(ditherSyms indexOf:(Image ditherAlgorithm) ifAbsent:#threshold).
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1089
    ].
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1090
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1091
    box := DialogBox new.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1092
    box label:(resources string:'Display screen settings').
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1093
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1094
    (box addTextLabel:(resources string:'Actual visible screen area:'))
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1095
        adjust:#left.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1096
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1097
    (box addPopUpList:(resources string:'common sizes:') on:sizeList)
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1098
        label:'monitor size'.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1099
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1100
    idx := sizes findFirst:[:entry |
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1101
                                ((entry at:1) = sizeX value)
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1102
                                and:[((entry at:2) = sizeY value)]
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1103
                           ].
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1104
    idx ~~ 0 ifTrue:[
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1105
        sizeList selectionIndex:idx
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1106
    ].
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1107
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1108
    sizeList onChangeSend:#value to:[
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1109
                                        |idx|
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1110
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1111
                                        idx := sizeList selectionIndex.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1112
                                        sizeX value:((sizes at:idx) at:1).
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1113
                                        sizeY value:((sizes at:idx) at:2).
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1114
                                    ].
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1115
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1116
    y := box yPosition.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1117
    component := box addTextLabel:(resources string:'screen size:').
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1118
    component width:0.3; adjust:#right; borderWidth:0.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1119
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1120
    box yPosition:y.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1121
    component := box addInputFieldOn:sizeX tabable:true.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1122
    component width:0.25; left:0.3; 
595
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1123
              immediateAccept:false; acceptOnLeave:false; 
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1124
              cursorMovementWhenUpdating:#beginOfLine;
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1125
              converter:(PrintConverter new initForInteger).
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1126
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1127
    box yPosition:y.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1128
    component := box addTextLabel:(' x ').
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1129
    component width:0.1; left:0.55; adjust:#center; borderWidth:0.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1130
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1131
    box yPosition:y.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1132
    component := box addInputFieldOn:sizeY tabable:true.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1133
    component width:0.25; left:0.65; 
595
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1134
              immediateAccept:false; acceptOnLeave:false; 
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1135
              cursorMovementWhenUpdating:#beginOfLine;
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1136
              converter:(PrintConverter new initForInteger).
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1137
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1138
    box yPosition:y.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1139
    component := box addTextLabel:('(mm)').
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1140
    component width:0.1; left:0.9; adjust:#center; borderWidth:0.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1141
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1142
    box addVerticalSpace.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1143
    box addHorizontalLine.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1144
    box addVerticalSpace.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1145
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1146
    box addCheckBox:(resources string:'color monitor') on:isColorMonitor.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1147
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1148
    visual == #PseudoColor ifTrue:[
622
9d02b3440252 ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents: 618
diff changeset
  1149
        box addVerticalSpace.
9d02b3440252 ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents: 618
diff changeset
  1150
        component := box addCheckBox:(resources string:'use fix color palette (6x6x4)') on:useFixPalette.
9d02b3440252 ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents: 618
diff changeset
  1151
    ].
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1152
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1153
    ditherSyms notNil ifTrue:[
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1154
        box addVerticalSpace.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1155
        component := box addPopUpList:(resources string:'image display:') on:ditherList.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1156
        component label:'image display'.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1157
        component superView horizontalLayout:#leftSpace.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1158
    ].
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1159
614
561229d704f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 608
diff changeset
  1160
    box addVerticalSpace.
561229d704f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 608
diff changeset
  1161
    box addCheckBox:(resources string:'allow colored/grayscale icons') on:deepIcons.
561229d704f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 608
diff changeset
  1162
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1163
    box 
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1164
        addHelpButtonFor:'NewLauncher/screenSettings.html';
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1165
        addAbortButton; addOkButton.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1166
    box open.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1167
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1168
    box accepted ifTrue:[
632
7b59b670e687 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 631
diff changeset
  1169
        Image flushDeviceImages.
7b59b670e687 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 631
diff changeset
  1170
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1171
        screen visualType == #PseudoColor ifTrue:[
622
9d02b3440252 ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents: 618
diff changeset
  1172
            useFixPalette value ifTrue:[
638
5541c2f7836f warnbox if fixColor allocation fails
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
  1173
                Color colorAllocationFailSignal handle:[:ex |
5541c2f7836f warnbox if fixColor allocation fails
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
  1174
                    self warn:(resources string:'Could not allocate colors.').
5541c2f7836f warnbox if fixColor allocation fails
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
  1175
                ] do:[
670
7c958acbc5e8 fixColor and ditherColor stuff moved from Color
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
  1176
                    Color getColorsRed:6 green:6 blue:4 on:screen
638
5541c2f7836f warnbox if fixColor allocation fails
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
  1177
                ]
622
9d02b3440252 ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents: 618
diff changeset
  1178
            ] ifFalse:[
670
7c958acbc5e8 fixColor and ditherColor stuff moved from Color
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
  1179
                screen releaseFixColors
622
9d02b3440252 ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents: 618
diff changeset
  1180
            ]
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1181
        ].
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1182
        screen hasColors:isColorMonitor value.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1183
        screen widthInMillimeter:sizeX value.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1184
        screen heightInMillimeter:sizeY value.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1185
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1186
        screen supportsDeepIcons:deepIcons value.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1187
        ditherSyms notNil ifTrue:[
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1188
            Image ditherAlgorithm:(ditherSyms at:ditherList selectionIndex).
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1189
        ].
614
561229d704f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 608
diff changeset
  1190
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1191
        self withWaitCursorDo:[
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1192
            View defaultStyle:(View defaultStyle).
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1193
        ].
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1194
    ].
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1195
    box destroy
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1196
670
7c958acbc5e8 fixColor and ditherColor stuff moved from Color
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
  1197
    "Modified: 11.7.1996 / 18:26:26 / cg"
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1198
!
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1199
398
001d78a6cacd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
  1200
fontSettings
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  1201
    (self fontBoxForEncoding:nil) ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  1202
        self reopenLauncher.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  1203
    ]
397
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  1204
398
001d78a6cacd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
  1205
    "Created: 26.2.1996 / 22:52:51 / cg"
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  1206
    "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
  1207
!
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  1208
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1209
keyboardSetting 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1210
    |mappings listOfRawKeys listOfFunctions
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1211
     box l
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1212
     list1 list2 listView1 listView2 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1213
     frame selectionForwarder macroForwarder macroTextView y|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1214
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1215
    mappings := Screen current keyboardMap.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1216
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1217
    listOfRawKeys := (mappings keys asArray collect:[:key | key asString]) sort.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1218
    listOfFunctions := (mappings values asSet asArray collect:[:key | key asString]) sort.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1220
    selectionForwarder := Plug new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1221
    selectionForwarder respondTo:#showFunction
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1222
                  with:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1223
                        |raw|
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1224
                        raw := list1 selection.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1225
                        list2 retractInterestsFor:selectionForwarder.
568
58d7e4157f23 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
  1226
                        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
  1227
                        list2 onChangeSend:#showRawKey to:selectionForwarder.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1228
                       ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1229
    selectionForwarder respondTo:#showRawKey
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1230
                  with:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1231
                        |f raw|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1232
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1233
                        f := list2 selection.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1234
                        list1 retractInterestsFor:selectionForwarder.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1235
                        raw := mappings keyAtValue:f asString.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1236
                        raw isNil ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1237
                            raw := mappings keyAtValue:f first.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1238
                            raw isNil ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1239
                                raw := mappings keyAtValue:f asSymbol.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1240
                            ]
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1241
                        ].
568
58d7e4157f23 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
  1242
                        list1 selection:raw.
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1243
                        list1 onChangeSend:#showFunction to:selectionForwarder.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1244
                       ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1245
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
  1246
    macroForwarder := [
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1247
                        |f macro indent|
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1248
                        f := list2 selection.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1249
                        (f startsWith:'Cmd') ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1250
                            f := f copyFrom:4
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1251
                        ].
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1252
                        macro := FunctionKeySequences at:(f asSymbol) ifAbsent:nil.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1253
                        macro notNil ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1254
                            macro := macro asStringCollection.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1255
                            indent := macro
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1256
                                         inject:99999 into:[:min :element |
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1257
                                             |stripped|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1258
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1259
                                             stripped := element withoutLeadingSeparators.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1260
                                             stripped size == 0 ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1261
                                                 min
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1262
                                             ] ifFalse:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1263
                                                 min min:(element size - stripped size)
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1264
                                             ]
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1265
                                         ].
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1266
                            indent ~~ 0 ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1267
                                macro := macro collect:[:line | 
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1268
                                             line size > indent ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1269
                                                line copyFrom:indent+1
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1270
                                             ] ifFalse:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1271
                                                line
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1272
                                             ].
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1273
                                        ]
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1274
                            ].                        
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1275
                        ].
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1276
                        macroTextView contents:macro.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1277
                       ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1278
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1279
    list1 := SelectionInList with:listOfRawKeys.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1280
    list1 onChangeSend:#showFunction to:selectionForwarder.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1281
    list2 := SelectionInList with:listOfFunctions.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1282
    list2 onChangeSend:#showRawKey to:selectionForwarder.
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
  1283
    list2 onChangeSend:#value to:macroForwarder.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1284
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1285
    box := Dialog new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1286
    box label:(resources string:'Keyboard mappings').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1287
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1288
    l := box addTextLabel:(resources string:'KEY_MSG') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1289
    l adjust:#left; borderWidth:0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1290
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1291
    frame := View new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1292
    frame extent:300 @ 300.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1293
    frame borderWidth:0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1294
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1295
    listView1 := ScrollableView for:SelectionInListView in:frame.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1296
    listView1 model:list1.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1297
    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
  1298
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1299
    listView2 := ScrollableView for:SelectionInListView in:frame.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1300
    listView2 model:list2.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1301
    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
  1302
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1303
    frame topInset:box yPosition.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1304
    box addComponent:frame withExtent:350@200.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1305
    box makeTabable:listView1. 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1306
    box makeTabable:listView2. 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1307
    frame origin:0.0@0.0 corner:1.0@0.6.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1308
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1309
    box addVerticalSpace.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1310
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1311
    l := box addTextLabel:(resources string:'Macro text (if any):') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1312
    l adjust:#left; borderWidth:0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1313
    l origin:0.0@0.6 corner:1.0@0.6.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1314
    l topInset:(View viewSpacing).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1315
    l bottomInset:(l preferredExtent y negated - View viewSpacing).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1316
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1317
    macroTextView := HVScrollableView for:TextView miniScroller:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1318
    box addComponent:macroTextView tabable:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1319
    macroTextView origin:0.0@0.6 corner:1.0@1.0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1320
    y := box yPosition.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1321
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1322
    box
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1323
        addHelpButtonFor:'NewLauncher/keyboardSetting.html';
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1324
        "addAbortButton;" 
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1325
        addOkButton.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1326
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1327
    macroTextView topInset:(l preferredExtent y + 5).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1328
    macroTextView bottomInset:(box preferredExtent y - y).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1329
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1330
    box open.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1331
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1332
    box accepted ifTrue:[
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1333
        "no action yet ..."
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1334
    ].
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1335
    box destroy
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1336
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
  1337
    "Modified: 31.5.1996 / 22:55:51 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1338
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1339
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1340
languageSetting 
281
7b73ea8b2faa more for international language support
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
  1341
    |listOfLanguages translatedLanguages idx language  box|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1342
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1343
    "
410
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1344
     get list of supported languages from the launchers resources ...
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1345
    "
410
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1346
    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
  1347
    translatedLanguages := resources array:listOfLanguages.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1348
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1349
    box := ListSelectionBox title:(resources string:'LANG_MSG') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1350
    box label:(resources string:'Language selection').
281
7b73ea8b2faa more for international language support
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
  1351
    box list:translatedLanguages.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1352
    box initialText:(Language).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1353
    box action:[:newLanguage |
410
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1354
        self withWaitCursorDo:[
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  1355
            transcript showCR:'change language to ' , newLanguage , ' ...'.
410
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1356
            idx := translatedLanguages indexOf:newLanguage withoutSeparators.
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1357
            idx ~~ 0 ifTrue:[
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1358
                language := listOfLanguages at:idx
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1359
            ] ifFalse:[
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1360
                language := newLanguage
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1361
            ].
514
e48fbcbc358d do not directly access the Language variable
Claus Gittinger <cg@exept.de>
parents: 511
diff changeset
  1362
            Smalltalk language:language asSymbol.
410
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1363
            ResourcePack flushCachedResourcePacks
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1364
        ].
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1365
        self reopenLauncher.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1366
    ].    
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1367
    box
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1368
        addHelpButtonFor:'NewLauncher/languageSetting.html'.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1369
    box open.
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1370
    box destroy
281
7b73ea8b2faa more for international language support
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
  1371
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  1372
    "Modified: 5.7.1996 / 13:12:39 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1373
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1374
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1375
memorySettings
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1376
    |box check igcLimit igcFreeLimit igcFreeAmount newSpaceSize
440
afdf9ea91d26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 434
diff changeset
  1377
     compressLimit
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1378
     oldIncr component fields|
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1379
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1380
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1381
    "/ extract relevant system settings ...
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1382
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1383
    igcLimit := ObjectMemory incrementalGCLimit asValue.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1384
    igcFreeLimit := ObjectMemory freeSpaceGCLimit asValue.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1385
    igcFreeAmount := ObjectMemory freeSpaceGCAmount asValue.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1386
    newSpaceSize := ObjectMemory newSpaceSize asValue.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1387
    oldIncr := ObjectMemory oldSpaceIncrement asValue.
440
afdf9ea91d26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 434
diff changeset
  1388
    compressLimit := ObjectMemory oldSpaceCompressLimit asValue.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1389
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1390
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1391
    "/ create a box on those values ...
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1392
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1393
    fields := OrderedCollection new.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1394
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1395
    box := DialogBox new.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1396
    box label:(resources string:'Memory manager settings').
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1397
345
3bb0d27efc7a changed memorySettings texts
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
  1398
    box addTextLabel:'Warning - invalid settings may result in poor performance.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1399
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1400
You have been warned.'.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1401
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1402
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1403
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1404
                    addLabelledInputField:(resources string:'size of newSpace:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1405
                    adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1406
                    on:newSpaceSize 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1407
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1408
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1409
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1410
    component converter:(PrintConverter new initForNumber).
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1411
    fields add:component.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1412
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1413
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1414
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1415
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1416
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1417
                    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
  1418
                    adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1419
                    on:igcLimit 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1420
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1421
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1422
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1423
    component converter:(PrintConverter new initForNumber).
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1424
    fields add:component.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1425
345
3bb0d27efc7a changed memorySettings texts
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
  1426
    box addTextLabel:'(start IGC whenever this amount has been allocated)'.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1427
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1428
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1429
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1430
                    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
  1431
                    adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1432
                    on:igcFreeLimit 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1433
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1434
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1435
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1436
    component converter:(PrintConverter new initForNumber).
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1437
    fields add:component.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1438
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1439
    box addTextLabel:'(start IGC whenever freespace drops below this)'.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1440
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1441
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1442
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1443
                    addLabelledInputField:(resources string:'incremental GC amount:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1444
                    adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1445
                    on:igcFreeAmount 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1446
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1447
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1448
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1449
    component converter:(PrintConverter new initForNumber).
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1450
    fields add:component.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1451
345
3bb0d27efc7a changed memorySettings texts
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
  1452
    box addTextLabel:'(try to keep this amount for peak requests)'.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1453
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1454
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1455
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1456
                    addLabelledInputField:(resources string:'oldspace increment:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1457
                    adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1458
                    on:oldIncr 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1459
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1460
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1461
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1462
    component converter:(PrintConverter new initForNumber).
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1463
    fields add:component.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1464
345
3bb0d27efc7a changed memorySettings texts
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
  1465
    box addTextLabel:'(increase oldSpace in chunks of this size)'.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1466
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1467
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1468
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1469
                    addLabelledInputField:(resources string:'oldspace compress limit:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1470
                    adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1471
                    on:compressLimit 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1472
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1473
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1474
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1475
    component converter:(PrintConverter new initForNumber).
440
afdf9ea91d26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 434
diff changeset
  1476
    fields add:component.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1477
440
afdf9ea91d26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 434
diff changeset
  1478
    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
  1479
    box addHorizontalLine.
440
afdf9ea91d26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 434
diff changeset
  1480
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1481
    box addAbortButton; addOkButton.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1482
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1483
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1484
    "/ show the box ...
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1485
    "/
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1486
    box open.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1487
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1488
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1489
    "/ update system settings
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1490
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1491
    box accepted ifTrue:[
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1492
        fields do:[:comp | comp accept].
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1493
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1494
        igcFreeAmount value ~~ ObjectMemory freeSpaceGCAmount ifTrue:[
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1495
            ObjectMemory freeSpaceGCAmount:igcFreeAmount value.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1496
        ].
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1497
        igcFreeLimit value ~~ ObjectMemory freeSpaceGCLimit ifTrue:[
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1498
            ObjectMemory freeSpaceGCLimit:igcFreeLimit value.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1499
        ].
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1500
        igcLimit value ~~ ObjectMemory incrementalGCLimit ifTrue:[
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1501
            ObjectMemory incrementalGCLimit:igcLimit value.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1502
        ].
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1503
        newSpaceSize value ~~ ObjectMemory newSpaceSize ifTrue:[
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1504
            ObjectMemory newSpaceSize:newSpaceSize value.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1505
        ].
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1506
        oldIncr value ~~ ObjectMemory oldSpaceIncrement ifTrue:[
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1507
            ObjectMemory oldSpaceIncrement:oldIncr value.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1508
        ].
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1509
        ObjectMemory oldSpaceCompressLimit:compressLimit value.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1510
    ].
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1511
    box destroy
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1512
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1513
    "Modified: 29.5.1996 / 14:16:24 / cg"
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1514
!
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1515
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1516
messageSettings
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1517
    |box vmInfo vmErrors displayErrors classInfos|
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1518
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1519
    vmInfo := ObjectMemory infoPrinting asValue.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1520
    vmErrors := ObjectMemory debugPrinting asValue.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1521
    classInfos := Object infoPrinting asValue.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1522
    displayErrors := DeviceWorkstation errorPrinting asValue.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1523
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1524
    box := DialogBox new.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1525
    box label:(resources string:'Messages').
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1526
"/    box extent:200@300.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1527
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1528
    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
  1529
    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
  1530
    box addHorizontalLine.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1531
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1532
    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
  1533
    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
  1534
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1535
    box addAbortButton; addOkButton.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1536
    box open.
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1537
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1538
    box accepted ifTrue:[
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1539
        ObjectMemory infoPrinting:vmInfo value.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1540
        ObjectMemory debugPrinting:vmErrors value.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1541
        Object infoPrinting:classInfos value.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1542
        DeviceWorkstation errorPrinting:displayErrors value.
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1543
    ].
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1544
    box destroy
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1545
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1546
    "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
  1547
!
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1548
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1549
miscSettings
327
44a25cae2645 allow setting of dialog-focus behavior
ca
parents: 319
diff changeset
  1550
    |box check logDoits shadows updChanges changeFileName returnFocus
335
c725e5d99819 localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents: 327
diff changeset
  1551
     loadBinaries compileLazy hostNameInLabel useManager localSourceFirst 
491
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1552
     showAccelerators sourceCacheDir cacheEntry
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1553
     component localCheck oldIndent nm fn|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1554
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1555
    "/
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1556
    "/ extract relevant system settings ...
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1557
    "/
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1558
    logDoits := Smalltalk logDoits asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1559
    shadows := PopUpView shadows asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1560
    hostNameInLabel := StandardSystemView includeHostNameInLabel asValue.
327
44a25cae2645 allow setting of dialog-focus behavior
ca
parents: 319
diff changeset
  1561
    returnFocus := Dialog returnFocusWhenClosingModalBoxes asValue.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1562
    updChanges := Class updatingChanges asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1563
    changeFileName := ObjectMemory nameForChanges asValue.
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1564
    useManager := (Smalltalk at:#SourceCodeManager) notNil asValue.
335
c725e5d99819 localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents: 327
diff changeset
  1565
    localSourceFirst := Class tryLocalSourceFirst asValue.
420
2c169931d1ab allow turning of of accelerator display
Claus Gittinger <cg@exept.de>
parents: 410
diff changeset
  1566
    showAccelerators := MenuView showAcceleratorKeys asValue.
491
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1567
    sourceCacheDir := nil asValue.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1568
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1569
    loadBinaries := Smalltalk loadBinaries asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1570
    compileLazy := Autoload compileLazy asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1571
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1572
    "/
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1573
    "/ create a box on those values ...
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1574
    "/
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1575
    box := DialogBox new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1576
    box label:(resources string:'Other settings').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1577
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1578
    box addCheckBox:(resources string:'log compiles in changes file') on:updChanges.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1579
    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
  1580
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1581
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1582
                    addLabelledInputField:(resources string:'change file name:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1583
                    adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1584
                    on:changeFileName 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1585
                    tabable:true
492
829b4872bca3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
  1586
                    separateAtX:0.4.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1587
    component immediateAccept:true; acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1588
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1589
"/    y := box yPosition.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1590
"/    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
  1591
"/    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
  1592
"/    box yPosition:y.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1593
"/    component := box addInputFieldOn:changeFileName tabable:true.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1594
"/    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
  1595
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1596
    box addHorizontalLine.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1597
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1598
    box addCheckBox:(resources string:'lazy compilation when autoloading') on:compileLazy.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1599
    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
  1600
    ObjectFileLoader isNil ifTrue:[
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1601
        loadBinaries value:false.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1602
        check disable
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1603
    ].
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1604
250
16612cb1c470 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 249
diff changeset
  1605
    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
  1606
    oldIndent := box leftIndent.
335
c725e5d99819 localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents: 327
diff changeset
  1607
    box leftIndent:30.
c725e5d99819 localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents: 327
diff changeset
  1608
    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
  1609
    localCheck enableChannel:useManager.
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1610
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1611
    cacheEntry := box 
493
eddc0d77d99e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 492
diff changeset
  1612
                    addLabelledInputField:(resources string:'source cache dir:')
491
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1613
                    adjust:#right
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1614
                    on:sourceCacheDir 
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1615
                    tabable:true
492
829b4872bca3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
  1616
                    separateAtX:0.4.
491
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1617
    cacheEntry immediateAccept:true; acceptOnLeave:false.
343
569baf25f549 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 342
diff changeset
  1618
    box leftIndent:oldIndent.
521
14e0be643785 disable cacheDir field if no sourceCodeManager
Claus Gittinger <cg@exept.de>
parents: 514
diff changeset
  1619
    cacheEntry enableChannel:useManager.
335
c725e5d99819 localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents: 327
diff changeset
  1620
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1621
    (AbstractSourceCodeManager isNil 
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1622
    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
  1623
        useManager value:false.
491
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1624
        cacheEntry disable.
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1625
        check disable.
505
a7f41006fb0b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 503
diff changeset
  1626
        localCheck enable.
491
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1627
    ] ifFalse:[
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1628
        sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName).
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1629
    ].
335
c725e5d99819 localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents: 327
diff changeset
  1630
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1631
    box addHorizontalLine.
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
    box addCheckBox:(resources string:'shadows under popup views') on:shadows.
327
44a25cae2645 allow setting of dialog-focus behavior
ca
parents: 319
diff changeset
  1634
    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
  1635
    box addCheckBox:(resources string:'hostname in window labels') on:hostNameInLabel.
443
ea8f82ba103c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 440
diff changeset
  1636
    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
  1637
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1638
    box 
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1639
        addHelpButtonFor:'NewLauncher/miscSettings.html';
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1640
        addAbortButton; 
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1641
        addOkButton.
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1642
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1643
    "/
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1644
    "/ show the box ...
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1645
    "/
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1646
    box open.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1647
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1648
    "/
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1649
    "/ update system settings
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1650
    "/
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1651
    box accepted ifTrue:[
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1652
        Smalltalk logDoits:logDoits value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1653
        PopUpView shadows:shadows value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1654
        Class updateChanges:updChanges value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1655
        Autoload compileLazy:compileLazy value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1656
        Smalltalk loadBinaries:loadBinaries value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1657
        StandardSystemView includeHostNameInLabel:hostNameInLabel value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1658
        ObjectMemory nameForChanges:changeFileName value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1659
        Dialog returnFocusWhenClosingModalBoxes:returnFocus value.
420
2c169931d1ab allow turning of of accelerator display
Claus Gittinger <cg@exept.de>
parents: 410
diff changeset
  1660
        MenuView showAcceleratorKeys:showAccelerators value.
327
44a25cae2645 allow setting of dialog-focus behavior
ca
parents: 319
diff changeset
  1661
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1662
        useManager value ifTrue:[
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1663
            (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
  1664
                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
  1665
            ].
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1666
            Class tryLocalSourceFirst:(localSourceFirst value).
491
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1667
            nm := sourceCacheDir value.
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1668
            (fn := nm asFilename) exists ifFalse:[
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1669
                (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
  1670
                    fn makeDirectory; 
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1671
                       makeReadableForAll;
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1672
                       makeWritableForAll;
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1673
                       makeExecutableForAll.
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1674
                ]
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1675
            ].
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1676
            (fn exists 
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1677
            and:[fn isDirectory
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1678
            and:[fn isReadable
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1679
            and:[fn isWritable]]]) ifTrue:[
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1680
                AbstractSourceCodeManager cacheDirectoryName:(sourceCacheDir value).
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1681
            ]
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1682
        ] ifFalse:[
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1683
            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
  1684
        ]
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1685
    ].
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1686
    box destroy
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1687
590
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
  1688
    "Modified: 29.5.1996 / 18:37:26 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1689
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1690
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1691
printerSettings
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1692
    |box 
595
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1693
     possiblePrinters possibleTypes printerType printCommand 
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1694
     possiblePageFormats pageFormat landscape format updater
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1695
     formatLabel formatComponent landscapeLabel landscapeComponent
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1696
     topInset leftInset bottomInset unitList unit
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1697
     topInsetLabel topInsetComponent leftInsetLabel leftInsetComponent
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1698
     bottomInsetLabel bottomInsetComponent
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1699
     check y y1 commandListPop component oldIndent commandList row|
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1700
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1701
    possiblePrinters := PrinterStream withAllSubclasses asArray.
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1702
    possibleTypes := possiblePrinters collect:[:cls | cls printerTypeName].
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1703
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1704
    printerType := SelectionInList new list:(resources array:possibleTypes).
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1705
    printerType selectionIndex:(possiblePrinters identityIndexOf:Printer).
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1706
    printCommand := Printer printCommand asValue.
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1707
604
8fd6e7c5868d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
  1708
    pageFormat := SelectionInList new list:(Printer defaultPageFormats).
8fd6e7c5868d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
  1709
    pageFormat selection:(Printer pageFormat).
8fd6e7c5868d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
  1710
    landscape := Printer landscape asValue.
8fd6e7c5868d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
  1711
8fd6e7c5868d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
  1712
    topInset := Printer topInset asValue.
8fd6e7c5868d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
  1713
    leftInset := Printer leftInset asValue.
8fd6e7c5868d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
  1714
    bottomInset := Printer bottomInset asValue.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1715
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1716
    box := DialogBox new.
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1717
    box label:(resources string:'Printer settings').
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1718
595
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1719
    box addPopUpList:(resources string:'printer type:') on:printerType.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1720
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1721
    y := box yPosition.
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1722
    component := box addTextLabel:(resources string:'print command:').
362
d5d99cdda74c use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents: 359
diff changeset
  1723
    component width:0.3; adjust:#right; borderWidth:0.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1724
    box yPosition:y.
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1725
    commandListPop := box addComboBoxOn:printCommand tabable:true.
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1726
"/    commandListPop := box addInputFieldOn:printCommand tabable:true.
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1727
    commandListPop width:0.7; left:0.3; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
362
d5d99cdda74c use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents: 359
diff changeset
  1728
    "/ some common print commands ...
499
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1729
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1730
    commandList := resources at:'PRINT_COMMANDS' ifAbsent:nil.
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1731
    commandList isNil ifTrue:[
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1732
        commandList := PrinterStream defaultCommands.
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1733
        commandList isNil ifTrue:[
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1734
            commandList := #('lpr' 
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1735
                             'lp' 
499
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1736
                            ).
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1737
        ]
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1738
    ].
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  1739
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1740
    commandListPop list:commandList.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1741
    box addVerticalSpace.
595
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1742
    box addHorizontalLine.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1743
    box addVerticalSpace.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1744
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1745
    row := OrderedCollection new.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1746
    row add:(formatLabel := Label label:(resources string:'page format:')).
676
a5d1f2adfb98 beautified for 2D look
Claus Gittinger <cg@exept.de>
parents: 673
diff changeset
  1747
    formatLabel borderWidth:0.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1748
    row add:(formatComponent := PopUpList on:pageFormat).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1749
    formatComponent label:'unknown'.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1750
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1751
    row add:(landscapeLabel := Label label:(resources string:'landscape:')).
676
a5d1f2adfb98 beautified for 2D look
Claus Gittinger <cg@exept.de>
parents: 673
diff changeset
  1752
    landscapeLabel borderWidth:0.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1753
    row add:(landscapeComponent := CheckToggle on:landscape).
595
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1754
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1755
    y := box yPosition.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1756
    box
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1757
        addRow:(1 to:2)
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1758
        fromX:0
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1759
        toX:0.5
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1760
        collect:[:idx | row at:idx]
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1761
        tabable:false
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1762
        horizontalLayout:#leftSpace
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1763
        verticalLayout:#center.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1764
    y1 := box yPosition.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1765
    box yPosition:y.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1766
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1767
    box
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1768
        addRow:(3 to:4)
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1769
        fromX:0.5
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1770
        toX:1.0
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1771
        collect:[:idx | row at:idx]
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1772
        tabable:false
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1773
        horizontalLayout:#leftSpace
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1774
        verticalLayout:#center.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1775
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1776
    box yPosition:(box yPosition max:y1).
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1777
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1778
    box makeTabable:(formatComponent).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1779
    box makeTabable:(landscapeComponent).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1780
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1781
    box addVerticalSpace.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1782
    box addHorizontalLine.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1783
    box addVerticalSpace.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1784
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1785
    y := box yPosition.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1786
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1787
    topInsetComponent := box 
603
a1054630b5e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 602
diff changeset
  1788
        addLabelledInputField:(resources string:'top margin:')
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1789
        adjust:#right
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1790
        on:topInset 
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1791
        tabable:true
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1792
        from:0.0 to:0.5
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1793
        separateAtX:0.6.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1794
    topInsetComponent converter:(PrintConverter new initForNumber).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1795
    y1 := box yPosition.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1796
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1797
    box yPosition:y.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1798
    unitList := SelectionInList with:#('inch' 'mm').
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1799
    unitList selectionIndex:1.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1800
605
89f279250b96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 604
diff changeset
  1801
    component := box addComponent:(PopUpList on:unitList).
89f279250b96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 604
diff changeset
  1802
    component
603
a1054630b5e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 602
diff changeset
  1803
        left:0.6;
a1054630b5e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 602
diff changeset
  1804
        width:0.3.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1805
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1806
    box yPosition:y1.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1807
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1808
    leftInsetComponent := box 
603
a1054630b5e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 602
diff changeset
  1809
        addLabelledInputField:(resources string:'left margin:')
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1810
        adjust:#right
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1811
        on:leftInset 
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1812
        tabable:true
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1813
        from:0.0 to:0.5
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1814
        separateAtX:0.6.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1815
    leftInsetComponent converter:(PrintConverter new initForNumber).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1816
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1817
    bottomInsetComponent := box 
603
a1054630b5e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 602
diff changeset
  1818
        addLabelledInputField:(resources string:'bottom margin:')
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1819
        adjust:#right
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1820
        on:bottomInset 
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1821
        tabable:true
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1822
        from:0.0 to:0.5
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1823
        separateAtX:0.6.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1824
    bottomInsetComponent converter:(PrintConverter new initForNumber).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1825
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1826
    updater := [ |p fg hasPageSize hasMargins|
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1827
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1828
                       printerType selectionIndex ~~ 0 ifTrue:[
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1829
                           p := possiblePrinters at:(printerType selectionIndex).
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1830
                           hasPageSize := p supportsPageSizes. 
604
8fd6e7c5868d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
  1831
                           hasMargins := p supportsMargins. 
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1832
                       ] ifFalse:[
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1833
                           hasPageSize := false.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1834
                           hasMargins := false.
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1835
                       ].
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1836
                       hasPageSize ifTrue:[
597
68312d41ebab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 596
diff changeset
  1837
                          fg := Button new foregroundColor.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1838
                          formatComponent enable.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1839
                          landscapeComponent enable.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1840
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1841
                          formatComponent label:p pageFormat.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1842
                          pageFormat value:(p pageFormat).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1843
                          landscape value:(p landscape).
597
68312d41ebab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 596
diff changeset
  1844
                       ] ifFalse:[ 
68312d41ebab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 596
diff changeset
  1845
                          fg := Button new disabledForegroundColor.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1846
                          formatComponent disable.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1847
                          landscapeComponent disable.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1848
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1849
                          formatComponent label:'unknown'.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1850
                          landscape value:nil.
597
68312d41ebab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 596
diff changeset
  1851
                       ].
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1852
                       hasMargins ifTrue:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1853
                          unitList selectionIndex == 2 ifTrue:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1854
                              unit := #mm
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1855
                          ] ifFalse:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1856
                              unit := #inch
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1857
                          ].
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1858
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1859
                          topInset value:(UnitConverter convert:p topInset from:#inch to:unit).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1860
                          leftInset value:(UnitConverter convert:p leftInset from:#inch to:unit).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1861
                          bottomInset value:(UnitConverter convert:p bottomInset from:#inch to:unit).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1862
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1863
                          topInsetComponent enable.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1864
                          leftInsetComponent enable.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1865
                          bottomInsetComponent enable.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1866
                       ] ifFalse:[ 
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1867
                          topInsetComponent disable.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1868
                          leftInsetComponent disable.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1869
                          bottomInsetComponent disable.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1870
                       ].
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1871
                       formatLabel foregroundColor:fg.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1872
                       landscapeLabel foregroundColor:fg.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1873
                        
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1874
                       p notNil ifTrue:[ 
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1875
                           commandList := p defaultCommands.
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1876
                           commandList notNil ifTrue:[
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1877
                                commandListPop list:commandList 
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1878
                           ].
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1879
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1880
                           printCommand value:(p printCommand).
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1881
                       ]
597
68312d41ebab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 596
diff changeset
  1882
                     ].
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1883
    unitList onChangeSend:#value to:updater.
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1884
    printerType onChangeSend:#value to:updater.
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1885
    updater value.
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
  1886
608
4596be8837d6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 605
diff changeset
  1887
    box addVerticalSpace;
4596be8837d6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 605
diff changeset
  1888
        addHelpButtonFor:'NewLauncher/printerSettings.html';
4596be8837d6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 605
diff changeset
  1889
        addAbortButton; addOkButton.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1890
    box open.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1891
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1892
    box accepted ifTrue:[
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  1893
        Printer := possiblePrinters at:(printerType selectionIndex).
362
d5d99cdda74c use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents: 359
diff changeset
  1894
        Printer printCommand:printCommand value.
595
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1895
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1896
        Printer supportsPageSizes ifTrue:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1897
            Printer pageFormat:(pageFormat selection).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1898
            Printer landscape:(landscape value).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1899
        ].
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1900
        Printer supportsMargins ifTrue:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1901
            unitList selectionIndex == 2 ifTrue:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1902
                unit := #mm
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1903
            ] ifFalse:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1904
                unit := #inch
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1905
            ].
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1906
            Printer topInset:(UnitConverter convert:topInset value from:unit to:#inch).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1907
            Printer leftInset:(UnitConverter convert:leftInset value from:unit to:#inch).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1908
            Printer bottomInset:(UnitConverter convert:bottomInset value from:unit to:#inch).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  1909
        ].
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1910
    ].
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1911
    box destroy
362
d5d99cdda74c use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents: 359
diff changeset
  1912
676
a5d1f2adfb98 beautified for 2D look
Claus Gittinger <cg@exept.de>
parents: 673
diff changeset
  1913
    "Modified: 17.7.1996 / 12:04:55 / cg"
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1914
!
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  1915
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1916
viewStyleSetting 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1917
    |listOfStyles resourceDir dir box 
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1918
     list listView scrView infoLabel infoForwarder newStyle|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1919
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1920
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1921
     search resources directory for a list of .style files ...
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1922
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1923
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1924
    resourceDir := Smalltalk getSystemFileName:'resources'.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1925
    resourceDir isNil ifTrue:[
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1926
        self warn:'no styles found (missing ''resources'' directory)'.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1927
        ^ self
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1928
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1929
    dir := FileDirectory directoryNamed:resourceDir.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1930
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1931
    listOfStyles := dir select:[:aFileName | aFileName endsWith:'.style'].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1932
    listOfStyles := listOfStyles collect:[:aFileName | aFileName copyWithoutLast:6].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1933
    listOfStyles sort.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1934
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1935
"/ old code: used a standard ListSelectionBox
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1936
"/ changed to intercept selection and add info-output.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1937
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1938
"/    box := ListSelectionBox title:(resources string:'STYLE_MSG') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1939
"/    box label:(resources string:'Style selection').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1940
"/    box list:listOfStyles.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1941
"/    box initialText:View defaultStyle.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1942
"/    box selectAction:[:newStyle |
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1943
"/    ].    
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1944
"/    box action:[:newStyle |
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1945
"/        transcript topView withCursor:Cursor wait do:[
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  1946
"/            transcript showCR:'change style to ' , newStyle , ' ...'.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1947
"/            View defaultStyle:newStyle asSymbol.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1948
"/        ]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1949
"/    ].    
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1950
"/    box showAtPointer
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1951
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1952
"/ new code: build box 'by 'hand'
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1953
"/
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
  1954
    infoForwarder := [
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1955
                        |nm sheet comment|
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1956
                        nm := list selection.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1957
                        sheet := ViewStyle fromFile:(nm , '.style').
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1958
                        comment := sheet at:#comment ifAbsent:''.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1959
                        infoLabel label:comment withCRs asStringCollection
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1960
                       ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1961
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1962
    list := SelectionInList with:listOfStyles.
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
  1963
    list onChangeSend:#value to:infoForwarder.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1964
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1965
    box := Dialog new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1966
    box label:(resources string:'Style selection').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1967
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1968
    (box addTextLabel:(resources string:'STYLE_MSG') withCRs) adjust:#left.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1969
    listView := SelectionInListView on:list.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1970
    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
  1971
    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
  1972
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1973
    box addVerticalSpace.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1974
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1975
    (infoLabel := box addTextLabel:'\\' withCRs) adjust:#centerLeft.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1976
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1977
    box addAbortButton; addOkButton.
568
58d7e4157f23 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
  1978
    list selection:(View defaultStyle).
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1979
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1980
    box stickAtBottomWithVariableHeight:scrView.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1981
    box stickAtBottomWithFixHeight:infoLabel.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1982
    box open.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1983
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1984
    box accepted ifTrue:[
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1985
        newStyle := list selection.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1986
        newStyle notNil ifTrue:[
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1987
            self withWaitCursorDo:[
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  1988
                transcript showCR:'change style to ' , newStyle , ' ...'.
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1989
                View defaultStyle:newStyle asSymbol.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1990
            ].
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1991
            self reopenLauncher.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1992
        ]
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1993
    ].
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1994
    box destroy
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1995
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  1996
    "Modified: 5.7.1996 / 13:13:22 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1997
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1998
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1999
!NewLauncher methodsFor:'actions - tools'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2000
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2001
compressingGarbageCollect
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2002
    ObjectMemory verboseGarbageCollect
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2003
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2004
    "Created: 12.5.1996 / 15:30:15 / cg"
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2005
!
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2006
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2007
fullScreenHardcopy
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2008
    "after a second (to allow redraw of views under menu ...),
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2009
     save the contents of the whole screen."
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2010
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2011
    Processor addTimedBlock:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2012
	self saveScreenImage:(Image fromScreen) defaultName:'screen'
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2013
    ] afterSeconds:1
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2014
!
99
claus
parents: 98
diff changeset
  2015
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2016
garbageCollect
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2017
    ObjectMemory reclaimSymbols
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2018
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2019
    "Created: 12.5.1996 / 15:28:03 / cg"
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2020
!
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2021
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2022
globalGarbageCollect
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2023
    ObjectMemory reclaimSymbols
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2024
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2025
    "Created: 12.5.1996 / 15:28:13 / cg"
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2026
!
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2027
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2028
removeAllBreakAndTracePoints
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2029
    MessageTracer cleanup
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2030
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2031
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2032
screenHardcopy
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2033
    "after a second (to allow redraw of views under menu ...),
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2034
     let user specify a rectangular area on the screen
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2035
     and save its contents."
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2036
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2037
    |area|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2038
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2039
    Processor addTimedBlock:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2040
	area := Rectangle fromUser.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2041
	(area width > 0 and:[area height > 0]) ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2042
	    self saveScreenImage:(Image fromScreen:area) defaultName:'hardcopy'
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2043
	]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2044
    ] afterSeconds:1
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2045
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2046
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2047
startEventMonitor
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2048
    EventMonitor open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2049
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2050
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2051
startFullWindowTreeView
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2052
    WindowTreeView open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2053
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2054
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2055
startMemoryMonitor
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2056
    MemoryMonitor open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2057
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2058
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2059
startMemoryUsageView
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2060
    MemoryUsageView open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2061
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2062
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2063
startProcessMonitor
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2064
    ProcessMonitor open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2065
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2066
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2067
startStopEventTrace
503
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  2068
    |v wg|
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2069
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2070
    v := Screen current viewFromUser.
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2071
    v notNil ifTrue:[
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2072
        v := v topView.
503
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  2073
        wg := v windowGroup.
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  2074
        wg notNil ifTrue:[
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  2075
            "/
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  2076
            "/ toggle eventTrace in its windowGroup
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  2077
            "/
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  2078
            wg traceEvents:(wg preEventHook isNil)
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2079
        ]
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2080
    ]
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2081
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2082
    "Created: 7.3.1996 / 14:44:22 / cg"
503
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  2083
    "Modified: 24.4.1996 / 10:27:11 / cg"
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2084
!
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2085
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2086
startWindowTreeView
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2087
    |v|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2088
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2089
    v := self pickAView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2090
    v notNil ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2091
	WindowTreeView openOn:v topView
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2092
    ]
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
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2095
viewDestroy
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2096
    "let user pick a view and destroy it.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2097
     Even allow destroying non-smalltalk views
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2098
     (also for views which I forgot due to some error)"
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2099
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2100
    |device p v id|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2101
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2102
    (Delay forSeconds:1) wait.
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
    device := Screen current.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2105
    p :=  device pointFromUser.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2106
    id := device viewIdFromPoint:p.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2107
    v := device viewFromId:id.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2108
    v notNil ifTrue:[
304
49dc8c0e733e interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
  2109
	v topView destroy.
49dc8c0e733e interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
  2110
	^ self
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2111
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2112
    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
  2113
	^ self
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2114
    ].
298
d1212fc486b9 message string changed
Claus Gittinger <cg@exept.de>
parents: 281
diff changeset
  2115
    (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
  2116
    ifTrue:[
304
49dc8c0e733e interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents: 298
diff changeset
  2117
	device destroyView:nil withId:id
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2118
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2119
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2120
    "Modified: 18.9.1995 / 23:13:32 / claus"
298
d1212fc486b9 message string changed
Claus Gittinger <cg@exept.de>
parents: 281
diff changeset
  2121
    "Modified: 14.12.1995 / 22:02:26 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2122
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2123
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2124
viewHardcopy
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2125
    "after a second (to allow redraw of views under menu ...),
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2126
     let user specify a view and save its contents."
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2127
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2128
    Processor addTimedBlock:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2129
	|v|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2130
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2131
	v := Screen current viewFromUser.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2132
	v notNil ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2133
	    self saveScreenImage:(Image fromView:(v topView)) defaultName:'hardcopy'
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2134
	]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2135
    ] afterSeconds:1
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2136
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2137
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2138
viewInspect
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2139
    "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
  2140
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2141
    |v|
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
    v := self pickAView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2144
    v notNil ifTrue:[
226
4b050498fe46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
  2145
"/        v topView inspect
4b050498fe46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
  2146
	v inspect
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2147
    ]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2148
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2149
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2150
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2151
!NewLauncher methodsFor:'change & update'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2152
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2153
update:something with:aParameter from:changedObject
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2154
    ((something == #currentProject)
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2155
    or:[changedObject == Project]) ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2156
	self changed:#info.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2157
	^ self
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2158
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2159
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2160
658
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2161
!NewLauncher methodsFor:'dynamic menus'!
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2162
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2163
addMenu:name withItems:items actions:actions
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2164
    "dynamically add a new (user-)menu to the menu panel.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2165
     This allows applications to install items for themself
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2166
     dynamically in the launcher."
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2167
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2168
    |subMenu|
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2169
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2170
    myMenu add:name selector:(name asSymbol) before:#help.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2171
    subMenu := MenuView forMenu:myMenu.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2172
    subMenu labels:items.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2173
    subMenu actions:actions.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2174
    myMenu at:name putMenu:subMenu
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2175
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2176
    "
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2177
     |launcher actionBlocks|
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2178
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2179
     actionBlocks := Array new:3.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2180
     actionBlocks at:1 put:[Transcript showCR:'foo'].
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2181
     actionBlocks at:2 put:[Transcript showCR:'bar'].
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2182
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2183
     launcher := Transcript topView application.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2184
     launcher 
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2185
        addMenu:'misc' 
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2186
        withItems:#('foo' 'bar')
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2187
        actions:actionBlocks
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2188
    "
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2189
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2190
    "
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2191
     |launcher actionBlocks|
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2192
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2193
     actionBlocks := Array new:3.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2194
     actionBlocks at:1 put:[RDoItServer startServer].
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2195
     actionBlocks at:2 put:[RDoItServer killServer].
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2196
                
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2197
     launcher := Transcript topView application.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2198
     launcher 
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2199
        addMenu:'misc' 
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2200
        withItems:#('start rdoit server' 'stop rdoit server')
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2201
        actions:actionBlocks
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2202
    "
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2203
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2204
    "Modified: 5.7.1996 / 11:45:19 / cg"
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2205
!
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2206
668
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2207
menuAt:nameSymbol
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2208
    "return a menu by name"
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2209
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2210
    ^ myMenu subMenuAt:nameSymbol
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2211
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2212
    "
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2213
     |launcher demoMenu|
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2214
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2215
     launcher := Transcript topView application.
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2216
     demoMenu := launcher menuAt:#demos.
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2217
     demoMenu
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2218
        addLabels:#('-' 'fooBar')
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2219
        selectors:#(nil fooBar).
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2220
     demoMenu actionAt:#fooBar put:[Transcript showCR:'fooBar']
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2221
    "
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2222
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2223
    "Created: 11.7.1996 / 15:35:13 / cg"
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2224
    "Modified: 11.7.1996 / 15:42:25 / cg"
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2225
!
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2226
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2227
removeMenu:name
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2228
    "dynamically remove a (user-)menu from the menu panel.
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2229
     This allows applications to de-install items for themself
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2230
     dynamically in the launcher."
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2231
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2232
    myMenu remove:name 
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2233
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2234
    "
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2235
     |launcher actionBlocks|
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2236
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2237
     actionBlocks := Array new:3.
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2238
     actionBlocks at:1 put:[Transcript showCR:'foo'].
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2239
     actionBlocks at:2 put:[Transcript showCR:'bar'].
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2240
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2241
     launcher := Transcript topView application.
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2242
     launcher 
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2243
        addMenu:'misc' 
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2244
        withItems:#('foo' 'bar')
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2245
        actions:actionBlocks.
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2246
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2247
     Delay waitForSeconds:10.
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2248
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2249
     launcher removeMenu:'misc'
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2250
    "
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2251
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2252
    "Created: 5.7.1996 / 11:44:54 / cg"
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2253
    "Modified: 5.7.1996 / 11:54:36 / cg"
658
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2254
! !
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2255
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2256
!NewLauncher methodsFor:'help'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2257
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2258
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
  2259
    |sel s buttons|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2260
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2261
    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
  2262
        s := 'TRANSCRIPT_HELP'
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2263
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2264
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2265
    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
  2266
        s := 'INFOVIEW_HELP'
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2267
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2268
399
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  2269
    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
  2270
    (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
  2271
        "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
  2272
        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
  2273
        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
  2274
            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
  2275
        ].
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  2276
        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
  2277
            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
  2278
        ].
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  2279
        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
  2280
            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
  2281
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2282
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2283
    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
  2284
        ^ resources string:s
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
    ^ nil
399
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  2287
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  2288
    "Modified: 26.2.1996 / 23:08:19 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2289
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2290
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2291
!NewLauncher methodsFor:'infoview update'!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2292
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2293
info
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2294
    |project projectName projectDir packageName|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2295
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2296
    (Project isNil or:[(project := Project current) isNil]) ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2297
	projectName := '* none *'.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2298
	projectDir := '.'.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2299
	packageName := '* none *'.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2300
    ] ifFalse:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2301
	projectName := project name.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2302
	projectDir := project directory.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2303
	packageName := project packageName.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2304
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2305
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2306
    ^ resources
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2307
	string:'project: ''%1''  fileOut to: ''%3''  package: ''%2'''
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2308
	  withArgs:(Array 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2309
			with:projectName
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2310
			with:packageName 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2311
			with:(projectDir contractTo:30))
319
a39350103cb2 forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
  2312
!
a39350103cb2 forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
  2313
a39350103cb2 forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
  2314
showActivity:someMessage
500
6824f44e589b commentary
Claus Gittinger <cg@exept.de>
parents: 499
diff changeset
  2315
    "some activityNotification to be forwarded to the user;
6824f44e589b commentary
Claus Gittinger <cg@exept.de>
parents: 499
diff changeset
  2316
     show it in the transcript here."
6824f44e589b commentary
Claus Gittinger <cg@exept.de>
parents: 499
diff changeset
  2317
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2318
    transcript showCR:someMessage; endEntry
319
a39350103cb2 forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
  2319
a39350103cb2 forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
  2320
    "Created: 23.12.1995 / 12:38:29 / cg"
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2321
    "Modified: 5.7.1996 / 13:13:15 / cg"
99
claus
parents: 98
diff changeset
  2322
! !
claus
parents: 98
diff changeset
  2323
93
claus
parents: 92
diff changeset
  2324
!NewLauncher methodsFor:'initialize / release'!
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2325
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2326
addTopViewsToCurrentProject
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2327
    "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
  2328
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2329
    ^ self
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2330
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2331
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2332
buttonPanelSpec
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2333
    "return a spec for the buttons in the panel;
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2334
     entries consists of selector and bitmap-filename.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2335
     nil selectors are taken as separators (see setupButtonPanel)"
98
claus
parents: 96
diff changeset
  2336
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2337
    ^ #(
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2338
        #(startSystemBrowser 'SBrowser32x32.xbm')
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2339
        #(startFileBrowser   'FBrowser32x32.xbm')
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  2340
"/        #(startWorkspace      'Workspace32x32.xbm')
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2341
        #(nil nil)
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2342
        #(startChangesBrowser 'CBrowser32x32.xbm')
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2343
"/        #(nil nil)
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2344
"/        #(nil nil)
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2345
"/        #(startDocumentationTool 'book11.ico')
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2346
     )
230
6be247b9d815 workspace button
Claus Gittinger <cg@exept.de>
parents: 228
diff changeset
  2347
6be247b9d815 workspace button
Claus Gittinger <cg@exept.de>
parents: 228
diff changeset
  2348
    "Created: 4.12.1995 / 20:16:18 / cg"
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2349
    "Modified: 19.4.1996 / 16:37:46 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2350
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2351
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2352
closeDownViews
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2353
    OpenLaunchers remove:self ifAbsent:nil.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2354
    super closeDownViews.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2355
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2356
    "Created: 5.7.1996 / 13:33:36 / cg"
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2357
!
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2358
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2359
closeRequest
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2360
    (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
  2361
	super closeRequest
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2362
    ]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2363
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2364
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2365
disableDangerousMenuItemsInRemoteLauncher
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2366
    "if I am a remote launcher (multidisplay operation),
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2367
     disable menus which are dangerous or affect common state. 
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2368
     These operations have to
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2369
     be performed on the main screen."
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2370
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2371
    isMainLauncher ifFalse:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2372
        (myMenu menuAt:#file) disableAll:#(snapshot snapshotAndExit objectModuleDialog exit).
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2373
        (myMenu menuAt:#projects) disableAll.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2374
        (myMenu menuAt:#settings) disableAll.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2375
    ].
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2376
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2377
    "Created: 5.7.1996 / 17:00:50 / cg"
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2378
    "Modified: 5.7.1996 / 17:01:30 / cg"
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2379
!
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2380
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2381
focusSequence
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2382
    ^ (Array with:myMenu) 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2383
      , 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2384
      (buttonPanel subViews select:[:element | element isKindOf:Button])
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2385
"/      , (Array with:Transcript)
98
claus
parents: 96
diff changeset
  2386
!
claus
parents: 96
diff changeset
  2387
93
claus
parents: 92
diff changeset
  2388
openInterface
98
claus
parents: 96
diff changeset
  2389
    "sent by my superclass to open up my interface"
93
claus
parents: 92
diff changeset
  2390
615
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2391
    |top icn w scrn sz|
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2392
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2393
    "/ if there is already a transcript on my device,
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2394
    "/ I am a slave launcher with limited functionality.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2395
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2396
    Transcript notNil ifTrue:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2397
        Transcript ~~ Stderr ifTrue:[
662
b5efd05fa256 use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents: 661
diff changeset
  2398
            isMainLauncher := (Transcript graphicsDevice == device).
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2399
        ] ifFalse:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2400
            isMainLauncher := true
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2401
        ]
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2402
    ] ifFalse:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2403
        isMainLauncher := true
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2404
    ].
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2405
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2406
    top := StandardSystemView onDevice:device.
205
e3952eceab14 set iconLabel
Claus Gittinger <cg@exept.de>
parents: 192
diff changeset
  2407
    top label:'Smalltalk/X'; iconLabel:'ST/X Launcher'.
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2408
    top extent:(400@300 ).
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2409
615
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2410
    icn := self class aboutIcon.
686
3dd40eb33b09 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 679
diff changeset
  2411
    icn notNil ifTrue:[
3dd40eb33b09 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 679
diff changeset
  2412
        icn := icn magnifiedTo:(sz := Screen current preferredIconSize).
3dd40eb33b09 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 679
diff changeset
  2413
    ].
616
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  2414
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  2415
    ((scrn := Screen current) supportsDeepIcons not
617
19ec7ab9ffb1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 616
diff changeset
  2416
    and:[scrn supportsIconViews
19ec7ab9ffb1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 616
diff changeset
  2417
    and:[scrn depth > 1]]) ifTrue:[    
616
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  2418
        w := View extent:sz. 
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  2419
        w viewBackground:icn.
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  2420
        top iconView:w
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  2421
    ] ifFalse:[
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  2422
        top icon:icn.
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  2423
    ].
615
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2424
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2425
"/    (scrn := Screen current) supportsDeepIcons ifTrue:[
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2426
"/        icn := self class aboutIcon.
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2427
"/        icn notNil ifTrue:[
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2428
"/            icn := icn magnifiedTo:(sz := scrn preferredIconSize).
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2429
"/            icn := Depth8Image fromImage:icn.
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2430
"/            top icon:icn
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2431
"/        ].
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2432
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2433
"/    ] ifFalse:[
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2434
"/        scrn supportsIconViews ifTrue:[
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2435
"/            icn := self class aboutIcon.
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2436
"/            icn notNil ifTrue:[
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2437
"/                icn := icn magnifiedTo:(sz := scrn preferredIconSize).
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2438
"/                w := View extent:sz. 
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2439
"/                w viewBackground:icn.
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2440
"/                top iconView:w
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2441
"/            ].
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2442
"/        ]
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  2443
"/    ].
92
claus
parents: 91
diff changeset
  2444
93
claus
parents: 92
diff changeset
  2445
    self setupViewsIn:top.
98
claus
parents: 96
diff changeset
  2446
claus
parents: 96
diff changeset
  2447
    top application:self.   
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2448
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2449
    "
92
claus
parents: 91
diff changeset
  2450
     open with higher prio to allow interaction even while things
claus
parents: 91
diff changeset
  2451
     are running ...
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2452
    "
92
claus
parents: 91
diff changeset
  2453
    top openWithPriority:(Processor userSchedulingPriority + 1).
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2454
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2455
    OpenLaunchers isNil ifTrue:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2456
        OpenLaunchers := OrderedCollection new.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2457
    ].
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2458
    OpenLaunchers add:self.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2459
686
3dd40eb33b09 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 679
diff changeset
  2460
    "Modified: 25.7.1996 / 21:12:09 / cg"
93
claus
parents: 92
diff changeset
  2461
!
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2462
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2463
release
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2464
    infoProcess notNil ifTrue:[
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2465
        infoProcess terminate.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2466
        infoProcess := nil.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2467
    ].
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2468
    OpenLaunchers remove:self ifAbsent:nil.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2469
    super release
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2470
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2471
    "Modified: 5.7.1996 / 11:48:56 / cg"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2472
!
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2473
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2474
restarted
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2475
    "image restart - since WindowGroup recreates the process with
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
  2476
     the default priority, we have to raise the prio again.
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
  2477
     Mhmh - this looks like a bug to me ...
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
  2478
     Also, the cursor (which was stored as a write or waitCursor) must
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
  2479
     be reset to normal."
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2480
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2481
    Processor activeProcess priority:(Processor userSchedulingPriority + 1).
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
  2482
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2483
    super restarted
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
  2484
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
  2485
    "Modified: 1.6.1996 / 16:58:25 / cg"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2486
!
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2487
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2488
saveAndTerminateRequest
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2489
    "some windowManagers can send this, to shutDown an application
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2490
     but let it save its state before, for later restart. 
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2491
     Although I have not yet encountered such a windowManager,
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2492
     we are already prepared for this ;-)"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2493
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2494
    self snapshot.
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2495
    super saveAndTerminateRequest
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2496
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2497
    "Created: 5.7.1996 / 13:07:45 / cg"
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2498
    "Modified: 5.7.1996 / 13:08:55 / cg"
103
claus
parents: 102
diff changeset
  2499
!
claus
parents: 102
diff changeset
  2500
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2501
setupButtonPanelIn:aTopView
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2502
    "create the buttonPanel"
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2503
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  2504
    |spc mh buttonSize|
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2505
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2506
    spc := View viewSpacing // 2.
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2507
    buttonPanel := HorizontalPanelView in:aTopView.
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2508
    buttonPanel level:-1; borderWidth:0.
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2509
    buttonPanel horizontalLayout:#leftSpace.
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2510
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  2511
    buttonSize := self class buttonImageSize.
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  2512
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2513
    "/
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2514
    "/ the buttonSpec is a collection of:
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2515
    "/   #( selector  iconFileName )
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2516
    "/ or:
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2517
    "/   #( selector  (className iconQuerySelector) )
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2518
    "/ or"
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2519
    "/   #( nil )
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2520
    "/
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2521
    self buttonPanelSpec do:[:entry |
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2522
        |sel b sep img iconSpec|
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2523
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  2524
        sel := entry at:1.
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  2525
        sel isNil ifTrue:[
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  2526
            sep := View in:buttonPanel.
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  2527
            sep extent:32@1; borderWidth:0.
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  2528
        ] ifFalse:[
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  2529
            b := Button in:buttonPanel.
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2530
            iconSpec := entry at:2.
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2531
            iconSpec isArray ifTrue:[
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2532
                img := (Smalltalk classNamed:(iconSpec at:1)) perform:(iconSpec at:2).
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2533
            ] ifFalse:[
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2534
                img := Image fromFile:iconSpec.
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2535
            ].
591
b06ede2544fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 590
diff changeset
  2536
            (img notNil and:[buttonSize notNil]) ifTrue:[
b06ede2544fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 590
diff changeset
  2537
                img extent ~= buttonSize ifTrue:[
b06ede2544fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 590
diff changeset
  2538
                    img := img magnifiedTo:buttonSize       
b06ede2544fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 590
diff changeset
  2539
                ]
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  2540
            ].
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  2541
            b form:img.
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  2542
            b model:self; changeMessage:sel
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  2543
        ]
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2544
    ].
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2545
100
claus
parents: 99
diff changeset
  2546
    mh := myMenu height.
claus
parents: 99
diff changeset
  2547
    buttonPanel origin:0.0 @ (mh + spc)
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  2548
                corner:(1.0 @ (mh + spc + buttonPanel preferredExtent y)).
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2549
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2550
    buttonPanel leftInset:spc; rightInset:spc.
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2551
591
b06ede2544fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 590
diff changeset
  2552
    "Modified: 29.5.1996 / 19:23:04 / cg"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2553
!
11b4ce85104e Initial revision
claus
parents:
diff changeset
  2554
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2555
setupDemoMenu
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2556
    "setup the demo pulldown menu"
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2557
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2558
    |m|
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2559
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2560
    myMenu at:#demos 
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2561
           putLabels:(resources array:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2562
                                        'goodies'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2563
                                        'games'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2564
                                        'geometric designs'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2565
                                        'simple animations'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2566
                                        '3D graphics'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2567
                                        'graphic editors'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2568
                                       ))
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2569
           selectors:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2570
                                        goodies
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2571
                                        games
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2572
                                        geometricDesigns
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2573
                                        simpleAnimations
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2574
                                        #'3Dgraphics'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2575
                                        #graphicEditors
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2576
                      )
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2577
           receiver:self.
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2578
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2579
    "
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2580
     only to show two different ways of defining a popUpMenu,
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2581
     we use labels:selectors:receiver: here:
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2582
    "
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2583
    m := myMenu menuAt:#demos.
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2584
    m subMenuAt:#games
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2585
      put:(PopUpMenu
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2586
                labels:(resources array:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2587
                                           'Tetris'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2588
                                           'Tic Tac Toe'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2589
                                           'Tic Tac Toe (2 players)'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2590
                                         ))
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2591
                selectors:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2592
                                           startTetris
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2593
                                           startTicTacToe
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2594
                                           startTicTacToe2
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2595
                           )
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2596
                receiver:self).
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2597
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2598
    "
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2599
     and labels:selector:args:receiver: here:
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2600
    "
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2601
    m subMenuAt:#geometricDesigns
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2602
      put:(PopUpMenu
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2603
                labels:(resources array:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2604
                                           'Pen demo'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2605
                                           'Commander demo'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2606
                                           '-'     
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2607
                                           'Fractal plants demo'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2608
                                           'Fractal patterns demo'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2609
                                         ))
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2610
                selector:#openDemo:
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2611
                args:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2612
                                           PenDemo
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2613
                                           CommanderDemo
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2614
                                           nil
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2615
                                           FractalPlantsDemo
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2616
                                           FractalPatternsDemo
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2617
                      )
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2618
                receiver:self).
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2619
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2620
    m subMenuAt:#simpleAnimations 
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2621
      put:(PopUpMenu
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2622
                labels:(resources array:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2623
                                           'Animation'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2624
                                           'Globe demo'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2625
                                         ))
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2626
                selector:#openDemo:
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2627
                args:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2628
                                           Animation
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2629
                                           GlobeDemo
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2630
                      )
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2631
                receiver:self).
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2632
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2633
    m subMenuAt:#'3Dgraphics' 
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2634
      put:(PopUpMenu
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2635
                labels:(resources 
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2636
                            array:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2637
                                'plane'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2638
                                'tetra'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2639
                                'cube (wireframe)'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2640
                                'cube (solid)'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2641
                                'sphere (wireframe)'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2642
                                'doughnut (wireframe)'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2643
                                'planet'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2644
                                'teapot'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2645
                                'logo'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2646
                                'rubics cube'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2647
                                'x/y graph'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2648
                                '-'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2649
                                'cube (light)'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2650
                                'cube (light & texture)'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2651
                                'sphere (light)'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2652
                                'colored octahedron'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2653
                             ))
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2654
                selector:#openDemo:
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2655
                args:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2656
                                GLPlaneDemoView2
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2657
                                GLTetraDemoView
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2658
                                GLWireCubeDemoView
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2659
                                GLCubeDemoView
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2660
                                GLWireSphereDemoView
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2661
                                GLDoughnutDemoView
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2662
                                GLPlanetDemoView
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2663
                                GLTeapotDemo
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2664
                                Logo3DView1
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2665
                                RubicsCubeView
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2666
                                GLXYGraph
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2667
                                nil
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2668
                                GLCubeDemoView2
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2669
                                GLBrickCubeDemoView
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2670
                                GLSphereDemoView2
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2671
                                GLOctaHedronDemoView
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2672
                      )
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2673
                receiver:self).
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2674
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2675
    m subMenuAt:#graphicEditors 
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2676
      put:(PopUpMenu
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2677
                labels:(resources array:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2678
                                           'DrawTool'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2679
                                           'LogicTool'
464
998161ce250d added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents: 458
diff changeset
  2680
                                           'Paint Demo'
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2681
                                         ))
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2682
                selector:#openDemo:
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2683
                args:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2684
                                           DrawTool
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2685
                                           LogicTool
464
998161ce250d added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents: 458
diff changeset
  2686
                                           ColorDrawDemo3
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2687
                      )
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2688
                receiver:self).
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2689
91
claus
parents: 90
diff changeset
  2690
    m subMenuAt:#goodies 
claus
parents: 90
diff changeset
  2691
      put:(PopUpMenu
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2692
                labels:(resources array:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2693
                                        'clock'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2694
                                        'calendar'
464
998161ce250d added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents: 458
diff changeset
  2695
                                        'calculator'
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2696
                                        '-'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2697
                                        'mail tool'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2698
                                        'news tool'
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2699
                                        ))
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2700
                selector:#openDemo:
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2701
                args:#(
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2702
                                        Clock 
464
998161ce250d added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents: 458
diff changeset
  2703
                                        Calendar
998161ce250d added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents: 458
diff changeset
  2704
                                        CalculatorView
450
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2705
                                        nil
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2706
                                        MailView 
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2707
                                        NewsView
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2708
                      )
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2709
                receiver:self).
6668a0aec8d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
  2710
464
998161ce250d added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents: 458
diff changeset
  2711
    "Modified: 11.4.1996 / 00:21:46 / cg"
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2712
!
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2713
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2714
setupInfoViewIn:topView 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2715
    |spc halfSpc|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2716
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2717
    spc := View viewSpacing.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2718
    infoView := Label label:'' in:topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2719
    infoView adjust:#left; borderWidth:0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2720
    infoView level:-1.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2721
    transcript superView bottomInset:(infoView height + spc).
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  2722
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2723
    infoView is3D ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2724
	halfSpc := spc // 2.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2725
    ] ifFalse:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2726
	halfSpc := 0
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2727
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2728
    infoView topInset:(infoView height negated - spc + transcript borderWidth);
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2729
	     bottomInset:halfSpc;
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2730
	     leftInset:halfSpc; 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2731
	     rightInset:halfSpc.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2732
    infoView origin:0.0 @ 1.0 corner:1.0 @ 1.0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2733
    infoView model:self; aspect:#info; labelMessage:#info.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2734
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2735
    Project notNil ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2736
	Project addDependent:self.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2737
    ]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2738
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2739
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2740
     NewLauncher open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2741
    "
93
claus
parents: 92
diff changeset
  2742
!
claus
parents: 92
diff changeset
  2743
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2744
setupMenu
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2745
    "setup the pulldown menu"
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2746
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2747
    |l s icon|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2748
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2749
    myMenu labels:(resources array:#(
379
b7adadee426a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
  2750
                                     about
b7adadee426a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
  2751
                                     file
b7adadee426a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
  2752
                                     classes
b7adadee426a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
  2753
                                     tools
b7adadee426a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
  2754
                                     projects
b7adadee426a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
  2755
                                     settings
b7adadee426a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
  2756
                                     demos
b7adadee426a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
  2757
                                     help)).
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2758
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2759
     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
  2760
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2761
    icon := self class smallAboutIcon.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2762
    icon notNil ifTrue:[
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2763
        myMenu labels at:1 put:icon.
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2764
        myMenu height:(myMenu height max:(icon height + (View viewSpacing * 2)))
93
claus
parents: 92
diff changeset
  2765
    ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2766
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2767
    myMenu selectors:#(
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2768
                                     #about
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2769
                                     #file
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2770
                                     #classes 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2771
                                     #tools 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2772
                                     #projects 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2773
                                     #settings
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2774
                                     #demos
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2775
                                     #help).
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2776
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2777
    myMenu at:#about 
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2778
           putLabels:(resources array:#(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2779
                                        'about Smalltalk/X ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2780
                                       ))
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2781
           selectors:#(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2782
                                        #about 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2783
                      )
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2784
           receiver:self.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2785
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2786
    l := #(
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2787
                'file browser'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2788
                '-'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2789
                'modules ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2790
                '-'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2791
                'snapshot ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2792
                'snapshot & exit ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2793
                'exit smalltalk ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2794
         ).
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2795
    s := #(
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2796
                #startFileBrowser
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2797
                nil
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2798
                #objectModuleDialog 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2799
                nil
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2800
                #snapshot
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2801
                #snapshotAndExit
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2802
                #exit
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2803
         ).
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2804
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2805
    myMenu at:#file
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2806
           putLabels:(resources array:l)
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2807
           selectors:s
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2808
           receiver:self.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2809
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2810
    myMenu at:#classes 
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2811
           putLabels:(resources array:#(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2812
                                        'system browser'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2813
                                        'class browser ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2814
                                        'full class browser ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2815
                                        'class hierarchy browser ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2816
                                        'class tree'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2817
                                        '-'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2818
                                        'implementors ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2819
                                        'senders ...'
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
  2820
                                        'resource ...'
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2821
                                        '-'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2822
                                        'change browser'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2823
                                        ))
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2824
           selectors:#(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2825
                                        #startSystemBrowser 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2826
                                        #startClassBrowser 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2827
                                        #startFullClassBrowser 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2828
                                        #startClassHierarchyBrowser 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2829
                                        #startClassTreeView 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2830
                                        nil
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2831
                                        #browseImplementors 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2832
                                        #browseSenders 
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
  2833
                                        #browseResources 
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2834
                                        nil
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2835
                                        #startChangesBrowser 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2836
                      )
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2837
           receiver:self.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2838
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2839
    JavaBrowser notNil ifTrue:[
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2840
        (myMenu subMenuAt:#classes)
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2841
            addLabels:(resources array:#('-' 'java browser'))
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2842
            selectors:#(nil startJavaBrowser)
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2843
            after:#startClassTreeView
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2844
    ].
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  2845
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2846
    myMenu at:#projects 
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2847
           putLabels:(resources array:#(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2848
                                        'new project'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2849
                                        '-'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2850
                                        'select project ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2851
                                        ))
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2852
           selectors:#(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2853
                                        #newProject 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2854
                                        nil
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2855
                                        #selectProject 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2856
                      )
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2857
           receiver:self.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2858
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2859
    myMenu at:#settings 
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2860
           putLabels:(resources array:#(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2861
                                        'language ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2862
                                        'show keyboard mappings ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2863
                                        'view style ...'
398
001d78a6cacd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
  2864
                                        'fonts ...'
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2865
                                        'printer ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2866
                                        'messages ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2867
                                        'compilation ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2868
                                        'object memory ...'
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  2869
                                        'screen ...'
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2870
                                        'misc ...'
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2871
                                        ))
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2872
           selectors:#(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2873
                                        #languageSetting 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2874
                                        #keyboardSetting 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2875
                                        #viewStyleSetting 
398
001d78a6cacd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
  2876
                                        #fontSettings 
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2877
                                        #printerSettings 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2878
                                        #messageSettings 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2879
                                        #compilerSettings 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2880
                                        #memorySettings 
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  2881
                                        #displaySettings 
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2882
                                        #miscSettings 
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2883
                      )
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2884
           receiver:self.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2885
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2886
    self setupToolsMenu.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2887
    self setupDemoMenu.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2888
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2889
    ActiveHelp notNil ifTrue:[
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2890
        l := #(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2891
                'ST/X documentation'
497
b2fb9ca947d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 496
diff changeset
  2892
                'class documentation'
483
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
  2893
                'index'
538
43effd124313 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  2894
                '-'
43effd124313 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  2895
                'active help \c'
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2896
              ).
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2897
        s := #(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2898
                #startDocumentationTool
496
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
  2899
                #startClassDocumentation
483
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
  2900
                #startDocumentationIndex
538
43effd124313 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  2901
                nil
43effd124313 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  2902
                #toggleActiveHelp:
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2903
              )
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2904
    ] ifFalse:[
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2905
        l := #(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2906
                'ST/X documentation'
497
b2fb9ca947d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 496
diff changeset
  2907
                'class documentation'
483
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
  2908
                'index'
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2909
              ).
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2910
        s := #(
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2911
                #startDocumentationTool
496
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
  2912
                #startClassDocumentation
483
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
  2913
                #startDocumentationIndex
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2914
              )
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2915
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2916
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2917
    myMenu at:#help 
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2918
           putLabels:(resources array:l)
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2919
           selectors:s
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2920
           receiver:self.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2921
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2922
    (ActiveHelp notNil
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2923
    and:[ActiveHelp isActive]) ifTrue:[
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2924
        (myMenu menuAt:#help) checkToggleAt:#toggleActiveHelp: put:true
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2925
    ].
377
a40d0dd88c1b added ...'s
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
  2926
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2927
    self disableDangerousMenuItemsInRemoteLauncher
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2928
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  2929
    "Modified: 5.7.1996 / 17:01:43 / cg"
93
claus
parents: 92
diff changeset
  2930
!
claus
parents: 92
diff changeset
  2931
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2932
setupOtherViewsIn:aTopView
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2933
    "a hook - allows redefinition in your personal subclass.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2934
     For example, add a clock:"
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2935
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2936
"
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2937
    |sz clock space halfSpace|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2938
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2939
    sz := buttonPanel innerHeight - (buttonPanel level abs*2).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2940
    space := View viewSpacing.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2941
    halfSpace := space // 2.
93
claus
parents: 92
diff changeset
  2942
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2943
    buttonPanel rightInset:sz+(space  * 2).
93
claus
parents: 92
diff changeset
  2944
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2945
    clock := ClockView in:buttonPanel topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2946
    clock borderWidth:1.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2947
    clock showSeconds:false.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2948
    clock extent:(sz @ sz).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2949
    clock origin:(1.0 @ (buttonPanel origin y + halfSpace)).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2950
    clock leftInset:sz negated - 2 - halfSpace.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2951
    clock rightInset:halfSpace.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2952
    clock level:1.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2953
"
93
claus
parents: 92
diff changeset
  2954
!
claus
parents: 92
diff changeset
  2955
claus
parents: 92
diff changeset
  2956
setupToolsMenu
claus
parents: 92
diff changeset
  2957
    "setup the tools pulldown menu"
claus
parents: 92
diff changeset
  2958
claus
parents: 92
diff changeset
  2959
    |m|
claus
parents: 92
diff changeset
  2960
claus
parents: 92
diff changeset
  2961
    myMenu at:#tools 
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2962
           putLabels:(resources array:#(
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2963
                                        'workspace'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2964
                                        '-'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2965
                                        'monitors'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2966
                                        '-'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2967
                                        'view tree (all views)'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2968
                                        'view tree'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2969
                                        'inspect view'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2970
                                        'destroy view'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2971
                                        '-'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2972
                                        'hardcopy'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2973
                                        '-'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2974
                                        'misc'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2975
                                        ))
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2976
           selectors:#(
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2977
                                        #startWorkspace 
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2978
                                        nil
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2979
                                        #monitors
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2980
                                        nil
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2981
                                        #startFullWindowTreeView 
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2982
                                        #startWindowTreeView 
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2983
                                        #viewInspect 
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2984
                                        #viewDestroy 
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2985
                                        nil
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2986
                                        #hardcopy 
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2987
                                        nil
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2988
                                        #misc 
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2989
                      )
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2990
           receiver:self.
93
claus
parents: 92
diff changeset
  2991
claus
parents: 92
diff changeset
  2992
claus
parents: 92
diff changeset
  2993
    m := myMenu menuAt:#tools.
claus
parents: 92
diff changeset
  2994
    m subMenuAt:#monitors 
claus
parents: 92
diff changeset
  2995
      put:(PopUpMenu
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2996
                labels:(resources array:#(
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2997
                                           'process'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2998
                                           'memory'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2999
                                           'event view'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3000
                                           'event trace'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3001
                                           '-'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3002
                                           'memory usage'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3003
                                         ))
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3004
                selectors:#(
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3005
                                        #startProcessMonitor
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3006
                                        #startMemoryMonitor 
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3007
                                        #startEventMonitor 
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3008
                                        #startStopEventTrace
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3009
                                        nil
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3010
                                        #startMemoryUsageView 
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3011
                           )
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3012
                receiver:self).
93
claus
parents: 92
diff changeset
  3013
120
claus
parents: 119
diff changeset
  3014
    m subMenuAt:#misc 
claus
parents: 119
diff changeset
  3015
      put:(PopUpMenu
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3016
                labels:(resources array:#(
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  3017
                                           'garbage collect'
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  3018
                                           'garbage collect & compress'
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  3019
                                           '-'
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3020
                                           'remove all break/trace points'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3021
                                         ))
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3022
                selectors:#(
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  3023
                                        #garbageCollect
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  3024
                                        #compressingGarbageCollect
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  3025
                                        nil
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  3026
                                        #removeAllBreakAndTracePoints                                        
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3027
                           )
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3028
                receiver:self).
120
claus
parents: 119
diff changeset
  3029
93
claus
parents: 92
diff changeset
  3030
    m subMenuAt:#hardcopy 
claus
parents: 92
diff changeset
  3031
      put:(PopUpMenu
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3032
                labels:(resources array:#(
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3033
                                           'screen'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3034
                                           'area'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3035
                                           'view'
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3036
                                         ))
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3037
                selectors:#(
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3038
                                        #fullScreenHardcopy
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3039
                                        #screenHardcopy
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3040
                                        #viewHardcopy
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3041
                           )
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3042
                receiver:self).
93
claus
parents: 92
diff changeset
  3043
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  3044
    "Modified: 12.5.1996 / 15:29:46 / cg"
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  3045
!
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  3046
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3047
setupTranscriptIn:aView 
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3048
    |v launcher|
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3049
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3050
    "/ check if this is an additional launcher on a remote display.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3051
    "/ if so, do not close the real launcher.
107
claus
parents: 106
diff changeset
  3052
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3053
    (Transcript notNil and:[Transcript ~~ Stderr]) ifTrue:[
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3054
        isMainLauncher ifTrue:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3055
            launcher := Transcript topView application
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3056
        ] ifFalse:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3057
            launcher := self class current.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3058
        ].
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3059
        launcher notNil ifTrue:[
662
b5efd05fa256 use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents: 661
diff changeset
  3060
            launcher window graphicsDevice == device ifTrue:[
661
8171aa84ae17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 660
diff changeset
  3061
                OpenLaunchers remove:launcher ifAbsent:nil.
8171aa84ae17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 660
diff changeset
  3062
                launcher window destroy.
8171aa84ae17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 660
diff changeset
  3063
            ]
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3064
        ]
110
claus
parents: 109
diff changeset
  3065
    ].
claus
parents: 109
diff changeset
  3066
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3067
    v := HVScrollableView 
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3068
                for:TextCollector
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3069
                miniScrollerH:true 
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3070
                miniScrollerV:false 
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3071
                in:aView.
93
claus
parents: 92
diff changeset
  3072
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3073
    v origin:(0.0 @ (buttonPanel corner y + View viewSpacing)) 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3074
      corner:(1.0 @ 1.0).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3075
    transcript := v scrolledView.
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3076
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3077
    isMainLauncher ifTrue:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3078
        transcript beTranscript.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3079
    ] ifFalse:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3080
        transcript showCR:'**************** Notice ***********************'.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3081
        transcript showCR:'**       this is NOT the Transcript          **'.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3082
        transcript showCR:'** The real Transcript is on the main screen **'.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3083
        transcript showCR:'**                                           **'.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3084
        transcript showCR:'** Menus affecting common state are disabled **'.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3085
        transcript showCR:'***********************************************'.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3086
    ]
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3087
662
b5efd05fa256 use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents: 661
diff changeset
  3088
    "Modified: 5.7.1996 / 17:55:15 / cg"
94
claus
parents: 93
diff changeset
  3089
!
claus
parents: 93
diff changeset
  3090
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3091
setupViewsIn:topView 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3092
    "create the pulldown menu, buttonPanel and transcript view"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3093
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3094
    |tFont|
131
claus
parents: 128
diff changeset
  3095
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3096
    topView model:self.
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3097
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3098
    myMenu := PullDownMenu in:topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3099
    myMenu origin:0.0 @ 0.0 corner:(1.0 @ myMenu height).
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3100
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3101
    self setupMenu.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3102
    self setupButtonPanelIn:topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3103
    self setupTranscriptIn:topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3104
    self setupInfoViewIn:topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3105
    self setupOtherViewsIn:topView.
118
claus
parents: 117
diff changeset
  3106
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3107
    tFont := transcript font.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3108
    topView extent:(((tFont widthOf:'3')*60) max:myMenu preferredExtent x)
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3109
		    @ 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3110
		    ((tFont height) * 20).
118
claus
parents: 117
diff changeset
  3111
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3112
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3113
     NewLauncher open
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3114
    "
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3115
! !
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3116
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3117
!NewLauncher methodsFor:'private'!
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3118
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3119
fontBoxForEncoding:encodingMatch
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3120
    |box defaultFont y b
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3121
     labelDef buttonDef listDef menuDef textDef
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3122
     models labels allOfThem filter|
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3123
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3124
    encodingMatch notNil ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3125
        filter := [:f | f encoding notNil 
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3126
                        and:[encodingMatch match:f encoding]].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3127
    ].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3128
        
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3129
    models := OrderedCollection new.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3130
    labels := OrderedCollection new.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3131
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3132
    models add:(allOfThem := nil asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3133
    models add:(labelDef := Label defaultFont asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3134
    models add:(buttonDef := Button defaultFont asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3135
    models add:(listDef := SelectionInListView defaultFont asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3136
    models add:(menuDef := MenuView defaultFont asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3137
    models add:(textDef := TextView defaultFont asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3138
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3139
    box := Dialog new.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3140
    box label:(resources string:'Font settings').
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3141
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3142
    models
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3143
    with:(resources array:#('all' 'labels' 'buttons' 'lists' 'menus' 'edit text'))
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3144
    do:[:model :title |
427
3ad00ff692b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 421
diff changeset
  3145
        |y2 lbl f i|
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3146
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3147
        f := model value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3148
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3149
        (box addTextLabel:title) adjust:#left.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3150
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3151
        y := box yPosition.
631
76013574eb04 Settings.Fonts menu: Add ... to Change button labels.
Stefan Vogel <sv@exept.de>
parents: 630
diff changeset
  3152
        b := box addComponent:(Button label:(resources string:'change ...')) tabable:true.
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3153
        b relativeExtent:nil; extent:(b preferredExtent).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3154
        y2 := box yPosition.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3155
        box yPosition:y.
427
3ad00ff692b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 421
diff changeset
  3156
        i := box leftIndent.
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3157
        box leftIndent:(b widthIncludingBorder + View viewSpacing).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3158
        (lbl := box addTextLabel:'')
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3159
            adjust:#left;
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3160
            font:(model value);
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3161
            labelChannel:(BlockValue 
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3162
                            with:[:v | |f|
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3163
                                f := v value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3164
                                f isNil ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3165
                                    ''
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3166
                                ] ifFalse:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3167
                                    f userFriendlyName
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3168
                                ]
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3169
                            ]
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3170
                            argument:model).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3171
        labels add:lbl.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3172
427
3ad00ff692b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 421
diff changeset
  3173
        box leftIndent:i.
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3174
        box yPosition:(box yPosition max:y2).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3175
        box addVerticalSpace.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3176
        box addHorizontalLine.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3177
        box addVerticalSpace.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3178
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3179
        b action:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3180
            |f|
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3181
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3182
            f := FontPanel 
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3183
                fontFromUserInitial:(model value) 
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3184
                              title:(resources string:'font for %1' with:title)
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3185
                             filter:filter.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3186
            f notNil ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3187
                model == allOfThem ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3188
                    models do:[:m | m value:f].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3189
                    labels do:[:l | l font:f]
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3190
                ] ifFalse:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3191
                    model value:f.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3192
                    lbl font:f.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3193
                ].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3194
            ]
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3195
        ].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3196
        model == allOfThem ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3197
            box addVerticalSpace
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3198
        ]
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3199
    ].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3200
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3201
    box addAbortButton; addOkButton.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3202
    (box addButton:(Button label:(resources string:'defaults')) before:nil)
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3203
        action:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3204
            "/ fetch defaults
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3205
            View updateAllStyleCaches.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3206
            labelDef value: Label defaultFont.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3207
            buttonDef value: Button defaultFont.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3208
            listDef value: SelectionInListView defaultFont.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3209
            menuDef value: MenuView defaultFont.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3210
            textDef value: TextView defaultFont.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3211
        ].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3212
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3213
    box open.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3214
    box accepted ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3215
        Label defaultFont:labelDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3216
        Button defaultFont:buttonDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3217
        Toggle defaultFont:buttonDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3218
        SelectionInListView defaultFont:listDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3219
        MenuView defaultFont:menuDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3220
        PullDownMenu defaultFont:menuDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3221
        TextView defaultFont:textDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3222
        EditTextView defaultFont:textDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3223
        CodeView defaultFont:textDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3224
    ].
592
5a03a69bc5a3 oops - menuAction is now called with arg if there is one
Claus Gittinger <cg@exept.de>
parents: 591
diff changeset
  3225
    box destroy.
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3226
    ^ box accepted
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3227
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3228
    "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
  3229
    "Modified: 30.5.1996 / 09:18:57 / cg"
631
76013574eb04 Settings.Fonts menu: Add ... to Change button labels.
Stefan Vogel <sv@exept.de>
parents: 630
diff changeset
  3230
    "Modified: 17.6.1996 / 13:38:48 / stefan"
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3231
!
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3232
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3233
pickAView
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3234
    |v|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3235
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3236
    (Delay forSeconds:1) wait.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3237
    v := Screen current viewFromUser.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3238
    v isNil ifTrue:[
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3239
	self warn:'sorry, this is not a smalltalk view'.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3240
	^ nil
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3241
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3242
    ^ v
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3243
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3244
106
claus
parents: 105
diff changeset
  3245
reopenLauncher
claus
parents: 105
diff changeset
  3246
    "for now (since style & language settings currently do
claus
parents: 105
diff changeset
  3247
     not affect living views ...)"
claus
parents: 105
diff changeset
  3248
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3249
    |contents fontPref enc fontList newDefault newLauncher|
397
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  3250
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  3251
    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
  3252
    enc := MenuView defaultFont encoding.
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  3253
    (fontPref match:enc) ifFalse:[
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  3254
        (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
  3255
        ifTrue:[
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  3256
            self fontBoxForEncoding:fontPref
397
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  3257
        ]
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  3258
    ].
106
claus
parents: 105
diff changeset
  3259
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3260
    contents := transcript endEntry; list.
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3261
    newLauncher := self class open.
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3262
    newLauncher window waitUntilVisible.
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3263
    newLauncher transcript list:contents; hideCursor; scrollToBottom; cursorToEnd; showCursor
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3264
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3265
    "Modified: 5.7.1996 / 14:00:40 / cg"
106
claus
parents: 105
diff changeset
  3266
!
claus
parents: 105
diff changeset
  3267
100
claus
parents: 99
diff changeset
  3268
saveAllViews
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3269
    "tell each topview that we are going to terminate and give it chance
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3270
     to save its contents."
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3271
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3272
    ObjectMemory changed:#aboutToExit
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3273
!
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3274
93
claus
parents: 92
diff changeset
  3275
saveScreenImage:anImage defaultName:defaultName
claus
parents: 92
diff changeset
  3276
    "save an image into a file 
claus
parents: 92
diff changeset
  3277
     - ask user for filename using a fileSelectionBox."
claus
parents: 92
diff changeset
  3278
claus
parents: 92
diff changeset
  3279
    |fileName|
claus
parents: 92
diff changeset
  3280
claus
parents: 92
diff changeset
  3281
    fileName := Dialog
382
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  3282
                    requestFileName:(resources string:'save image in:')
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  3283
                    default:(defaultName , '.tiff')
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  3284
                    ok:(resources string:'save')
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  3285
                    abort:(resources string:'cancel')
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  3286
                    pattern:'*.tiff'.
93
claus
parents: 92
diff changeset
  3287
claus
parents: 92
diff changeset
  3288
    fileName notNil ifTrue:[
382
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  3289
        anImage saveOn:fileName
93
claus
parents: 92
diff changeset
  3290
    ].
382
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  3291
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  3292
    "Modified: 21.2.1996 / 13:09:28 / cg"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3293
! !
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3294
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3295
!NewLauncher methodsFor:'queries'!
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  3296
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3297
processName
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3298
    "for monitors only - my name"
142
claus
parents: 140
diff changeset
  3299
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3300
    ^ 'ST/X Launcher'
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3301
!
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3302
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3303
transcript
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3304
    "my transcript"
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3305
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3306
    ^ transcript
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3307
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3308
    "Created: 5.7.1996 / 13:04:36 / cg"
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  3309
! !
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  3310
635
2b0ae1f2cf0e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 632
diff changeset
  3311
!NewLauncher  class methodsFor:'documentation'!
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3312
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3313
version
690
c3fb26a81b59 disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
  3314
    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.176 1996-08-02 19:05:34 cg Exp $'
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3315
! !