Launcher.st
author Claus Gittinger <cg@exept.de>
Wed, 08 Jan 1997 15:04:08 +0100
changeset 921 0189f3d732e2
parent 920 2b66e8759af5
child 922 c72dae45cf15
permissions -rw-r--r--
commenting & restructuring
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
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
     3
              All Rights Reserved
88
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
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
    13
ApplicationModel subclass:#Launcher
891
26ac48ced53b show the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 864
diff changeset
    14
	instanceVariableNames:'myMenu buttonPanel transcript infoView infoProcess helpIsOn
26ac48ced53b show the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 864
diff changeset
    15
		isMainLauncher'
915
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
    16
	classVariableNames:'CachedAboutIcon OpenLaunchers NotifyingEmergencyHandler'
891
26ac48ced53b show the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 864
diff changeset
    17
	poolDictionaries:''
26ac48ced53b show the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 864
diff changeset
    18
	category:'Interface-Smalltalk'
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
    19
!
11b4ce85104e Initial revision
claus
parents:
diff changeset
    20
760
39e3f920b233 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 743
diff changeset
    21
!Launcher 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
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
    26
              All Rights Reserved
88
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
"
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
    39
    Of course, it is possible to change the Launcher class itself
105
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.
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
    76
        All menu setup has been extracted into separate init-methods,
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
    77
        so there is often only a need to redefine one of those
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
    78
        (for example, to add your own demos, only redefine setupDemoMenu).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
    79
        To add a new master-item with its own pullDown, redefine setupMainMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
    80
        to include another selector and add the correspoonding menu there.
88
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
    81
"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    82
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    83
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    84
documentation
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    85
"
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    86
    a new launcher, combining old Launchers menu and transcript into
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    87
    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
    88
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    89
    Also, this app makes first use of the new compatibility framework;
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    90
    you will notice, that this is a subclass of ApplicationModel.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    91
    New applications will no longer be built as subclasses of standardSystemView.
511
1e00846b87e5 documentation
Claus Gittinger <cg@exept.de>
parents: 505
diff changeset
    92
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
    93
    See #customization for information regarding your own private
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
    94
    launcher functions.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
    95
511
1e00846b87e5 documentation
Claus Gittinger <cg@exept.de>
parents: 505
diff changeset
    96
    [author:]
1e00846b87e5 documentation
Claus Gittinger <cg@exept.de>
parents: 505
diff changeset
    97
        Claus Gittinger
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
    98
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
    99
    [see also:]
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   100
        Examples_misc::MyLauncher
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   101
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   102
    [start with:]
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   103
        Launcher open
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   104
"
88
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
   105
! !
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
   106
760
39e3f920b233 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 743
diff changeset
   107
!Launcher class methodsFor:'accessing'!
660
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
current
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   110
    "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
   111
     (for access via addMenu/ removeMenu)"
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   112
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   113
    OpenLaunchers do:[:aLauncher |
662
b5efd05fa256 use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents: 661
diff changeset
   114
        aLauncher window graphicsDevice == Screen current ifTrue:[
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   115
            ^ aLauncher
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   116
        ]
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   117
    ].
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   118
    ^ nil.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   119
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   120
    "
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   121
     Launcher current
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   122
    "
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   123
662
b5efd05fa256 use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents: 661
diff changeset
   124
    "Modified: 5.7.1996 / 17:55:28 / cg"
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   125
    "Modified: 9.9.1996 / 22:41:36 / stefan"
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   126
! !
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   127
760
39e3f920b233 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 743
diff changeset
   128
!Launcher class methodsFor:'defaults'!
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
   129
11b4ce85104e Initial revision
claus
parents:
diff changeset
   130
aboutIcon
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   131
    "return the icon shown in the about menu-item and used
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   132
     as ST/X about icon"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   133
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
   134
    |image|
11b4ce85104e Initial revision
claus
parents:
diff changeset
   135
11b4ce85104e Initial revision
claus
parents:
diff changeset
   136
    CachedAboutIcon notNil ifTrue:[^ CachedAboutIcon].
11b4ce85104e Initial revision
claus
parents:
diff changeset
   137
11b4ce85104e Initial revision
claus
parents:
diff changeset
   138
    image := Image fromFile:'SmalltalkX.xbm'.
92
claus
parents: 91
diff changeset
   139
    image notNil ifTrue:[
580
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   140
        |green dark|
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   141
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
   142
        Screen current hasColors ifTrue:[
580
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   143
            green := (Color red:0 green:80 blue:20) "darkened".
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   144
            dark := Color gray:10.
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   145
            image photometric:#palette.
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   146
        ] ifFalse:[
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   147
            dark := Color black.
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   148
            green := Color white.
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   149
            image photometric:#blackIs0.
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   150
        ].
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   151
        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
   152
"/        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
   153
"/            image := (Image implementorForDepth:Screen current depth) fromImage:image.
144
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   154
"/        ]
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
   155
    ].
11b4ce85104e Initial revision
claus
parents:
diff changeset
   156
    CachedAboutIcon := image.
11b4ce85104e Initial revision
claus
parents:
diff changeset
   157
    ^ image
11b4ce85104e Initial revision
claus
parents:
diff changeset
   158
11b4ce85104e Initial revision
claus
parents:
diff changeset
   159
    "
92
claus
parents: 91
diff changeset
   160
     CachedAboutIcon := nil.
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   161
     Launcher aboutIcon
92
claus
parents: 91
diff changeset
   162
    "
144
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   163
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   164
    "Modified: 9.9.1996 / 22:41:23 / stefan"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   165
    "Modified: 8.1.1997 / 15:01:30 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   166
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   167
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
   168
buttonImageSize
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   169
    "images in buttonPanel are sized to this.
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   170
     Can be redefined in subclasses to return nil (no scaling)
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   171
     or any other useful size"
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   172
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   173
    ^ 32@32
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   174
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   175
    "Modified: 19.4.1996 / 16:36:17 / cg"
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
   176
!
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
   177
915
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   178
notifyingEmergencyHandler
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   179
    "return a block (used as an emergency handler
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   180
     for exceptions), which does errorNotification before going
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   181
     into the debugger."
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   182
915
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   183
    NotifyingEmergencyHandler isNil ifTrue:[
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   184
        NotifyingEmergencyHandler := [:ex | nil errorNotify:ex errorString ]
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   185
    ].
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   186
    ^ NotifyingEmergencyHandler
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   187
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   188
    "Created: 7.1.1997 / 22:18:19 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   189
    "Modified: 8.1.1997 / 15:02:46 / cg"
915
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   190
!
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   191
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   192
smallAboutIcon
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   193
    "return the icon shown in the about menu-item"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   194
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   195
    |image|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   196
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   197
    image := self aboutIcon.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   198
    image notNil ifTrue:[
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   199
        image := image magnifiedBy:0.4.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   200
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   201
    ^ image
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   202
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   203
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   204
     CachedAboutIcon := nil.
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   205
     Launcher aboutIcon.
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   206
     Launcher smallAboutIcon.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   207
    "
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   208
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   209
    "Modified: 9.9.1996 / 22:42:12 / stefan"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   210
    "Modified: 8.1.1997 / 15:02:56 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   211
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   212
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   213
!Launcher methodsFor:'actions - about & help'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   214
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   215
about
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   216
    "show an about box"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   217
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   218
    |box|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   220
    box := AboutBox new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   221
    box autoHideAfter:10 with:[].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   222
    box showAtCenter
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   223
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   224
    "Modified: 8.1.1997 / 14:37:07 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   225
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   226
727
6d954f6e4ee2 print documentation
Claus Gittinger <cg@exept.de>
parents: 726
diff changeset
   227
showBookPrintDocument
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   228
    "open an HTML browser on the 'book'-printing document"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   229
727
6d954f6e4ee2 print documentation
Claus Gittinger <cg@exept.de>
parents: 726
diff changeset
   230
    self showDocumentation:'BOOK.html'
6d954f6e4ee2 print documentation
Claus Gittinger <cg@exept.de>
parents: 726
diff changeset
   231
6d954f6e4ee2 print documentation
Claus Gittinger <cg@exept.de>
parents: 726
diff changeset
   232
    "Modified: 31.8.1995 / 13:11:28 / claus"
6d954f6e4ee2 print documentation
Claus Gittinger <cg@exept.de>
parents: 726
diff changeset
   233
    "Created: 12.9.1996 / 01:53:30 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   234
    "Modified: 8.1.1997 / 14:42:59 / cg"
727
6d954f6e4ee2 print documentation
Claus Gittinger <cg@exept.de>
parents: 726
diff changeset
   235
!
6d954f6e4ee2 print documentation
Claus Gittinger <cg@exept.de>
parents: 726
diff changeset
   236
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   237
showDocumentation:aRelativeDocFilePath
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   238
    "open an HTML browser on some document"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   239
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   240
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   241
     although that one is not yet finished,
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   242
     its better than nothing ...
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   243
    "
555
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   244
    HTMLDocumentView notNil ifTrue:[
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   245
        "
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   246
         temporary kludge;
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   247
         not all machines can autoload binaries;
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   248
         however, on my SGI (which can) we want it
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   249
         to load automatically.
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   250
        "
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   251
        HTMLDocumentView isLoaded ifFalse:[
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   252
            ErrorSignal catch:[HTMLDocumentView autoload]
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   253
        ].
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   254
        HTMLDocumentView isLoaded ifTrue:[
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   255
            HTMLDocumentView openFullOnDocumentationFile:aRelativeDocFilePath. 
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   256
            ^ self
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   257
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   258
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   259
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   260
    self warn:'Sorry, the ST/X HTML reader is not (yet) 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   261
included in this architectures release.
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
Please use Mosaic, netscape, chimera or any
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   264
other HTML viewer to see the documentation.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   265
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   266
The documentation is found in the ''doc/online'' directory.'.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   267
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   268
    "Modified: 31.8.1995 / 13:11:08 / claus"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   269
    "Modified: 8.1.1997 / 14:42:42 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   270
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   271
733
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   272
showLicenceConditions
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   273
    "open an HTML browser on the 'LICENCE' document"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   274
860
fa31564f3072 changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents: 855
diff changeset
   275
    |lang doc|
fa31564f3072 changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents: 855
diff changeset
   276
fa31564f3072 changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents: 855
diff changeset
   277
    ((lang := Smalltalk language) = 'de'
fa31564f3072 changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents: 855
diff changeset
   278
    or:[lang = 'german']) ifTrue:[
fa31564f3072 changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents: 855
diff changeset
   279
        doc := 'german/LICENCE.STX.html'
fa31564f3072 changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents: 855
diff changeset
   280
    ] ifFalse:[
fa31564f3072 changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents: 855
diff changeset
   281
        doc := 'english/LICENCE.STX.html'
fa31564f3072 changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents: 855
diff changeset
   282
    ].
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   283
    doc := resources at:'LICENCEFILE' default:doc.
860
fa31564f3072 changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents: 855
diff changeset
   284
    self showDocumentation:('../' , doc)
739
cce1e1dab15e Licence is in german/LICENCE.STX.html.
Stefan Vogel <sv@exept.de>
parents: 738
diff changeset
   285
733
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   286
    "Created: 14.9.1996 / 12:35:00 / cg"
739
cce1e1dab15e Licence is in german/LICENCE.STX.html.
Stefan Vogel <sv@exept.de>
parents: 738
diff changeset
   287
    "Modified: 23.9.1996 / 17:03:15 / stefan"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   288
    "Modified: 8.1.1997 / 14:39:57 / cg"
733
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   289
!
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   290
496
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   291
startClassDocumentation
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   292
    "open an HTML browser on the 'classDoc/TOP' document"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   293
496
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   294
    self showDocumentation:'classDoc/TOP.html'
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   295
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   296
    "Modified: 31.8.1995 / 13:11:28 / claus"
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   297
    "Created: 22.4.1996 / 21:03:56 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   298
    "Modified: 8.1.1997 / 14:42:04 / cg"
496
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   299
!
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   300
483
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   301
startDocumentationIndex
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   302
    "open an HTML browser on the 'index' document"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   303
483
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   304
    self showDocumentation:'index.html'
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   305
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   306
    "Modified: 31.8.1995 / 13:11:28 / claus"
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   307
    "Created: 17.4.1996 / 22:08:55 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   308
    "Modified: 8.1.1997 / 14:41:23 / cg"
483
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   309
!
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   310
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   311
startDocumentationTool
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   312
    "open an HTML browser on the 'TOP' document"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   313
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   314
    self showDocumentation:'TOP.html'
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   315
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   316
    "Modified: 31.8.1995 / 13:11:28 / claus"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   317
    "Modified: 8.1.1997 / 14:41:38 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   318
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   319
776
f1a70d73582a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   320
startWhatsNewDocumentation
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   321
    "open an HTML browser on the 'whatsNew.html' document"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   322
776
f1a70d73582a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   323
    self showDocumentation:'whatsNew.html'
f1a70d73582a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   324
f1a70d73582a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   325
    "Modified: 31.8.1995 / 13:11:28 / claus"
f1a70d73582a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   326
    "Created: 18.10.1996 / 14:00:35 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   327
    "Modified: 8.1.1997 / 14:39:32 / cg"
776
f1a70d73582a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   328
!
f1a70d73582a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   329
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   330
toggleActiveHelp:aBoolean
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   331
    "turn on/off active help"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   332
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   333
    ActiveHelp notNil ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   334
        helpIsOn := aBoolean.
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   335
        helpIsOn ifTrue:[
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   336
            ActiveHelp start
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   337
        ] ifFalse:[
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   338
            ActiveHelp stop
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   339
        ]
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   340
    ].
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   341
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   342
    "Modified: 8.1.1997 / 14:37:30 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   343
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   344
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   345
!Launcher methodsFor:'actions - classes'!
219
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
browseImplementors
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   348
    "open an implementors- browser after asking for a selector"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   349
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   350
    |enterBox|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   351
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   352
    enterBox := EnterBox title:(resources at:'Browse implementors of:') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   353
    enterBox okText:(resources at:'browse').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   354
    enterBox action:[:selectorName |
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   355
        |cls|
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   356
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   357
        self withWaitCursorDo:[SystemBrowser browseImplementorsOf:selectorName]  
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   358
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   359
    enterBox showAtPointer
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   360
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   361
    "Modified: 8.1.1997 / 14:44:09 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   362
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   363
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   364
browseResources
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   365
    "open a resource- browser after asking for a resource string"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   366
589
ce36a65f07a1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
   367
    |enterBox t|
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   368
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   369
    enterBox := EnterBox title:(resources at:'Resource symbol (nil for any):') withCRs.
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   370
    enterBox okText:(resources at:'browse').
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   371
    enterBox action:[:resourceName |
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   372
        |rsc|
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   373
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   374
        (resourceName isNil or:[resourceName isEmpty]) ifTrue:[
589
ce36a65f07a1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
   375
            t := 'methods with any resource'.
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   376
            rsc := nil
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   377
        ] ifFalse:[
589
ce36a65f07a1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
   378
            t := 'methods with ' , resourceName , '-resource'.
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   379
            rsc := resourceName asSymbolIfInterned.
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   380
        ].
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   381
        self withWaitCursorDo:[
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   382
            SystemBrowser browseForResource:rsc
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   383
                          in:(Smalltalk allClasses)
589
ce36a65f07a1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
   384
                          title:t
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   385
        ]  
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   386
    ].
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   387
    enterBox showAtPointer
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   388
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   389
    "Created: 28.5.1996 / 13:15:16 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   390
    "Modified: 8.1.1997 / 14:44:41 / cg"
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   391
!
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   392
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   393
browseSenders
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   394
    "open a senders- browser after asking for a selector"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   395
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   396
    |enterBox|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   397
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   398
    enterBox := EnterBox title:(resources at:'Browse senders of:') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   399
    enterBox okText:(resources at:'browse').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   400
    enterBox action:[:selectorName |
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   401
        |cls|
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   402
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   403
        self withWaitCursorDo:[SystemBrowser browseAllCallsOn:selectorName]  
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   404
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   405
    enterBox showAtPointer
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   406
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   407
    "Modified: 8.1.1997 / 14:46:46 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   408
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   409
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   410
startChangesBrowser
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   411
    "open a changebrowser"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   412
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   413
    self withWaitCursorDo:[ChangesBrowser open]
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   414
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   415
    "Modified: 8.1.1997 / 14:47:07 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   416
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   417
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   418
startClassBrowser
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   419
    "open a classBrowser; asks for class"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   420
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   421
    SystemBrowser askThenBrowseClass
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   422
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   423
    "Modified: 8.1.1997 / 14:48:16 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   424
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   425
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   426
startClassHierarchyBrowser
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   427
    "open a classHierarchyBrowser; asks for class"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   428
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   429
    SystemBrowser askThenBrowseClassHierarchy
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   430
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   431
    "Modified: 8.1.1997 / 14:48:28 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   432
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   433
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   434
startClassTreeView
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   435
    "open a classHierarchyTree view"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   436
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   437
    self withWaitCursorDo:[ClassTreeGraphView open]
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   438
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   439
    "Modified: 8.1.1997 / 14:48:38 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   440
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   441
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   442
startFileBrowser
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   443
    "open a fileBrowser"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   444
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   445
    self withWaitCursorDo:[FileBrowser open]
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   446
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   447
    "Modified: 8.1.1997 / 14:48:47 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   448
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   449
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   450
startFullClassBrowser
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   451
    "open a fullClass systemBrowser; asks for class"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   452
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   453
    SystemBrowser askThenBrowseFullClassProtocol
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   454
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   455
    "Modified: 8.1.1997 / 14:48:06 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   456
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   457
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   458
startJavaBrowser
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   459
    "open a javaBrowser (not included in the standard distribution)"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   460
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   461
    JavaBrowser notNil ifTrue:[
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   462
        self withWaitCursorDo:[JavaBrowser open]
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   463
    ]
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   464
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   465
    "Created: 18.4.1996 / 15:55:44 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   466
    "Modified: 8.1.1997 / 14:47:31 / cg"
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   467
!
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   468
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   469
startSystemBrowser
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   470
    "open a systemBrowser"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   471
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   472
    self withWaitCursorDo:[SystemBrowser open]
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   473
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   474
    "Modified: 8.1.1997 / 14:47:43 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   475
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   476
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   477
startWorkspace
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   478
    "open a workspace"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   479
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   480
    Workspace open
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   481
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   482
    "Modified: 8.1.1997 / 14:47:49 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   483
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   484
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   485
!Launcher methodsFor:'actions - demos'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   486
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   487
openDemo:className
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   488
    "open a demo, given its name.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   489
     Looks in both the Smalltalk- and the Demos-Namespace
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   490
     for that class."
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   491
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   492
    self openApplication:className nameSpace:Demos
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   493
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   494
    "Modified: 8.1.1997 / 14:51:02 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   495
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   496
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   497
startTetris
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   498
    "opens a tetris game"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   499
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   500
    self openDemo:'Tetris'
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   501
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   502
    "Modified: 8.1.1997 / 14:49:15 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   503
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   504
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   505
startTicTacToe
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   506
    "opens a ticTacToe game against the machine"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   507
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   508
    self openDemo:'TicTacToeGame'
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   509
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   510
    "Modified: 8.1.1997 / 14:49:37 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   511
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   512
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   513
startTicTacToe2
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   514
    "opens a 2-user ticTacToe game"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   515
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   516
    self openApplication:'TicTacToeGame' nameSpace:Demos with:#open2UserGame
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   517
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   518
    "Modified: 8.1.1997 / 14:49:29 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   519
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   520
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   521
!Launcher methodsFor:'actions - file'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   522
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   523
exit
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   524
    "stop ST/X - after asking for confirmation"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   525
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   526
    (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
   527
    ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   528
        self saveAllViews.
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   529
        Smalltalk exit
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   530
    ]
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   531
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   532
    "Modified: 8.1.1997 / 14:50:00 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   533
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   534
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   535
objectModuleDialog
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   536
    "opens a moduleInfo dialog"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   537
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   538
    |allModules moduleNames
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   539
     allObjects methodObjects methodNames 
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
   540
     cObjects cObjectNames
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   541
     otherObjects otherObjectNames
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   542
     box l handles unloadButton
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   543
     list1 list2 listView1 listView2
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   544
     y panel 
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   545
     showBuiltIn showModules showMethods showCObjects showOthers
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   546
     moduleListUpdater check canDoIt menu|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   547
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   548
    showBuiltIn := true asValue. 
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   549
    canDoIt := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   550
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   551
    showModules := canDoIt asValue. 
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   552
    showMethods := canDoIt asValue.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   553
    showCObjects := canDoIt asValue.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   554
    showOthers := canDoIt asValue.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   555
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
   556
    list1 := SelectionInList new.
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
   557
    list2 := SelectionInList new.
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
   558
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
   559
    moduleListUpdater := [
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   560
            |l|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   561
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   562
            list2 list:nil.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   563
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   564
            l := Array new.
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   565
            handles := Array new.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   566
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   567
            (showModules value or:[showBuiltIn value]) ifTrue:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   568
                allModules := ObjectMemory binaryModuleInfo asOrderedCollection.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   569
                (showBuiltIn value and:[showModules value]) ifFalse:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   570
                    allModules := allModules select:[:i |
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   571
                        |wantToSee|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   572
821
a81a0fb108d0 changes for new moduleInfo reply
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   573
                        wantToSee := i dynamic.
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   574
                        showBuiltIn value ifTrue:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   575
                            wantToSee := wantToSee not
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   576
                        ].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   577
                        wantToSee
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   578
                    ]
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   579
                ].
821
a81a0fb108d0 changes for new moduleInfo reply
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   580
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   581
                "/ sorting by reverse id brings newest ones to the top (a side effect)
821
a81a0fb108d0 changes for new moduleInfo reply
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   582
                allModules sort:[:a :b | (a id) > (b id)].
a81a0fb108d0 changes for new moduleInfo reply
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   583
                moduleNames := allModules collect:[:entry | entry name].
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   584
                l := l , moduleNames.
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   585
                handles := handles , allModules.
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   586
            ].
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   587
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   588
            showMethods value ifTrue:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   589
                allObjects := ObjectFileLoader loadedObjectHandles.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   590
                methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   591
                methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   592
                                                                'compiled method - removed' , ' (in ' , mH pathName , ')'
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   593
                                                            ] ifFalse:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   594
                                                                'compiled method ' , mH method whoString , ' (in ' , mH pathName , ')'
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   595
                                                            ].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   596
                                                     ].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   597
                l := l , methodNames.
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   598
                handles := handles , methodObjects.
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   599
            ].
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   600
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   601
            showCObjects value ifTrue:[
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   602
                allObjects := ObjectFileLoader loadedObjectHandles.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   603
                cObjects := (allObjects select:[:h | h isFunctionObjectHandle]) asArray.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   604
                cObjectNames := cObjects collect:[:entry | entry pathName].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   605
                l := l , cObjectNames.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   606
                handles := handles , cObjects.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   607
            ].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   608
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   609
            showOthers value ifTrue:[
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   610
                allObjects := ObjectFileLoader loadedObjectHandles.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   611
                otherObjects := (allObjects select:[:h | (h isFunctionObjectHandle
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   612
                                                         or:[h isMethodHandle
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   613
                                                         or:[h isClassLibHandle]]) not]) asArray.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   614
                otherObjectNames := otherObjects collect:[:entry | entry pathName].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   615
                l := l , otherObjectNames.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   616
                handles := handles , otherObjects.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   617
            ].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   618
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   619
            list1 list:l.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   620
            unloadButton disable.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   621
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   622
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
   623
    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
   624
    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
   625
    showMethods onChangeSend:#value to:moduleListUpdater.
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   626
    showCObjects onChangeSend:#value to:moduleListUpdater.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   627
    showOthers onChangeSend:#value to:moduleListUpdater.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   628
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   629
    box := Dialog new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   630
    box label:(resources string:'Module dialog').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   631
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   632
    listView1 := HVScrollableView for:SelectionInListView miniScrollerH:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   633
    listView1 model:list1.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   634
    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
   635
    listView1 action:[:sel |
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   636
        |info classNames tabs module|
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   637
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   638
        listView1 middleButtonMenu:nil.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   639
467
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   640
        box withWaitCursorDo:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   641
            |nm fileName addr entry1 entry2 entry3 method|
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   642
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   643
            tabs := TabulatorSpecification unit:#inch positions:#(0 2.6).
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   644
467
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   645
            (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
   646
                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
   647
            ].
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   648
            info isNil ifTrue:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   649
                "/ selected a method, cObject or unknown
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   650
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   651
                module := handles at:sel.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   652
                fileName := module pathName.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   653
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   654
                module isMethodHandle ifTrue:[
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   655
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   656
                    (method := module method) isNil ifTrue:[
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   657
                        nm := '** removed **'.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   658
                    ] ifFalse:[
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   659
                        menu := PopUpMenu
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   660
                                    labels:#('inspect' 'browse')
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   661
                                    selectors:#(inspect browse).
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   662
                        menu actionAt:#inspect put:[ method inspect ].
827
c74f542ba50b use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 821
diff changeset
   663
                        menu actionAt:#browse put:[ |who|
c74f542ba50b use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 821
diff changeset
   664
                                                    who := method who.
c74f542ba50b use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 821
diff changeset
   665
                                                    SystemBrowser 
c74f542ba50b use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 821
diff changeset
   666
                                                        openInClass:(who methodClass) 
c74f542ba50b use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 821
diff changeset
   667
                                                        selector:(who methodSelector) 
c74f542ba50b use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 821
diff changeset
   668
                                                  ].
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   669
                        listView1 middleButtonMenu:menu.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   670
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   671
                        nm := (method whoString) asText emphasizeAllWith:(#color->Color blue).
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   672
                    ].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   673
                    entry1 := MultiColListEntry new:2 tabulatorSpecification:tabs.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   674
                    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
   675
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   676
                    entry2 := MultiColListEntry new:2 tabulatorSpecification:tabs.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   677
                    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
   678
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   679
                    entry3 := MultiColListEntry new:2 tabulatorSpecification:tabs.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   680
                    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
   681
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   682
                    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
   683
                ] ifFalse:[
673
c227d07d31bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 672
diff changeset
   684
                    (module isFunctionObjectHandle 
c227d07d31bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 672
diff changeset
   685
                    and:[module functions notEmpty]) ifTrue:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   686
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   687
                        menu := PopUpMenu
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   688
                                    labels:#('inspect')
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   689
                                    selectors:#(inspect).
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   690
                        menu actionAt:#inspect put:[ module functions inspect  ].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   691
                        listView1 middleButtonMenu:menu.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   692
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   693
                        list2 list:((module functions select:[:f | f notNil])
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   694
                                        collect:[:f | |entry|
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   695
                                                        entry := MultiColListEntry new:2 tabulatorSpecification:tabs.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   696
                                                        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
   697
                                                        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
   698
                                                        entry
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   699
                                                ]).
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   700
                    ] ifFalse:[
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   701
                        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
   702
                    ]
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   703
                ].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   704
                
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   705
                unloadButton enable.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   706
            ] ifFalse:[
467
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   707
                "/ selected a package
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   708
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   709
                "/ 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
   710
821
a81a0fb108d0 changes for new moduleInfo reply
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   711
                classNames := info classNames asSortedCollection.
467
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   712
                classNames := classNames collect:[:cName |
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   713
                                |cls entry rev listEntry|
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   714
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   715
                                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
   716
                                listEntry colAt:1 put:cName.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   717
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   718
                                cls := Smalltalk classNamed:cName.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   719
                                cls isNil ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   720
                                    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
   721
                                ] ifFalse:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   722
                                    rev := cls binaryRevision.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   723
                                    rev notNil ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   724
                                        cls isLoaded ifFalse:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   725
                                            entry := '(stub for: ' , rev.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   726
                                        ] ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   727
                                            entry :='(bin: ' , rev.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   728
                                        ].    
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   729
                                        cls revision ~= rev ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   730
                                            entry := entry , ' / src: ' , cls revision    
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   731
                                        ].
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   732
                                        listEntry colAt:2 put:entry , ')'
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   733
                                    ] ifFalse:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   734
                                       cls revision notNil ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   735
                                            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
   736
                                       ]
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   737
                                    ]
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   738
                                ].
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   739
                                listEntry
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   740
                              ].
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   741
                list2 list:classNames.
821
a81a0fb108d0 changes for new moduleInfo reply
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   742
                info dynamic ifTrue:[
467
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   743
                    unloadButton enable.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   744
                ] ifFalse:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   745
                    unloadButton disable.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   746
                ].
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   747
            ]
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   748
        ]
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   749
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   750
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   751
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   752
    panel := HorizontalPanelView new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   753
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   754
    panel add:(l := Label label:'show:').
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   755
    l adjust:#left; borderWidth:0.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   756
    panel add:(check := CheckBox label:'builtin' model:showBuiltIn).
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   757
    box makeTabable:check.
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   758
    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
   759
    canDoIt ifFalse:[
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   760
        check disable
690
c3fb26a81b59 disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   761
    ] ifTrue:[
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   762
        box makeTabable:check.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   763
    ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   764
    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
   765
    canDoIt ifFalse:[
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   766
        check disable
690
c3fb26a81b59 disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   767
    ] ifTrue:[
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   768
        box makeTabable:check.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   769
    ].
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   770
    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
   771
    canDoIt ifFalse:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   772
        check disable
690
c3fb26a81b59 disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   773
    ] ifTrue:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   774
        box makeTabable:check.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   775
    ].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   776
    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
   777
    canDoIt ifFalse:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   778
        check disable
690
c3fb26a81b59 disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   779
    ] ifTrue:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   780
        box makeTabable:check.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   781
    ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   782
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   783
    panel horizontalLayout:#fitSpace.
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   784
    "/ panel horizontalLayout:#leftSpace.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   785
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   786
    box addComponent:panel tabable:false.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   787
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   788
    box addVerticalSpace.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   789
    box addComponent:listView1 tabable:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   790
    listView1 topInset:(View viewSpacing + panel preferredExtent y).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   791
    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
   792
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   793
    l := box addTextLabel:(resources string:'contained classes/subsets:').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   794
    l adjust:#left; borderWidth:0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   795
    l origin:0.0@0.4 corner:1.0@0.4.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   796
    l topInset:(View viewSpacing).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   797
    l bottomInset:((l preferredExtent y) negated - View viewSpacing).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   798
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   799
    listView2 := HVScrollableView for:SelectionInListView  miniScrollerH:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   800
    listView2 model:list2; printItems:false.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   801
    box addComponent:listView2 tabable:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   802
    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
   803
    listView2 disable.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   804
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   805
    unloadButton := Button label:(resources string:'unload').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   806
    unloadButton action:[
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   807
        self withWaitCursorDo:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   808
            box withWaitCursorDo:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   809
                |info idx pathName|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   810
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   811
                idx := list1 selectionIndex.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   812
                info := allModules at:idx ifAbsent:nil.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   813
672
9e8c6ef412b1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   814
                list1 selectionIndex:nil.
9e8c6ef412b1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   815
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   816
                info isNil ifTrue:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   817
                    "/ selected a method
740
95ef743fb8aa fixed unload of method-modules
Claus Gittinger <cg@exept.de>
parents: 739
diff changeset
   818
                    "/ idx := idx - allModules size.
672
9e8c6ef412b1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   819
                    pathName := (handles at:idx) pathName.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   820
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   821
                ] ifFalse:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   822
                    "/ selected a package
821
a81a0fb108d0 changes for new moduleInfo reply
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   823
                    pathName := info pathName.
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   824
                ].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   825
                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
   826
                moduleListUpdater value.
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   827
                unloadButton disable.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   828
            ]
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   829
        ]
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   830
    ].
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
   831
    moduleListUpdater value.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   832
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   833
    box addButton:unloadButton.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   834
    box addAbortButtonLabelled:(resources string:'close').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   835
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   836
    y := box yPosition.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   837
    listView2 topInset:(l preferredExtent y + 5).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   838
    listView2 bottomInset:(box preferredExtent y - y).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   839
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   840
"/    box width:(400 min:(box device width * 2 // 3)); 
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   841
"/        height:(450 min:(box device height - 50)); 
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   842
"/        sizeFixed:true.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   843
    box open.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   844
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
   845
    box destroy.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   846
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   847
    "Modified: 17.9.1995 / 16:47:50 / claus"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   848
    "Modified: 8.1.1997 / 14:50:15 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   849
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   850
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   851
snapshot
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   852
    "saves a snapshot image, after asking for a fileName"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   853
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   854
    |fileName|
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   855
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   856
    fileName := DialogBox
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   857
                    request:(resources at:'filename for image:') withCRs
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   858
              initialAnswer:(ObjectMemory nameForSnapshot) 
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   859
                    okLabel:(resources at:'save')
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   860
                      title:(resources string:'save image')
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   861
                   onCancel:nil.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   862
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   863
    fileName notNil ifTrue:[
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   864
        self showCursor:Cursor write.
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   865
        [
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   866
            (ObjectMemory snapShotOn:fileName) ifFalse:[
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   867
                "
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   868
                 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
   869
                "
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   870
                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
   871
            ]
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   872
        ] valueNowOrOnUnwindDo:[
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   873
            self restoreCursors.
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   874
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   875
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   876
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   877
    "Modified: 8.1.1997 / 14:50:29 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   878
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   879
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   880
snapshotAndExit
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   881
    "saves a snapshot image and exits, after asking for a fileName"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   882
590
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   883
    |fileName ok|
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   884
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   885
    fileName := DialogBox
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   886
                    request:(resources at:'filename for image:') withCRs
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   887
              initialAnswer:(ObjectMemory nameForSnapshot) 
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   888
                    okLabel:(resources at:'save & exit')
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   889
                      title:(resources string:'save image & exit')
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   890
                   onCancel:nil.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   891
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   892
    fileName notNil ifTrue:[
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   893
        self showCursor:Cursor write.
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   894
        [
590
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   895
            ok := ObjectMemory snapShotOn:fileName.
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   896
        ] valueNowOrOnUnwindDo:[
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   897
            self restoreCursors.
590
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   898
        ].
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   899
590
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   900
        ok ifFalse:[
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   901
            "
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   902
             snapshot failed for some reason (disk full, no permission etc.)
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   903
             Do NOT exit in this case.
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   904
            "
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   905
            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
   906
        ] ifTrue:[
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   907
            "
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   908
             saveAllViews tells all views to shutdown neatly 
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   909
             (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
   910
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   911
             This is NOT required - all data should be in the snapshot ...
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   912
             ... however, if remote disks/mountable filesystems are involved,
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   913
             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
   914
             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
   915
            "
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   916
"
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   917
            self saveAllViews.
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   918
"
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   919
            Smalltalk exit
404
4960628225e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 403
diff changeset
   920
        ]
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   921
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   922
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   923
    "Modified: 8.1.1997 / 14:50:36 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   924
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   925
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   926
!Launcher methodsFor:'actions - goodies'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   927
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   928
openGoodie:className
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   929
    "open a goodie, given its name.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   930
     Looks in both the Smalltalk- and the Goodies-Namespace
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   931
     for that class."
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   932
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   933
    self openApplication:className nameSpace:Goodies
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   934
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   935
    "Modified: 8.1.1997 / 14:51:18 / cg"
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   936
!
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   937
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   938
startCalendar
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   939
    "open a calendar goodie"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   940
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   941
    self openGoodie:'Calendar'
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   942
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   943
    "Modified: 8.1.1997 / 14:51:29 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   944
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   945
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   946
startClock
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   947
    "open a clock goodie"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   948
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   949
    self openGoodie:'RoundClock'
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   950
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   951
    "Modified: 8.1.1997 / 14:51:34 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   952
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   953
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   954
startMailTool
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   955
    "open a mailView goodie"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   956
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   957
    self openGoodie:'MailView'
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   958
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   959
    "Modified: 8.1.1997 / 14:51:42 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   960
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   961
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   962
startNewsTool
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   963
    "open a newsTool goodie"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   964
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   965
    self openGoodie:'NewsView'
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   966
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   967
    "Modified: 8.1.1997 / 14:51:48 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   968
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   969
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   970
!Launcher methodsFor:'actions - projects'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   971
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   972
newProject 
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   973
    "creates a new project & opens a projectView for it"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   974
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   975
    Project notNil ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   976
        (ProjectView for:(Project new)) open
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   977
    ]
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   978
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   979
    "Modified: 8.1.1997 / 14:52:07 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   980
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   981
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   982
selectProject
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   983
    "asks for and switch to another project"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   984
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   985
    |list box|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   986
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   987
    Project notNil ifTrue:[
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   988
        list := Project allInstances.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   989
        box := ListSelectionBox new.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   990
        box list:(list collect:[:p | p name]).
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   991
        box title:(resources string:'select a project').
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   992
        box action:[:selection |
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   993
            |project|
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   994
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   995
            project := list detect:[:p | p name = selection] ifNone:[nil].
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   996
            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
   997
                transcript showCR:'no such project.'
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   998
            ] ifFalse:[
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
   999
                project showViews.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1000
                Project current:project
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1001
            ]
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1002
        ].
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1003
        box showAtPointer.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1004
        box destroy
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1005
    ]
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1006
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1007
    "Modified: 8.1.1997 / 14:52:20 / cg"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1008
! !
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1009
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  1010
!Launcher methodsFor:'actions - settings'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1011
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1012
compilerSettings
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1013
    "open a dialog on compiler related settings"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1014
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1015
    |box warnings warnSTX warnUnderscore warnOldStyle allowUnderscore immutableArrays
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1016
     warnSTXBox warnUnderscoreBox warnOldStyleBox warnCommonMistakes warnCommonMistakesBox
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1017
     stcCompilation compilationList stcCompilationOptions stcIncludes stcDefines stcOptions
833
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1018
     stcLibraries stcLibraryPath cc ccOptions historyLines catchRedefs keepSourceOptions keepSource  
780
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1019
     constantFoldingOptions constantFolding justInTimeCompilation fullSingleStep
782
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1020
     warnEnabler check component oldIndent t supportsJustInTimeCompilation y
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1021
     y2 fullLineNumbers|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1022
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1023
    warnings := Compiler warnings asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1024
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1025
    warnSTX := Compiler warnSTXSpecials asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1026
    warnUnderscore := Compiler warnUnderscoreInIdentifier asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1027
    warnOldStyle := Compiler warnOldStyleAssignment asValue.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1028
    warnCommonMistakes := Compiler warnCommonMistakes asValue.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1029
    allowUnderscore := Compiler allowUnderscoreInIdentifier asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1030
    immutableArrays := Compiler arraysAreImmutable asValue.
782
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1031
    fullLineNumbers := (Compiler lineNumberInfo == #full) asValue.
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1032
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1033
    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
  1034
    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
  1035
    constantFolding selectionIndex:3.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1036
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1037
    stcCompilationOptions := #( always default never).
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1038
    stcCompilation := SelectionInList new 
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1039
                        list:(resources array:#('always' 
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1040
                                                'primitive code only' 
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1041
                                                'never'
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1042
                                               )).
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1043
    stcCompilation selectionIndex:2.
698
64cf733533d1 dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
  1044
    (supportsJustInTimeCompilation := ObjectMemory supportsJustInTimeCompilation)
64cf733533d1 dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
  1045
    ifTrue:[
780
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1046
        justInTimeCompilation := ObjectMemory justInTimeCompilation:nil.
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1047
        fullSingleStep := ObjectMemory fullSingleStepSupport:nil.
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1048
    ] ifFalse:[
780
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1049
        justInTimeCompilation := false.
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1050
        fullSingleStep := false.
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1051
    ].
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1052
    justInTimeCompilation := justInTimeCompilation asValue.
780
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1053
    fullSingleStep := fullSingleStep asValue.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1054
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1055
    stcIncludes := Compiler stcCompilationIncludes asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1056
    stcDefines := Compiler stcCompilationDefines asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1057
    stcOptions := Compiler stcCompilationOptions asValue.
833
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1058
    ccOptions := Compiler ccCompilationOptions asValue.
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1059
    cc := Compiler ccPath asValue.
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1060
232
926e657541c9 *** empty log message ***
chrisy
parents: 230
diff changeset
  1061
    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
  1062
        (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
  1063
            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
  1064
        ].
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1065
        (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
  1066
            stcLibraryPath := t asValue.
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1067
        ]
232
926e657541c9 *** empty log message ***
chrisy
parents: 230
diff changeset
  1068
    ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1069
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1070
    catchRedefs := Class catchMethodRedefinitions asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1071
    historyLines := (HistoryManager notNil and:[HistoryManager isActive]) asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1072
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1073
    keepSourceOptions := #( keep reference absReference sourceReference discard ).
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1074
    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
  1075
    keepSource selectionIndex:1.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1076
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
  1077
    warnEnabler := [
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
  1078
              warnings value ifTrue:[
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1079
                warnSTXBox enable. 
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1080
                warnOldStyleBox enable.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1081
                warnCommonMistakesBox enable.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1082
                allowUnderscore value ifTrue:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1083
                    warnUnderscoreBox enable.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1084
                ] ifFalse:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1085
                    warnUnderscoreBox disable.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1086
                ].
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1087
              ] ifFalse:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1088
                warnSTXBox disable. 
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1089
                warnUnderscoreBox disable.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1090
                warnOldStyleBox disable.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1091
                warnCommonMistakesBox disable.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1092
              ]].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1093
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
  1094
    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
  1095
    allowUnderscore onChangeSend:#value to:warnEnabler.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1096
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1097
    box := DialogBox new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1098
    box label:(resources string:'Compiler settings').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1099
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1100
    box addCheckBox:(resources string:'catch method redefinitions') on:catchRedefs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1101
    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
  1102
    HistoryManager isNil ifTrue:[check disable].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1103
378
7e17a9941cca added ...'s
Claus Gittinger <cg@exept.de>
parents: 377
diff changeset
  1104
    box addPopUpList:(resources string:'fileIn source mode:') on:keepSource.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1105
    keepSource selectionIndex:( keepSourceOptions indexOf:(ClassCategoryReader sourceMode) ifAbsent:1).
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1106
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1107
    box addHorizontalLine.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1108
698
64cf733533d1 dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
  1109
    supportsJustInTimeCompilation ifTrue:[
64cf733533d1 dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
  1110
        component := box 
64cf733533d1 dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
  1111
                        addCheckBox:(resources string:'just in time compilation to machine code') 
64cf733533d1 dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
  1112
                        on:justInTimeCompilation.
780
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1113
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1114
        component := box 
783
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1115
                        addCheckBox:(resources string:'detailed single step support') 
780
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1116
                        on:fullSingleStep.
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1117
698
64cf733533d1 dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
  1118
        box addHorizontalLine.
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1119
    ].
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1120
232
926e657541c9 *** empty log message ***
chrisy
parents: 230
diff changeset
  1121
    ObjectFileLoader notNil ifTrue:[
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1122
        compilationList := box addPopUpList:(resources string:'stc compilation to machine code') on:stcCompilation.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1123
        stcCompilation selectionIndex:( stcCompilationOptions indexOf:(Compiler stcCompilation) ifAbsent:2).
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1124
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1125
        component := box 
833
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1126
                        addLabelledInputField:(resources string:'include directories:')
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1127
                        adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1128
                        on:stcIncludes 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1129
                        tabable:true
783
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1130
                        separateAtX:0.3.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1131
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1132
        component preferredExtent:(250 @ component preferredExtent y).
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1133
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1134
"/        box addVerticalSpace.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1135
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1136
        component := box 
833
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1137
                        addLabelledInputField:(resources string:'defines:')
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1138
                        adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1139
                        on:stcDefines 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1140
                        tabable:true
783
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1141
                        separateAtX:0.3.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1142
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1143
        component preferredExtent:(250 @ component preferredExtent y).
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1144
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1145
"/        box addVerticalSpace.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1146
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1147
        component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1148
                        addLabelledInputField:(resources string:'stc options:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1149
                        adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1150
                        on:stcOptions 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1151
                        tabable:true
783
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1152
                        separateAtX:0.3.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1153
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1154
        component preferredExtent:(250 @ component preferredExtent y).
688
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1155
833
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1156
"/        box addVerticalSpace.
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1157
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1158
        component := box 
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1159
                        addLabelledInputField:(resources string:'cc command:')
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1160
                        adjust:#right
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1161
                        on:cc 
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1162
                        tabable:true
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1163
                        separateAtX:0.3.
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1164
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1165
        component preferredExtent:(250 @ component preferredExtent y).
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1166
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1167
        component := box 
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1168
                        addLabelledInputField:(resources string:'cc options:')
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1169
                        adjust:#right
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1170
                        on:ccOptions 
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1171
                        tabable:true
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1172
                        separateAtX:0.3.
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1173
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1174
        component preferredExtent:(250 @ component preferredExtent y).
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1175
688
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1176
        stcLibraries notNil ifTrue:[
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1177
"/            box addVerticalSpace.
688
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1178
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1179
            component := box 
833
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1180
                            addLabelledInputField:(resources string:'C-libraries:')
688
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1181
                            adjust:#right
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1182
                            on:stcLibraries 
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1183
                            tabable:true
783
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1184
                            separateAtX:0.3.
688
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1185
            component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1186
            component preferredExtent:(250 @ component preferredExtent y).
688
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1187
        ].
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1188
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1189
        stcLibraryPath notNil ifTrue:[
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1190
"/            box addVerticalSpace.
688
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1191
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1192
            component := box 
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1193
                            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
  1194
                            adjust:#right
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1195
                            on:stcLibraryPath 
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1196
                            tabable:true
783
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1197
                            separateAtX:0.3.
688
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1198
            component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1199
            component preferredExtent:(250 @ component preferredExtent y).
688
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1200
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1201
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1202
"/        box addVerticalSpace.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1203
        box addHorizontalLine.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1204
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1205
        "/ if there is no compiler around,
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1206
        "/ change to compile nothing, and disable the checkBoxes
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1207
        Compiler canCreateMachineCode ifFalse:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1208
            stcCompilation selectionIndex:3.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1209
            compilationList disable.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1210
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1211
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1212
783
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1213
    y := box yPosition.
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1214
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1215
"/    box addVerticalSpace.
782
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1216
    component := box addCheckBox:(resources string:'allow underscore in identifiers') on:allowUnderscore.
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1217
    component width:0.4.
783
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1218
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1219
"/    box addVerticalSpace.
782
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1220
    component := box addCheckBox:(resources string:'literal arrays are immutable') on:immutableArrays.
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1221
    component width:0.4.
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1222
    y2 := box yPosition.
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1223
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1224
    box yPosition:y.
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1225
    box leftIndent:0.
783
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1226
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1227
    component :=box addPopUpList:(resources string:'constant folding:') on:constantFolding.
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1228
    component superView left:0.5; width:0.5.
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1229
    constantFolding selectionIndex:( constantFoldingOptions indexOf:(Compiler foldConstants) ifAbsent:1).
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1230
782
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1231
    component := box addCheckBox:(resources string:'full lineNumber info') on:fullLineNumbers.
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1232
    component left:0.5; width:0.4.
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1233
    box yPosition:(box yPosition max:y2).
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1234
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1235
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1236
    box addHorizontalLine.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1237
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1238
    box addCheckBox:(resources string:'warnings') on:warnings.
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1239
"/    box addVerticalSpace.
343
569baf25f549 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 342
diff changeset
  1240
    oldIndent := box leftIndent.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1241
    box leftIndent:30.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1242
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1243
    y := box yPosition.
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1244
760
39e3f920b233 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 743
diff changeset
  1245
    warnSTXBox := box addCheckBox:(resources string:'ST/X extensions') on:warnSTX.
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1246
    warnSTXBox width:0.4.
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1247
"/    box addVerticalSpace.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1248
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1249
    warnUnderscoreBox := box addCheckBox:(resources string:'underscores in identifiers') on:warnUnderscore.
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1250
    warnUnderscoreBox width:0.4.
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1251
"/    box addVerticalSpace.
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1252
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1253
    box yPosition:y.
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1254
    box leftIndent:0.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1255
    warnOldStyleBox := box addCheckBox:(resources string:'oldStyle assignment') on:warnOldStyle.
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1256
    warnOldStyleBox left:0.5; width:0.4.
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1257
"/    box addVerticalSpace.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1258
679
c9613b350e05 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1259
    warnCommonMistakesBox := box addCheckBox:(resources string:'common mistakes') on:warnCommonMistakes.
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1260
    warnCommonMistakesBox left:0.5; width:0.4.
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1261
"/    box addVerticalSpace.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1262
343
569baf25f549 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 342
diff changeset
  1263
    box leftIndent:oldIndent.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1264
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1265
    box 
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  1266
        addHelpButtonFor:'Launcher/compilerSettings.html';
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1267
        addAbortButton; 
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1268
        addOkButton.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1269
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
  1270
    warnEnabler value.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1271
    box open.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1272
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1273
    box accepted ifTrue:[
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1274
        HistoryManager notNil ifTrue:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1275
            historyLines value ifTrue:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1276
                HistoryManager activate
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1277
            ] ifFalse:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1278
                HistoryManager deactivate
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1279
            ].
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1280
        ].
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1281
        Class catchMethodRedefinitions:catchRedefs value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1282
        ClassCategoryReader sourceMode:(keepSourceOptions at:keepSource selectionIndex).
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1283
        Compiler warnings:warnings value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1284
        Compiler warnSTXSpecials:warnSTX value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1285
        Compiler warnOldStyleAssignment:warnOldStyle value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1286
        Compiler warnUnderscoreInIdentifier:warnUnderscore value.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1287
        Compiler warnCommonMistakes:warnCommonMistakes value.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1288
        Compiler allowUnderscoreInIdentifier:allowUnderscore value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1289
        Compiler arraysAreImmutable:immutableArrays value.
782
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1290
        fullLineNumbers value ifTrue:[
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1291
            Compiler lineNumberInfo:#full.
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1292
        ] ifFalse:[
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1293
            Compiler lineNumberInfo:true
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1294
        ].
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1295
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1296
        Compiler stcCompilation:(stcCompilationOptions at:stcCompilation selectionIndex).
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1297
        Compiler stcCompilationIncludes:stcIncludes value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1298
        Compiler stcCompilationDefines:stcDefines value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1299
        Compiler stcCompilationOptions:stcOptions value.
833
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1300
        Compiler ccCompilationOptions:ccOptions value.
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1301
        Compiler ccPath:cc value.
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1302
        Compiler foldConstants:(constantFoldingOptions at:constantFolding selectionIndex).
700
23bc1eb02ac9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
  1303
698
64cf733533d1 dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
  1304
        supportsJustInTimeCompilation ifTrue:[
700
23bc1eb02ac9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
  1305
            justInTimeCompilation value ifTrue:[
23bc1eb02ac9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
  1306
                Method allInstancesDo:[:m | m checked:false].
23bc1eb02ac9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
  1307
            ].
698
64cf733533d1 dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
  1308
            ObjectMemory justInTimeCompilation:justInTimeCompilation value.
780
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1309
            ObjectMemory fullSingleStepSupport:fullSingleStep value.
698
64cf733533d1 dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
  1310
        ].
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1311
        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
  1312
            stcLibraries notNil ifTrue:[
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1313
                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
  1314
            ].
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1315
            stcLibraryPath notNil ifTrue:[
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1316
                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
  1317
            ]
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1318
        ]
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1319
    ].
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1320
    box destroy
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1321
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1322
    "Modified: 10.9.1995 / 19:19:18 / claus"
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  1323
    "Modified: 9.9.1996 / 22:42:47 / stefan"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1324
    "Modified: 8.1.1997 / 14:52:36 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1325
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1326
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1327
displaySettings
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1328
    "open a dialog on display related settings"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1329
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1330
    |box 
614
561229d704f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 608
diff changeset
  1331
     sizes sizeNames sizeList sizeX sizeY deepIcons
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  1332
     isColorMonitor useFixPalette idx ditherStyles ditherSyms ditherList
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  1333
     y component screen visual|
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1334
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1335
    sizeNames := #(
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1336
                        '9''    (212mm x 160mm) GAS plasma/LCD'
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1337
                        '11.3'' (235mm x 175mm) LCD'
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1338
                        '16''   (275mm x 208mm)'
636
12296c4a31b9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 635
diff changeset
  1339
                        '17''   (315mm x 245mm) SUN ELC'
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1340
                        '17''   (325mm x 245mm)'
635
2b0ae1f2cf0e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 632
diff changeset
  1341
                        '19''   (340mm x 270mm) (NCD)'
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1342
                        '20''   (350mm x 280mm) (SGI)'
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1343
                        '21''   (365mm x 285mm) (Eizo / Nanao)'
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1344
                       ).
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1345
    sizes := #(      (212 160)
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1346
                     (235 175)
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1347
                     (275 208)
636
12296c4a31b9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 635
diff changeset
  1348
                     (315 245)
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1349
                     (325 245)
635
2b0ae1f2cf0e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 632
diff changeset
  1350
                     (340 270)
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1351
                     (350 280)
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1352
                     (365 285)
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1353
                   ).
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1354
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1355
    screen := Screen current.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1356
    visual := screen visualType.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1357
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1358
    isColorMonitor := screen hasColors asValue.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1359
    deepIcons := screen supportsDeepIcons asValue.
670
7c958acbc5e8 fixColor and ditherColor stuff moved from Color
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
  1360
    useFixPalette := screen fixColors notNil asValue.
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1361
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1362
    sizeList := SelectionInList with:sizeNames.
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1363
    sizeX := screen widthInMillimeter asValue.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1364
    sizeY := screen heightInMillimeter asValue.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1365
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1366
    ditherList := SelectionInList with:sizeNames.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1367
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1368
    (visual == #StaticGray or:[visual == #GrayScale]) ifTrue:[
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1369
        ditherStyles := #('threshold' 'ordered dither' 'error diffusion').
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1370
        ditherSyms := #(threshold ordered floydSteinberg).
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1371
    ] ifFalse:[
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1372
        visual ~~ #TrueColor ifTrue:[
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1373
            ditherStyles := #('nearest color' 'error diffusion').
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1374
            ditherSyms := #(ordered floydSteinberg).
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1375
        ]
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1376
    ].
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1377
    ditherSyms notNil ifTrue:[    
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1378
        ditherList list:ditherStyles.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1379
        ditherList selectionIndex:(ditherSyms indexOf:(Image ditherAlgorithm) ifAbsent:#threshold).
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1380
    ].
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1381
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1382
    box := DialogBox new.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1383
    box label:(resources string:'Display screen settings').
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1384
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1385
    (box addTextLabel:(resources string:'Actual visible screen area:'))
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1386
        adjust:#left.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1387
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1388
    (box addPopUpList:(resources string:'common sizes:') on:sizeList)
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1389
        label:'monitor size'.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1390
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1391
    idx := sizes findFirst:[:entry |
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1392
                                ((entry at:1) = sizeX value)
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1393
                                and:[((entry at:2) = sizeY value)]
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1394
                           ].
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1395
    idx ~~ 0 ifTrue:[
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1396
        sizeList selectionIndex:idx
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1397
    ].
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1398
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1399
    sizeList onChangeSend:#value to:[
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1400
                                        |idx|
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1401
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1402
                                        idx := sizeList selectionIndex.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1403
                                        sizeX value:((sizes at:idx) at:1).
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1404
                                        sizeY value:((sizes at:idx) at:2).
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1405
                                    ].
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1406
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1407
    y := box yPosition.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1408
    component := box addTextLabel:(resources string:'screen size:').
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1409
    component width:0.3; adjust:#right; borderWidth:0.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1410
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1411
    box yPosition:y.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1412
    component := box addInputFieldOn:sizeX tabable:true.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1413
    component width:0.25; left:0.3; 
595
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1414
              immediateAccept:false; acceptOnLeave:false; 
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1415
              cursorMovementWhenUpdating:#beginOfLine;
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1416
              converter:(PrintConverter new initForInteger);
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1417
              model:sizeX.
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1418
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1419
    box yPosition:y.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1420
    component := box addTextLabel:(' x ').
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1421
    component width:0.1; left:0.55; adjust:#center; borderWidth:0.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1422
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1423
    box yPosition:y.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1424
    component := box addInputFieldOn:sizeY tabable:true.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1425
    component width:0.25; left:0.65; 
595
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1426
              immediateAccept:false; acceptOnLeave:false; 
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1427
              cursorMovementWhenUpdating:#beginOfLine;
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1428
              converter:(PrintConverter new initForInteger);
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1429
              model:sizeY.
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1430
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1431
    box yPosition:y.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1432
    component := box addTextLabel:('(mm)').
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1433
    component width:0.1; left:0.9; adjust:#center; borderWidth:0.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1434
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1435
    box addVerticalSpace.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1436
    box addHorizontalLine.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1437
    box addVerticalSpace.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1438
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1439
    box addCheckBox:(resources string:'color monitor') on:isColorMonitor.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1440
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1441
    visual == #PseudoColor ifTrue:[
622
9d02b3440252 ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents: 618
diff changeset
  1442
        box addVerticalSpace.
9d02b3440252 ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents: 618
diff changeset
  1443
        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
  1444
    ].
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1445
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1446
    ditherSyms notNil ifTrue:[
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1447
        box addVerticalSpace.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1448
        component := box addPopUpList:(resources string:'image display:') on:ditherList.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1449
        component label:'image display'.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1450
        component superView horizontalLayout:#leftSpace.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1451
    ].
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1452
614
561229d704f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 608
diff changeset
  1453
    box addVerticalSpace.
561229d704f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 608
diff changeset
  1454
    box addCheckBox:(resources string:'allow colored/grayscale icons') on:deepIcons.
561229d704f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 608
diff changeset
  1455
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1456
    box 
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  1457
        addHelpButtonFor:'Launcher/screenSettings.html';
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1458
        addAbortButton; addOkButton.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1459
    box open.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1460
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1461
    box accepted ifTrue:[
632
7b59b670e687 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 631
diff changeset
  1462
        Image flushDeviceImages.
7b59b670e687 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 631
diff changeset
  1463
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1464
        screen visualType == #PseudoColor ifTrue:[
622
9d02b3440252 ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents: 618
diff changeset
  1465
            useFixPalette value ifTrue:[
638
5541c2f7836f warnbox if fixColor allocation fails
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
  1466
                Color colorAllocationFailSignal handle:[:ex |
5541c2f7836f warnbox if fixColor allocation fails
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
  1467
                    self warn:(resources string:'Could not allocate colors.').
5541c2f7836f warnbox if fixColor allocation fails
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
  1468
                ] do:[
670
7c958acbc5e8 fixColor and ditherColor stuff moved from Color
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
  1469
                    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
  1470
                ]
622
9d02b3440252 ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents: 618
diff changeset
  1471
            ] ifFalse:[
670
7c958acbc5e8 fixColor and ditherColor stuff moved from Color
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
  1472
                screen releaseFixColors
622
9d02b3440252 ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents: 618
diff changeset
  1473
            ]
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1474
        ].
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1475
        screen hasColors:isColorMonitor value.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1476
        screen widthInMillimeter:sizeX value.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1477
        screen heightInMillimeter:sizeY value.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1478
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1479
        screen supportsDeepIcons:deepIcons value.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1480
        ditherSyms notNil ifTrue:[
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1481
            Image ditherAlgorithm:(ditherSyms at:ditherList selectionIndex).
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1482
        ].
614
561229d704f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 608
diff changeset
  1483
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1484
        self withWaitCursorDo:[
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1485
            View defaultStyle:(View defaultStyle).
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1486
        ].
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1487
    ].
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1488
    box destroy
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1489
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  1490
    "Modified: 9.9.1996 / 22:43:04 / stefan"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1491
    "Modified: 8.1.1997 / 14:52:42 / cg"
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1492
!
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1493
398
001d78a6cacd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
  1494
fontSettings
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1495
    "open a dialog on font related settings"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1496
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  1497
    (self fontBoxForEncoding:nil) ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  1498
        self reopenLauncher.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  1499
    ]
397
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  1500
398
001d78a6cacd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
  1501
    "Created: 26.2.1996 / 22:52:51 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1502
    "Modified: 8.1.1997 / 14:52:49 / cg"
397
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  1503
!
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  1504
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1505
keyboardSetting 
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1506
    "open a dialog on keyboard related settings"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1507
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1508
    |mappings listOfRawKeys listOfFunctions
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1509
     box l
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1510
     list1 list2 listView1 listView2 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1511
     frame selectionForwarder macroForwarder macroTextView y|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1512
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1513
    mappings := Screen current keyboardMap.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1514
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1515
    listOfRawKeys := (mappings keys asArray collect:[:key | key asString]) sort.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1516
    listOfFunctions := (mappings values asSet asArray collect:[:key | key asString]) sort.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1517
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1518
    selectionForwarder := Plug new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1519
    selectionForwarder respondTo:#showFunction
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1520
                  with:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1521
                        |raw|
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1522
                        raw := list1 selection.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1523
                        list2 retractInterestsFor:selectionForwarder.
568
58d7e4157f23 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
  1524
                        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
  1525
                        list2 onChangeSend:#showRawKey to:selectionForwarder.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1526
                       ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1527
    selectionForwarder respondTo:#showRawKey
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1528
                  with:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1529
                        |f raw|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1530
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1531
                        f := list2 selection.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1532
                        list1 retractInterestsFor:selectionForwarder.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1533
                        raw := mappings keyAtValue:f asString.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1534
                        raw isNil ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1535
                            raw := mappings keyAtValue:f first.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1536
                            raw isNil ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1537
                                raw := mappings keyAtValue:f asSymbol.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1538
                            ]
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1539
                        ].
568
58d7e4157f23 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
  1540
                        list1 selection:raw.
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1541
                        list1 onChangeSend:#showFunction to:selectionForwarder.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1542
                       ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1543
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
  1544
    macroForwarder := [
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1545
                        |f macro indent|
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1546
                        f := list2 selection.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1547
                        (f startsWith:'Cmd') ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1548
                            f := f copyFrom:4
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1549
                        ].
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1550
                        macro := FunctionKeySequences at:(f asSymbol) ifAbsent:nil.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1551
                        macro notNil ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1552
                            macro := macro asStringCollection.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1553
                            indent := macro
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1554
                                         inject:99999 into:[:min :element |
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1555
                                             |stripped|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1556
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1557
                                             stripped := element withoutLeadingSeparators.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1558
                                             stripped size == 0 ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1559
                                                 min
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1560
                                             ] ifFalse:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1561
                                                 min min:(element size - stripped size)
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1562
                                             ]
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1563
                                         ].
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1564
                            indent ~~ 0 ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1565
                                macro := macro collect:[:line | 
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1566
                                             line size > indent ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1567
                                                line copyFrom:indent+1
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1568
                                             ] ifFalse:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1569
                                                line
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1570
                                             ].
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1571
                                        ]
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1572
                            ].                        
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1573
                        ].
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1574
                        macroTextView contents:macro.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1575
                       ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1576
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1577
    list1 := SelectionInList with:listOfRawKeys.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1578
    list1 onChangeSend:#showFunction to:selectionForwarder.
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  1579
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1580
    list2 := SelectionInList with:listOfFunctions.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1581
    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
  1582
    list2 onChangeSend:#value to:macroForwarder.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1583
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1584
    box := Dialog new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1585
    box label:(resources string:'Keyboard mappings').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1586
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1587
    l := box addTextLabel:(resources string:'KEY_MSG') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1588
    l adjust:#left; borderWidth:0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1589
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1590
    frame := View new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1591
    frame extent:300 @ 300.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1592
    frame borderWidth:0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1593
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1594
    listView1 := ScrollableView for:SelectionInListView in:frame.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1595
    listView1 model:list1.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1596
    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
  1597
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1598
    listView2 := ScrollableView for:SelectionInListView in:frame.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1599
    listView2 model:list2.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1600
    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
  1601
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1602
    frame topInset:box yPosition.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1603
    box addComponent:frame withExtent:350@200.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1604
    box makeTabable:listView1. 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1605
    box makeTabable:listView2. 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1606
    frame origin:0.0@0.0 corner:1.0@0.6.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1607
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1608
    box addVerticalSpace.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1609
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1610
    l := box addTextLabel:(resources string:'Macro text (if any):') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1611
    l adjust:#left; borderWidth:0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1612
    l origin:0.0@0.6 corner:1.0@0.6.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1613
    l topInset:(View viewSpacing).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1614
    l bottomInset:(l preferredExtent y negated - View viewSpacing).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1615
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1616
    macroTextView := HVScrollableView for:TextView miniScroller:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1617
    box addComponent:macroTextView tabable:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1618
    macroTextView origin:0.0@0.6 corner:1.0@1.0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1619
    y := box yPosition.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1620
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1621
    box
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  1622
        addHelpButtonFor:'Launcher/keyboardSetting.html';
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1623
        "addAbortButton;" 
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1624
        addOkButton.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1625
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1626
    macroTextView topInset:(l preferredExtent y + 5).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1627
    macroTextView bottomInset:(box preferredExtent y - y).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1628
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1629
    box open.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1630
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1631
    box accepted ifTrue:[
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1632
        "no action yet ..."
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1633
    ].
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1634
    box destroy
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1635
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  1636
    "Modified: 9.9.1996 / 22:43:17 / stefan"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1637
    "Modified: 8.1.1997 / 14:52:55 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1638
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1639
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1640
languageSetting 
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1641
    "open a dialog on language related settings"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1642
777
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1643
    |listOfLanguages translatedLanguages switch box|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1644
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1645
    "
410
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1646
     get list of supported languages from the launchers resources ...
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1647
    "
410
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1648
    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
  1649
    translatedLanguages := resources array:listOfLanguages.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1650
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1651
    box := ListSelectionBox title:(resources string:'LANG_MSG') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1652
    box label:(resources string:'Language selection').
281
7b73ea8b2faa more for international language support
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
  1653
    box list:translatedLanguages.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1654
    box initialText:(Language).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1655
    box action:[:newLanguage |
410
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1656
        self withWaitCursorDo:[
777
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1657
            |fontPref idx language oldLanguage enc answer matchingFonts|
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1658
410
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1659
            idx := translatedLanguages indexOf:newLanguage withoutSeparators.
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1660
            idx ~~ 0 ifTrue:[
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1661
                language := listOfLanguages at:idx
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1662
            ] ifFalse:[
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1663
                language := newLanguage
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1664
            ].
777
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1665
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1666
            "/ check if the new language needs a differently encoded font;
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1667
            "/ ask user to switch font and allow cancellation.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1668
            "/ Otherwise, you are left with unreadable menu & button items ...
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1669
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1670
            oldLanguage := Smalltalk language.
514
e48fbcbc358d do not directly access the Language variable
Claus Gittinger <cg@exept.de>
parents: 511
diff changeset
  1671
            Smalltalk language:language asSymbol.
777
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1672
            ResourcePack flushCachedResourcePacks.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1673
            fontPref := self class classResources at:'PREFERRED_FONT_ENCODING'.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1674
            Smalltalk language:oldLanguage.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1675
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1676
            switch := true.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1677
            enc := MenuView defaultFont encoding.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1678
            (fontPref match:enc) ifFalse:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1679
                "/ look if there is one at all.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1680
                matchingFonts := Screen current listOfAvailableFonts select:[:f | fontPref match:f encoding].
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1681
                matchingFonts size == 0 ifTrue:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1682
                    (Dialog 
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1683
                        confirm:(resources 
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1684
                                    string:'your display does not offer any %1-encoded font.\\Change the language anyway ?\ (texts will probably be unreadable then)'
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1685
                                      with:fontPref) withCRs)
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1686
                    ifFalse:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1687
                        switch := false
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1688
                    ]
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1689
                ] ifFalse:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1690
                    answer := Dialog 
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1691
                                confirmWithCancel:(resources 
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1692
                                                        string:'menu font is not %1-encoded.\\Change it ?'
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1693
                                                        with:fontPref) withCRs
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1694
                                           labels:(resources
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1695
                                                        array:#('cancel' 'no' 'yes'))
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1696
                                           default:3.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1697
                    answer isNil ifTrue:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1698
                        switch := false
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1699
                    ] ifFalse:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1700
                        answer ifTrue:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1701
                            switch := (self fontBoxForEncoding:fontPref)
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1702
                        ]
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1703
                    ].
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1704
                ].
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1705
            ].
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1706
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1707
            switch ifTrue:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1708
                transcript showCR:'change language to ' , newLanguage , ' ...'.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1709
                Smalltalk language:language asSymbol.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1710
                ResourcePack flushCachedResourcePacks
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1711
            ].
410
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1712
        ].
777
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1713
        switch ifTrue:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1714
            self reopenLauncher.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1715
        ]
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1716
    ].    
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1717
    box
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  1718
        addHelpButtonFor:'Launcher/languageSetting.html'.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1719
    box open.
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1720
    box destroy
281
7b73ea8b2faa more for international language support
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
  1721
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  1722
    "Modified: 9.9.1996 / 22:43:27 / stefan"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1723
    "Modified: 8.1.1997 / 14:53:01 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1724
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1725
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1726
memorySettings
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1727
    "open a dialog on objectMemory related settings"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1728
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  1729
    |box igcLimit igcFreeLimit igcFreeAmount newSpaceSize
440
afdf9ea91d26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 434
diff changeset
  1730
     compressLimit
773
98efb7f5e8fa prepared dynamic-compiler controls
Claus Gittinger <cg@exept.de>
parents: 772
diff changeset
  1731
     oldIncr component fields codeLimit codeTrigger|
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1732
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1733
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1734
    "/ extract relevant system settings ...
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1735
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1736
    igcLimit := ObjectMemory incrementalGCLimit asValue.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1737
    igcFreeLimit := ObjectMemory freeSpaceGCLimit asValue.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1738
    igcFreeAmount := ObjectMemory freeSpaceGCAmount asValue.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1739
    newSpaceSize := ObjectMemory newSpaceSize asValue.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1740
    oldIncr := ObjectMemory oldSpaceIncrement asValue.
440
afdf9ea91d26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 434
diff changeset
  1741
    compressLimit := ObjectMemory oldSpaceCompressLimit asValue.
774
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1742
    codeLimit := ObjectMemory dynamicCodeLimit asValue.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1743
    codeTrigger := ObjectMemory dynamicCodeGCTrigger asValue.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1744
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1745
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1746
    "/ create a box on those values ...
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1747
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1748
    fields := OrderedCollection new.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1749
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1750
    box := DialogBox new.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1751
    box label:(resources string:'Memory manager settings').
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1752
345
3bb0d27efc7a changed memorySettings texts
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
  1753
    box addTextLabel:'Warning - invalid settings may result in poor performance.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1754
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1755
You have been warned.'.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1756
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1757
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1758
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1759
                    addLabelledInputField:(resources string:'size of newSpace:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1760
                    adjust:#right
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1761
                    on:nil "/ newSpaceSize 
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1762
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1763
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1764
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1765
    component converter:(PrintConverter new initForNumber).
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1766
    component model:newSpaceSize.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1767
    fields add:component.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1768
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1769
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1770
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1771
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1772
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1773
                    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
  1774
                    adjust:#right
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1775
                    on:nil "/ igcLimit 
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1776
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1777
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1778
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1779
    component converter:(PrintConverter new initForNumber).
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1780
    component model:igcLimit.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1781
    fields add:component.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1782
345
3bb0d27efc7a changed memorySettings texts
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
  1783
    box addTextLabel:'(start IGC whenever this amount has been allocated)'.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1784
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1785
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1786
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1787
                    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
  1788
                    adjust:#right
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1789
                    on:nil "/ igcFreeLimit 
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1790
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1791
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1792
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1793
    component converter:(PrintConverter new initForNumber).
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1794
    component model:igcFreeLimit.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1795
    fields add:component.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1796
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1797
    box addTextLabel:'(start IGC whenever freespace drops below this)'.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1798
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1799
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1800
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1801
                    addLabelledInputField:(resources string:'incremental GC amount:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1802
                    adjust:#right
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1803
                    on:nil "/ igcFreeAmount 
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1804
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1805
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1806
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1807
    component converter:(PrintConverter new initForNumber).
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1808
    component model:igcFreeAmount.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1809
    fields add:component.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1810
345
3bb0d27efc7a changed memorySettings texts
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
  1811
    box addTextLabel:'(try to keep this amount for peak requests)'.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1812
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1813
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1814
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1815
                    addLabelledInputField:(resources string:'oldspace increment:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1816
                    adjust:#right
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1817
                    on:nil "/ oldIncr 
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1818
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1819
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1820
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1821
    component converter:(PrintConverter new initForNumber).
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1822
    component model:oldIncr.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1823
    fields add:component.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1824
345
3bb0d27efc7a changed memorySettings texts
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
  1825
    box addTextLabel:'(increase oldSpace in chunks of this size)'.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1826
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1827
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1828
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1829
                    addLabelledInputField:(resources string:'oldspace compress limit:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1830
                    adjust:#right
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1831
                    on:nil "/ compressLimit 
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1832
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1833
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1834
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1835
    component converter:(PrintConverter new initForNumber).
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1836
    component model:compressLimit.
440
afdf9ea91d26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 434
diff changeset
  1837
    fields add:component.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1838
440
afdf9ea91d26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 434
diff changeset
  1839
    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
  1840
    box addHorizontalLine.
440
afdf9ea91d26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 434
diff changeset
  1841
774
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1842
    ObjectMemory supportsJustInTimeCompilation ifTrue:[
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1843
        component := box 
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1844
                        addLabelledInputField:(resources string:'dynamic code limit:')
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1845
                        adjust:#right
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1846
                        on:nil
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1847
                        tabable:true
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1848
                        separateAtX:0.7.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1849
        component acceptOnLeave:false.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1850
        component converter:(PrintConverter new initForNumberOrNil).
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1851
        component model:codeLimit.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1852
        fields add:component.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1853
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1854
        box addTextLabel:'(flush dynamic compiled code to stay within this limit)'.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1855
        box addHorizontalLine.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1856
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1857
        component := box 
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1858
                        addLabelledInputField:(resources string:'dynamic code GC trigger:')
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1859
                        adjust:#right
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1860
                        on:nil
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1861
                        tabable:true
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1862
                        separateAtX:0.7.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1863
        component acceptOnLeave:false.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1864
        component converter:(PrintConverter new initForNumberOrNil).
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1865
        component model:codeTrigger.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1866
        fields add:component.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1867
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1868
        box addTextLabel:'(start incremental GC whenever this amount of code has been allocated)'.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1869
        box addHorizontalLine.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1870
    ].
773
98efb7f5e8fa prepared dynamic-compiler controls
Claus Gittinger <cg@exept.de>
parents: 772
diff changeset
  1871
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1872
    box addAbortButton; addOkButton.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1873
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1874
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1875
    "/ show the box ...
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1876
    "/
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1877
    box open.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1878
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1879
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1880
    "/ update system settings
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1881
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1882
    box accepted ifTrue:[
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1883
        fields do:[:comp | comp accept].
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1884
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1885
        igcFreeAmount value ~~ ObjectMemory freeSpaceGCAmount ifTrue:[
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1886
            ObjectMemory freeSpaceGCAmount:igcFreeAmount value.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1887
        ].
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1888
        igcFreeLimit value ~~ ObjectMemory freeSpaceGCLimit ifTrue:[
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1889
            ObjectMemory freeSpaceGCLimit:igcFreeLimit value.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1890
        ].
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1891
        igcLimit value ~~ ObjectMemory incrementalGCLimit ifTrue:[
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1892
            ObjectMemory incrementalGCLimit:igcLimit value.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1893
        ].
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1894
        newSpaceSize value ~~ ObjectMemory newSpaceSize ifTrue:[
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1895
            ObjectMemory newSpaceSize:newSpaceSize value.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1896
        ].
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1897
        oldIncr value ~~ ObjectMemory oldSpaceIncrement ifTrue:[
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1898
            ObjectMemory oldSpaceIncrement:oldIncr value.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1899
        ].
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1900
        ObjectMemory oldSpaceCompressLimit:compressLimit value.
774
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1901
        ObjectMemory dynamicCodeLimit:codeLimit value.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1902
        ObjectMemory dynamicCodeGCTrigger:codeTrigger value.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1903
    ].
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1904
    box destroy
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1905
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1906
    "Modified: 8.1.1997 / 14:53:07 / cg"
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1907
!
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1908
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1909
messageSettings
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1910
    "open a dialog on infoMessage related settings"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1911
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1912
    |box vmInfo vmErrors displayErrors classInfos|
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1913
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1914
    vmInfo := ObjectMemory infoPrinting asValue.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1915
    vmErrors := ObjectMemory debugPrinting asValue.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1916
    classInfos := Object infoPrinting asValue.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1917
    displayErrors := DeviceWorkstation errorPrinting asValue.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1918
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1919
    box := DialogBox new.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1920
    box label:(resources string:'Messages').
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1921
"/    box extent:200@300.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1922
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1923
    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
  1924
    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
  1925
    box addHorizontalLine.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1926
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1927
    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
  1928
    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
  1929
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1930
    box addAbortButton; addOkButton.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1931
    box open.
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1932
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1933
    box accepted ifTrue:[
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1934
        ObjectMemory infoPrinting:vmInfo value.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1935
        ObjectMemory debugPrinting:vmErrors value.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1936
        Object infoPrinting:classInfos value.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1937
        DeviceWorkstation errorPrinting:displayErrors value.
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1938
    ].
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1939
    box destroy
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1940
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1941
    "Modified: 8.1.1997 / 14:53:14 / cg"
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1942
!
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1943
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1944
miscSettings
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1945
    "open a dialog on misc other settings"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1946
327
44a25cae2645 allow setting of dialog-focus behavior
ca
parents: 319
diff changeset
  1947
    |box check logDoits shadows updChanges changeFileName returnFocus
711
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  1948
     loadBinaries compileLazy hostNameInLabel useManager hasManager 
733
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  1949
     repository repositoryHolder localSourceFirst 
491
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1950
     showAccelerators sourceCacheDir cacheEntry
843
1b6ae381074a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 837
diff changeset
  1951
     component localCheck oldIndent nm fn manager
915
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1952
     keepMethodHistory showErrorNotifier|
843
1b6ae381074a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 837
diff changeset
  1953
1b6ae381074a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 837
diff changeset
  1954
    "/ 
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1955
    "/ extract relevant system settings ...
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1956
    "/
843
1b6ae381074a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 837
diff changeset
  1957
    keepMethodHistory := Class methodHistory notNil asValue.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1958
    logDoits := Smalltalk logDoits asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1959
    shadows := PopUpView shadows asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1960
    hostNameInLabel := StandardSystemView includeHostNameInLabel asValue.
327
44a25cae2645 allow setting of dialog-focus behavior
ca
parents: 319
diff changeset
  1961
    returnFocus := Dialog returnFocusWhenClosingModalBoxes asValue.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1962
    updChanges := Class updatingChanges asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1963
    changeFileName := ObjectMemory nameForChanges asValue.
711
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  1964
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  1965
    hasManager := AbstractSourceCodeManager notNil
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  1966
                  and:[AbstractSourceCodeManager isLoaded].
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  1967
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  1968
    hasManager ifTrue:[
733
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  1969
        useManager := (manager := Smalltalk at:#SourceCodeManager) notNil asValue.
711
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  1970
        localSourceFirst := Class tryLocalSourceFirst asValue.
733
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  1971
        manager notNil ifTrue:[
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  1972
            repository := manager repositoryName.
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  1973
            repository notNil ifTrue:[
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  1974
                repositoryHolder := repository asValue
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  1975
            ]
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  1976
        ].
711
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  1977
    ] ifFalse:[
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  1978
        useManager := false.
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  1979
        localSourceFirst := false
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  1980
    ].
420
2c169931d1ab allow turning of of accelerator display
Claus Gittinger <cg@exept.de>
parents: 410
diff changeset
  1981
    showAccelerators := MenuView showAcceleratorKeys asValue.
915
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  1982
    showErrorNotifier := (Exception emergencyHandler == Launcher notifyingEmergencyHandler) asValue.
914
10583a26baad choice of errorNotification or direct debugger entry
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
  1983
491
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  1984
    sourceCacheDir := nil asValue.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1985
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1986
    loadBinaries := Smalltalk loadBinaries asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1987
    compileLazy := Autoload compileLazy asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1988
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1989
    "/
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1990
    "/ create a box on those values ...
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  1991
    "/
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1992
    box := DialogBox new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1993
    box label:(resources string:'Other settings').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1994
845
f58a12dd747e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 843
diff changeset
  1995
    box addCheckBox:(resources string:'remember changed methods (for previous method in browser)') on:keepMethodHistory.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1996
    box addCheckBox:(resources string:'log compiles in changes file') on:updChanges.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1997
    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
  1998
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1999
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  2000
                    addLabelledInputField:(resources string:'change file name:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  2001
                    adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  2002
                    on:changeFileName 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  2003
                    tabable:true
492
829b4872bca3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
  2004
                    separateAtX:0.4.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  2005
    component immediateAccept:true; acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  2006
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  2007
"/    y := box yPosition.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  2008
"/    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
  2009
"/    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
  2010
"/    box yPosition:y.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  2011
"/    component := box addInputFieldOn:changeFileName tabable:true.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  2012
"/    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
  2013
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2014
    box addHorizontalLine.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2015
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2016
    box addCheckBox:(resources string:'lazy compilation when autoloading') on:compileLazy.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2017
    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
  2018
    ObjectFileLoader isNil ifTrue:[
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2019
        loadBinaries value:false.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2020
        check disable
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2021
    ].
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2022
711
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2023
    hasManager ifTrue:[
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2024
        check := box addCheckBox:(resources string:'sourcecode from sourcecode management') on:useManager.
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2025
        oldIndent := box leftIndent.
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2026
        box leftIndent:30.
733
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  2027
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  2028
        repositoryHolder notNil ifTrue:[
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  2029
            component := box 
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  2030
                            addLabelledInputField:(resources string:'repository:')
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  2031
                            adjust:#right
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  2032
                            on:repositoryHolder 
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  2033
                            tabable:true
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  2034
                            separateAtX:0.4.
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  2035
            component immediateAccept:true; acceptOnLeave:false.
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  2036
        ].
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  2037
711
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2038
        localCheck := box addCheckBox:(resources string:'if present, use local source (suppress checkout)') on:localSourceFirst.
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2039
        localCheck enableChannel:useManager.
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2040
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2041
        cacheEntry := box 
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2042
                        addLabelledInputField:(resources string:'source cache dir:')
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2043
                        adjust:#right
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2044
                        on:sourceCacheDir 
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2045
                        tabable:true
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2046
                        separateAtX:0.4.
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2047
        cacheEntry immediateAccept:true; acceptOnLeave:false.
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2048
        box leftIndent:oldIndent.
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2049
        cacheEntry enableChannel:useManager.
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2050
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2051
        (AbstractSourceCodeManager isNil 
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2052
        or:[AbstractSourceCodeManager defaultManager isNil]) ifTrue:[
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2053
            useManager value:false.
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2054
            cacheEntry disable.
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2055
            check disable.
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2056
            localCheck enable.
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2057
        ] ifFalse:[
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2058
            sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName).
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2059
        ].
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2060
    ].
335
c725e5d99819 localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents: 327
diff changeset
  2061
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2062
    box addHorizontalLine.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2063
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2064
    box addCheckBox:(resources string:'shadows under popup views') on:shadows.
327
44a25cae2645 allow setting of dialog-focus behavior
ca
parents: 319
diff changeset
  2065
    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
  2066
    box addCheckBox:(resources string:'hostname in window labels') on:hostNameInLabel.
443
ea8f82ba103c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 440
diff changeset
  2067
    box addCheckBox:(resources string:'show accelerator keys in menus') on:showAccelerators.
915
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2068
    box addCheckBox:(resources string:'show error notifier before opening debugger') on:showErrorNotifier.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2069
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2070
    box 
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  2071
        addHelpButtonFor:'Launcher/miscSettings.html';
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2072
        addAbortButton; 
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2073
        addOkButton.
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2074
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2075
    "/
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2076
    "/ show the box ...
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2077
    "/
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  2078
    box open.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2079
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2080
    "/
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2081
    "/ update system settings
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2082
    "/
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2083
    box accepted ifTrue:[
843
1b6ae381074a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 837
diff changeset
  2084
        Class keepMethodHistory:keepMethodHistory value.
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2085
        Smalltalk logDoits:logDoits value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2086
        PopUpView shadows:shadows value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2087
        Class updateChanges:updChanges value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2088
        Autoload compileLazy:compileLazy value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2089
        Smalltalk loadBinaries:loadBinaries value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2090
        StandardSystemView includeHostNameInLabel:hostNameInLabel value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2091
        ObjectMemory nameForChanges:changeFileName value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2092
        Dialog returnFocusWhenClosingModalBoxes:returnFocus value.
420
2c169931d1ab allow turning of of accelerator display
Claus Gittinger <cg@exept.de>
parents: 410
diff changeset
  2093
        MenuView showAcceleratorKeys:showAccelerators value.
327
44a25cae2645 allow setting of dialog-focus behavior
ca
parents: 319
diff changeset
  2094
711
748349e59632 only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 709
diff changeset
  2095
        (hasManager and:[useManager value]) ifTrue:[
733
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  2096
            manager isNil ifTrue:[
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  2097
                Smalltalk at:#SourceCodeManager put:(AbstractSourceCodeManager defaultManager).
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  2098
                manager := Smalltalk at:#SourceCodeManager.
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2099
            ].
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2100
            Class tryLocalSourceFirst:(localSourceFirst value).
491
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  2101
            nm := sourceCacheDir value.
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  2102
            (fn := nm asFilename) exists ifFalse:[
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  2103
                (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
  2104
                    fn makeDirectory; 
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  2105
                       makeReadableForAll;
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  2106
                       makeWritableForAll;
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  2107
                       makeExecutableForAll.
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  2108
                ]
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  2109
            ].
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  2110
            (fn exists 
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  2111
            and:[fn isDirectory
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  2112
            and:[fn isReadable
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  2113
            and:[fn isWritable]]]) ifTrue:[
8c30fe86b0e9 allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents: 490
diff changeset
  2114
                AbstractSourceCodeManager cacheDirectoryName:(sourceCacheDir value).
733
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  2115
            ].
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  2116
            repositoryHolder notNil ifTrue:[
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  2117
                manager repositoryName:repositoryHolder value.
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  2118
                manager initialize
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
  2119
            ].
914
10583a26baad choice of errorNotification or direct debugger entry
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
  2120
915
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2121
            showErrorNotifier value ifFalse:[
914
10583a26baad choice of errorNotification or direct debugger entry
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
  2122
                Exception emergencyHandler:nil
10583a26baad choice of errorNotification or direct debugger entry
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
  2123
            ] ifTrue:[
915
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2124
                Exception emergencyHandler:(Launcher notifyingEmergencyHandler)
914
10583a26baad choice of errorNotification or direct debugger entry
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
  2125
            ]
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2126
        ] ifFalse:[
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2127
            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
  2128
        ]
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  2129
    ].
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  2130
    box destroy
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2131
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  2132
    "Modified: 9.9.1996 / 22:43:36 / stefan"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2133
    "Modified: 8.1.1997 / 14:53:22 / cg"
219
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
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2136
printerSettings
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2137
    "open a dialog on printer related settings"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2138
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2139
    |box 
595
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2140
     possiblePrinters possibleTypes printerType printCommand 
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  2141
     pageFormat landscape updater
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2142
     formatLabel formatComponent landscapeLabel landscapeComponent
709
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2143
     topMargin leftMargin rightMargin bottomMargin unitList unit
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  2144
     topMarginComponent leftMarginComponent
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  2145
     rightMarginComponent
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  2146
     bottomMarginComponent supportsColor supportsColorComponent
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  2147
     y y1 commandListPop component commandList row|
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2148
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2149
    possiblePrinters := PrinterStream withAllSubclasses asArray.
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2150
    possibleTypes := possiblePrinters collect:[:cls | cls printerTypeName].
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2151
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2152
    printerType := SelectionInList new list:(resources array:possibleTypes).
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2153
    printerType selectionIndex:(possiblePrinters identityIndexOf:Printer).
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2154
    printCommand := Printer printCommand asValue.
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2155
604
8fd6e7c5868d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
  2156
    pageFormat := SelectionInList new list:(Printer defaultPageFormats).
8fd6e7c5868d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
  2157
    pageFormat selection:(Printer pageFormat).
8fd6e7c5868d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
  2158
    landscape := Printer landscape asValue.
8fd6e7c5868d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
  2159
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2160
    topMargin := Printer topMargin asValue.
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2161
    leftMargin := Printer leftMargin asValue.
709
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2162
    rightMargin := Printer rightMargin asValue.
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2163
    bottomMargin := Printer bottomMargin asValue.
702
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2164
    supportsColor := Printer supportsColor asValue.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2165
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2166
    box := DialogBox new.
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2167
    box label:(resources string:'Printer settings').
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2168
726
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2169
"/ either use a popUpList ...
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2170
"/    box addPopUpList:(resources string:'printer type:') on:printerType.
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2171
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2172
"/ or a comboList;
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2173
"/ which one looks better ?
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2174
    y := box yPosition.
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2175
    component := box addTextLabel:(resources string:'printer type:').
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2176
    component width:0.3; adjust:#right; borderWidth:0.
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2177
    box yPosition:y.
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2178
    component := box addComboListOn:printerType tabable:true.
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2179
    component changeMessage:#selectionIndex:; useIndex:true.
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2180
    component width:0.7; left:0.3.
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2181
"/ end of question
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2182
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2183
    y := box yPosition.
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2184
    component := box addTextLabel:(resources string:'print command:').
362
d5d99cdda74c use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents: 359
diff changeset
  2185
    component width:0.3; adjust:#right; borderWidth:0.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2186
    box yPosition:y.
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2187
    commandListPop := box addComboBoxOn:printCommand tabable:true.
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2188
"/    commandListPop := box addInputFieldOn:printCommand tabable:true.
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2189
    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
  2190
    "/ some common print commands ...
499
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  2191
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  2192
    commandList := resources at:'PRINT_COMMANDS' ifAbsent:nil.
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  2193
    commandList isNil ifTrue:[
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  2194
        commandList := PrinterStream defaultCommands.
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  2195
        commandList isNil ifTrue:[
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  2196
            commandList := #('lpr' 
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2197
                             'lp' 
499
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  2198
                            ).
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  2199
        ]
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  2200
    ].
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  2201
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2202
    commandListPop list:commandList.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2203
    box addVerticalSpace.
595
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2204
    box addHorizontalLine.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2205
    box addVerticalSpace.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2206
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2207
    row := OrderedCollection new.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2208
    row add:(formatLabel := Label label:(resources string:'page format:')).
676
a5d1f2adfb98 beautified for 2D look
Claus Gittinger <cg@exept.de>
parents: 673
diff changeset
  2209
    formatLabel borderWidth:0.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2210
    row add:(formatComponent := PopUpList on:pageFormat).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2211
    formatComponent label:'unknown'.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2212
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2213
    row add:(landscapeLabel := Label label:(resources string:'landscape:')).
676
a5d1f2adfb98 beautified for 2D look
Claus Gittinger <cg@exept.de>
parents: 673
diff changeset
  2214
    landscapeLabel borderWidth:0.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2215
    row add:(landscapeComponent := CheckToggle on:landscape).
595
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2216
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2217
    y := box yPosition.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2218
    box
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2219
        addRow:(1 to:2)
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2220
        fromX:0
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2221
        toX:0.5
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2222
        collect:[:idx | row at:idx]
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2223
        tabable:false
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2224
        horizontalLayout:#leftSpace
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2225
        verticalLayout:#center.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2226
    y1 := box yPosition.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2227
    box yPosition:y.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2228
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2229
    box
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2230
        addRow:(3 to:4)
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2231
        fromX:0.5
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2232
        toX:1.0
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2233
        collect:[:idx | row at:idx]
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2234
        tabable:false
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2235
        horizontalLayout:#leftSpace
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2236
        verticalLayout:#center.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2237
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2238
    box yPosition:(box yPosition max:y1).
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2239
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2240
    box makeTabable:(formatComponent).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2241
    box makeTabable:(landscapeComponent).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2242
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2243
    box addVerticalSpace.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2244
    box addHorizontalLine.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2245
    box addVerticalSpace.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2246
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2247
    y := box yPosition.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2248
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2249
    topMarginComponent := box 
603
a1054630b5e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 602
diff changeset
  2250
        addLabelledInputField:(resources string:'top margin:')
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2251
        adjust:#right
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2252
        on:nil "/ topMargin 
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2253
        tabable:true
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2254
        from:0.0 to:0.5
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2255
        separateAtX:0.6.
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2256
    topMarginComponent converter:(PrintConverter new initForNumber).
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2257
    topMarginComponent model:topMargin.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2258
    y1 := box yPosition.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2259
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2260
    box yPosition:y.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2261
    unitList := SelectionInList with:#('inch' 'mm').
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2262
    unitList selectionIndex:1.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2263
605
89f279250b96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 604
diff changeset
  2264
    component := box addComponent:(PopUpList on:unitList).
89f279250b96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 604
diff changeset
  2265
    component
603
a1054630b5e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 602
diff changeset
  2266
        left:0.6;
a1054630b5e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 602
diff changeset
  2267
        width:0.3.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2268
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2269
    box yPosition:y1.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2270
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2271
    leftMarginComponent := box 
603
a1054630b5e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 602
diff changeset
  2272
        addLabelledInputField:(resources string:'left margin:')
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2273
        adjust:#right
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2274
        on:nil "/ leftMargin 
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2275
        tabable:true
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2276
        from:0.0 to:0.5
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2277
        separateAtX:0.6.
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2278
    leftMarginComponent converter:(PrintConverter new initForNumber).
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2279
    leftMarginComponent model:leftMargin.
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2280
709
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2281
    rightMarginComponent := box 
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2282
        addLabelledInputField:(resources string:'right margin:')
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2283
        adjust:#right
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2284
        on:nil "/ rightMargin 
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2285
        tabable:true
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2286
        from:0.0 to:0.5
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2287
        separateAtX:0.6.
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2288
    rightMarginComponent converter:(PrintConverter new initForNumber).
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2289
    rightMarginComponent model:rightMargin.
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2290
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2291
    bottomMarginComponent := box 
603
a1054630b5e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 602
diff changeset
  2292
        addLabelledInputField:(resources string:'bottom margin:')
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2293
        adjust:#right
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2294
        on:nil "/ bottomMargin 
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2295
        tabable:true
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2296
        from:0.0 to:0.5
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2297
        separateAtX:0.6.
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2298
    bottomMarginComponent converter:(PrintConverter new initForNumber).
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2299
    bottomMarginComponent model:bottomMargin.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2300
702
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2301
    box addHorizontalLine.
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2302
    supportsColorComponent := box addCheckBox:(resources string:'Color printer') on:supportsColor.
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2303
    box addVerticalSpace.
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2304
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2305
    updater := [ |p fg hasPageSize hasMargins|
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2306
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2307
                       printerType selectionIndex ~~ 0 ifTrue:[
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2308
                           p := possiblePrinters at:(printerType selectionIndex).
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2309
                           hasPageSize := p supportsPageSizes. 
604
8fd6e7c5868d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
  2310
                           hasMargins := p supportsMargins. 
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2311
                       ] ifFalse:[
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2312
                           hasPageSize := false.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2313
                           hasMargins := false.
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2314
                       ].
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2315
                       hasPageSize ifTrue:[
597
68312d41ebab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 596
diff changeset
  2316
                          fg := Button new foregroundColor.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2317
                          formatComponent enable.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2318
                          landscapeComponent enable.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2319
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2320
                          formatComponent label:p pageFormat.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2321
                          pageFormat value:(p pageFormat).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2322
                          landscape value:(p landscape).
597
68312d41ebab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 596
diff changeset
  2323
                       ] ifFalse:[ 
68312d41ebab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 596
diff changeset
  2324
                          fg := Button new disabledForegroundColor.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2325
                          formatComponent disable.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2326
                          landscapeComponent disable.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2327
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2328
                          formatComponent label:'unknown'.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2329
                          landscape value:nil.
597
68312d41ebab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 596
diff changeset
  2330
                       ].
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2331
                       hasMargins ifTrue:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2332
                          unitList selectionIndex == 2 ifTrue:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2333
                              unit := #mm
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2334
                          ] ifFalse:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2335
                              unit := #inch
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2336
                          ].
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2337
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2338
                          topMargin value:(UnitConverter convert:p topMargin from:#inch to:unit).
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2339
                          leftMargin value:(UnitConverter convert:p leftMargin from:#inch to:unit).
709
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2340
                          rightMargin value:(UnitConverter convert:p rightMargin from:#inch to:unit).
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2341
                          bottomMargin value:(UnitConverter convert:p bottomMargin from:#inch to:unit).
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2342
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2343
                          topMarginComponent enable.
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2344
                          leftMarginComponent enable.
709
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2345
                          rightMarginComponent enable.
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2346
                          bottomMarginComponent enable.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2347
                       ] ifFalse:[ 
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2348
                          topMarginComponent disable.
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2349
                          leftMarginComponent disable.
709
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2350
                          rightMarginComponent disable.
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2351
                          bottomMarginComponent disable.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2352
                       ].
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2353
                       formatLabel foregroundColor:fg.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2354
                       landscapeLabel foregroundColor:fg.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2355
                        
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2356
                       p notNil ifTrue:[ 
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2357
                           commandList := p defaultCommands.
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2358
                           commandList notNil ifTrue:[
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2359
                                commandListPop list:commandList 
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2360
                           ].
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2361
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2362
                           printCommand value:(p printCommand).
702
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2363
                       ].
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2364
                       p supportsPostscript ifFalse:[
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2365
                           supportsColorComponent disable.
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2366
                           supportsColor value:false
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2367
                       ] ifTrue:[
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2368
                           supportsColorComponent enable.
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2369
                           supportsColor value:(Printer supportsColor).
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2370
                       ]
597
68312d41ebab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 596
diff changeset
  2371
                     ].
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2372
    unitList onChangeSend:#value to:updater.
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2373
    printerType onChangeSend:#value to:updater.
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2374
    updater value.
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
  2375
608
4596be8837d6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 605
diff changeset
  2376
    box addVerticalSpace;
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  2377
        addHelpButtonFor:'Launcher/printerSettings.html';
608
4596be8837d6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 605
diff changeset
  2378
        addAbortButton; addOkButton.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  2379
    box open.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2380
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2381
    box accepted ifTrue:[
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2382
        Printer := possiblePrinters at:(printerType selectionIndex).
362
d5d99cdda74c use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents: 359
diff changeset
  2383
        Printer printCommand:printCommand value.
595
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2384
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2385
        Printer supportsPageSizes ifTrue:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2386
            Printer pageFormat:(pageFormat selection).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2387
            Printer landscape:(landscape value).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2388
        ].
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2389
        Printer supportsMargins ifTrue:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2390
            unitList selectionIndex == 2 ifTrue:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2391
                unit := #mm
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2392
            ] ifFalse:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2393
                unit := #inch
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2394
            ].
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2395
            Printer topMargin:(UnitConverter convert:topMargin value from:unit to:#inch).
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2396
            Printer leftMargin:(UnitConverter convert:leftMargin value from:unit to:#inch).
709
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2397
            Printer rightMargin:(UnitConverter convert:rightMargin value from:unit to:#inch).
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2398
            Printer bottomMargin:(UnitConverter convert:bottomMargin value from:unit to:#inch).
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2399
        ].
702
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2400
        Printer supportsPostscript ifTrue:[
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2401
            Printer supportsColor:supportsColor value.
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2402
        ].
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2403
    ].
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2404
    box destroy
362
d5d99cdda74c use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents: 359
diff changeset
  2405
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  2406
    "Modified: 9.9.1996 / 22:43:51 / stefan"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2407
    "Modified: 8.1.1997 / 14:53:31 / cg"
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2408
!
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2409
853
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2410
restoreSettings
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2411
    "restore settings from a settings-file."
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2412
853
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2413
    "a temporary kludge - we need a central systemSettings object for this,
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2414
     which can be saved/restored with a single store/read."
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2415
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2416
    |fileName|
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2417
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2418
    fileName := Dialog 
855
16bdd6eca5a1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 854
diff changeset
  2419
        requestFileName:(resources string:'restore settings from:') 
853
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2420
        default:'settings.stx'
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2421
        ok:(resources string:'restore') 
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2422
        abort:(resources string:'cancel') 
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2423
        pattern:'*.stx'
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2424
        fromDirectory:nil.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2425
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2426
    (fileName isNil or:[fileName isEmpty]) ifTrue:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2427
        "/ canceled
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2428
        ^ self
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2429
    ].
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2430
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2431
    self withWaitCursorDo:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2432
        Smalltalk fileIn:fileName.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2433
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2434
        self reopenLauncher.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2435
    ].
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2436
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2437
    "Modified: 8.1.1997 / 14:53:52 / cg"
853
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2438
!
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2439
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2440
saveSettings
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2441
    "save settings to a settings-file."
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2442
853
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2443
    "a temporary kludge - we need a central systemSettings object for this,
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2444
     which can be saved/restored with a single store/read."
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2445
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2446
    |s screen fileName|
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2447
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2448
    fileName := Dialog 
855
16bdd6eca5a1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 854
diff changeset
  2449
        requestFileName:(resources string:'save settings in:') 
853
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2450
        default:'settings.stx'
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2451
        ok:(resources string:'save') 
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2452
        abort:(resources string:'cancel') 
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2453
        pattern:'*.stx'
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2454
        fromDirectory:nil.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2455
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2456
    (fileName isNil or:[fileName isEmpty]) ifTrue:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2457
        "/ canceled
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2458
        ^ self
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2459
    ].
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2460
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2461
    s := fileName asFilename writeStream.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2462
    s isNil ifTrue:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2463
        self warn:'cannot write the ''' , fileName , ''' file'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2464
        ^ self
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2465
    ].
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2466
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2467
    s nextPutLine:'"/ ST/X saved settings';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2468
      nextPutLine:'"/ DO NOT MODIFY MANUALLY';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2469
      nextPutLine:'"/';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2470
      nextPutLine:'"/ this file was automatically generated by the';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2471
      nextPutLine:'"/ ''save settings'' function of the Launcher';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2472
      nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2473
    s cr.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2474
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2475
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2476
    s nextPutLine:'"/ saved by ' , OperatingSystem getLoginName , '@' , OperatingSystem getHostName , ' at ' , AbsoluteTime now printString.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2477
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2478
    s cr.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2479
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2480
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2481
    s nextPutLine:'"/ Display settings:'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2482
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2483
    s nextPutLine:'"/ only restore the display settings, if on the same Display ...'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2484
    s nextPutLine:'Display displayName = ' , (Display displayName storeString) , ' ifTrue:['.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2485
      screen := Screen current.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2486
      screen fixColors notNil ifTrue:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2487
        s nextPutLine:'  Image flushDeviceImages.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2488
        s nextPutLine:'  Color colorAllocationFailSignal catch:['.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2489
        s nextPutLine:'    Color getColorsRed:6 green:6 blue:4 on:Display'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2490
        s nextPutLine:'  ].'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2491
      ] ifFalse:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2492
        s nextPutLine:'  Display releaseFixColors.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2493
      ].
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2494
      s nextPutLine:'  Display hasColors: ' , (screen hasColors storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2495
      s nextPutLine:'  Display widthInMillimeter: ' , (screen widthInMillimeter storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2496
      s nextPutLine:'  Display heightInMillimeter: ' , (screen heightInMillimeter storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2497
      s nextPutLine:'  Display supportsDeepIcons: ' , (screen supportsDeepIcons storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2498
      s nextPutLine:'  Image ditherAlgorithm: ' , (Image ditherAlgorithm storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2499
      s nextPutLine:'  View defaultStyle:(View defaultStyle). "/ to flush any device images'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2500
    s nextPutLine:'].'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2501
    s cr.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2502
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2503
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2504
    s nextPutLine:'"/ Compiler settings:'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2505
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2506
    s nextPutLine:'Compiler warnSTXSpecials: ' , (Compiler warnSTXSpecials storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2507
      nextPutLine:'Compiler warnUnderscoreInIdentifier: ' , (Compiler warnUnderscoreInIdentifier storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2508
      nextPutLine:'Compiler warnOldStyleAssignment: ' , (Compiler warnOldStyleAssignment storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2509
      nextPutLine:'Compiler warnCommonMistakes: ' , (Compiler warnCommonMistakes storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2510
      nextPutLine:'Compiler allowUnderscoreInIdentifier: ' , (Compiler allowUnderscoreInIdentifier storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2511
      nextPutLine:'Compiler arraysAreImmutable: ' , (Compiler arraysAreImmutable storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2512
      nextPutLine:'Compiler lineNumberInfo: ' , (Compiler lineNumberInfo storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2513
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2514
      nextPutLine:'Compiler foldConstants: ' , (Compiler foldConstants storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2515
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2516
      nextPutLine:'Compiler stcCompilationIncludes: ' , (Compiler stcCompilationIncludes storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2517
      nextPutLine:'Compiler stcCompilationDefines: ' , (Compiler stcCompilationDefines storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2518
      nextPutLine:'Compiler stcCompilationOptions: ' , (Compiler stcCompilationOptions storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2519
      nextPutLine:'Compiler ccCompilationOptions: ' , (Compiler ccCompilationOptions storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2520
      nextPutLine:'Compiler ccPath: ' , (Compiler ccPath storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2521
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2522
      nextPutLine:'ObjectMemory justInTimeCompilation: ' , (ObjectMemory justInTimeCompilation storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2523
      nextPutLine:'ObjectMemory fullSingleStepSupport: ' , (ObjectMemory fullSingleStepSupport storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2524
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2525
    HistoryManager isActive ifTrue:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2526
        s nextPutLine:'HistoryManager activate.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2527
    ] ifFalse:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2528
        s nextPutLine:'HistoryManager deactivate.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2529
    ].
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2530
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2531
    ObjectFileLoader notNil ifTrue:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2532
        s nextPutLine:'ObjectFileLoader searchedLibraries: ' , (ObjectFileLoader searchedLibraries storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2533
        s nextPutLine:'ObjectFileLoader libPath: ' , (ObjectFileLoader libPath storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2534
    ].
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2535
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2536
    s nextPutLine:'Class catchMethodRedefinitions: ' , (Class catchMethodRedefinitions storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2537
    s nextPutLine:'ClassCategoryReader sourceMode: ' , (ClassCategoryReader sourceMode storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2538
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2539
    s cr.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2540
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2541
    s nextPutLine:'"/ Info & Debug Messages:'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2542
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2543
    s nextPutLine:'ObjectMemory infoPrinting: ' , (ObjectMemory infoPrinting storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2544
      nextPutLine:'ObjectMemory debugPrinting: ' , (ObjectMemory debugPrinting storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2545
      nextPutLine:'Object infoPrinting: ' , (Object infoPrinting storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2546
      nextPutLine:'DeviceWorkstation errorPrinting: ' , (DeviceWorkstation errorPrinting storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2547
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2548
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2549
    s cr.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2550
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2551
    s nextPutLine:'"/ Misc settings:'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2552
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2553
    s nextPutLine:'Class keepMethodHistory: ' , (Class methodHistory notNil storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2554
      nextPutLine:'Smalltalk logDoits: ' , (Smalltalk logDoits storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2555
      nextPutLine:'Autoload compileLazy: ' , (Autoload compileLazy storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2556
      nextPutLine:'Smalltalk loadBinaries: ' , (Smalltalk loadBinaries storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2557
      nextPutLine:'StandardSystemView includeHostNameInLabel: ' , (StandardSystemView includeHostNameInLabel storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2558
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2559
      "/ claus - I dont think its a good idea to save those ...
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2560
      nextPutLine:'"/ Class updateChanges: ' , (Class updatingChanges storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2561
      nextPutLine:'"/ ObjectMemory nameForChanges: ' , (ObjectMemory nameForChanges storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2562
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2563
      nextPutLine:'Dialog returnFocusWhenClosingModalBoxes: ' , (Dialog returnFocusWhenClosingModalBoxes storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2564
      nextPutLine:'MenuView showAcceleratorKeys: ' , (MenuView showAcceleratorKeys storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2565
      nextPutLine:'Class tryLocalSourceFirst: ' , (Class tryLocalSourceFirst storeString) , '.'.
915
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2566
    (Exception emergencyHandler == Launcher notifyingEmergencyHandler) ifTrue:[
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2567
        s nextPutLine:'Exception emergencyHandler:(Launcher notifyingEmergencyHandler).'.
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2568
    ].
853
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2569
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2570
    s cr.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2571
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2572
    s nextPutLine:'"/ Printer settings:'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2573
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2574
    s nextPutLine:'Printer := ' , (Printer name) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2575
      nextPutLine:'Printer printCommand: ' , (Printer printCommand storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2576
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2577
    Printer supportsPageSizes ifTrue:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2578
        s nextPutLine:'Printer pageFormat: ' , (Printer pageFormat storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2579
        s nextPutLine:'Printer landscape: ' , (Printer landscape storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2580
    ].
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2581
    Printer supportsMargins ifTrue:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2582
        s nextPutLine:'Printer topMargin: ' , (Printer topMargin storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2583
        s nextPutLine:'Printer leftMargin: ' , (Printer leftMargin storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2584
        s nextPutLine:'Printer rightMargin: ' , (Printer rightMargin storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2585
        s nextPutLine:'Printer bottomMargin: ' , (Printer bottomMargin storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2586
    ].
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2587
    Printer supportsPostscript ifTrue:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2588
        s nextPutLine:'Printer supportsColor: ' , (Printer supportsColor storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2589
    ].
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2590
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2591
    s cr.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2592
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2593
    s nextPutLine:'"/ Font settings:'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2594
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2595
    s nextPutLine:'View defaultFont: ' , (View defaultFont storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2596
    s nextPutLine:'Label defaultFont: ' , (Label defaultFont storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2597
    s nextPutLine:'Button defaultFont: ' , (Button defaultFont storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2598
    s nextPutLine:'Toggle defaultFont: ' , (Toggle defaultFont storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2599
    s nextPutLine:'SelectionInListView defaultFont: ' , (SelectionInListView defaultFont storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2600
    s nextPutLine:'MenuView defaultFont: ' , (MenuView defaultFont storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2601
    s nextPutLine:'PullDownMenu defaultFont: ' , (PullDownMenu defaultFont storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2602
    s nextPutLine:'TextView defaultFont: ' , (TextView defaultFont storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2603
    s nextPutLine:'EditTextView defaultFont: ' , (EditTextView defaultFont storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2604
    s nextPutLine:'CodeView defaultFont: ' , (CodeView defaultFont storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2605
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2606
    s cr.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2607
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2608
    s nextPutLine:'"/ Language setting:'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2609
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2610
    s nextPutLine:'Smalltalk language: ' , (Smalltalk language storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2611
    s nextPutLine:'Smalltalk languageTerritory: ' , (Smalltalk languageTerritory storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2612
    s close.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2613
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2614
    "
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2615
     Transcript topView application saveSettings
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2616
    "
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2617
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2618
    "Modified: 8.1.1997 / 14:54:00 / cg"
853
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2619
!
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2620
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2621
viewStyleSetting 
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2622
    "open a dialog on viewStyle related settings"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2623
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2624
    |listOfStyles resourceDir dir box 
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2625
     list listView scrView infoLabel infoForwarder newStyle|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2626
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2627
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2628
     search resources directory for a list of .style files ...
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2629
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2630
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2631
    resourceDir := Smalltalk getSystemFileName:'resources'.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2632
    resourceDir isNil ifTrue:[
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2633
        self warn:'no styles found (missing ''resources'' directory)'.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2634
        ^ self
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2635
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2636
    dir := FileDirectory directoryNamed:resourceDir.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2637
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2638
    listOfStyles := dir select:[:aFileName | aFileName endsWith:'.style'].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2639
    listOfStyles := listOfStyles collect:[:aFileName | aFileName copyWithoutLast:6].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2640
    listOfStyles sort.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2641
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2642
"/ old code: used a standard ListSelectionBox
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2643
"/ changed to intercept selection and add info-output.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2644
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2645
"/    box := ListSelectionBox title:(resources string:'STYLE_MSG') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2646
"/    box label:(resources string:'Style selection').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2647
"/    box list:listOfStyles.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2648
"/    box initialText:View defaultStyle.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2649
"/    box selectAction:[:newStyle |
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2650
"/    ].    
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2651
"/    box action:[:newStyle |
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2652
"/        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
  2653
"/            transcript showCR:'change style to ' , newStyle , ' ...'.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2654
"/            View defaultStyle:newStyle asSymbol.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2655
"/        ]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2656
"/    ].    
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2657
"/    box showAtPointer
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2658
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2659
"/ new code: build box 'by 'hand'
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2660
"/
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
  2661
    infoForwarder := [
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2662
                        |nm sheet comment|
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2663
                        nm := list selection.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2664
                        sheet := ViewStyle fromFile:(nm , '.style').
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2665
                        comment := sheet at:#comment ifAbsent:''.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2666
                        infoLabel label:comment withCRs asStringCollection
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2667
                       ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2668
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2669
    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
  2670
    list onChangeSend:#value to:infoForwarder.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2671
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2672
    box := Dialog new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2673
    box label:(resources string:'Style selection').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2674
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2675
    (box addTextLabel:(resources string:'STYLE_MSG') withCRs) adjust:#left.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2676
    listView := SelectionInListView on:list.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2677
    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
  2678
    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
  2679
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2680
    box addVerticalSpace.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2681
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2682
    (infoLabel := box addTextLabel:'\\' withCRs) adjust:#centerLeft.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2683
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2684
    box addAbortButton; addOkButton.
568
58d7e4157f23 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
  2685
    list selection:(View defaultStyle).
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2686
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2687
    box stickAtBottomWithVariableHeight:scrView.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2688
    box stickAtBottomWithFixHeight:infoLabel.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  2689
    box open.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2690
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2691
    box accepted ifTrue:[
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2692
        newStyle := list selection.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2693
        newStyle notNil ifTrue:[
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2694
            self withWaitCursorDo:[
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2695
                transcript showCR:'change style to ' , newStyle , ' ...'.
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2696
                View defaultStyle:newStyle asSymbol.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2697
            ].
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2698
            self reopenLauncher.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2699
        ]
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  2700
    ].
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  2701
    box destroy
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2702
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2703
    "Modified: 8.1.1997 / 14:54:08 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2704
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2705
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  2706
!Launcher methodsFor:'actions - tools'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2707
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2708
compressingGarbageCollect
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2709
    "perform a compressing garbageCollect"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2710
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2711
    ObjectMemory verboseGarbageCollect
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2712
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2713
    "Created: 12.5.1996 / 15:30:15 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2714
    "Modified: 8.1.1997 / 14:54:21 / cg"
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2715
!
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2716
815
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2717
findAndDestroyWindow
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2718
    "find a window (by name) and destroy it"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2719
815
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2720
    |v|
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2721
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2722
    v := self findWindow.
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2723
    v notNil ifTrue:[
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2724
        v destroy.
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2725
    ].
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2726
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2727
    "Created: 28.10.1996 / 14:39:23 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2728
    "Modified: 8.1.1997 / 14:54:52 / cg"
815
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2729
!
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2730
765
9dafe5b26f77 moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents: 760
diff changeset
  2731
findAndRaiseWindow
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2732
    "find a window (by name) and raise it"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2733
815
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2734
    |v|
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2735
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2736
    v := self findWindow.
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2737
    v notNil ifTrue:[
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2738
        v raiseDeiconified.
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2739
    ].
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2740
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2741
    "Modified: 8.1.1997 / 14:54:59 / cg"
765
9dafe5b26f77 moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents: 760
diff changeset
  2742
!
9dafe5b26f77 moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents: 760
diff changeset
  2743
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2744
fullScreenHardcopy
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2745
    "after a second (to allow redraw of views under menu ...),
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2746
     save the contents of the whole screen."
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2747
738
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2748
    Processor 
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2749
        addTimedBlock:[
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2750
                        self 
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2751
                            saveScreenImage:(Image fromScreen) 
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2752
                            defaultName:'screen'
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2753
                      ] 
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2754
        afterSeconds:1
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2755
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2756
    "Modified: 23.9.1996 / 14:36:14 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2757
!
99
claus
parents: 98
diff changeset
  2758
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2759
garbageCollect
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2760
    "perform a non-compressing garbageCollect"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2761
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2762
    ObjectMemory reclaimSymbols
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2763
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2764
    "Created: 12.5.1996 / 15:28:03 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2765
    "Modified: 8.1.1997 / 14:54:29 / cg"
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2766
!
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2767
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2768
globalGarbageCollect
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2769
    "perform a non-compressing garbageCollect"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2770
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2771
    ObjectMemory reclaimSymbols
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2772
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2773
    "Created: 12.5.1996 / 15:28:13 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2774
    "Modified: 8.1.1997 / 14:54:36 / cg"
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2775
!
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2776
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2777
removeAllBreakAndTracePoints
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2778
    "remove all break- and trace points"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2779
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2780
    MessageTracer cleanup
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2781
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2782
    "Modified: 8.1.1997 / 14:55:27 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2783
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2784
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2785
screenHardcopy
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2786
    "after a second (to allow redraw of views under menu ...),
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2787
     let user specify a rectangular area on the screen
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2788
     and save its contents."
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2789
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2790
    |area|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2791
738
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2792
    Processor 
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2793
        addTimedBlock:[
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2794
                        area := Rectangle fromUser.
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2795
                        (area width > 0 and:[area height > 0]) ifTrue:[
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2796
                            self saveScreenImage:(Image fromScreen:area) defaultName:'hardcopy'
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2797
                        ]
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2798
                      ] 
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2799
        afterSeconds:1
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2800
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2801
    "Modified: 23.9.1996 / 14:36:28 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2802
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2803
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2804
startEventMonitor
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2805
    "open an eventMonitor view"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2806
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2807
    EventMonitor open
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2808
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2809
    "Modified: 8.1.1997 / 14:55:40 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2810
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2811
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2812
startFullWindowTreeView
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2813
    "open a windowTree view (on all views)"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2814
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2815
    WindowTreeView open
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2816
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2817
    "Modified: 8.1.1997 / 14:56:04 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2818
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2819
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2820
startMemoryMonitor
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2821
    "open a memoryMonitor view"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2822
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2823
    MemoryMonitor open
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2824
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2825
    "Modified: 8.1.1997 / 14:56:14 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2826
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2827
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2828
startMemoryUsageView
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2829
    "open a memoryUsage view"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2830
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2831
    MemoryUsageView open
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2832
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2833
    "Modified: 8.1.1997 / 14:56:21 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2834
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2835
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2836
startProcessMonitor
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2837
    "open a processMonitor view"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2838
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2839
    ProcessMonitor open
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2840
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2841
    "Modified: 8.1.1997 / 14:56:27 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2842
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2843
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2844
startStopEventTrace
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2845
    "start/stop event tracing for a particular view"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2846
503
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  2847
    |v wg|
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2848
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2849
    v := Screen current viewFromUser.
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2850
    v notNil ifTrue:[
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2851
        v := v topView.
503
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  2852
        wg := v windowGroup.
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  2853
        wg notNil ifTrue:[
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  2854
            "/
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  2855
            "/ toggle eventTrace in its windowGroup
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  2856
            "/
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  2857
            wg traceEvents:(wg preEventHook isNil)
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2858
        ]
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2859
    ]
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2860
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2861
    "Created: 7.3.1996 / 14:44:22 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2862
    "Modified: 8.1.1997 / 14:56:44 / cg"
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2863
!
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  2864
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2865
startWindowTreeView
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2866
    "open a windowTree view (on a topView)"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2867
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2868
    |v|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2869
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2870
    v := self pickAView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2871
    v notNil ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  2872
        WindowTreeView openOn:v topView
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2873
    ]
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2874
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2875
    "Modified: 8.1.1997 / 14:55:59 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2876
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2877
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2878
viewDestroy
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2879
    "let user pick a view and destroy it.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2880
     Even allow destroying non-smalltalk views
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2881
     (also for views which I forgot due to some error)"
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2882
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2883
    |device p v id|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2884
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2885
    (Delay forSeconds:1) wait.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2886
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2887
    device := Screen current.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2888
    p :=  device pointFromUser.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2889
    id := device viewIdFromPoint:p.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2890
    v := device viewFromId:id.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2891
    v notNil ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  2892
        v topView destroy.
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  2893
        ^ self
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2894
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2895
    id = device rootView id ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  2896
        ^ self
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2897
    ].
298
d1212fc486b9 message string changed
Claus Gittinger <cg@exept.de>
parents: 281
diff changeset
  2898
    (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
  2899
    ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  2900
        device destroyView:nil withId:id
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2901
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2902
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2903
    "Modified: 18.9.1995 / 23:13:32 / claus"
298
d1212fc486b9 message string changed
Claus Gittinger <cg@exept.de>
parents: 281
diff changeset
  2904
    "Modified: 14.12.1995 / 22:02:26 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2905
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2906
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2907
viewHardcopy
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2908
    "after a second (to allow redraw of views under menu ...),
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2909
     let user specify a view and save its contents."
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2910
738
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2911
    Processor 
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2912
        addTimedBlock:[
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2913
                        |v|
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2914
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2915
                        v := Screen current viewFromUser.
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2916
                        v notNil ifTrue:[
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2917
                            self saveScreenImage:(Image fromView:(v topView)) defaultName:'hardcopy'
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2918
                        ]
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2919
                      ] 
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2920
        afterSeconds:1
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2921
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2922
    "Modified: 23.9.1996 / 14:36:48 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2923
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2924
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2925
viewInspect
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2926
    "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
  2927
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2928
    |v|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2929
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2930
    v := self pickAView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2931
    v notNil ifTrue:[
226
4b050498fe46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
  2932
"/        v topView inspect
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  2933
        v inspect
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2934
    ]
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
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  2938
!Launcher methodsFor:'change & update'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2939
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2940
update:something with:aParameter from:changedObject
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2941
    "care for project changes & update my infoView"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2942
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2943
    ((something == #currentProject)
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2944
    or:[changedObject == Project]) ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  2945
        self changed:#info.
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  2946
        ^ self
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2947
    ].
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2948
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2949
    "Modified: 8.1.1997 / 14:57:07 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2950
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2951
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  2952
!Launcher methodsFor:'dynamic menus'!
658
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2953
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2954
addMenu:name withItems:items actions:actions
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2955
    "dynamically add a new (user-)menu to the menu panel.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2956
     This allows applications to install items for themself
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2957
     dynamically in the launcher."
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2958
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2959
    |subMenu|
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2960
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2961
    myMenu add:name selector:(name asSymbol) before:#help.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2962
    subMenu := MenuView forMenu:myMenu.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2963
    subMenu labels:items.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2964
    subMenu actions:actions.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2965
    myMenu at:name putMenu:subMenu
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2966
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2967
    "
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2968
     |launcher actionBlocks|
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2969
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2970
     actionBlocks := Array new:3.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2971
     actionBlocks at:1 put:[Transcript showCR:'foo'].
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2972
     actionBlocks at:2 put:[Transcript showCR:'bar'].
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2973
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2974
     launcher := Transcript topView application.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2975
     launcher 
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2976
        addMenu:'misc' 
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2977
        withItems:#('foo' 'bar')
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2978
        actions:actionBlocks
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2979
    "
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2980
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2981
    "
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2982
     |launcher actionBlocks|
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2983
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2984
     actionBlocks := Array new:3.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2985
     actionBlocks at:1 put:[RDoItServer startServer].
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2986
     actionBlocks at:2 put:[RDoItServer killServer].
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2987
                
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2988
     launcher := Transcript topView application.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2989
     launcher 
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2990
        addMenu:'misc' 
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2991
        withItems:#('start rdoit server' 'stop rdoit server')
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2992
        actions:actionBlocks
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2993
    "
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2994
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  2995
    "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
  2996
!
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2997
668
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2998
menuAt:nameSymbol
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  2999
    "return a menu by name"
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3000
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3001
    ^ myMenu subMenuAt:nameSymbol
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3002
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3003
    "
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3004
     |launcher demoMenu|
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3005
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3006
     launcher := Transcript topView application.
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3007
     demoMenu := launcher menuAt:#demos.
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3008
     demoMenu
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3009
        addLabels:#('-' 'fooBar')
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3010
        selectors:#(nil fooBar).
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3011
     demoMenu actionAt:#fooBar put:[Transcript showCR:'fooBar']
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3012
    "
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3013
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3014
    "Created: 11.7.1996 / 15:35:13 / cg"
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3015
    "Modified: 11.7.1996 / 15:42:25 / cg"
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3016
!
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3017
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3018
removeMenu:name
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3019
    "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
  3020
     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
  3021
     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
  3022
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3023
    myMenu remove:name 
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3024
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3025
    "
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3026
     |launcher actionBlocks|
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3027
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3028
     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
  3029
     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
  3030
     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
  3031
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3032
     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
  3033
     launcher 
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3034
        addMenu:'misc' 
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3035
        withItems:#('foo' 'bar')
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3036
        actions:actionBlocks.
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3037
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3038
     Delay waitForSeconds:10.
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3039
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3040
     launcher removeMenu:'misc'
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3041
    "
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3042
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3043
    "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
  3044
    "Modified: 5.7.1996 / 11:54:36 / cg"
658
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3045
! !
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3046
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  3047
!Launcher methodsFor:'help'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3048
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3049
helpTextFor:aComponent
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3050
    "activeHelp interface: return some help text for a component"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3051
399
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  3052
    |sel s buttons|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3053
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3054
    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
  3055
        s := 'TRANSCRIPT_HELP'
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3056
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3057
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3058
    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
  3059
        s := 'INFOVIEW_HELP'
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3060
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3061
399
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  3062
    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
  3063
    (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
  3064
        "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
  3065
        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
  3066
        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
  3067
            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
  3068
        ].
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  3069
        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
  3070
            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
  3071
        ].
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  3072
        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
  3073
            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
  3074
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3075
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3076
    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
  3077
        ^ resources string:s
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3078
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3079
    ^ nil
399
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  3080
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3081
    "Modified: 8.1.1997 / 14:57:34 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3082
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3083
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  3084
!Launcher methodsFor:'infoview update'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3085
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3086
info
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3087
    "update the infoView from the current project"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3088
893
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3089
    |project projectName projectDir packageName defNameSpace msg args|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3090
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3091
    (Project isNil or:[(project := Project current) isNil]) ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3092
        projectName := '* none *'.
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3093
        projectDir := '.'.
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3094
        packageName := '* none *'.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3095
    ] ifFalse:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3096
        projectName := project name.
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3097
        projectDir := project directory.
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3098
        packageName := project packageName.
891
26ac48ced53b show the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 864
diff changeset
  3099
        defNameSpace := project defaultNameSpace.
26ac48ced53b show the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 864
diff changeset
  3100
    ].
26ac48ced53b show the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 864
diff changeset
  3101
    defNameSpace isNil ifTrue:[
26ac48ced53b show the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 864
diff changeset
  3102
        defNameSpace := Smalltalk.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3103
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3104
893
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3105
    defNameSpace == Smalltalk ifTrue:[
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3106
        msg := 'project: ''%1''  fileOut to: ''%3''  package: ''%2'''.
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3107
        args := Array 
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3108
                    with:projectName
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3109
                    with:packageName 
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3110
                    with:(projectDir contractTo:30).
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3111
    ] ifFalse:[
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3112
        msg := 'project: ''%1''  fileOut to: ''%3''  package: ''%2''  nameSpace: %4'.
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3113
        args := Array 
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3114
                        with:projectName
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3115
                        with:packageName 
891
26ac48ced53b show the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 864
diff changeset
  3116
                        with:(projectDir contractTo:30)
893
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3117
                        with:defNameSpace name.
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3118
    ].
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3119
        
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3120
    ^ resources string:msg withArgs:args
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3121
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3122
    "Modified: 8.1.1997 / 14:57:47 / cg"
319
a39350103cb2 forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
  3123
!
a39350103cb2 forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
  3124
a39350103cb2 forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
  3125
showActivity:someMessage
500
6824f44e589b commentary
Claus Gittinger <cg@exept.de>
parents: 499
diff changeset
  3126
    "some activityNotification to be forwarded to the user;
6824f44e589b commentary
Claus Gittinger <cg@exept.de>
parents: 499
diff changeset
  3127
     show it in the transcript here."
6824f44e589b commentary
Claus Gittinger <cg@exept.de>
parents: 499
diff changeset
  3128
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3129
    transcript showCR:someMessage; endEntry
319
a39350103cb2 forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
  3130
a39350103cb2 forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
  3131
    "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
  3132
    "Modified: 5.7.1996 / 13:13:15 / cg"
99
claus
parents: 98
diff changeset
  3133
! !
claus
parents: 98
diff changeset
  3134
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3135
!Launcher methodsFor:'initialize - menus'!
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3136
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3137
disableDangerousMenuItemsInRemoteLauncher
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3138
    "if I am a remote launcher (multidisplay operation),
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3139
     disable menus which are dangerous or affect common state. 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3140
     These operations have to
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3141
     be performed on the main screen."
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3142
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3143
    isMainLauncher ifFalse:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3144
        (myMenu menuAt:#file) disableAll:#(snapshot snapshotAndExit objectModuleDialog exit).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3145
        (myMenu menuAt:#projects) disableAll.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3146
        (myMenu menuAt:#settings) disableAll.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3147
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3148
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3149
    "Created: 5.7.1996 / 17:00:50 / cg"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3150
    "Modified: 5.7.1996 / 17:01:30 / cg"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3151
!
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3152
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3153
setupAboutMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3154
    "setup the about- pulldown menu"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3155
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3156
    myMenu at:#about 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3157
           putLabels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3158
                                        'about Smalltalk/X ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3159
                                        '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3160
                                        'licence conditions'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3161
                                       ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3162
           selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3163
                                        #about 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3164
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3165
                                        #showLicenceConditions 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3166
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3167
           receiver:self.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3168
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3169
    "Created: 8.1.1997 / 14:03:20 / cg"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3170
    "Modified: 8.1.1997 / 14:04:19 / cg"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3171
!
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3172
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3173
setupClassesMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3174
    "setup the classes- pulldown menu"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3175
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3176
    myMenu at:#classes 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3177
           putLabels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3178
                                        'system browser'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3179
                                        'class browser ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3180
                                        'full class browser ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3181
                                        'class hierarchy browser ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3182
                                        'class tree'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3183
                                        '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3184
                                        'implementors ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3185
                                        'senders ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3186
                                        'resource ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3187
                                        '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3188
                                        'change browser'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3189
                                        ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3190
           selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3191
                                        #startSystemBrowser 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3192
                                        #startClassBrowser 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3193
                                        #startFullClassBrowser 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3194
                                        #startClassHierarchyBrowser 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3195
                                        #startClassTreeView 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3196
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3197
                                        #browseImplementors 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3198
                                        #browseSenders 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3199
                                        #browseResources 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3200
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3201
                                        #startChangesBrowser 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3202
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3203
           receiver:self.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3204
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3205
    JavaBrowser notNil ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3206
        (myMenu subMenuAt:#classes)
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3207
            addLabels:(resources array:#('-' 'java browser'))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3208
            selectors:#(nil startJavaBrowser)
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3209
            after:#startClassTreeView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3210
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3211
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3212
    "Created: 8.1.1997 / 14:05:44 / cg"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3213
!
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3214
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3215
setupDemoMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3216
    "setup the demo- pulldown menu"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3217
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3218
    |m|
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3219
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3220
    myMenu at:#demos 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3221
           putLabels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3222
                                        'goodies'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3223
                                        'games'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3224
                                        'geometric designs'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3225
                                        'simple animations'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3226
                                        '3D graphics'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3227
                                        'graphic editors'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3228
                                       ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3229
           selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3230
                                        goodies
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3231
                                        games
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3232
                                        geometricDesigns
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3233
                                        simpleAnimations
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3234
                                        #'3Dgraphics'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3235
                                        #graphicEditors
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3236
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3237
           receiver:self.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3238
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3239
    "
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3240
     only to show two different ways of defining a popUpMenu,
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3241
     we use labels:selectors:receiver: here:
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3242
    "
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3243
    m := myMenu menuAt:#demos.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3244
    m subMenuAt:#games
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3245
      put:(PopUpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3246
                labels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3247
                                           'Tetris'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3248
                                           'Tic Tac Toe'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3249
                                           'Tic Tac Toe (2 players)'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3250
                                         ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3251
                selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3252
                                           startTetris
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3253
                                           startTicTacToe
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3254
                                           startTicTacToe2
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3255
                           )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3256
                receiver:self).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3257
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3258
    "
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3259
     and labels:selector:args:receiver: here:
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3260
    "
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3261
    m subMenuAt:#geometricDesigns
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3262
      put:(PopUpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3263
                labels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3264
                                           'Pen demo'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3265
                                           'Commander demo'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3266
                                           '-'     
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3267
                                           'Fractal plants demo'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3268
                                           'Fractal patterns demo'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3269
                                           'more fractal patterns demo'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3270
                                         ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3271
                selector:#openDemo:
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3272
                args:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3273
                                           PenDemo
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3274
                                           CommanderDemo
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3275
                                           nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3276
                                           FractalPlantsDemo
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3277
                                           FractalPatternsDemo
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3278
                                           ArmchairUniverseDemo
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3279
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3280
                receiver:self).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3281
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3282
    m subMenuAt:#simpleAnimations 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3283
      put:(PopUpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3284
                labels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3285
                                           'Animation'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3286
                                           'Globe demo'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3287
                                         ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3288
                selector:#openDemo:
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3289
                args:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3290
                                           Animation
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3291
                                           GlobeDemo
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3292
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3293
                receiver:self).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3294
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3295
    m subMenuAt:#'3Dgraphics' 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3296
      put:(PopUpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3297
                labels:(resources 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3298
                            array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3299
                                'plane'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3300
                                'tetra'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3301
                                'cube (wireframe)'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3302
                                'cube (solid)'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3303
                                'sphere (wireframe)'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3304
                                'doughnut (wireframe)'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3305
                                'planet'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3306
                                'teapot'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3307
                                'logo'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3308
                                'rubics cube'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3309
                                'x/y graph'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3310
                                '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3311
                                'cube (light)'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3312
                                'cube (light & texture)'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3313
                                'sphere (light)'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3314
                                'colored octahedron'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3315
                             ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3316
                selector:#openDemo:
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3317
                args:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3318
                                GLPlaneDemoView2
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3319
                                GLTetraDemoView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3320
                                GLWireCubeDemoView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3321
                                GLCubeDemoView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3322
                                GLWireSphereDemoView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3323
                                GLDoughnutDemoView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3324
                                GLPlanetDemoView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3325
                                GLTeapotDemo
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3326
                                Logo3DView1
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3327
                                RubicsCubeView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3328
                                GLXYGraph
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3329
                                nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3330
                                GLCubeDemoView2
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3331
                                GLBrickCubeDemoView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3332
                                GLSphereDemoView2
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3333
                                GLOctaHedronDemoView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3334
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3335
                receiver:self).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3336
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3337
    m subMenuAt:#graphicEditors 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3338
      put:(PopUpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3339
                labels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3340
                                           'DrawTool'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3341
                                           'LogicTool'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3342
                                           'Paint Demo'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3343
                                         ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3344
                selector:#openDemo:
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3345
                args:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3346
                                           DrawTool
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3347
                                           LogicTool
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3348
                                           ColorDrawDemo3
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3349
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3350
                receiver:self).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3351
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3352
    m subMenuAt:#goodies 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3353
      put:(PopUpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3354
                labels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3355
                                        'clock'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3356
                                        'calendar'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3357
                                        'calculator'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3358
                                        '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3359
                                        'mail tool'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3360
                                        'news tool'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3361
                                        ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3362
                selector:#openDemo:
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3363
                args:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3364
                                        Clock 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3365
                                        Calendar
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3366
                                        CalculatorView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3367
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3368
                                        MailView 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3369
                                        NewsView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3370
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3371
                receiver:self).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3372
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3373
    "Modified: 8.1.1997 / 14:04:22 / cg"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3374
!
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3375
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3376
setupFileMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3377
    "setup the file- pulldown menu"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3378
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3379
    |l s|
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3380
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3381
    l := #(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3382
                'file browser'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3383
                '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3384
                'modules ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3385
                '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3386
                'snapshot ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3387
                'snapshot & exit ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3388
                'exit smalltalk ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3389
         ).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3390
    s := #(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3391
                #startFileBrowser
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3392
                nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3393
                #objectModuleDialog 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3394
                nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3395
                #snapshot
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3396
                #snapshotAndExit
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3397
                #exit
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3398
         ).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3399
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3400
    myMenu at:#file
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3401
           putLabels:(resources array:l)
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3402
           selectors:s
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3403
           receiver:self.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3404
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3405
    "Created: 8.1.1997 / 14:04:15 / cg"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3406
!
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3407
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3408
setupHelpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3409
    "setup the help- pulldown menu"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3410
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3411
    |l s|
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3412
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3413
    ActiveHelp notNil ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3414
        l := #(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3415
                'what''s new'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3416
                'index'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3417
                '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3418
                'ST/X online documentation'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3419
                'class documentation'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3420
                '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3421
                'print documentation ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3422
                '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3423
                'active help \c'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3424
              ).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3425
        s := #(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3426
                #startWhatsNewDocumentation
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3427
                #startDocumentationIndex
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3428
                nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3429
                #startDocumentationTool
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3430
                #startClassDocumentation
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3431
                nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3432
                #showBookPrintDocument
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3433
                nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3434
                #toggleActiveHelp:
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3435
              )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3436
    ] ifFalse:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3437
        l := #(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3438
                'what''s new'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3439
                'index'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3440
                '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3441
                'ST/X online documentation'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3442
                'class documentation'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3443
                '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3444
                'print documentation ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3445
              ).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3446
        s := #(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3447
                #startWhatsNewDocumentation
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3448
                #startDocumentationIndex
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3449
                nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3450
                #startDocumentationTool
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3451
                #startClassDocumentation
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3452
                nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3453
                #showBookPrintDocument
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3454
              )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3455
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3456
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3457
    myMenu at:#help 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3458
           putLabels:(resources array:l)
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3459
           selectors:s
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3460
           receiver:self.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3461
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3462
    (ActiveHelp notNil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3463
    and:[ActiveHelp isActive]) ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3464
        (myMenu menuAt:#help) checkToggleAt:#toggleActiveHelp: put:true
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3465
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3466
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3467
    "Created: 8.1.1997 / 14:08:09 / cg"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3468
!
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3469
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3470
setupMainMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3471
    "setup the pulldown menus main items.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3472
     Extracted into a separate method, to allow subclasses to
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3473
     add their own entries"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3474
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3475
    |l s icon|
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3476
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3477
    myMenu labels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3478
                                     about
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3479
                                     file
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3480
                                     classes
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3481
                                     tools
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3482
                                     projects
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3483
                                     settings
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3484
                                     demos
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3485
                                     help)).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3486
    "
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3487
     if there is a bitmap, change 'about' to the ST/X icon
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3488
    "
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3489
    icon := self class smallAboutIcon.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3490
    icon notNil ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3491
        myMenu labels at:1 put:icon.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3492
        myMenu height:(myMenu height max:(icon height + (View viewSpacing * 2)))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3493
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3494
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3495
    myMenu selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3496
                                     #about
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3497
                                     #file
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3498
                                     #classes 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3499
                                     #tools 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3500
                                     #projects 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3501
                                     #settings
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3502
                                     #demos
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3503
                                     #help).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3504
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3505
    "Created: 8.1.1997 / 13:58:50 / cg"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3506
!
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3507
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3508
setupMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3509
    "setup the pulldown menu"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3510
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3511
    |mainItems|
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3512
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3513
    self setupMainMenu.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3514
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3515
    mainItems := myMenu selectors.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3516
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3517
    (mainItems includes:#about) ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3518
        "/ if not redefined without an about-menu ...
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3519
        self setupAboutMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3520
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3521
    (mainItems includes:#file) ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3522
        "/ if not redefined without a file-menu ...
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3523
        self setupFileMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3524
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3525
    (mainItems includes:#classes) ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3526
        "/ if not redefined without a classes-menu ...
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3527
        self setupClassesMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3528
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3529
    (mainItems includes:#projects) ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3530
        "/ if not redefined without a projects-menu ...
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3531
        self setupProjectsMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3532
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3533
    (mainItems includes:#settings) ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3534
        "/ if not redefined without a settings-menu ...
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3535
        self setupSettingsMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3536
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3537
    (mainItems includes:#tools) ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3538
        "/ if not redefined without a tools-menu ...
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3539
        self setupToolsMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3540
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3541
    (mainItems includes:#demos) ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3542
        "/ if not redefined without a demos-menu ...
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3543
        self setupDemoMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3544
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3545
    (mainItems includes:#help) ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3546
        "/ if not redefined without a help-menu ...
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3547
        self setupHelpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3548
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3549
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3550
    self disableDangerousMenuItemsInRemoteLauncher
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3551
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3552
    "Modified: 8.1.1997 / 14:09:47 / cg"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3553
!
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3554
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3555
setupProjectsMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3556
    "setup the projects- pulldown menu"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3557
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3558
    myMenu at:#projects 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3559
           putLabels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3560
                                        'new project'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3561
                                        '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3562
                                        'select project ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3563
                                        ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3564
           selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3565
                                        #newProject 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3566
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3567
                                        #selectProject 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3568
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3569
           receiver:self.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3570
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3571
    "Created: 8.1.1997 / 14:06:18 / cg"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3572
!
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3573
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3574
setupSettingsMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3575
    "setup the settings- pulldown menu"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3576
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3577
    myMenu at:#settings 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3578
           putLabels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3579
                                        'language ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3580
                                        'show keyboard mappings ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3581
                                        'view style ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3582
                                        'fonts ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3583
                                        'printer ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3584
                                        'messages ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3585
                                        'compilation ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3586
                                        'object memory ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3587
                                        'screen ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3588
                                        'misc ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3589
                                        '='
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3590
                                        'save settings ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3591
                                        'restore settings ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3592
                                        ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3593
           selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3594
                                        #languageSetting 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3595
                                        #keyboardSetting 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3596
                                        #viewStyleSetting 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3597
                                        #fontSettings 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3598
                                        #printerSettings 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3599
                                        #messageSettings 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3600
                                        #compilerSettings 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3601
                                        #memorySettings 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3602
                                        #displaySettings 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3603
                                        #miscSettings
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3604
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3605
                                        #saveSettings 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3606
                                        #restoreSettings 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3607
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3608
           receiver:self.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3609
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3610
    "Created: 8.1.1997 / 14:07:00 / cg"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3611
!
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3612
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3613
setupToolsMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3614
    "setup the tools- pulldown menu"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3615
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3616
    |m|
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3617
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3618
    myMenu at:#tools 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3619
           putLabels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3620
                                        'workspace'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3621
                                        '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3622
                                        'monitors'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3623
                                        '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3624
                                        'views'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3625
                                        '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3626
                                        'hardcopy'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3627
                                        '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3628
                                        'misc'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3629
                                        ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3630
           selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3631
                                        #startWorkspace 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3632
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3633
                                        #monitors
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3634
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3635
                                        #views
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3636
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3637
                                        #hardcopy 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3638
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3639
                                        #misc 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3640
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3641
           receiver:self.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3642
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3643
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3644
    m := myMenu menuAt:#tools.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3645
    m subMenuAt:#monitors 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3646
      put:(PopUpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3647
                labels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3648
                                           'process'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3649
                                           'memory'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3650
                                           'event view'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3651
                                           'event trace'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3652
                                           '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3653
                                           'memory usage'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3654
                                         ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3655
                selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3656
                                        #startProcessMonitor
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3657
                                        #startMemoryMonitor 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3658
                                        #startEventMonitor 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3659
                                        #startStopEventTrace
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3660
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3661
                                        #startMemoryUsageView 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3662
                           )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3663
                receiver:self).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3664
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3665
    m subMenuAt:#views 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3666
      put:(PopUpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3667
                labels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3668
                                           'find & raise ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3669
                                           '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3670
                                           'view tree (all views)'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3671
                                           'view tree'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3672
                                           'select & inspect view'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3673
                                           'select & destroy view'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3674
                                           'find & destroy ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3675
                                         ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3676
                selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3677
                                        #findAndRaiseWindow 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3678
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3679
                                        #startFullWindowTreeView 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3680
                                        #startWindowTreeView 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3681
                                        #viewInspect 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3682
                                        #viewDestroy 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3683
                                        #findAndDestroyWindow 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3684
                           )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3685
                receiver:self).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3686
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3687
    m subMenuAt:#misc 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3688
      put:(PopUpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3689
                labels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3690
                                           'garbage collect'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3691
                                           'garbage collect & compress'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3692
                                           '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3693
                                           'remove all break/trace points'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3694
                                         ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3695
                selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3696
                                        #garbageCollect
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3697
                                        #compressingGarbageCollect
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3698
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3699
                                        #removeAllBreakAndTracePoints                                        
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3700
                           )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3701
                receiver:self).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3702
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3703
    m subMenuAt:#hardcopy 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3704
      put:(PopUpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3705
                labels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3706
                                           'screen'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3707
                                           'area'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3708
                                           'view'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3709
                                         ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3710
                selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3711
                                        #fullScreenHardcopy
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3712
                                        #screenHardcopy
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3713
                                        #viewHardcopy
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3714
                           )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3715
                receiver:self).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3716
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3717
    "Modified: 8.1.1997 / 14:04:25 / cg"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3718
! !
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3719
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  3720
!Launcher methodsFor:'initialize / release'!
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3721
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3722
addTopViewsToCurrentProject
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3723
    "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
  3724
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3725
    ^ self
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3726
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3727
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3728
buttonPanelSpec
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3729
    "return a spec for the buttons in the panel;
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3730
     entries consists of selector and bitmap-filename.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3731
     nil selectors are taken as separators (see setupButtonPanel)"
98
claus
parents: 96
diff changeset
  3732
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3733
    ^ #(
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3734
        #(startSystemBrowser 'SBrowser32x32.xbm')
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3735
        #(startFileBrowser   'FBrowser32x32.xbm')
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  3736
"/        #(startWorkspace      'Workspace32x32.xbm')
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3737
        #(nil nil)
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3738
        #(startChangesBrowser 'CBrowser32x32.xbm')
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3739
"/        #(nil nil)
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3740
"/        #(nil nil)
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3741
"/        #(startDocumentationTool 'book11.ico')
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3742
     )
230
6be247b9d815 workspace button
Claus Gittinger <cg@exept.de>
parents: 228
diff changeset
  3743
6be247b9d815 workspace button
Claus Gittinger <cg@exept.de>
parents: 228
diff changeset
  3744
    "Created: 4.12.1995 / 20:16:18 / cg"
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3745
    "Modified: 19.4.1996 / 16:37:46 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3746
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3747
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3748
closeDownViews
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3749
    OpenLaunchers remove:self ifAbsent:nil.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3750
    super closeDownViews.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3751
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3752
    "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
  3753
!
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3754
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3755
closeRequest
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3756
    (self confirm:(resources string:'really close %1 ?' with:self class name)) ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3757
        super closeRequest
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3758
    ]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3759
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3760
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3761
focusSequence
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3762
    ^ (Array with:myMenu) 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3763
      , 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3764
      (buttonPanel subViews select:[:element | element isKindOf:Button])
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3765
"/      , (Array with:Transcript)
98
claus
parents: 96
diff changeset
  3766
!
claus
parents: 96
diff changeset
  3767
93
claus
parents: 92
diff changeset
  3768
openInterface
98
claus
parents: 96
diff changeset
  3769
    "sent by my superclass to open up my interface"
93
claus
parents: 92
diff changeset
  3770
615
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3771
    |top icn w scrn sz|
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3772
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3773
    "/ 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
  3774
    "/ 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
  3775
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3776
    Transcript notNil ifTrue:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3777
        Transcript ~~ Stderr ifTrue:[
662
b5efd05fa256 use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents: 661
diff changeset
  3778
            isMainLauncher := (Transcript graphicsDevice == device).
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3779
        ] ifFalse:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3780
            isMainLauncher := true
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3781
        ]
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3782
    ] ifFalse:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3783
        isMainLauncher := true
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3784
    ].
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3785
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3786
    top := StandardSystemView onDevice:device.
205
e3952eceab14 set iconLabel
Claus Gittinger <cg@exept.de>
parents: 192
diff changeset
  3787
    top label:'Smalltalk/X'; iconLabel:'ST/X Launcher'.
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3788
    top extent:(400@300 ).
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3789
615
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3790
    icn := self class aboutIcon.
686
3dd40eb33b09 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 679
diff changeset
  3791
    icn notNil ifTrue:[
3dd40eb33b09 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 679
diff changeset
  3792
        icn := icn magnifiedTo:(sz := Screen current preferredIconSize).
3dd40eb33b09 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 679
diff changeset
  3793
    ].
616
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  3794
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  3795
    ((scrn := Screen current) supportsDeepIcons not
617
19ec7ab9ffb1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 616
diff changeset
  3796
    and:[scrn supportsIconViews
19ec7ab9ffb1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 616
diff changeset
  3797
    and:[scrn depth > 1]]) ifTrue:[    
616
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  3798
        w := View extent:sz. 
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  3799
        w viewBackground:icn.
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  3800
        top iconView:w
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  3801
    ] ifFalse:[
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  3802
        top icon:icn.
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  3803
    ].
615
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3804
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3805
"/    (scrn := Screen current) supportsDeepIcons ifTrue:[
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3806
"/        icn := self class aboutIcon.
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3807
"/        icn notNil ifTrue:[
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3808
"/            icn := icn magnifiedTo:(sz := scrn preferredIconSize).
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3809
"/            icn := Depth8Image fromImage:icn.
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3810
"/            top icon:icn
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3811
"/        ].
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3812
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3813
"/    ] ifFalse:[
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3814
"/        scrn supportsIconViews ifTrue:[
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3815
"/            icn := self class aboutIcon.
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3816
"/            icn notNil ifTrue:[
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3817
"/                icn := icn magnifiedTo:(sz := scrn preferredIconSize).
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3818
"/                w := View extent:sz. 
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3819
"/                w viewBackground:icn.
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3820
"/                top iconView:w
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3821
"/            ].
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3822
"/        ]
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  3823
"/    ].
92
claus
parents: 91
diff changeset
  3824
93
claus
parents: 92
diff changeset
  3825
    self setupViewsIn:top.
98
claus
parents: 96
diff changeset
  3826
claus
parents: 96
diff changeset
  3827
    top application:self.   
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3828
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3829
    "
92
claus
parents: 91
diff changeset
  3830
     open with higher prio to allow interaction even while things
claus
parents: 91
diff changeset
  3831
     are running ...
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3832
    "
92
claus
parents: 91
diff changeset
  3833
    top openWithPriority:(Processor userSchedulingPriority + 1).
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3834
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3835
    OpenLaunchers isNil ifTrue:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3836
        OpenLaunchers := OrderedCollection new.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3837
    ].
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3838
    OpenLaunchers add:self.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3839
686
3dd40eb33b09 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 679
diff changeset
  3840
    "Modified: 25.7.1996 / 21:12:09 / cg"
93
claus
parents: 92
diff changeset
  3841
!
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3842
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3843
release
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3844
    infoProcess notNil ifTrue:[
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3845
        infoProcess terminate.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3846
        infoProcess := nil.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3847
    ].
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3848
    OpenLaunchers remove:self ifAbsent:nil.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3849
    super release
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3850
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3851
    "Modified: 5.7.1996 / 11:48:56 / cg"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3852
!
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3853
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3854
restarted
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3855
    "image restart - since WindowGroup recreates the process with
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
  3856
     the default priority, we have to raise the prio again.
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
  3857
     Mhmh - this looks like a bug to me ...
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
  3858
     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
  3859
     be reset to normal."
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3860
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3861
    Processor activeProcess priority:(Processor userSchedulingPriority + 1).
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
  3862
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3863
    super restarted
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
  3864
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
  3865
    "Modified: 1.6.1996 / 16:58:25 / cg"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3866
!
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3867
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3868
saveAndTerminateRequest
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3869
    "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
  3870
     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
  3871
     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
  3872
     we are already prepared for this ;-)"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3873
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3874
    self snapshot.
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3875
    super saveAndTerminateRequest
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3876
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3877
    "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
  3878
    "Modified: 5.7.1996 / 13:08:55 / cg"
103
claus
parents: 102
diff changeset
  3879
!
claus
parents: 102
diff changeset
  3880
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3881
setupButtonPanelIn:aTopView
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3882
    "create the buttonPanel"
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3883
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  3884
    |spc mh buttonSize|
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3885
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3886
    spc := View viewSpacing // 2.
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3887
    buttonPanel := HorizontalPanelView in:aTopView.
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3888
    buttonPanel level:-1; borderWidth:0.
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3889
    buttonPanel horizontalLayout:#leftSpace.
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3890
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  3891
    buttonSize := self class buttonImageSize.
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  3892
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3893
    "/
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3894
    "/ the buttonSpec is a collection of:
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3895
    "/   #( selector  iconFileName )
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3896
    "/ or:
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3897
    "/   #( selector  (className iconQuerySelector) )
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3898
    "/ or"
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3899
    "/   #( nil )
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3900
    "/
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  3901
    self buttonPanelSpec do:[:entry |
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3902
        |sel b sep img iconSpec|
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3903
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  3904
        sel := entry at:1.
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  3905
        sel isNil ifTrue:[
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  3906
            sep := View in:buttonPanel.
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  3907
            sep extent:32@1; borderWidth:0.
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  3908
        ] ifFalse:[
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  3909
            b := Button in:buttonPanel.
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3910
            iconSpec := entry at:2.
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3911
            iconSpec isArray ifTrue:[
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3912
                img := (Smalltalk classNamed:(iconSpec at:1)) perform:(iconSpec at:2).
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3913
            ] ifFalse:[
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3914
                img := Image fromFile:iconSpec.
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3915
            ].
591
b06ede2544fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 590
diff changeset
  3916
            (img notNil and:[buttonSize notNil]) ifTrue:[
b06ede2544fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 590
diff changeset
  3917
                img extent ~= buttonSize ifTrue:[
b06ede2544fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 590
diff changeset
  3918
                    img := img magnifiedTo:buttonSize       
b06ede2544fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 590
diff changeset
  3919
                ]
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  3920
            ].
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  3921
            b form:img.
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  3922
            b model:self; changeMessage:sel
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  3923
        ]
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3924
    ].
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3925
100
claus
parents: 99
diff changeset
  3926
    mh := myMenu height.
claus
parents: 99
diff changeset
  3927
    buttonPanel origin:0.0 @ (mh + spc)
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  3928
                corner:(1.0 @ (mh + spc + buttonPanel preferredExtent y)).
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3929
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3930
    buttonPanel leftInset:spc; rightInset:spc.
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3931
591
b06ede2544fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 590
diff changeset
  3932
    "Modified: 29.5.1996 / 19:23:04 / cg"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3933
!
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3934
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3935
setupInfoViewIn:topView 
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3936
    "create the infoView"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3937
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3938
    |spc halfSpc|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3939
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3940
    spc := View viewSpacing.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3941
    infoView := Label label:'' in:topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3942
    infoView adjust:#left; borderWidth:0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3943
    infoView level:-1.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3944
    transcript superView bottomInset:(infoView height + spc).
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  3945
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3946
    infoView is3D ifTrue:[
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  3947
        halfSpc := spc // 2.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3948
    ] ifFalse:[
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  3949
        halfSpc := 0
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3950
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3951
    infoView topInset:(infoView height negated - spc + transcript borderWidth);
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  3952
             bottomInset:halfSpc;
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  3953
             leftInset:halfSpc; 
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  3954
             rightInset:halfSpc.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3955
    infoView origin:0.0 @ 1.0 corner:1.0 @ 1.0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3956
    infoView model:self; aspect:#info; labelMessage:#info.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3957
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3958
    Project notNil ifTrue:[
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  3959
        Project addDependent:self.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3960
    ]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3961
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3962
    "
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  3963
     Launcher open
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3964
    "
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  3965
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  3966
    "Modified: 9.9.1996 / 22:44:15 / stefan"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3967
    "Modified: 8.1.1997 / 14:58:22 / cg"
93
claus
parents: 92
diff changeset
  3968
!
claus
parents: 92
diff changeset
  3969
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3970
setupOtherViewsIn:aTopView
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3971
    "a hook - allows redefinition in your personal subclass.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3972
     For example, add a clock:"
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3973
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3974
"
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3975
    |sz clock space halfSpace|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3976
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3977
    sz := buttonPanel innerHeight - (buttonPanel level abs*2).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3978
    space := View viewSpacing.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3979
    halfSpace := space // 2.
93
claus
parents: 92
diff changeset
  3980
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3981
    buttonPanel rightInset:sz+(space  * 2).
93
claus
parents: 92
diff changeset
  3982
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3983
    clock := ClockView in:buttonPanel topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3984
    clock borderWidth:1.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3985
    clock showSeconds:false.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3986
    clock extent:(sz @ sz).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3987
    clock origin:(1.0 @ (buttonPanel origin y + halfSpace)).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3988
    clock leftInset:sz negated - 2 - halfSpace.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3989
    clock rightInset:halfSpace.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3990
    clock level:1.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3991
"
93
claus
parents: 92
diff changeset
  3992
!
claus
parents: 92
diff changeset
  3993
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3994
setupTranscriptIn:aView 
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3995
    "create the transcript view"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3996
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3997
    |v launcher|
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3998
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  3999
    "/ 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
  4000
    "/ if so, do not close the real launcher.
107
claus
parents: 106
diff changeset
  4001
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4002
    (Transcript notNil and:[Transcript ~~ Stderr]) ifTrue:[
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4003
        isMainLauncher ifTrue:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4004
            launcher := Transcript topView application
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4005
        ] ifFalse:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4006
            launcher := self class current.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4007
        ].
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4008
        launcher notNil ifTrue:[
662
b5efd05fa256 use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents: 661
diff changeset
  4009
            launcher window graphicsDevice == device ifTrue:[
661
8171aa84ae17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 660
diff changeset
  4010
                OpenLaunchers remove:launcher ifAbsent:nil.
8171aa84ae17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 660
diff changeset
  4011
                launcher window destroy.
8171aa84ae17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 660
diff changeset
  4012
            ]
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4013
        ]
110
claus
parents: 109
diff changeset
  4014
    ].
claus
parents: 109
diff changeset
  4015
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4016
    v := HVScrollableView 
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4017
                for:TextCollector
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4018
                miniScrollerH:true 
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4019
                miniScrollerV:false 
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4020
                in:aView.
93
claus
parents: 92
diff changeset
  4021
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4022
    v origin:(0.0 @ (buttonPanel corner y + View viewSpacing)) 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4023
      corner:(1.0 @ 1.0).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4024
    transcript := v scrolledView.
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4025
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4026
    isMainLauncher ifTrue:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4027
        transcript beTranscript.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4028
    ] ifFalse:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4029
        transcript showCR:'**************** Notice ***********************'.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4030
        transcript showCR:'**       this is NOT the Transcript          **'.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4031
        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
  4032
        transcript showCR:'**                                           **'.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4033
        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
  4034
        transcript showCR:'***********************************************'.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4035
    ]
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4036
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4037
    "Modified: 8.1.1997 / 14:58:32 / cg"
94
claus
parents: 93
diff changeset
  4038
!
claus
parents: 93
diff changeset
  4039
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4040
setupViewsIn:topView 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4041
    "create the pulldown menu, buttonPanel and transcript view"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4042
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4043
    |tFont|
131
claus
parents: 128
diff changeset
  4044
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4045
    topView model:self.
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4046
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4047
    myMenu := PullDownMenu in:topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4048
    myMenu origin:0.0 @ 0.0 corner:(1.0 @ myMenu height).
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4049
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4050
    self setupMenu.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4051
    self setupButtonPanelIn:topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4052
    self setupTranscriptIn:topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4053
    self setupInfoViewIn:topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4054
    self setupOtherViewsIn:topView.
118
claus
parents: 117
diff changeset
  4055
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4056
    tFont := transcript font.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4057
    topView extent:(((tFont widthOf:'3')*60) max:myMenu preferredExtent x)
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4058
                    @ 
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4059
                    ((tFont height) * 20).
118
claus
parents: 117
diff changeset
  4060
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4061
    "
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4062
     Launcher open
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4063
    "
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4064
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4065
    "Modified: 9.9.1996 / 22:44:31 / stefan"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4066
! !
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4067
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4068
!Launcher methodsFor:'private'!
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4069
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4070
findWindow
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4071
    "a helper for find & destroy and find & raise operations;
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4072
     let user choose a view and return it; return nil on cancel"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4073
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4074
    |knownTopViews nameList box|
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4075
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4076
    knownTopViews := IdentitySet new.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4077
    Screen allScreens do:[:aScreen |
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4078
        aScreen knownViews do:[:aView |
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4079
            aView notNil ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4080
                knownTopViews add:aView topView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4081
            ]
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4082
        ]
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4083
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4084
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4085
    knownTopViews := knownTopViews select:[:aView | aView windowGroup notNil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4086
                                                    and:[aView windowGroup isModal not]].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4087
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4088
    knownTopViews := knownTopViews asOrderedCollection.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4089
    knownTopViews sort:[:v1 :v2 | v1 label < v2 label].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4090
    nameList := knownTopViews collect:[:v | 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4091
                                        |isDead wg p|
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4092
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4093
                                        ((wg := v windowGroup) notNil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4094
                                        and:[(p := wg process) notNil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4095
                                        and:[p state ~~ #dead]]) ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4096
                                            v label
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4097
                                        ] ifFalse:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4098
                                            v label , ' (dead ?)'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4099
                                        ]
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4100
                                      ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4101
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4102
    box := ListSelectionBox new.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4103
    box noEnterField.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4104
    box list:nameList.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4105
    box label:(resources string:'view selection').
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4106
    box title:(resources string:'select a view to raise deiconified:') withCRs.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4107
    box action:[:selection |
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4108
        |v|
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4109
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4110
        v := knownTopViews at:box selectionIndex.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4111
        box destroy.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4112
        ^ v
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4113
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4114
    box extent:400@300.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4115
    box showAtPointer.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4116
    ^ nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4117
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4118
    "Modified: 16.10.1996 / 12:41:39 / cg"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4119
    "Created: 28.10.1996 / 14:38:41 / cg"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4120
!
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4121
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4122
fontBoxForEncoding:encodingMatch
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4123
    "open a fontBox, showing fonts which match some encoding
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4124
     (used when changing to japanese ...)"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4125
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  4126
    |box y b
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4127
     labelDef buttonDef listDef menuDef textDef
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4128
     models labels allOfThem filter|
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4129
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4130
    encodingMatch notNil ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4131
        filter := [:f | f encoding notNil 
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4132
                        and:[encodingMatch match:f encoding]].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4133
    ].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4134
        
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4135
    models := OrderedCollection new.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4136
    labels := OrderedCollection new.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4137
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4138
    models add:(allOfThem := nil asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4139
    models add:(labelDef := Label defaultFont asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4140
    models add:(buttonDef := Button defaultFont asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4141
    models add:(listDef := SelectionInListView defaultFont asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4142
    models add:(menuDef := MenuView defaultFont asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4143
    models add:(textDef := TextView defaultFont asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4144
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4145
    box := Dialog new.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4146
    box label:(resources string:'Font settings').
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4147
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4148
    models
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4149
    with:(resources array:#('all' 'labels' 'buttons' 'lists' 'menus' 'edit text'))
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4150
    do:[:model :title |
427
3ad00ff692b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 421
diff changeset
  4151
        |y2 lbl f i|
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4152
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4153
        f := model value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4154
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4155
        (box addTextLabel:title) adjust:#left.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4156
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4157
        y := box yPosition.
631
76013574eb04 Settings.Fonts menu: Add ... to Change button labels.
Stefan Vogel <sv@exept.de>
parents: 630
diff changeset
  4158
        b := box addComponent:(Button label:(resources string:'change ...')) tabable:true.
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4159
        b relativeExtent:nil; extent:(b preferredExtent).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4160
        y2 := box yPosition.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4161
        box yPosition:y.
427
3ad00ff692b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 421
diff changeset
  4162
        i := box leftIndent.
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4163
        box leftIndent:(b widthIncludingBorder + View viewSpacing).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4164
        (lbl := box addTextLabel:'')
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4165
            adjust:#left;
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4166
            font:(model value);
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4167
            labelChannel:(BlockValue 
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4168
                            with:[:v | |f|
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4169
                                f := v value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4170
                                f isNil ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4171
                                    ''
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4172
                                ] ifFalse:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4173
                                    f userFriendlyName
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4174
                                ]
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4175
                            ]
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4176
                            argument:model).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4177
        labels add:lbl.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4178
427
3ad00ff692b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 421
diff changeset
  4179
        box leftIndent:i.
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4180
        box yPosition:(box yPosition max:y2).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4181
        box addVerticalSpace.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4182
        box addHorizontalLine.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4183
        box addVerticalSpace.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4184
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4185
        b action:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4186
            |f|
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4187
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4188
            f := FontPanel 
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4189
                fontFromUserInitial:(model value) 
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4190
                              title:(resources string:'font for %1' with:title)
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4191
                             filter:filter.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4192
            f notNil ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4193
                model == allOfThem ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4194
                    models do:[:m | m value:f].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4195
                    labels do:[:l | l font:f]
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4196
                ] ifFalse:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4197
                    model value:f.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4198
                    lbl font:f.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4199
                ].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4200
            ]
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4201
        ].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4202
        model == allOfThem ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4203
            box addVerticalSpace
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4204
        ]
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4205
    ].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4206
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4207
    box addAbortButton; addOkButton.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4208
    (box addButton:(Button label:(resources string:'defaults')) before:nil)
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4209
        action:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4210
            "/ fetch defaults
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4211
            View updateAllStyleCaches.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4212
            labelDef value: Label defaultFont.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4213
            buttonDef value: Button defaultFont.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4214
            listDef value: SelectionInListView defaultFont.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4215
            menuDef value: MenuView defaultFont.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4216
            textDef value: TextView defaultFont.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4217
        ].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4218
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4219
    box open.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4220
    box accepted ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4221
        Label defaultFont:labelDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4222
        Button defaultFont:buttonDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4223
        Toggle defaultFont:buttonDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4224
        SelectionInListView defaultFont:listDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4225
        MenuView defaultFont:menuDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4226
        PullDownMenu defaultFont:menuDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4227
        TextView defaultFont:textDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4228
        EditTextView defaultFont:textDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4229
        CodeView defaultFont:textDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4230
    ].
592
5a03a69bc5a3 oops - menuAction is now called with arg if there is one
Claus Gittinger <cg@exept.de>
parents: 591
diff changeset
  4231
    box destroy.
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4232
    ^ box accepted
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4233
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4234
    "Created: 27.2.1996 / 01:44:16 / cg"
631
76013574eb04 Settings.Fonts menu: Add ... to Change button labels.
Stefan Vogel <sv@exept.de>
parents: 630
diff changeset
  4235
    "Modified: 17.6.1996 / 13:38:48 / stefan"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4236
    "Modified: 8.1.1997 / 14:59:11 / cg"
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4237
!
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4238
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4239
openApplication:className nameSpace:aNameSpace
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4240
    "open some application, given the classes name.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4241
     Look for it in Smalltalk and the given nameSpace"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4242
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4243
    self openApplication:className nameSpace:aNameSpace with:#open
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4244
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4245
    "Modified: 8.1.1997 / 14:59:42 / cg"
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4246
!
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4247
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4248
openApplication:className nameSpace:aNameSpace with:aSelector
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4249
    "open some application, given the classes name.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4250
     Look for it in Smalltalk and the given nameSpace"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4251
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4252
    |cls|
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4253
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4254
    cls := Smalltalk at:className asSymbol.
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4255
    cls isNil ifTrue:[
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4256
        "/ look if its in the nameSpace
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4257
        aNameSpace notNil ifTrue:[
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4258
            cls := aNameSpace at:className asSymbol
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4259
        ]
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4260
    ].
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4261
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4262
    cls isNil ifTrue:[
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4263
        self warn:(resources string:'sorry, the %1 class is not available.' with:className).
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4264
    ] ifFalse:[
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4265
        Autoload autoloadFailedSignal handle:[:ex |
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4266
            self warn:(resources string:'sorry, the %1 class seems to be not available.' with:className)
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4267
        ] do:[
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4268
            cls perform:aSelector
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4269
        ]
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4270
    ]
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4271
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4272
    "Created: 8.1.1997 / 12:52:13 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4273
    "Modified: 8.1.1997 / 14:59:47 / cg"
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4274
!
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4275
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4276
pickAView
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4277
    "let user pick a view and return it"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4278
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4279
    |v|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4280
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4281
    (Delay forSeconds:1) wait.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4282
    v := Screen current viewFromUser.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4283
    v isNil ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  4284
        self warn:'sorry, this is not a smalltalk view'.
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  4285
        ^ nil
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4286
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4287
    ^ v
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4288
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4289
    "Modified: 8.1.1997 / 14:59:57 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4290
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4291
106
claus
parents: 105
diff changeset
  4292
reopenLauncher
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4293
    "reopen a new launcher.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4294
     for now (since style & language settings currently do
106
claus
parents: 105
diff changeset
  4295
     not affect living views ...)"
claus
parents: 105
diff changeset
  4296
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  4297
    |contents fontPref enc newLauncher|
397
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  4298
777
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  4299
"/ moved the stuff below to the language-setting
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  4300
"/ dialog (ask before changing the language, to have
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  4301
"/ proper texts in the dialogs).
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  4302
"/
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  4303
"/    fontPref := self class classResources at:'PREFERRED_FONT_ENCODING'.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  4304
"/    enc := MenuView defaultFont encoding.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  4305
"/    (fontPref match:enc) ifFalse:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  4306
"/        (self confirm:'menu font is not ' , fontPref , '-encoded.\\Change it ?' withCRs)
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  4307
"/        ifTrue:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  4308
"/            self fontBoxForEncoding:fontPref
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  4309
"/        ]
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  4310
"/    ].
106
claus
parents: 105
diff changeset
  4311
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4312
    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
  4313
    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
  4314
    newLauncher window waitUntilVisible.
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4315
    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
  4316
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4317
    "Modified: 8.1.1997 / 15:00:15 / cg"
106
claus
parents: 105
diff changeset
  4318
!
claus
parents: 105
diff changeset
  4319
100
claus
parents: 99
diff changeset
  4320
saveAllViews
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4321
    "tell each topview that we are going to terminate and give it chance
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4322
     to save its contents."
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4323
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4324
    ObjectMemory changed:#aboutToExit
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4325
!
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4326
93
claus
parents: 92
diff changeset
  4327
saveScreenImage:anImage defaultName:defaultName
claus
parents: 92
diff changeset
  4328
    "save an image into a file 
claus
parents: 92
diff changeset
  4329
     - ask user for filename using a fileSelectionBox."
claus
parents: 92
diff changeset
  4330
claus
parents: 92
diff changeset
  4331
    |fileName|
claus
parents: 92
diff changeset
  4332
claus
parents: 92
diff changeset
  4333
    fileName := Dialog
382
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  4334
                    requestFileName:(resources string:'save image in:')
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  4335
                    default:(defaultName , '.tiff')
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  4336
                    ok:(resources string:'save')
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  4337
                    abort:(resources string:'cancel')
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  4338
                    pattern:'*.tiff'.
93
claus
parents: 92
diff changeset
  4339
claus
parents: 92
diff changeset
  4340
    fileName notNil ifTrue:[
382
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  4341
        anImage saveOn:fileName
93
claus
parents: 92
diff changeset
  4342
    ].
382
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  4343
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  4344
    "Modified: 21.2.1996 / 13:09:28 / cg"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4345
! !
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4346
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4347
!Launcher methodsFor:'queries'!
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  4348
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4349
processName
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4350
    "for monitors only - my name"
142
claus
parents: 140
diff changeset
  4351
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4352
    ^ '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
  4353
!
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4354
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4355
transcript
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4356
    "my transcript"
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4357
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4358
    ^ transcript
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4359
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4360
    "Created: 5.7.1996 / 13:04:36 / cg"
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  4361
! !
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  4362
760
39e3f920b233 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 743
diff changeset
  4363
!Launcher class methodsFor:'documentation'!
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4364
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4365
version
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4366
    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.224 1997-01-08 14:04:08 cg Exp $'
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4367
! !