Launcher.st
author Claus Gittinger <cg@exept.de>
Tue, 01 Apr 1997 14:55:24 +0200
changeset 1108 75a3e4f9a21a
parent 1106 650465f9b173
child 1115 8fc8a7688aec
permissions -rw-r--r--
care for non-labeled views in #findWindow
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
1039
5777986bc03a fixed resource search
Claus Gittinger <cg@exept.de>
parents: 1037
diff changeset
    14
	instanceVariableNames:'myMenu buttonPanel transcript infoView infoProcess helpIsOn
5777986bc03a fixed resource search
Claus Gittinger <cg@exept.de>
parents: 1037
diff changeset
    15
		isMainLauncher'
5777986bc03a fixed resource search
Claus Gittinger <cg@exept.de>
parents: 1037
diff changeset
    16
	classVariableNames:'CachedAboutIcon OpenLaunchers NotifyingEmergencyHandler'
5777986bc03a fixed resource search
Claus Gittinger <cg@exept.de>
parents: 1037
diff changeset
    17
	poolDictionaries:''
5777986bc03a fixed resource search
Claus Gittinger <cg@exept.de>
parents: 1037
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
954
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
    96
    Notice:
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
    97
        Since there can only be one SystemTranscript, opening a new launcher
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
    98
        will automatically close the current one (except for a remote launcher,
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
    99
        opened on another display).
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   100
511
1e00846b87e5 documentation
Claus Gittinger <cg@exept.de>
parents: 505
diff changeset
   101
    [author:]
1e00846b87e5 documentation
Claus Gittinger <cg@exept.de>
parents: 505
diff changeset
   102
        Claus Gittinger
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   103
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   104
    [see also:]
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   105
        Examples_misc::MyLauncher
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   106
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   107
    [start with:]
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   108
        Launcher open
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   109
"
954
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   110
!
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   111
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   112
examples
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   113
"
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   114
    As ST/X can handle multiple screens, there is nothing (except fear ;-)
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   115
    from preventing you to work with your friend in the same image.
965
b363c2d24c26 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 964
diff changeset
   116
    To do this, evaluate (replace localhost by whatever):
954
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   117
                                                                        [exBegin]
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   118
        |display2|
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   119
965
b363c2d24c26 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 964
diff changeset
   120
        display2 := XWorkstation new initializeFor:'localhost:0'.
954
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   121
        display2 isNil ifTrue:[
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   122
            self warn:'cannot connect.'.
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   123
        ] ifFalse:[
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   124
            display2 startDispatch.
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   125
            display2 keyboardMap:(Display keyboardMap).
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   126
            Launcher openOnDevice:display2.
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   127
        ]
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   128
                                                                        [exEnd]
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   129
    But you should be somewhat careful, the other guy may change things so
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   130
    that you are blocked (start high prio processes, change classes etc.)
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   131
    Anyway, a nice demo ....
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
   132
"
88
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
   133
! !
a38a2e87687b *** empty log message ***
claus
parents: 86
diff changeset
   134
760
39e3f920b233 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 743
diff changeset
   135
!Launcher class methodsFor:'accessing'!
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   136
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   137
current
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   138
    "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
   139
     (for access via addMenu/ removeMenu)"
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   140
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   141
    OpenLaunchers do:[:aLauncher |
662
b5efd05fa256 use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents: 661
diff changeset
   142
        aLauncher window graphicsDevice == Screen current ifTrue:[
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   143
            ^ aLauncher
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   144
        ]
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   145
    ].
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   146
    ^ nil.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   147
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   148
    "
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   149
     Launcher current
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   150
    "
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   151
662
b5efd05fa256 use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents: 661
diff changeset
   152
    "Modified: 5.7.1996 / 17:55:28 / cg"
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   153
    "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
   154
! !
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
   155
760
39e3f920b233 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 743
diff changeset
   156
!Launcher class methodsFor:'defaults'!
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
   157
11b4ce85104e Initial revision
claus
parents:
diff changeset
   158
aboutIcon
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   159
    "return the icon shown in the about menu-item and used
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   160
     as ST/X about icon"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   161
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
   162
    |image|
11b4ce85104e Initial revision
claus
parents:
diff changeset
   163
11b4ce85104e Initial revision
claus
parents:
diff changeset
   164
    CachedAboutIcon notNil ifTrue:[^ CachedAboutIcon].
11b4ce85104e Initial revision
claus
parents:
diff changeset
   165
11b4ce85104e Initial revision
claus
parents:
diff changeset
   166
    image := Image fromFile:'SmalltalkX.xbm'.
92
claus
parents: 91
diff changeset
   167
    image notNil ifTrue:[
580
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   168
        |green dark|
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   169
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
   170
        Screen current hasColors ifTrue:[
1037
2e9961e2fe15 *** empty log message ***
ca
parents: 1034
diff changeset
   171
            green := (Color redPercent:0 greenPercent:80 bluePercent:20) "darkened".
2e9961e2fe15 *** empty log message ***
ca
parents: 1034
diff changeset
   172
            dark := Color grayPercent:10.
580
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   173
            image photometric:#palette.
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   174
        ] ifFalse:[
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   175
            dark := Color black.
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   176
            green := Color white.
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   177
            image photometric:#blackIs0.
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   178
        ].
71a1b9e1ee81 gray vs. grey
Claus Gittinger <cg@exept.de>
parents: 574
diff changeset
   179
        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
   180
"/        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
   181
"/            image := (Image implementorForDepth:Screen current depth) fromImage:image.
144
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   182
"/        ]
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
   183
    ].
11b4ce85104e Initial revision
claus
parents:
diff changeset
   184
    CachedAboutIcon := image.
11b4ce85104e Initial revision
claus
parents:
diff changeset
   185
    ^ image
11b4ce85104e Initial revision
claus
parents:
diff changeset
   186
11b4ce85104e Initial revision
claus
parents:
diff changeset
   187
    "
92
claus
parents: 91
diff changeset
   188
     CachedAboutIcon := nil.
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   189
     Launcher aboutIcon
92
claus
parents: 91
diff changeset
   190
    "
144
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   191
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   192
    "Modified: 9.9.1996 / 22:41:23 / stefan"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   193
    "Modified: 8.1.1997 / 15:01:30 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   194
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   195
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
   196
buttonImageSize
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   197
    "images in buttonPanel are sized to this.
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   198
     Can be redefined in subclasses to return nil (no scaling)
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   199
     or any other useful size"
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   200
932
d370fa068ade allow button size to be specified in the styleSheet
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   201
    <resource: #style (#launcherButtonSize)>
d370fa068ade allow button size to be specified in the styleSheet
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   202
d370fa068ade allow button size to be specified in the styleSheet
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   203
    ^ View styleSheet at:#launcherButtonSize default:(32@32)
d370fa068ade allow button size to be specified in the styleSheet
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   204
d370fa068ade allow button size to be specified in the styleSheet
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   205
    "Modified: 9.1.1997 / 13:48:09 / cg"
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
   206
!
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
   207
915
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   208
notifyingEmergencyHandler
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   209
    "return a block (used as an emergency handler
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   210
     for exceptions), which does errorNotification before going
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   211
     into the debugger."
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   212
960
5ed782506949 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
   213
    "Remember the handlerBlock, to be able to determine if the current
5ed782506949 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
   214
     handler is the notifying one."
5ed782506949 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
   215
915
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   216
    NotifyingEmergencyHandler isNil ifTrue:[
960
5ed782506949 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
   217
        NotifyingEmergencyHandler := Exception notifyingEmergencyHandler
915
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   218
    ].
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   219
    ^ NotifyingEmergencyHandler
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   220
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   221
    "Created: 7.1.1997 / 22:18:19 / cg"
960
5ed782506949 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
   222
    "Modified: 15.1.1997 / 21:15:38 / cg"
915
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   223
!
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   224
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   225
smallAboutIcon
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   226
    "return the icon shown in the about menu-item"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   227
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   228
    |image|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   229
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   230
    image := self aboutIcon.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   231
    image notNil ifTrue:[
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   232
        image := image magnifiedBy:0.4.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   233
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   234
    ^ image
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   235
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   236
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   237
     CachedAboutIcon := nil.
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   238
     Launcher aboutIcon.
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   239
     Launcher smallAboutIcon.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   240
    "
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   241
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   242
    "Modified: 9.9.1996 / 22:42:12 / stefan"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   243
    "Modified: 8.1.1997 / 15:02:56 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   244
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   245
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   246
!Launcher methodsFor:'actions - about & help'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   247
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   248
about
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   249
    "show an about box"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   250
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   251
    |box|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   252
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   253
    box := AboutBox new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   254
    box autoHideAfter:10 with:[].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   255
    box showAtCenter
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   256
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   257
    "Modified: 8.1.1997 / 14:37:07 / cg"
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
727
6d954f6e4ee2 print documentation
Claus Gittinger <cg@exept.de>
parents: 726
diff changeset
   260
showBookPrintDocument
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   261
    "open an HTML browser on the 'book'-printing document"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   262
727
6d954f6e4ee2 print documentation
Claus Gittinger <cg@exept.de>
parents: 726
diff changeset
   263
    self showDocumentation:'BOOK.html'
6d954f6e4ee2 print documentation
Claus Gittinger <cg@exept.de>
parents: 726
diff changeset
   264
6d954f6e4ee2 print documentation
Claus Gittinger <cg@exept.de>
parents: 726
diff changeset
   265
    "Modified: 31.8.1995 / 13:11:28 / claus"
6d954f6e4ee2 print documentation
Claus Gittinger <cg@exept.de>
parents: 726
diff changeset
   266
    "Created: 12.9.1996 / 01:53:30 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   267
    "Modified: 8.1.1997 / 14:42:59 / cg"
727
6d954f6e4ee2 print documentation
Claus Gittinger <cg@exept.de>
parents: 726
diff changeset
   268
!
6d954f6e4ee2 print documentation
Claus Gittinger <cg@exept.de>
parents: 726
diff changeset
   269
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   270
showDocumentation:aRelativeDocFilePath
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   271
    "open an HTML browser on some document"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   272
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   273
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   274
     although that one is not yet finished,
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   275
     its better than nothing ...
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   276
    "
555
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   277
    HTMLDocumentView notNil ifTrue:[
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   278
        "
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   279
         temporary kludge;
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   280
         not all machines can autoload binaries;
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   281
         however, on my SGI (which can) we want it
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   282
         to load automatically.
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   283
        "
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   284
        HTMLDocumentView isLoaded ifFalse:[
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   285
            ErrorSignal catch:[HTMLDocumentView autoload]
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   286
        ].
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   287
        HTMLDocumentView isLoaded ifTrue:[
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   288
            HTMLDocumentView openFullOnDocumentationFile:aRelativeDocFilePath. 
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   289
            ^ self
c5efe38d2c46 use new documentView
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
   290
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   291
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   292
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   293
    self warn:'Sorry, the ST/X HTML reader is not (yet) 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   294
included in this architectures release.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   295
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   296
Please use Mosaic, netscape, chimera or any
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   297
other HTML viewer to see the documentation.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   298
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   299
The documentation is found in the ''doc/online'' directory.'.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   300
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   301
    "Modified: 31.8.1995 / 13:11:08 / claus"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   302
    "Modified: 8.1.1997 / 14:42:42 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   303
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   304
733
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   305
showLicenceConditions
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   306
    "open an HTML browser on the 'LICENCE' document"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   307
860
fa31564f3072 changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents: 855
diff changeset
   308
    |lang doc|
fa31564f3072 changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents: 855
diff changeset
   309
fa31564f3072 changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents: 855
diff changeset
   310
    ((lang := Smalltalk language) = 'de'
fa31564f3072 changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents: 855
diff changeset
   311
    or:[lang = 'german']) ifTrue:[
fa31564f3072 changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents: 855
diff changeset
   312
        doc := 'german/LICENCE.STX.html'
fa31564f3072 changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents: 855
diff changeset
   313
    ] ifFalse:[
fa31564f3072 changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents: 855
diff changeset
   314
        doc := 'english/LICENCE.STX.html'
fa31564f3072 changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents: 855
diff changeset
   315
    ].
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   316
    doc := resources at:'LICENCEFILE' default:doc.
860
fa31564f3072 changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents: 855
diff changeset
   317
    self showDocumentation:('../' , doc)
739
cce1e1dab15e Licence is in german/LICENCE.STX.html.
Stefan Vogel <sv@exept.de>
parents: 738
diff changeset
   318
733
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   319
    "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
   320
    "Modified: 23.9.1996 / 17:03:15 / stefan"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   321
    "Modified: 8.1.1997 / 14:39:57 / cg"
733
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   322
!
1cd5a9644c57 added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents: 727
diff changeset
   323
496
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   324
startClassDocumentation
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   325
    "open an HTML browser on the 'classDoc/TOP' document"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   326
496
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   327
    self showDocumentation:'classDoc/TOP.html'
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   328
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   329
    "Modified: 31.8.1995 / 13:11:28 / claus"
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   330
    "Created: 22.4.1996 / 21:03:56 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   331
    "Modified: 8.1.1997 / 14:42:04 / cg"
496
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   332
!
e9f37c7c4109 classDoc item in helpmenu
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   333
483
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   334
startDocumentationIndex
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   335
    "open an HTML browser on the 'index' document"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   336
483
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   337
    self showDocumentation:'index.html'
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   338
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   339
    "Modified: 31.8.1995 / 13:11:28 / claus"
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   340
    "Created: 17.4.1996 / 22:08:55 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   341
    "Modified: 8.1.1997 / 14:41:23 / cg"
483
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   342
!
548634e3d258 index in help menu
Claus Gittinger <cg@exept.de>
parents: 476
diff changeset
   343
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   344
startDocumentationTool
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   345
    "open an HTML browser on the 'TOP' document"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   346
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   347
    self showDocumentation:'TOP.html'
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   348
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   349
    "Modified: 31.8.1995 / 13:11:28 / claus"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   350
    "Modified: 8.1.1997 / 14:41:38 / cg"
219
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
776
f1a70d73582a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   353
startWhatsNewDocumentation
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   354
    "open an HTML browser on the 'whatsNew.html' document"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   355
776
f1a70d73582a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   356
    self showDocumentation:'whatsNew.html'
f1a70d73582a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   357
f1a70d73582a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   358
    "Modified: 31.8.1995 / 13:11:28 / claus"
f1a70d73582a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   359
    "Created: 18.10.1996 / 14:00:35 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   360
    "Modified: 8.1.1997 / 14:39:32 / cg"
776
f1a70d73582a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   361
!
f1a70d73582a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   362
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   363
toggleActiveHelp:aBoolean
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   364
    "turn on/off active help"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   365
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   366
    ActiveHelp notNil ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   367
        helpIsOn := aBoolean.
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   368
        helpIsOn ifTrue:[
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   369
            ActiveHelp start
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   370
        ] ifFalse:[
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   371
            ActiveHelp stop
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   372
        ]
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   373
    ].
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   374
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   375
    "Modified: 8.1.1997 / 14:37:30 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   376
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   377
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   378
!Launcher methodsFor:'actions - classes'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   379
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   380
browseImplementors
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   381
    "open an implementors- browser after asking for a selector"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   382
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   383
    |enterBox|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   384
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   385
    enterBox := EnterBox title:(resources at:'Browse implementors of:') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   386
    enterBox okText:(resources at:'browse').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   387
    enterBox action:[:selectorName |
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   388
        |cls|
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   389
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   390
        self withWaitCursorDo:[SystemBrowser browseImplementorsOf:selectorName]  
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   391
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   392
    enterBox showAtPointer
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   393
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   394
    "Modified: 8.1.1997 / 14:44:09 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   395
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   396
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   397
browseResources
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   398
    "open a resource- browser after asking for a resource string"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   399
930
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   400
    |box resourceHolder valueHolder component rsrc value t|
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   401
964
8fe72552b476 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   402
    resourceHolder := ValueHolder newString.
930
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   403
    valueHolder := '*' asValue.
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   404
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   405
    box := DialogBox new.
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   406
    box label:(resources at:'Resource search:').
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   407
    component := box addTextLabel:(resources at:'Search for methods which contain a\particular resource specification') withCRs.
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   408
    component adjust:#left.
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   409
    box addVerticalSpace:10.
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   410
1034
4dbf69457675 added #image-resource search to list.
ca
parents: 1032
diff changeset
   411
    component := box addTextLabel:(resources at:'Resource symbol (empty for any; no matchPattern allowed):') withCRs.
932
d370fa068ade allow button size to be specified in the styleSheet
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   412
    component adjust:#left.
970
4d14ab7bd326 better browse-resource dialog
Claus Gittinger <cg@exept.de>
parents: 968
diff changeset
   413
    component :=  box addComboBoxOn:resourceHolder tabable:true.
1034
4dbf69457675 added #image-resource search to list.
ca
parents: 1032
diff changeset
   414
    component list:#('* any *' 'keyboard' 'style' 'canvas' 'image' nil 'needsFix').
4dbf69457675 added #image-resource search to list.
ca
parents: 1032
diff changeset
   415
4dbf69457675 added #image-resource search to list.
ca
parents: 1032
diff changeset
   416
    component := box addTextLabel:(resources at:'Resource value (* for any; matchPattern is allowed):') withCRs.
932
d370fa068ade allow button size to be specified in the styleSheet
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   417
    component adjust:#left.
d370fa068ade allow button size to be specified in the styleSheet
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   418
    box addInputFieldOn:valueHolder tabable:true.
930
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   419
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   420
    box addVerticalSpace:10.
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   421
    box addAbortButton; addOkButton.
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   422
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   423
    box showAtPointer.
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   424
    box destroy.
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   425
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   426
    box accepted ifTrue:[
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   427
        rsrc := resourceHolder value.
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   428
        value := valueHolder value.
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   429
970
4d14ab7bd326 better browse-resource dialog
Claus Gittinger <cg@exept.de>
parents: 968
diff changeset
   430
        (rsrc isNil or:[rsrc isEmpty or:[rsrc = '*' or:[rsrc = '* any *']]]) ifTrue:[
589
ce36a65f07a1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
   431
            t := 'methods with any resource'.
930
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   432
            rsrc := nil
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   433
        ] ifFalse:[
932
d370fa068ade allow button size to be specified in the styleSheet
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   434
            t := 'methods with #' , rsrc , '-resource'.
1039
5777986bc03a fixed resource search
Claus Gittinger <cg@exept.de>
parents: 1037
diff changeset
   435
            rsrc := rsrc withoutSeparators asSymbol
930
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   436
        ].
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   437
        (value isNil or:[value isEmpty or:[value = '*']]) ifTrue:[
932
d370fa068ade allow button size to be specified in the styleSheet
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   438
            t := t , ' and any value'.
930
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   439
            value := nil
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   440
        ] ifFalse:[
932
d370fa068ade allow button size to be specified in the styleSheet
Claus Gittinger <cg@exept.de>
parents: 930
diff changeset
   441
            t := t , ' and value ' , value.
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   442
        ].
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   443
        self withWaitCursorDo:[
930
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   444
            SystemBrowser browseForResource:rsrc
f280acd36356 better resource search
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   445
                          containing:value
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   446
                          in:(Smalltalk allClasses)
589
ce36a65f07a1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
   447
                          title:t
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   448
        ]  
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   449
    ].
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   450
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   451
    "Created: 28.5.1996 / 13:15:16 / cg"
1039
5777986bc03a fixed resource search
Claus Gittinger <cg@exept.de>
parents: 1037
diff changeset
   452
    "Modified: 25.2.1997 / 20:09:07 / cg"
574
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   453
!
b097a3dd0360 added browse-resource
Claus Gittinger <cg@exept.de>
parents: 568
diff changeset
   454
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   455
browseSenders
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   456
    "open a senders- browser after asking for a selector"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   457
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   458
    |enterBox|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   459
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   460
    enterBox := EnterBox title:(resources at:'Browse senders of:') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   461
    enterBox okText:(resources at:'browse').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   462
    enterBox action:[:selectorName |
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   463
        |cls|
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   464
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   465
        self withWaitCursorDo:[SystemBrowser browseAllCallsOn:selectorName]  
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   466
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   467
    enterBox showAtPointer
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   468
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   469
    "Modified: 8.1.1997 / 14:46:46 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   470
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   471
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   472
startChangesBrowser
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   473
    "open a changebrowser"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   474
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   475
    self withWaitCursorDo:[ChangesBrowser open]
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   476
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   477
    "Modified: 8.1.1997 / 14:47:07 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   478
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   479
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   480
startClassBrowser
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   481
    "open a classBrowser; asks for class"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   482
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   483
    SystemBrowser askThenBrowseClass
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   484
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   485
    "Modified: 8.1.1997 / 14:48:16 / cg"
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
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   488
startClassHierarchyBrowser
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   489
    "open a classHierarchyBrowser; asks for class"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   490
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   491
    SystemBrowser askThenBrowseClassHierarchy
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   492
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   493
    "Modified: 8.1.1997 / 14:48:28 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   494
!
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
startClassTreeView
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   497
    "open a classHierarchyTree view"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   498
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   499
    self withWaitCursorDo:[ClassTreeGraphView open]
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   500
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   501
    "Modified: 8.1.1997 / 14:48:38 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   502
!
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
startFileBrowser
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   505
    "open a fileBrowser"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   506
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   507
    self withWaitCursorDo:[FileBrowser open]
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   508
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   509
    "Modified: 8.1.1997 / 14:48:47 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   510
!
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
startFullClassBrowser
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   513
    "open a fullClass systemBrowser; asks for class"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   514
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   515
    SystemBrowser askThenBrowseFullClassProtocol
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   516
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   517
    "Modified: 8.1.1997 / 14:48:06 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   518
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   519
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   520
startJavaBrowser
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   521
    "open a javaBrowser (not included in the standard distribution)"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   522
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   523
    JavaBrowser notNil ifTrue:[
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   524
        self withWaitCursorDo:[JavaBrowser open]
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   525
    ]
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   526
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   527
    "Created: 18.4.1996 / 15:55:44 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   528
    "Modified: 8.1.1997 / 14:47:31 / cg"
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   529
!
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
   530
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   531
startSystemBrowser
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   532
    "open a systemBrowser"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   533
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   534
    self withWaitCursorDo:[SystemBrowser open]
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   535
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   536
    "Modified: 8.1.1997 / 14:47:43 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   537
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   538
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   539
startWorkspace
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   540
    "open a workspace"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   541
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   542
    Workspace open
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   543
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   544
    "Modified: 8.1.1997 / 14:47:49 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   545
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   546
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   547
!Launcher methodsFor:'actions - demos'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   548
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   549
openDemo:className
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   550
    "open a demo, given its name.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   551
     Looks in both the Smalltalk- and the Demos-Namespace
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   552
     for that class."
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   553
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   554
    self openApplication:className nameSpace:Demos
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   555
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   556
    "Modified: 8.1.1997 / 14:51:02 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   557
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   558
1008
296ff0a39a80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   559
openGame:className
296ff0a39a80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   560
    "open a game, given its name.
296ff0a39a80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   561
     Looks in both the Smalltalk- and the Games-Namespace
296ff0a39a80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   562
     for that class."
296ff0a39a80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   563
296ff0a39a80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   564
    self openApplication:className nameSpace:Games
296ff0a39a80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   565
296ff0a39a80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   566
    "Modified: 8.1.1997 / 14:51:18 / cg"
296ff0a39a80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   567
    "Created: 28.1.1997 / 00:49:21 / cg"
296ff0a39a80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   568
!
296ff0a39a80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   569
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   570
startTetris
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   571
    "opens a tetris game"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   572
1008
296ff0a39a80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   573
    self openGame:'Tetris'
296ff0a39a80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   574
296ff0a39a80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   575
    "Modified: 28.1.1997 / 00:49:40 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   576
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   577
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   578
startTicTacToe
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   579
    "opens a ticTacToe game against the machine"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   580
1008
296ff0a39a80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   581
    self openGame:'TicTacToeGame'
296ff0a39a80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   582
296ff0a39a80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   583
    "Modified: 28.1.1997 / 00:49:44 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   584
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   585
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   586
startTicTacToe2
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   587
    "opens a 2-user ticTacToe game"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   588
1008
296ff0a39a80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   589
    self openApplication:'TicTacToeGame' nameSpace:Games with:#open2UserGame
296ff0a39a80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   590
296ff0a39a80 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   591
    "Modified: 28.1.1997 / 00:49:50 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   592
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   593
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   594
!Launcher methodsFor:'actions - file'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   595
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   596
exit
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   597
    "stop ST/X - after asking for confirmation"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   598
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   599
    (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
   600
    ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   601
        self saveAllViews.
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
   602
        Smalltalk exit
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   603
    ]
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   604
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   605
    "Modified: 8.1.1997 / 14:50:00 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   606
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   607
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   608
objectModuleDialog
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   609
    "opens a moduleInfo dialog"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   610
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   611
    |allModules moduleNames
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   612
     allObjects methodObjects methodNames 
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
   613
     cObjects cObjectNames
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   614
     otherObjects otherObjectNames
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   615
     box l handles unloadButton
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   616
     list1 list2 listView1 listView2
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   617
     y panel 
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   618
     showBuiltIn showModules showMethods showCObjects showOthers
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   619
     moduleListUpdater check canDoIt menu|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   620
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   621
    showBuiltIn := true asValue. 
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   622
    canDoIt := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   623
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   624
    showModules := canDoIt asValue. 
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   625
    showMethods := canDoIt asValue.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   626
    showCObjects := canDoIt asValue.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   627
    showOthers := canDoIt asValue.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   628
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
   629
    list1 := SelectionInList new.
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
   630
    list2 := SelectionInList new.
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
   631
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
   632
    moduleListUpdater := [
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   633
            |l|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   634
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   635
            list2 list:nil.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   636
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   637
            l := Array new.
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   638
            handles := Array new.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   639
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   640
            (showModules value or:[showBuiltIn value]) ifTrue:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   641
                allModules := ObjectMemory binaryModuleInfo asOrderedCollection.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   642
                (showBuiltIn value and:[showModules value]) ifFalse:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   643
                    allModules := allModules select:[:i |
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   644
                        |wantToSee|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   645
821
a81a0fb108d0 changes for new moduleInfo reply
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   646
                        wantToSee := i dynamic.
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   647
                        showBuiltIn value ifTrue:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   648
                            wantToSee := wantToSee not
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   649
                        ].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   650
                        wantToSee
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   651
                    ]
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   652
                ].
821
a81a0fb108d0 changes for new moduleInfo reply
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   653
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   654
                "/ 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
   655
                allModules sort:[:a :b | (a id) > (b id)].
a81a0fb108d0 changes for new moduleInfo reply
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   656
                moduleNames := allModules collect:[:entry | entry name].
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   657
                l := l , moduleNames.
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   658
                handles := handles , allModules.
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   659
            ].
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   660
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   661
            showMethods value ifTrue:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   662
                allObjects := ObjectFileLoader loadedObjectHandles.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   663
                methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   664
                methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   665
                                                                'compiled method - removed' , ' (in ' , mH pathName , ')'
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   666
                                                            ] ifFalse:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   667
                                                                'compiled method ' , mH method whoString , ' (in ' , mH pathName , ')'
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   668
                                                            ].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   669
                                                     ].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   670
                l := l , methodNames.
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   671
                handles := handles , methodObjects.
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   672
            ].
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   673
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   674
            showCObjects value ifTrue:[
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   675
                allObjects := ObjectFileLoader loadedObjectHandles.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   676
                cObjects := (allObjects select:[:h | h isFunctionObjectHandle]) asArray.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   677
                cObjectNames := cObjects collect:[:entry | entry pathName].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   678
                l := l , cObjectNames.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   679
                handles := handles , cObjects.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   680
            ].
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
            showOthers value ifTrue:[
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   683
                allObjects := ObjectFileLoader loadedObjectHandles.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   684
                otherObjects := (allObjects select:[:h | (h isFunctionObjectHandle
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   685
                                                         or:[h isMethodHandle
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   686
                                                         or:[h isClassLibHandle]]) not]) asArray.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   687
                otherObjectNames := otherObjects collect:[:entry | entry pathName].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   688
                l := l , otherObjectNames.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   689
                handles := handles , otherObjects.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   690
            ].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   691
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   692
            list1 list:l.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   693
            unloadButton disable.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   694
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   695
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
   696
    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
   697
    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
   698
    showMethods onChangeSend:#value to:moduleListUpdater.
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   699
    showCObjects onChangeSend:#value to:moduleListUpdater.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   700
    showOthers onChangeSend:#value to:moduleListUpdater.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   701
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   702
    box := Dialog new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   703
    box label:(resources string:'Module dialog').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   704
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   705
    listView1 := HVScrollableView for:SelectionInListView miniScrollerH:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   706
    listView1 model:list1.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   707
    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
   708
    listView1 action:[:sel |
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   709
        |info classNames tabs module|
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   710
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   711
        listView1 middleButtonMenu:nil.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   712
467
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   713
        box withWaitCursorDo:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   714
            |nm fileName addr entry1 entry2 entry3 method|
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   715
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   716
            tabs := TabulatorSpecification unit:#inch positions:#(0 2.6).
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   717
467
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   718
            (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
   719
                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
   720
            ].
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   721
            info isNil ifTrue:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   722
                "/ selected a method, cObject or unknown
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   723
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   724
                module := handles at:sel.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   725
                fileName := module pathName.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   726
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   727
                module isMethodHandle ifTrue:[
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   728
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   729
                    (method := module method) isNil ifTrue:[
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   730
                        nm := '** removed **'.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   731
                    ] ifFalse:[
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   732
                        menu := PopUpMenu
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   733
                                    labels:#('inspect' 'browse')
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   734
                                    selectors:#(inspect browse).
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   735
                        menu actionAt:#inspect put:[ method inspect ].
827
c74f542ba50b use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 821
diff changeset
   736
                        menu actionAt:#browse put:[ |who|
c74f542ba50b use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 821
diff changeset
   737
                                                    who := method who.
c74f542ba50b use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 821
diff changeset
   738
                                                    SystemBrowser 
c74f542ba50b use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 821
diff changeset
   739
                                                        openInClass:(who methodClass) 
c74f542ba50b use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 821
diff changeset
   740
                                                        selector:(who methodSelector) 
c74f542ba50b use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 821
diff changeset
   741
                                                  ].
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   742
                        listView1 middleButtonMenu:menu.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   743
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   744
                        nm := (method whoString) asText emphasizeAllWith:(#color->Color blue).
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   745
                    ].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   746
                    entry1 := MultiColListEntry new:2 tabulatorSpecification:tabs.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   747
                    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
   748
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   749
                    entry2 := MultiColListEntry new:2 tabulatorSpecification:tabs.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   750
                    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
   751
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   752
                    entry3 := MultiColListEntry new:2 tabulatorSpecification:tabs.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   753
                    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
   754
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   755
                    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
   756
                ] ifFalse:[
673
c227d07d31bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 672
diff changeset
   757
                    (module isFunctionObjectHandle 
c227d07d31bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 672
diff changeset
   758
                    and:[module functions notEmpty]) ifTrue:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   759
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   760
                        menu := PopUpMenu
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   761
                                    labels:#('inspect')
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   762
                                    selectors:#(inspect).
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   763
                        menu actionAt:#inspect put:[ module functions inspect  ].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   764
                        listView1 middleButtonMenu:menu.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   765
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   766
                        list2 list:((module functions select:[:f | f notNil])
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   767
                                        collect:[:f | |entry|
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   768
                                                        entry := MultiColListEntry new:2 tabulatorSpecification:tabs.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   769
                                                        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
   770
                                                        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
   771
                                                        entry
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   772
                                                ]).
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   773
                    ] ifFalse:[
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   774
                        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
   775
                    ]
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   776
                ].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   777
                
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   778
                unloadButton enable.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   779
            ] ifFalse:[
467
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   780
                "/ selected a package
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   781
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   782
                "/ 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
   783
821
a81a0fb108d0 changes for new moduleInfo reply
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   784
                classNames := info classNames asSortedCollection.
467
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   785
                classNames := classNames collect:[:cName |
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   786
                                |cls entry rev listEntry|
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   787
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   788
                                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
   789
                                listEntry colAt:1 put:cName.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   790
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   791
                                cls := Smalltalk classNamed:cName.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   792
                                cls isNil ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   793
                                    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
   794
                                ] ifFalse:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   795
                                    rev := cls binaryRevision.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   796
                                    rev notNil ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   797
                                        cls isLoaded ifFalse:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   798
                                            entry := '(stub for: ' , rev.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   799
                                        ] ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   800
                                            entry :='(bin: ' , rev.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   801
                                        ].    
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   802
                                        cls revision ~= rev ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   803
                                            entry := entry , ' / src: ' , cls revision    
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   804
                                        ].
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   805
                                        listEntry colAt:2 put:entry , ')'
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   806
                                    ] ifFalse:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   807
                                       cls revision notNil ifTrue:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   808
                                            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
   809
                                       ]
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   810
                                    ]
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   811
                                ].
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   812
                                listEntry
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   813
                              ].
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   814
                list2 list:classNames.
821
a81a0fb108d0 changes for new moduleInfo reply
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   815
                info dynamic ifTrue:[
467
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   816
                    unloadButton enable.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   817
                ] ifFalse:[
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   818
                    unloadButton disable.
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   819
                ].
b07279f33723 show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   820
            ]
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   821
        ]
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   822
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   823
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   824
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   825
    panel := HorizontalPanelView new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   826
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   827
    panel add:(l := Label label:'show:').
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   828
    l adjust:#left; borderWidth:0.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   829
    panel add:(check := CheckBox label:'builtin' model:showBuiltIn).
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   830
    box makeTabable:check.
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   831
    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
   832
    canDoIt ifFalse:[
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   833
        check disable
690
c3fb26a81b59 disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   834
    ] ifTrue:[
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   835
        box makeTabable:check.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   836
    ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   837
    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
   838
    canDoIt ifFalse:[
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   839
        check disable
690
c3fb26a81b59 disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   840
    ] ifTrue:[
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   841
        box makeTabable:check.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   842
    ].
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   843
    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
   844
    canDoIt ifFalse:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   845
        check disable
690
c3fb26a81b59 disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   846
    ] ifTrue:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   847
        box makeTabable:check.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   848
    ].
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   849
    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
   850
    canDoIt ifFalse:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   851
        check disable
690
c3fb26a81b59 disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   852
    ] ifTrue:[
671
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   853
        box makeTabable:check.
036972e738ba much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
   854
    ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   855
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   856
    panel horizontalLayout:#fitSpace.
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   857
    "/ panel horizontalLayout:#leftSpace.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   858
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   859
    box addComponent:panel tabable:false.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   860
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
   861
    box addVerticalSpace.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   862
    box addComponent:listView1 tabable:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   863
    listView1 topInset:(View viewSpacing + panel preferredExtent y).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   864
    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
   865
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   866
    l := box addTextLabel:(resources string:'contained classes/subsets:').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   867
    l adjust:#left; borderWidth:0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   868
    l origin:0.0@0.4 corner:1.0@0.4.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   869
    l topInset:(View viewSpacing).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   870
    l bottomInset:((l preferredExtent y) negated - View viewSpacing).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   871
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   872
    listView2 := HVScrollableView for:SelectionInListView  miniScrollerH:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   873
    listView2 model:list2; printItems:false.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   874
    box addComponent:listView2 tabable:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   875
    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
   876
    listView2 disable.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   877
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   878
    unloadButton := Button label:(resources string:'unload').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   879
    unloadButton action:[
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   880
        self withWaitCursorDo:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   881
            box withWaitCursorDo:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   882
                |info idx pathName|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   883
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   884
                idx := list1 selectionIndex.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   885
                info := allModules at:idx ifAbsent:nil.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   886
672
9e8c6ef412b1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   887
                list1 selectionIndex:nil.
9e8c6ef412b1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   888
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   889
                info isNil ifTrue:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   890
                    "/ selected a method
740
95ef743fb8aa fixed unload of method-modules
Claus Gittinger <cg@exept.de>
parents: 739
diff changeset
   891
                    "/ idx := idx - allModules size.
672
9e8c6ef412b1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   892
                    pathName := (handles at:idx) pathName.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   893
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   894
                ] ifFalse:[
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   895
                    "/ selected a package
821
a81a0fb108d0 changes for new moduleInfo reply
Claus Gittinger <cg@exept.de>
parents: 815
diff changeset
   896
                    pathName := info pathName.
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   897
                ].
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   898
                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
   899
                moduleListUpdater value.
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   900
                unloadButton disable.
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   901
            ]
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   902
        ]
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   903
    ].
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
   904
    moduleListUpdater value.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   905
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   906
    box addButton:unloadButton.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   907
    box addAbortButtonLabelled:(resources string:'close').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   908
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   909
    y := box yPosition.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   910
    listView2 topInset:(l preferredExtent y + 5).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   911
    listView2 bottomInset:(box preferredExtent y - y).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   912
458
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   913
"/    box width:(400 min:(box device width * 2 // 3)); 
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   914
"/        height:(450 min:(box device height - 50)); 
f2e58c66454c show stub classes
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
   915
"/        sizeFixed:true.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   916
    box open.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   917
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
   918
    box destroy.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   919
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   920
    "Modified: 17.9.1995 / 16:47:50 / claus"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   921
    "Modified: 8.1.1997 / 14:50:15 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   922
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   923
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   924
snapshot
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   925
    "saves a snapshot image, after asking for a fileName"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   926
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   927
    |fileName|
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   928
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   929
    fileName := DialogBox
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   930
                    request:(resources at:'filename for image:') withCRs
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   931
              initialAnswer:(ObjectMemory nameForSnapshot) 
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   932
                    okLabel:(resources at:'save')
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   933
                      title:(resources string:'save image')
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   934
                   onCancel:nil.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   935
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   936
    fileName notNil ifTrue:[
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   937
        self showCursor:Cursor write.
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   938
        [
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   939
            (ObjectMemory snapShotOn:fileName) ifFalse:[
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   940
                "
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   941
                 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
   942
                "
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   943
                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
   944
            ]
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   945
        ] valueNowOrOnUnwindDo:[
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   946
            self restoreCursors.
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   947
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   948
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   949
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   950
    "Modified: 8.1.1997 / 14:50:29 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   951
!
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
snapshotAndExit
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   954
    "saves a snapshot image and exits, after asking for a fileName"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   955
590
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   956
    |fileName ok|
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   957
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   958
    fileName := DialogBox
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   959
                    request:(resources at:'filename for image:') withCRs
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   960
              initialAnswer:(ObjectMemory nameForSnapshot) 
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   961
                    okLabel:(resources at:'save & exit')
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   962
                      title:(resources string:'save image & exit')
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   963
                   onCancel:nil.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   964
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   965
    fileName notNil ifTrue:[
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   966
        self showCursor:Cursor write.
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   967
        [
590
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   968
            ok := ObjectMemory snapShotOn:fileName.
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   969
        ] valueNowOrOnUnwindDo:[
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   970
            self restoreCursors.
590
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   971
        ].
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   972
590
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   973
        ok ifFalse:[
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   974
            "
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   975
             snapshot failed for some reason (disk full, no permission etc.)
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   976
             Do NOT exit in this case.
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   977
            "
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   978
            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
   979
        ] ifTrue:[
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   980
            "
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   981
             saveAllViews tells all views to shutdown neatly 
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   982
             (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
   983
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   984
             This is NOT required - all data should be in the snapshot ...
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   985
             ... however, if remote disks/mountable filesystems are involved,
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   986
             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
   987
             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
   988
            "
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   989
"
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   990
            self saveAllViews.
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   991
"
776544e5eab4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 589
diff changeset
   992
            Smalltalk exit
404
4960628225e9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 403
diff changeset
   993
        ]
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   994
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   995
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
   996
    "Modified: 8.1.1997 / 14:50:36 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   997
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   998
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
   999
!Launcher methodsFor:'actions - goodies'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1000
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1001
openGoodie:className
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1002
    "open a goodie, given its name.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1003
     Looks in both the Smalltalk- and the Goodies-Namespace
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1004
     for that class."
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1005
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1006
    self openApplication:className nameSpace:Goodies
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1007
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1008
    "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
  1009
!
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1010
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1011
startCalendar
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1012
    "open a calendar goodie"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1013
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1014
    self openGoodie:'Calendar'
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1015
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1016
    "Modified: 8.1.1997 / 14:51:29 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1017
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1018
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1019
startClock
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1020
    "open a clock goodie"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1021
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1022
    self openGoodie:'RoundClock'
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1023
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1024
    "Modified: 8.1.1997 / 14:51:34 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1025
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1026
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1027
startMailTool
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1028
    "open a mailView goodie"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1029
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1030
    self openGoodie:'MailView'
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1031
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1032
    "Modified: 8.1.1997 / 14:51:42 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1033
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1034
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1035
startNewsTool
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1036
    "open a newsTool goodie"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1037
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1038
    self openGoodie:'NewsView'
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1039
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1040
    "Modified: 8.1.1997 / 14:51:48 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1041
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1042
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  1043
!Launcher methodsFor:'actions - projects'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1044
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1045
newProject 
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1046
    "creates a new project & opens a projectView for it"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1047
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1048
    Project notNil ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  1049
        (ProjectView for:(Project new)) open
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1050
    ]
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1051
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1052
    "Modified: 8.1.1997 / 14:52:07 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1053
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1054
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1055
selectProject
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1056
    "asks for and switch to another project"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1057
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1058
    |list box|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1059
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1060
    Project notNil ifTrue:[
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1061
        list := Project allInstances.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1062
        box := ListSelectionBox new.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1063
        box list:(list collect:[:p | p name]).
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1064
        box title:(resources string:'select a project').
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1065
        box action:[:selection |
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1066
            |project|
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1067
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1068
            project := list detect:[:p | p name = selection] ifNone:[nil].
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1069
            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
  1070
                transcript showCR:'no such project.'
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1071
            ] ifFalse:[
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1072
                project showViews.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1073
                Project current:project
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1074
            ]
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1075
        ].
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1076
        box showAtPointer.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1077
        box destroy
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1078
    ]
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  1079
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1080
    "Modified: 8.1.1997 / 14:52:20 / cg"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1081
! !
11b4ce85104e Initial revision
claus
parents:
diff changeset
  1082
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  1083
!Launcher methodsFor:'actions - settings'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1084
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1085
compilerSettings
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1086
    "open a dialog on compiler related settings"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1087
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1088
    |box warnings warnSTX warnUnderscore warnOldStyle allowUnderscore immutableArrays
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1089
     warnSTXBox warnUnderscoreBox warnOldStyleBox warnCommonMistakes warnCommonMistakesBox
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1090
     stcCompilation compilationList stcCompilationOptions stcIncludes stcDefines stcOptions
833
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1091
     stcLibraries stcLibraryPath cc ccOptions historyLines catchRedefs keepSourceOptions keepSource  
780
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1092
     constantFoldingOptions constantFolding justInTimeCompilation fullSingleStep
782
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1093
     warnEnabler check component oldIndent t supportsJustInTimeCompilation y
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1094
     y2 fullLineNumbers|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1095
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1096
    warnings := Compiler warnings asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1097
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1098
    warnSTX := Compiler warnSTXSpecials asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1099
    warnUnderscore := Compiler warnUnderscoreInIdentifier asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1100
    warnOldStyle := Compiler warnOldStyleAssignment asValue.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1101
    warnCommonMistakes := Compiler warnCommonMistakes asValue.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1102
    allowUnderscore := Compiler allowUnderscoreInIdentifier asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1103
    immutableArrays := Compiler arraysAreImmutable asValue.
782
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1104
    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
  1105
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1106
    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
  1107
    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
  1108
    constantFolding selectionIndex:3.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1109
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1110
    stcCompilationOptions := #( always default never).
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1111
    stcCompilation := SelectionInList new 
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1112
                        list:(resources array:#('always' 
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1113
                                                'primitive code only' 
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1114
                                                'never'
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1115
                                               )).
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1116
    stcCompilation selectionIndex:2.
698
64cf733533d1 dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
  1117
    (supportsJustInTimeCompilation := ObjectMemory supportsJustInTimeCompilation)
64cf733533d1 dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
  1118
    ifTrue:[
780
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1119
        justInTimeCompilation := ObjectMemory justInTimeCompilation:nil.
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1120
        fullSingleStep := ObjectMemory fullSingleStepSupport:nil.
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1121
    ] ifFalse:[
780
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1122
        justInTimeCompilation := false.
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1123
        fullSingleStep := false.
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1124
    ].
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1125
    justInTimeCompilation := justInTimeCompilation asValue.
780
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1126
    fullSingleStep := fullSingleStep asValue.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1127
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1128
    stcIncludes := Compiler stcCompilationIncludes asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1129
    stcDefines := Compiler stcCompilationDefines asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1130
    stcOptions := Compiler stcCompilationOptions asValue.
833
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1131
    ccOptions := Compiler ccCompilationOptions asValue.
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1132
    cc := Compiler ccPath asValue.
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1133
232
926e657541c9 *** empty log message ***
chrisy
parents: 230
diff changeset
  1134
    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
  1135
        (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
  1136
            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
  1137
        ].
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1138
        (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
  1139
            stcLibraryPath := t asValue.
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1140
        ]
232
926e657541c9 *** empty log message ***
chrisy
parents: 230
diff changeset
  1141
    ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1142
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1143
    catchRedefs := Class catchMethodRedefinitions asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1144
    historyLines := (HistoryManager notNil and:[HistoryManager isActive]) asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1145
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1146
    keepSourceOptions := #( keep reference absReference sourceReference discard ).
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1147
    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
  1148
    keepSource selectionIndex:1.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1149
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
  1150
    warnEnabler := [
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
  1151
              warnings value ifTrue:[
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1152
                warnSTXBox enable. 
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1153
                warnOldStyleBox enable.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1154
                warnCommonMistakesBox enable.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1155
                allowUnderscore value ifTrue:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1156
                    warnUnderscoreBox enable.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1157
                ] ifFalse:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1158
                    warnUnderscoreBox disable.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1159
                ].
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1160
              ] ifFalse:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1161
                warnSTXBox disable. 
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1162
                warnUnderscoreBox disable.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1163
                warnOldStyleBox disable.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1164
                warnCommonMistakesBox disable.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1165
              ]].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1166
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
  1167
    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
  1168
    allowUnderscore onChangeSend:#value to:warnEnabler.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1169
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1170
    box := DialogBox new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1171
    box label:(resources string:'Compiler settings').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1172
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1173
    box addCheckBox:(resources string:'catch method redefinitions') on:catchRedefs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1174
    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
  1175
    HistoryManager isNil ifTrue:[check disable].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1176
378
7e17a9941cca added ...'s
Claus Gittinger <cg@exept.de>
parents: 377
diff changeset
  1177
    box addPopUpList:(resources string:'fileIn source mode:') on:keepSource.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1178
    keepSource selectionIndex:( keepSourceOptions indexOf:(ClassCategoryReader sourceMode) ifAbsent:1).
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1179
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1180
    box addHorizontalLine.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1181
698
64cf733533d1 dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
  1182
    supportsJustInTimeCompilation ifTrue:[
64cf733533d1 dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
  1183
        component := box 
64cf733533d1 dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
  1184
                        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
  1185
                        on:justInTimeCompilation.
780
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1186
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1187
        component := box 
783
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1188
                        addCheckBox:(resources string:'detailed single step support') 
780
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1189
                        on:fullSingleStep.
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1190
698
64cf733533d1 dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
  1191
        box addHorizontalLine.
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1192
    ].
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1193
232
926e657541c9 *** empty log message ***
chrisy
parents: 230
diff changeset
  1194
    ObjectFileLoader notNil ifTrue:[
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1195
        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
  1196
        stcCompilation selectionIndex:( stcCompilationOptions indexOf:(Compiler stcCompilation) ifAbsent:2).
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1197
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1198
        component := box 
833
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1199
                        addLabelledInputField:(resources string:'include directories:')
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1200
                        adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1201
                        on:stcIncludes 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1202
                        tabable:true
783
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1203
                        separateAtX:0.3.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1204
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1205
        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
  1206
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1207
"/        box addVerticalSpace.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1208
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1209
        component := box 
833
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1210
                        addLabelledInputField:(resources string:'defines:')
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1211
                        adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1212
                        on:stcDefines 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1213
                        tabable:true
783
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1214
                        separateAtX:0.3.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1215
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1216
        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
  1217
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1218
"/        box addVerticalSpace.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1219
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1220
        component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1221
                        addLabelledInputField:(resources string:'stc options:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1222
                        adjust:#right
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1223
                        on:stcOptions 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1224
                        tabable:true
783
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1225
                        separateAtX:0.3.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1226
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1227
        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
  1228
833
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1229
"/        box addVerticalSpace.
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1230
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1231
        component := box 
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1232
                        addLabelledInputField:(resources string:'cc command:')
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1233
                        adjust:#right
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1234
                        on:cc 
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1235
                        tabable:true
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1236
                        separateAtX:0.3.
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1237
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1238
        component preferredExtent:(250 @ component preferredExtent y).
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1239
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1240
        component := box 
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1241
                        addLabelledInputField:(resources string:'cc options:')
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1242
                        adjust:#right
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1243
                        on:ccOptions 
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1244
                        tabable:true
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1245
                        separateAtX:0.3.
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1246
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1247
        component preferredExtent:(250 @ component preferredExtent y).
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1248
688
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1249
        stcLibraries notNil ifTrue:[
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1250
"/            box addVerticalSpace.
688
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1251
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1252
            component := box 
833
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1253
                            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
  1254
                            adjust:#right
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1255
                            on:stcLibraries 
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1256
                            tabable:true
783
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1257
                            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
  1258
            component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1259
            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
  1260
        ].
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1261
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1262
        stcLibraryPath notNil ifTrue:[
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1263
"/            box addVerticalSpace.
688
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1264
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1265
            component := box 
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1266
                            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
  1267
                            adjust:#right
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1268
                            on:stcLibraryPath 
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1269
                            tabable:true
783
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1270
                            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
  1271
            component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1272
            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
  1273
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1274
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1275
"/        box addVerticalSpace.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1276
        box addHorizontalLine.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1277
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1278
        "/ if there is no compiler around,
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1279
        "/ change to compile nothing, and disable the checkBoxes
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1280
        Compiler canCreateMachineCode ifFalse:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1281
            stcCompilation selectionIndex:3.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1282
            compilationList disable.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1283
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1284
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1285
783
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1286
    y := box yPosition.
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1287
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1288
"/    box addVerticalSpace.
782
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1289
    component := box addCheckBox:(resources string:'allow underscore in identifiers') on:allowUnderscore.
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1290
    component width:0.4.
783
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1291
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1292
"/    box addVerticalSpace.
782
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1293
    component := box addCheckBox:(resources string:'literal arrays are immutable') on:immutableArrays.
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1294
    component width:0.4.
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1295
    y2 := box yPosition.
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1296
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1297
    box yPosition:y.
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1298
    box leftIndent:0.
783
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1299
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1300
    component :=box addPopUpList:(resources string:'constant folding:') on:constantFolding.
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1301
    component superView left:0.5; width:0.5.
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1302
    constantFolding selectionIndex:( constantFoldingOptions indexOf:(Compiler foldConstants) ifAbsent:1).
0f64a5d1bad2 reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents: 782
diff changeset
  1303
782
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1304
    component := box addCheckBox:(resources string:'full lineNumber info') on:fullLineNumbers.
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1305
    component left:0.5; width:0.4.
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1306
    box yPosition:(box yPosition max:y2).
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1307
695
bb9142257343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 690
diff changeset
  1308
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1309
    box addHorizontalLine.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1310
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1311
    box addCheckBox:(resources string:'warnings') on:warnings.
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1312
"/    box addVerticalSpace.
343
569baf25f549 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 342
diff changeset
  1313
    oldIndent := box leftIndent.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1314
    box leftIndent:30.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1315
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1316
    y := box yPosition.
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1317
760
39e3f920b233 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 743
diff changeset
  1318
    warnSTXBox := box addCheckBox:(resources string:'ST/X extensions') on:warnSTX.
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1319
    warnSTXBox width:0.4.
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1320
"/    box addVerticalSpace.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1321
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1322
    warnUnderscoreBox := box addCheckBox:(resources string:'underscores in identifiers') on:warnUnderscore.
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1323
    warnUnderscoreBox width:0.4.
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1324
"/    box addVerticalSpace.
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1325
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1326
    box yPosition:y.
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1327
    box leftIndent:0.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1328
    warnOldStyleBox := box addCheckBox:(resources string:'oldStyle assignment') on:warnOldStyle.
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1329
    warnOldStyleBox left:0.5; width:0.4.
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1330
"/    box addVerticalSpace.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1331
679
c9613b350e05 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 678
diff changeset
  1332
    warnCommonMistakesBox := box addCheckBox:(resources string:'common mistakes') on:warnCommonMistakes.
737
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1333
    warnCommonMistakesBox left:0.5; width:0.4.
cf66bc0a104f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 733
diff changeset
  1334
"/    box addVerticalSpace.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1335
343
569baf25f549 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 342
diff changeset
  1336
    box leftIndent:oldIndent.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1337
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1338
    box 
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  1339
        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
  1340
        addAbortButton; 
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  1341
        addOkButton.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1342
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
  1343
    warnEnabler value.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1344
    box open.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1345
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1346
    box accepted ifTrue:[
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1347
        HistoryManager notNil ifTrue:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1348
            historyLines value ifTrue:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1349
                HistoryManager activate
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1350
            ] ifFalse:[
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1351
                HistoryManager deactivate
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1352
            ].
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1353
        ].
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1354
        Class catchMethodRedefinitions:catchRedefs value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1355
        ClassCategoryReader sourceMode:(keepSourceOptions at:keepSource selectionIndex).
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1356
        Compiler warnings:warnings value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1357
        Compiler warnSTXSpecials:warnSTX value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1358
        Compiler warnOldStyleAssignment:warnOldStyle value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1359
        Compiler warnUnderscoreInIdentifier:warnUnderscore value.
678
3088fddbfb98 added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1360
        Compiler warnCommonMistakes:warnCommonMistakes value.
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1361
        Compiler allowUnderscoreInIdentifier:allowUnderscore value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1362
        Compiler arraysAreImmutable:immutableArrays value.
782
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1363
        fullLineNumbers value ifTrue:[
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1364
            Compiler lineNumberInfo:#full.
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1365
        ] ifFalse:[
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1366
            Compiler lineNumberInfo:true
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1367
        ].
907c21d2cac1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
  1368
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1369
        Compiler stcCompilation:(stcCompilationOptions at:stcCompilation selectionIndex).
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1370
        Compiler stcCompilationIncludes:stcIncludes value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1371
        Compiler stcCompilationDefines:stcDefines value.
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1372
        Compiler stcCompilationOptions:stcOptions value.
833
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1373
        Compiler ccCompilationOptions:ccOptions value.
f4d9acc94617 more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents: 827
diff changeset
  1374
        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
  1375
        Compiler foldConstants:(constantFoldingOptions at:constantFolding selectionIndex).
700
23bc1eb02ac9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
  1376
698
64cf733533d1 dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
  1377
        supportsJustInTimeCompilation ifTrue:[
700
23bc1eb02ac9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
  1378
            justInTimeCompilation value ifTrue:[
23bc1eb02ac9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
  1379
                Method allInstancesDo:[:m | m checked:false].
23bc1eb02ac9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
  1380
            ].
698
64cf733533d1 dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
  1381
            ObjectMemory justInTimeCompilation:justInTimeCompilation value.
780
c017bed8f4f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 777
diff changeset
  1382
            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
  1383
        ].
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1384
        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
  1385
            stcLibraries notNil ifTrue:[
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1386
                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
  1387
            ].
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1388
            stcLibraryPath notNil ifTrue:[
b695a9f1a456 dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents: 686
diff changeset
  1389
                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
  1390
            ]
359
26ce81391dbb sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents: 347
diff changeset
  1391
        ]
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1392
    ].
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1393
    box destroy
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1394
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1395
    "Modified: 10.9.1995 / 19:19:18 / claus"
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  1396
    "Modified: 9.9.1996 / 22:42:47 / stefan"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1397
    "Modified: 8.1.1997 / 14:52:36 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1398
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1399
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1400
displaySettings
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1401
    "open a dialog on display related settings"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1402
1106
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  1403
    |box listOfSizes sizeInfos
614
561229d704f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 608
diff changeset
  1404
     sizes sizeNames sizeList sizeX sizeY deepIcons
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  1405
     isColorMonitor useFixPalette idx ditherStyles ditherSyms ditherList
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  1406
     y component screen visual|
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1407
1106
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  1408
    listOfSizes := resources at:'LIST_OF_OFFERED_SCREEN_SIZES' default:#default.
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  1409
    listOfSizes == #default ifTrue:[
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  1410
        "/ nothing in resource file; offer at least some.
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  1411
        sizeInfos := #(
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  1412
                           ( '11.3'' (235mm x 175mm) LCD'   (235 175)    )
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  1413
                           ( '17''   (325mm x 245mm)'       (325 245)    )
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  1414
                           ( '19''   (340mm x 270mm)'       (340 270)    )
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  1415
                           ( '20''   (350mm x 280mm)'       (350 280)    )
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  1416
                           ( '21''   (365mm x 285mm)'       (365 285)    )
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1417
                       ).
1106
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  1418
    ] ifFalse:[
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  1419
        sizeInfos := resources array:listOfSizes.
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  1420
    ].
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  1421
    sizeNames := sizeInfos collect:[:entry | entry at:1].
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  1422
    sizes := sizeInfos collect:[:entry | entry at:2].
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1423
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1424
    screen := Screen current.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1425
    visual := screen visualType.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1426
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1427
    isColorMonitor := screen hasColors asValue.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1428
    deepIcons := screen supportsDeepIcons asValue.
670
7c958acbc5e8 fixColor and ditherColor stuff moved from Color
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
  1429
    useFixPalette := screen fixColors notNil asValue.
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
    sizeList := SelectionInList with:sizeNames.
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1432
    sizeX := screen widthInMillimeter asValue.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1433
    sizeY := screen heightInMillimeter asValue.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1434
1048
54e004b62d30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1435
    ditherList := SelectionInList new.
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1436
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1437
    (visual == #StaticGray or:[visual == #GrayScale]) ifTrue:[
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1438
        ditherStyles := #('threshold' 'ordered dither' 'error diffusion').
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1439
        ditherSyms := #(threshold ordered floydSteinberg).
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1440
    ] ifFalse:[
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1441
        visual ~~ #TrueColor ifTrue:[
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1442
            ditherStyles := #('nearest color' 'error diffusion').
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1443
            ditherSyms := #(ordered floydSteinberg).
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1444
        ]
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1445
    ].
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
        ditherList list:ditherStyles.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1448
        ditherList selectionIndex:(ditherSyms indexOf:(Image ditherAlgorithm) ifAbsent:#threshold).
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1449
    ].
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1450
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1451
    box := DialogBox new.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1452
    box label:(resources string:'Display screen settings').
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1453
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1454
    (box addTextLabel:(resources string:'Actual visible screen area:'))
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1455
        adjust:#left.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1456
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1457
    (box addPopUpList:(resources string:'common sizes:') on:sizeList)
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1458
        label:'monitor size'.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1459
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1460
    idx := sizes findFirst:[:entry |
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1461
                                ((entry at:1) = sizeX value)
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1462
                                and:[((entry at:2) = sizeY value)]
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1463
                           ].
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1464
    idx ~~ 0 ifTrue:[
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1465
        sizeList selectionIndex:idx
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1466
    ].
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1467
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1468
    sizeList onChangeSend:#value to:[
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1469
                                        |idx|
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1470
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1471
                                        idx := sizeList selectionIndex.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1472
                                        sizeX value:((sizes at:idx) at:1).
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1473
                                        sizeY value:((sizes at:idx) at:2).
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1474
                                    ].
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1475
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1476
    y := box yPosition.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1477
    component := box addTextLabel:(resources string:'screen size:').
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1478
    component width:0.3; adjust:#right; borderWidth:0.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1479
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1480
    box yPosition:y.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1481
    component := box addInputFieldOn:sizeX tabable:true.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1482
    component width:0.25; left:0.3; 
595
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1483
              immediateAccept:false; acceptOnLeave:false; 
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1484
              cursorMovementWhenUpdating:#beginOfLine;
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1485
              converter:(PrintConverter new initForInteger);
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1486
              model:sizeX.
594
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 yPosition:y.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1489
    component := box addTextLabel:(' x ').
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1490
    component width:0.1; left:0.55; adjust:#center; borderWidth:0.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1491
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1492
    box yPosition:y.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1493
    component := box addInputFieldOn:sizeY tabable:true.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1494
    component width:0.25; left:0.65; 
595
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  1495
              immediateAccept:false; acceptOnLeave:false; 
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1496
              cursorMovementWhenUpdating:#beginOfLine;
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1497
              converter:(PrintConverter new initForInteger);
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1498
              model:sizeY.
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1499
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1500
    box yPosition:y.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1501
    component := box addTextLabel:('(mm)').
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1502
    component width:0.1; left:0.9; adjust:#center; borderWidth:0.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1503
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1504
    box addVerticalSpace.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1505
    box addHorizontalLine.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1506
    box addVerticalSpace.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1507
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1508
    box addCheckBox:(resources string:'color monitor') on:isColorMonitor.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1509
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1510
    visual == #PseudoColor ifTrue:[
622
9d02b3440252 ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents: 618
diff changeset
  1511
        box addVerticalSpace.
9d02b3440252 ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents: 618
diff changeset
  1512
        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
  1513
    ].
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1514
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1515
    ditherSyms notNil ifTrue:[
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1516
        box addVerticalSpace.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1517
        component := box addPopUpList:(resources string:'image display:') on:ditherList.
1048
54e004b62d30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1047
diff changeset
  1518
        component defaultLabel:'image display'.
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1519
        component superView horizontalLayout:#leftSpace.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1520
    ].
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1521
614
561229d704f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 608
diff changeset
  1522
    box addVerticalSpace.
561229d704f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 608
diff changeset
  1523
    box addCheckBox:(resources string:'allow colored/grayscale icons') on:deepIcons.
561229d704f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 608
diff changeset
  1524
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1525
    box 
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  1526
        addHelpButtonFor:'Launcher/screenSettings.html';
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1527
        addAbortButton; addOkButton.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1528
    box open.
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1529
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1530
    box accepted ifTrue:[
632
7b59b670e687 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 631
diff changeset
  1531
        Image flushDeviceImages.
7b59b670e687 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 631
diff changeset
  1532
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1533
        screen visualType == #PseudoColor ifTrue:[
622
9d02b3440252 ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents: 618
diff changeset
  1534
            useFixPalette value ifTrue:[
638
5541c2f7836f warnbox if fixColor allocation fails
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
  1535
                Color colorAllocationFailSignal handle:[:ex |
5541c2f7836f warnbox if fixColor allocation fails
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
  1536
                    self warn:(resources string:'Could not allocate colors.').
5541c2f7836f warnbox if fixColor allocation fails
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
  1537
                ] do:[
670
7c958acbc5e8 fixColor and ditherColor stuff moved from Color
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
  1538
                    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
  1539
                ]
622
9d02b3440252 ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents: 618
diff changeset
  1540
            ] ifFalse:[
670
7c958acbc5e8 fixColor and ditherColor stuff moved from Color
Claus Gittinger <cg@exept.de>
parents: 668
diff changeset
  1541
                screen releaseFixColors
622
9d02b3440252 ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents: 618
diff changeset
  1542
            ]
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1543
        ].
630
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1544
        screen hasColors:isColorMonitor value.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1545
        screen widthInMillimeter:sizeX value.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1546
        screen heightInMillimeter:sizeY value.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1547
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1548
        screen supportsDeepIcons:deepIcons value.
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1549
        ditherSyms notNil ifTrue:[
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1550
            Image ditherAlgorithm:(ditherSyms at:ditherList selectionIndex).
b5a673d2ba35 added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents: 624
diff changeset
  1551
        ].
614
561229d704f5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 608
diff changeset
  1552
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1553
        self withWaitCursorDo:[
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1554
            View defaultStyle:(View defaultStyle).
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1555
        ].
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1556
    ].
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1557
    box destroy
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1558
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  1559
    "Modified: 9.9.1996 / 22:43:04 / stefan"
1106
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  1560
    "Modified: 29.3.1997 / 12:18:59 / cg"
594
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1561
!
01aba783dbc8 added screen-settings
Claus Gittinger <cg@exept.de>
parents: 592
diff changeset
  1562
398
001d78a6cacd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
  1563
fontSettings
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1564
    "open a dialog on font related settings"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1565
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  1566
    (self fontBoxForEncoding:nil) ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  1567
        self reopenLauncher.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  1568
    ]
397
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  1569
398
001d78a6cacd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 397
diff changeset
  1570
    "Created: 26.2.1996 / 22:52:51 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1571
    "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
  1572
!
799d6b395675 check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
  1573
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1574
keyboardSetting 
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1575
    "open a dialog on keyboard related settings"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1576
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1577
    |mappings listOfRawKeys listOfFunctions
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1578
     box l
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1579
     list1 list2 listView1 listView2 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1580
     frame selectionForwarder macroForwarder macroTextView y|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1581
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1582
    mappings := Screen current keyboardMap.
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
    listOfRawKeys := (mappings keys asArray collect:[:key | key asString]) sort.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1585
    listOfFunctions := (mappings values asSet asArray collect:[:key | key asString]) sort.
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
    selectionForwarder := Plug new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1588
    selectionForwarder respondTo:#showFunction
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1589
                  with:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1590
                        |raw|
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1591
                        raw := list1 selection.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1592
                        list2 retractInterestsFor:selectionForwarder.
568
58d7e4157f23 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
  1593
                        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
  1594
                        list2 onChangeSend:#showRawKey to:selectionForwarder.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1595
                       ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1596
    selectionForwarder respondTo:#showRawKey
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1597
                  with:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1598
                        |f raw|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1599
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1600
                        f := list2 selection.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1601
                        list1 retractInterestsFor:selectionForwarder.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1602
                        raw := mappings keyAtValue:f asString.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1603
                        raw isNil ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1604
                            raw := mappings keyAtValue:f first.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1605
                            raw isNil ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1606
                                raw := mappings keyAtValue:f asSymbol.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1607
                            ]
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1608
                        ].
568
58d7e4157f23 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
  1609
                        list1 selection:raw.
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1610
                        list1 onChangeSend:#showFunction to:selectionForwarder.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1611
                       ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1612
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
  1613
    macroForwarder := [
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1614
                        |f macro indent|
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1615
                        f := list2 selection.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1616
                        (f startsWith:'Cmd') ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1617
                            f := f copyFrom:4
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1618
                        ].
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1619
                        macro := FunctionKeySequences at:(f asSymbol) ifAbsent:nil.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1620
                        macro notNil ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1621
                            macro := macro asStringCollection.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1622
                            indent := macro
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1623
                                         inject:99999 into:[:min :element |
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1624
                                             |stripped|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1625
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1626
                                             stripped := element withoutLeadingSeparators.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1627
                                             stripped size == 0 ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1628
                                                 min
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1629
                                             ] ifFalse:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1630
                                                 min min:(element size - stripped size)
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1631
                                             ]
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1632
                                         ].
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1633
                            indent ~~ 0 ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1634
                                macro := macro collect:[:line | 
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1635
                                             line size > indent ifTrue:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1636
                                                line copyFrom:indent+1
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1637
                                             ] ifFalse:[
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1638
                                                line
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1639
                                             ].
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1640
                                        ]
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1641
                            ].                        
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1642
                        ].
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1643
                        macroTextView contents:macro.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1644
                       ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1645
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1646
    list1 := SelectionInList with:listOfRawKeys.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1647
    list1 onChangeSend:#showFunction to:selectionForwarder.
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  1648
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1649
    list2 := SelectionInList with:listOfFunctions.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1650
    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
  1651
    list2 onChangeSend:#value to:macroForwarder.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1652
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1653
    box := Dialog new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1654
    box label:(resources string:'Keyboard mappings').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1655
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1656
    l := box addTextLabel:(resources string:'KEY_MSG') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1657
    l adjust:#left; borderWidth:0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1658
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1659
    frame := View new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1660
    frame extent:300 @ 300.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1661
    frame borderWidth:0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1662
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1663
    listView1 := ScrollableView for:SelectionInListView in:frame.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1664
    listView1 model:list1.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1665
    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
  1666
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1667
    listView2 := ScrollableView for:SelectionInListView in:frame.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1668
    listView2 model:list2.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1669
    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
  1670
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1671
    frame topInset:box yPosition.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1672
    box addComponent:frame withExtent:350@200.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1673
    box makeTabable:listView1. 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1674
    box makeTabable:listView2. 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1675
    frame origin:0.0@0.0 corner:1.0@0.6.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1676
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1677
    box addVerticalSpace.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1678
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1679
    l := box addTextLabel:(resources string:'Macro text (if any):') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1680
    l adjust:#left; borderWidth:0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1681
    l origin:0.0@0.6 corner:1.0@0.6.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1682
    l topInset:(View viewSpacing).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1683
    l bottomInset:(l preferredExtent y negated - View viewSpacing).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1684
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1685
    macroTextView := HVScrollableView for:TextView miniScroller:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1686
    box addComponent:macroTextView tabable:true.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1687
    macroTextView origin:0.0@0.6 corner:1.0@1.0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1688
    y := box yPosition.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1689
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1690
    box
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  1691
        addHelpButtonFor:'Launcher/keyboardSetting.html';
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1692
        "addAbortButton;" 
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1693
        addOkButton.
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1694
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1695
    macroTextView topInset:(l preferredExtent y + 5).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1696
    macroTextView bottomInset:(box preferredExtent y - y).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1697
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1698
    box open.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1699
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1700
    box accepted ifTrue:[
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1701
        "no action yet ..."
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1702
    ].
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1703
    box destroy
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1704
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  1705
    "Modified: 9.9.1996 / 22:43:17 / stefan"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1706
    "Modified: 8.1.1997 / 14:52:55 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1707
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1708
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1709
languageSetting 
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1710
    "open a dialog on language related settings"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1711
777
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1712
    |listOfLanguages translatedLanguages switch box|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1713
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1714
    "
410
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1715
     get list of supported languages from the launchers resources ...
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1716
    "
410
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1717
    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
  1718
    translatedLanguages := resources array:listOfLanguages.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1719
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1720
    box := ListSelectionBox title:(resources string:'LANG_MSG') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1721
    box label:(resources string:'Language selection').
281
7b73ea8b2faa more for international language support
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
  1722
    box list:translatedLanguages.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1723
    box initialText:(Language).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1724
    box action:[:newLanguage |
410
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1725
        self withWaitCursorDo:[
777
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1726
            |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
  1727
410
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1728
            idx := translatedLanguages indexOf:newLanguage withoutSeparators.
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1729
            idx ~~ 0 ifTrue:[
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1730
                language := listOfLanguages at:idx
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1731
            ] ifFalse:[
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1732
                language := newLanguage
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1733
            ].
777
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1734
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1735
            "/ 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
  1736
            "/ 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
  1737
            "/ 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
  1738
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1739
            oldLanguage := Smalltalk language.
514
e48fbcbc358d do not directly access the Language variable
Claus Gittinger <cg@exept.de>
parents: 511
diff changeset
  1740
            Smalltalk language:language asSymbol.
777
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1741
            ResourcePack flushCachedResourcePacks.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1742
            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
  1743
            Smalltalk language:oldLanguage.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1744
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1745
            switch := true.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1746
            enc := MenuView defaultFont encoding.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1747
            (fontPref match:enc) ifFalse:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1748
                "/ 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
  1749
                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
  1750
                matchingFonts size == 0 ifTrue:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1751
                    (Dialog 
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1752
                        confirm:(resources 
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1753
                                    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
  1754
                                      with:fontPref) withCRs)
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1755
                    ifFalse:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1756
                        switch := false
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1757
                    ]
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1758
                ] ifFalse:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1759
                    answer := Dialog 
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1760
                                confirmWithCancel:(resources 
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1761
                                                        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
  1762
                                                        with:fontPref) withCRs
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1763
                                           labels:(resources
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1764
                                                        array:#('cancel' 'no' 'yes'))
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1765
                                           default:3.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1766
                    answer isNil ifTrue:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1767
                        switch := false
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1768
                    ] ifFalse:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1769
                        answer ifTrue:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1770
                            switch := (self fontBoxForEncoding:fontPref)
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1771
                        ]
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1772
                    ].
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1773
                ].
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1774
            ].
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1775
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1776
            switch ifTrue:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1777
                transcript showCR:'change language to ' , newLanguage , ' ...'.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1778
                Smalltalk language:language asSymbol.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1779
                ResourcePack flushCachedResourcePacks
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1780
            ].
410
5564d9d6d063 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 406
diff changeset
  1781
        ].
777
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1782
        switch ifTrue:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1783
            self reopenLauncher.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  1784
        ]
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1785
    ].    
421
0af6aa7db321 added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents: 420
diff changeset
  1786
    box
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  1787
        addHelpButtonFor:'Launcher/languageSetting.html'.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1788
    box open.
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  1789
    box destroy
281
7b73ea8b2faa more for international language support
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
  1790
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  1791
    "Modified: 9.9.1996 / 22:43:27 / stefan"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1792
    "Modified: 8.1.1997 / 14:53:01 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1793
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1794
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1795
memorySettings
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1796
    "open a dialog on objectMemory related settings"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1797
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  1798
    |box igcLimit igcFreeLimit igcFreeAmount newSpaceSize
440
afdf9ea91d26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 434
diff changeset
  1799
     compressLimit
1045
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1800
     oldIncr component fields codeLimit codeTrigger stackLimit|
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1801
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1802
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1803
    "/ extract relevant system settings ...
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1804
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1805
    igcLimit := ObjectMemory incrementalGCLimit asValue.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1806
    igcFreeLimit := ObjectMemory freeSpaceGCLimit asValue.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1807
    igcFreeAmount := ObjectMemory freeSpaceGCAmount asValue.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1808
    newSpaceSize := ObjectMemory newSpaceSize asValue.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1809
    oldIncr := ObjectMemory oldSpaceIncrement asValue.
440
afdf9ea91d26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 434
diff changeset
  1810
    compressLimit := ObjectMemory oldSpaceCompressLimit asValue.
774
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1811
    codeLimit := ObjectMemory dynamicCodeLimit asValue.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1812
    codeTrigger := ObjectMemory dynamicCodeGCTrigger asValue.
1045
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1813
    stackLimit := Process defaultMaximumStackSize asValue.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1814
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1815
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1816
    "/ create a box on those values ...
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1817
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1818
    fields := OrderedCollection new.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1819
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1820
    box := DialogBox new.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1821
    box label:(resources string:'Memory manager settings').
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1822
1045
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1823
    (box addTextLabel:'Warning - invalid settings may result in failures or poor performance
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1824
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1825
You have been warned.') adjust:#left.
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:'size of newSpace:')
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 "/ newSpaceSize 
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:newSpaceSize.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1837
    fields add:component.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1838
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1839
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1840
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1841
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1842
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1843
                    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
  1844
                    adjust:#right
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1845
                    on:nil "/ igcLimit 
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1846
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1847
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1848
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1849
    component converter:(PrintConverter new initForNumber).
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1850
    component model:igcLimit.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1851
    fields add:component.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1852
345
3bb0d27efc7a changed memorySettings texts
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
  1853
    box addTextLabel:'(start IGC whenever this amount has been allocated)'.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1854
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1855
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1856
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1857
                    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
  1858
                    adjust:#right
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1859
                    on:nil "/ igcFreeLimit 
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1860
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1861
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1862
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1863
    component converter:(PrintConverter new initForNumber).
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1864
    component model:igcFreeLimit.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1865
    fields add:component.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1866
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1867
    box addTextLabel:'(start IGC whenever freespace drops below this)'.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1868
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1869
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1870
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1871
                    addLabelledInputField:(resources string:'incremental GC amount:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1872
                    adjust:#right
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1873
                    on:nil "/ igcFreeAmount 
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1874
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1875
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1876
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1877
    component converter:(PrintConverter new initForNumber).
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1878
    component model:igcFreeAmount.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1879
    fields add:component.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1880
345
3bb0d27efc7a changed memorySettings texts
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
  1881
    box addTextLabel:'(try to keep this amount for peak requests)'.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1882
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1883
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1884
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1885
                    addLabelledInputField:(resources string:'oldspace increment:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1886
                    adjust:#right
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1887
                    on:nil "/ oldIncr 
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1888
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1889
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1890
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1891
    component converter:(PrintConverter new initForNumber).
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1892
    component model:oldIncr.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1893
    fields add:component.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1894
345
3bb0d27efc7a changed memorySettings texts
Claus Gittinger <cg@exept.de>
parents: 343
diff changeset
  1895
    box addTextLabel:'(increase oldSpace in chunks of this size)'.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1896
    box addHorizontalLine.
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1897
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1898
    component := box 
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1899
                    addLabelledInputField:(resources string:'oldspace compress limit:')
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1900
                    adjust:#right
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1901
                    on:nil "/ compressLimit 
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1902
                    tabable:true
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1903
                    separateAtX:0.7.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1904
    component acceptOnLeave:false.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1905
    component converter:(PrintConverter new initForNumber).
743
dc5a8537b78a printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1906
    component model:compressLimit.
440
afdf9ea91d26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 434
diff changeset
  1907
    fields add:component.
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1908
440
afdf9ea91d26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 434
diff changeset
  1909
    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
  1910
    box addHorizontalLine.
440
afdf9ea91d26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 434
diff changeset
  1911
1045
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1912
    component := box 
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1913
                    addLabelledInputField:(resources string:'stack limit:')
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1914
                    adjust:#right
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1915
                    on:nil 
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1916
                    tabable:true
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1917
                    separateAtX:0.7.
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1918
    component acceptOnLeave:false.
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1919
    component converter:(PrintConverter new initForNumber).
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1920
    component model:stackLimit.
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1921
    fields add:component.
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1922
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1923
    box addTextLabel:'(trigger recursionInterrupt if more stack is used by a process)'.
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1924
    box addHorizontalLine.
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1925
774
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1926
    ObjectMemory supportsJustInTimeCompilation ifTrue:[
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1927
        component := box 
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1928
                        addLabelledInputField:(resources string:'dynamic code limit:')
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1929
                        adjust:#right
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1930
                        on:nil
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1931
                        tabable:true
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1932
                        separateAtX:0.7.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1933
        component acceptOnLeave:false.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1934
        component converter:(PrintConverter new initForNumberOrNil).
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1935
        component model:codeLimit.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1936
        fields add:component.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1937
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1938
        box addTextLabel:'(flush dynamic compiled code to stay within this limit)'.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1939
        box addHorizontalLine.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1940
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1941
        component := box 
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1942
                        addLabelledInputField:(resources string:'dynamic code GC trigger:')
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1943
                        adjust:#right
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1944
                        on:nil
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1945
                        tabable:true
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1946
                        separateAtX:0.7.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1947
        component acceptOnLeave:false.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1948
        component converter:(PrintConverter new initForNumberOrNil).
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1949
        component model:codeTrigger.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1950
        fields add:component.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1951
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1952
        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
  1953
        box addHorizontalLine.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1954
    ].
773
98efb7f5e8fa prepared dynamic-compiler controls
Claus Gittinger <cg@exept.de>
parents: 772
diff changeset
  1955
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1956
    box addAbortButton; addOkButton.
1045
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1957
    box
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1958
        addHelpButtonFor:'Launcher/memorySettings.html'.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1959
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1960
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1961
    "/ show the box ...
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1962
    "/
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  1963
    box open.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1964
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1965
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1966
    "/ update system settings
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1967
    "/
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1968
    box accepted ifTrue:[
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1969
        fields do:[:comp | comp accept].
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1970
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1971
        igcFreeAmount value ~~ ObjectMemory freeSpaceGCAmount ifTrue:[
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1972
            ObjectMemory freeSpaceGCAmount:igcFreeAmount value.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1973
        ].
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1974
        igcFreeLimit value ~~ ObjectMemory freeSpaceGCLimit ifTrue:[
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1975
            ObjectMemory freeSpaceGCLimit:igcFreeLimit value.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1976
        ].
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1977
        igcLimit value ~~ ObjectMemory incrementalGCLimit ifTrue:[
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1978
            ObjectMemory incrementalGCLimit:igcLimit value.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1979
        ].
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1980
        newSpaceSize value ~~ ObjectMemory newSpaceSize ifTrue:[
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1981
            ObjectMemory newSpaceSize:newSpaceSize value.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1982
        ].
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1983
        oldIncr value ~~ ObjectMemory oldSpaceIncrement ifTrue:[
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1984
            ObjectMemory oldSpaceIncrement:oldIncr value.
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1985
        ].
1045
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1986
        stackLimit value ~~ Process defaultMaximumStackSize ifTrue:[
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1987
            Process defaultMaximumStackSize:stackLimit value.
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1988
        ].
476
8ebba8966f3f use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents: 467
diff changeset
  1989
        ObjectMemory oldSpaceCompressLimit:compressLimit value.
774
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1990
        ObjectMemory dynamicCodeLimit:codeLimit value.
c22fac38f868 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 773
diff changeset
  1991
        ObjectMemory dynamicCodeGCTrigger:codeTrigger value.
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1992
    ].
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1993
    box destroy
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1994
1045
9515beec99b3 added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
  1995
    "Modified: 27.2.1997 / 16:50:12 / cg"
341
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1996
!
d4a4fb700086 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 335
diff changeset
  1997
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1998
messageSettings
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1999
    "open a dialog on infoMessage related settings"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2000
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2001
    |box vmInfo vmErrors displayErrors classInfos|
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2002
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2003
    vmInfo := ObjectMemory infoPrinting asValue.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2004
    vmErrors := ObjectMemory debugPrinting asValue.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2005
    classInfos := Object infoPrinting asValue.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2006
    displayErrors := DeviceWorkstation errorPrinting asValue.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2007
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2008
    box := DialogBox new.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2009
    box label:(resources string:'Messages').
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2010
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2011
    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
  2012
    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
  2013
    box addHorizontalLine.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2014
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2015
    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
  2016
    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
  2017
1002
1fff704cea57 help text for message settings
Claus Gittinger <cg@exept.de>
parents: 997
diff changeset
  2018
    box addHelpButtonFor:'Launcher/messageSettings.html'.
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2019
    box addAbortButton; addOkButton.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  2020
    box open.
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2021
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2022
    box accepted ifTrue:[
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  2023
        ObjectMemory infoPrinting:vmInfo value.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  2024
        ObjectMemory debugPrinting:vmErrors value.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  2025
        Object infoPrinting:classInfos value.
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  2026
        DeviceWorkstation errorPrinting:displayErrors value.
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2027
    ].
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2028
    box destroy
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  2029
1002
1fff704cea57 help text for message settings
Claus Gittinger <cg@exept.de>
parents: 997
diff changeset
  2030
    "Modified: 27.1.1997 / 17:46:01 / cg"
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2031
!
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2032
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2033
miscSettings
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2034
    "open a dialog on misc other settings"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2035
973
bb876b0213e5 added setting for takeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 970
diff changeset
  2036
    |box check shadows takeFocus returnFocus
968
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2037
     hostNameInLabel showAccelerators 
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2038
     preemptive|
843
1b6ae381074a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 837
diff changeset
  2039
1b6ae381074a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 837
diff changeset
  2040
    "/ 
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2041
    "/ extract relevant system settings ...
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2042
    "/
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2043
    shadows := PopUpView shadows asValue.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2044
    hostNameInLabel := StandardSystemView includeHostNameInLabel asValue.
973
bb876b0213e5 added setting for takeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 970
diff changeset
  2045
    returnFocus := StandardSystemView returnFocusWhenClosingModalBoxes asValue.
bb876b0213e5 added setting for takeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 970
diff changeset
  2046
    takeFocus := StandardSystemView takeFocusWhenMapped asValue.
968
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2047
420
2c169931d1ab allow turning of of accelerator display
Claus Gittinger <cg@exept.de>
parents: 410
diff changeset
  2048
    showAccelerators := MenuView showAcceleratorKeys asValue.
968
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2049
    preemptive := Processor isTimeSlicing asValue.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2050
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2051
    "/
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2052
    "/ create a box on those values ...
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2053
    "/
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2054
    box := DialogBox new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2055
    box label:(resources string:'Other settings').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2056
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2057
    box addCheckBox:(resources string:'shadows under popup views') on:shadows.
327
44a25cae2645 allow setting of dialog-focus behavior
ca
parents: 319
diff changeset
  2058
    box addCheckBox:(resources string:'boxes return focus to previously active view') on:returnFocus.
973
bb876b0213e5 added setting for takeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 970
diff changeset
  2059
    box addCheckBox:(resources string:'views catch focus when mapped') on:takeFocus.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2060
    box addCheckBox:(resources string:'hostname in window labels') on:hostNameInLabel.
443
ea8f82ba103c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 440
diff changeset
  2061
    box addCheckBox:(resources string:'show accelerator keys in menus') on:showAccelerators.
938
7e9411dba623 added VerboseBacktraceDefault setting
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2062
7e9411dba623 added VerboseBacktraceDefault setting
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2063
    box addHorizontalLine.
7e9411dba623 added VerboseBacktraceDefault setting
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
  2064
968
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2065
    box addCheckBox:(resources string:'preemptive scheduling') on:preemptive.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2066
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2067
    box 
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  2068
        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
  2069
        addAbortButton; 
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2070
        addOkButton.
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2071
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2072
    "/
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2073
    "/ show the box ...
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2074
    "/
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  2075
    box open.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2076
249
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2077
    "/
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2078
    "/ update system settings
cc5c4a442f49 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 245
diff changeset
  2079
    "/
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2080
    box accepted ifTrue:[
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2081
        PopUpView shadows:shadows value.
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2082
        StandardSystemView includeHostNameInLabel:hostNameInLabel value.
973
bb876b0213e5 added setting for takeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 970
diff changeset
  2083
        StandardSystemView returnFocusWhenClosingModalBoxes:returnFocus value.
bb876b0213e5 added setting for takeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents: 970
diff changeset
  2084
        StandardSystemView takeFocusWhenMapped:takeFocus value.
420
2c169931d1ab allow turning of of accelerator display
Claus Gittinger <cg@exept.de>
parents: 410
diff changeset
  2085
        MenuView showAcceleratorKeys:showAccelerators value.
968
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2086
        Processor isTimeSlicing ~~ preemptive value ifTrue:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2087
            preemptive value ifTrue:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2088
                Processor startTimeSlicing
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2089
            ] ifFalse:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2090
                Processor stopTimeSlicing
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2091
            ]
364
75f5a7e99eb8 added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
  2092
        ]
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  2093
    ].
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  2094
    box destroy
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2095
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  2096
    "Modified: 9.9.1996 / 22:43:36 / stefan"
968
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2097
    "Modified: 17.1.1997 / 17:50:22 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2098
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2099
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2100
printerSettings
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2101
    "open a dialog on printer related settings"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2102
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2103
    |box 
595
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2104
     possiblePrinters possibleTypes printerType printCommand 
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  2105
     pageFormat landscape updater
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2106
     formatLabel formatComponent landscapeLabel landscapeComponent
709
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2107
     topMargin leftMargin rightMargin bottomMargin unitList unit
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  2108
     topMarginComponent leftMarginComponent
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  2109
     rightMarginComponent
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  2110
     bottomMarginComponent supportsColor supportsColorComponent
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  2111
     y y1 commandListPop component commandList row|
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2112
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2113
    possiblePrinters := PrinterStream withAllSubclasses asArray.
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2114
    possibleTypes := possiblePrinters collect:[:cls | cls printerTypeName].
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2115
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2116
    printerType := SelectionInList new list:(resources array:possibleTypes).
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2117
    printerType selectionIndex:(possiblePrinters identityIndexOf:Printer).
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2118
    printCommand := Printer printCommand asValue.
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2119
604
8fd6e7c5868d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
  2120
    pageFormat := SelectionInList new list:(Printer defaultPageFormats).
8fd6e7c5868d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
  2121
    pageFormat selection:(Printer pageFormat).
8fd6e7c5868d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
  2122
    landscape := Printer landscape asValue.
8fd6e7c5868d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
  2123
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2124
    topMargin := Printer topMargin asValue.
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2125
    leftMargin := Printer leftMargin asValue.
709
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2126
    rightMargin := Printer rightMargin asValue.
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2127
    bottomMargin := Printer bottomMargin asValue.
702
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2128
    supportsColor := Printer supportsColor asValue.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2129
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2130
    box := DialogBox new.
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2131
    box label:(resources string:'Printer settings').
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2132
726
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2133
"/ either use a popUpList ...
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2134
"/    box addPopUpList:(resources string:'printer type:') on:printerType.
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2135
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2136
"/ or a comboList;
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2137
"/ which one looks better ?
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2138
    y := box yPosition.
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2139
    component := box addTextLabel:(resources string:'printer type:').
1044
3ef72f4a74fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1041
diff changeset
  2140
    component width:0.25; adjust:#right; borderWidth:0.
726
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2141
    box yPosition:y.
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2142
    component := box addComboListOn:printerType tabable:true.
1047
44418428b4ed checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1045
diff changeset
  2143
    component aspect:#selectionIndex; changeMessage:#selectionIndex:; useIndex:true.
1044
3ef72f4a74fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1041
diff changeset
  2144
    component width:0.75; left:0.25.
726
904a429b49a0 checkin from browser
dq
parents: 715
diff changeset
  2145
"/ end of question
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2146
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2147
    y := box yPosition.
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2148
    component := box addTextLabel:(resources string:'print command:').
1044
3ef72f4a74fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1041
diff changeset
  2149
    component width:0.25; adjust:#right; borderWidth:0.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2150
    box yPosition:y.
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2151
    commandListPop := box addComboBoxOn:printCommand tabable:true.
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2152
"/    commandListPop := box addInputFieldOn:printCommand tabable:true.
1044
3ef72f4a74fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1041
diff changeset
  2153
    commandListPop width:0.75; left:0.25; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
362
d5d99cdda74c use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents: 359
diff changeset
  2154
    "/ some common print commands ...
499
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  2155
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  2156
    commandList := resources at:'PRINT_COMMANDS' ifAbsent:nil.
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  2157
    commandList isNil ifTrue:[
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  2158
        commandList := PrinterStream defaultCommands.
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  2159
        commandList isNil ifTrue:[
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  2160
            commandList := #('lpr' 
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2161
                             'lp' 
499
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  2162
                            ).
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  2163
        ]
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  2164
    ].
245bba7b9cd3 ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents: 497
diff changeset
  2165
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2166
    commandListPop list:commandList.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2167
    box addVerticalSpace.
595
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2168
    box addHorizontalLine.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2169
    box addVerticalSpace.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2170
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2171
    row := OrderedCollection new.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2172
    row add:(formatLabel := Label label:(resources string:'page format:')).
676
a5d1f2adfb98 beautified for 2D look
Claus Gittinger <cg@exept.de>
parents: 673
diff changeset
  2173
    formatLabel borderWidth:0.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2174
    row add:(formatComponent := PopUpList on:pageFormat).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2175
    formatComponent label:'unknown'.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2176
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2177
    row add:(landscapeLabel := Label label:(resources string:'landscape:')).
676
a5d1f2adfb98 beautified for 2D look
Claus Gittinger <cg@exept.de>
parents: 673
diff changeset
  2178
    landscapeLabel borderWidth:0.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2179
    row add:(landscapeComponent := CheckToggle on:landscape).
595
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2180
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2181
    y := box yPosition.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2182
    box
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2183
        addRow:(1 to:2)
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2184
        fromX:0
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2185
        toX:0.5
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2186
        collect:[:idx | row at:idx]
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2187
        tabable:false
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2188
        horizontalLayout:#leftSpace
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2189
        verticalLayout:#center.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2190
    y1 := box yPosition.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2191
    box yPosition:y.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2192
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2193
    box
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2194
        addRow:(3 to:4)
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2195
        fromX:0.5
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2196
        toX:1.0
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2197
        collect:[:idx | row at:idx]
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2198
        tabable:false
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2199
        horizontalLayout:#leftSpace
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2200
        verticalLayout:#center.
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2201
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2202
    box yPosition:(box yPosition max:y1).
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2203
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2204
    box makeTabable:(formatComponent).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2205
    box makeTabable:(landscapeComponent).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2206
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2207
    box addVerticalSpace.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2208
    box addHorizontalLine.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2209
    box addVerticalSpace.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2210
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2211
    y := box yPosition.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2212
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2213
    topMarginComponent := box 
603
a1054630b5e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 602
diff changeset
  2214
        addLabelledInputField:(resources string:'top margin:')
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2215
        adjust:#right
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2216
        on:nil "/ topMargin 
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2217
        tabable:true
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2218
        from:0.0 to:0.5
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2219
        separateAtX:0.6.
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2220
    topMarginComponent converter:(PrintConverter new initForNumber).
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2221
    topMarginComponent model:topMargin.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2222
    y1 := box yPosition.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2223
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2224
    box yPosition:y.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2225
    unitList := SelectionInList with:#('inch' 'mm').
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2226
    unitList selectionIndex:1.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2227
605
89f279250b96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 604
diff changeset
  2228
    component := box addComponent:(PopUpList on:unitList).
89f279250b96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 604
diff changeset
  2229
    component
603
a1054630b5e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 602
diff changeset
  2230
        left:0.6;
a1054630b5e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 602
diff changeset
  2231
        width:0.3.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2232
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2233
    box yPosition:y1.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2234
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2235
    leftMarginComponent := box 
603
a1054630b5e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 602
diff changeset
  2236
        addLabelledInputField:(resources string:'left margin:')
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2237
        adjust:#right
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2238
        on:nil "/ leftMargin 
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2239
        tabable:true
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2240
        from:0.0 to:0.5
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2241
        separateAtX:0.6.
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2242
    leftMarginComponent converter:(PrintConverter new initForNumber).
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2243
    leftMarginComponent model:leftMargin.
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2244
709
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2245
    rightMarginComponent := box 
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2246
        addLabelledInputField:(resources string:'right margin:')
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2247
        adjust:#right
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2248
        on:nil "/ rightMargin 
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2249
        tabable:true
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2250
        from:0.0 to:0.5
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2251
        separateAtX:0.6.
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2252
    rightMarginComponent converter:(PrintConverter new initForNumber).
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2253
    rightMarginComponent model:rightMargin.
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2254
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2255
    bottomMarginComponent := box 
603
a1054630b5e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 602
diff changeset
  2256
        addLabelledInputField:(resources string:'bottom margin:')
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2257
        adjust:#right
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2258
        on:nil "/ bottomMargin 
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2259
        tabable:true
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2260
        from:0.0 to:0.5
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2261
        separateAtX:0.6.
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2262
    bottomMarginComponent converter:(PrintConverter new initForNumber).
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2263
    bottomMarginComponent model:bottomMargin.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2264
702
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2265
    box addHorizontalLine.
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2266
    supportsColorComponent := box addCheckBox:(resources string:'Color printer') on:supportsColor.
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2267
    box addVerticalSpace.
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2268
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2269
    updater := [ |p fg hasPageSize hasMargins|
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2270
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2271
                       printerType selectionIndex ~~ 0 ifTrue:[
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2272
                           p := possiblePrinters at:(printerType selectionIndex).
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2273
                           hasPageSize := p supportsPageSizes. 
604
8fd6e7c5868d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 603
diff changeset
  2274
                           hasMargins := p supportsMargins. 
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2275
                       ] ifFalse:[
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2276
                           hasPageSize := false.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2277
                           hasMargins := false.
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2278
                       ].
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2279
                       hasPageSize ifTrue:[
597
68312d41ebab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 596
diff changeset
  2280
                          fg := Button new foregroundColor.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2281
                          formatComponent enable.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2282
                          landscapeComponent enable.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2283
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2284
                          formatComponent label:p pageFormat.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2285
                          pageFormat value:(p pageFormat).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2286
                          landscape value:(p landscape).
597
68312d41ebab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 596
diff changeset
  2287
                       ] ifFalse:[ 
68312d41ebab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 596
diff changeset
  2288
                          fg := Button new disabledForegroundColor.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2289
                          formatComponent disable.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2290
                          landscapeComponent disable.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2291
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2292
                          formatComponent label:'unknown'.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2293
                          landscape value:nil.
597
68312d41ebab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 596
diff changeset
  2294
                       ].
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2295
                       hasMargins ifTrue:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2296
                          unitList selectionIndex == 2 ifTrue:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2297
                              unit := #mm
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2298
                          ] ifFalse:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2299
                              unit := #inch
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2300
                          ].
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2301
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2302
                          topMargin value:(UnitConverter convert:p topMargin from:#inch to:unit).
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2303
                          leftMargin value:(UnitConverter convert:p leftMargin from:#inch to:unit).
709
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2304
                          rightMargin value:(UnitConverter convert:p rightMargin from:#inch to:unit).
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2305
                          bottomMargin value:(UnitConverter convert:p bottomMargin from:#inch to:unit).
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2306
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2307
                          topMarginComponent enable.
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2308
                          leftMarginComponent enable.
709
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2309
                          rightMarginComponent enable.
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2310
                          bottomMarginComponent enable.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2311
                       ] ifFalse:[ 
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2312
                          topMarginComponent disable.
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2313
                          leftMarginComponent disable.
709
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2314
                          rightMarginComponent disable.
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2315
                          bottomMarginComponent disable.
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2316
                       ].
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2317
                       formatLabel foregroundColor:fg.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2318
                       landscapeLabel foregroundColor:fg.
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2319
                        
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2320
                       p notNil ifTrue:[ 
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2321
                           commandList := p defaultCommands.
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2322
                           commandList notNil ifTrue:[
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2323
                                commandListPop list:commandList 
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2324
                           ].
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2325
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2326
                           printCommand value:(p printCommand).
702
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2327
                       ].
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2328
                       p supportsPostscript ifFalse:[
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2329
                           supportsColorComponent disable.
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2330
                           supportsColor value:false
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2331
                       ] ifTrue:[
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2332
                           supportsColorComponent enable.
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2333
                           supportsColor value:(Printer supportsColor).
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2334
                       ]
597
68312d41ebab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 596
diff changeset
  2335
                     ].
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2336
    unitList onChangeSend:#value to:updater.
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2337
    printerType onChangeSend:#value to:updater.
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2338
    updater value.
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
  2339
608
4596be8837d6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 605
diff changeset
  2340
    box addVerticalSpace;
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  2341
        addHelpButtonFor:'Launcher/printerSettings.html';
608
4596be8837d6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 605
diff changeset
  2342
        addAbortButton; addOkButton.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  2343
    box open.
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2344
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2345
    box accepted ifTrue:[
598
0d9f5f10e3a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 597
diff changeset
  2346
        Printer := possiblePrinters at:(printerType selectionIndex).
362
d5d99cdda74c use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents: 359
diff changeset
  2347
        Printer printCommand:printCommand value.
595
5b51eac88d92 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 594
diff changeset
  2348
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2349
        Printer supportsPageSizes ifTrue:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2350
            Printer pageFormat:(pageFormat selection).
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2351
            Printer landscape:(landscape value).
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
        Printer supportsMargins ifTrue:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2354
            unitList selectionIndex == 2 ifTrue:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2355
                unit := #mm
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2356
            ] ifFalse:[
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2357
                unit := #inch
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2358
            ].
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2359
            Printer topMargin:(UnitConverter convert:topMargin value from:unit to:#inch).
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2360
            Printer leftMargin:(UnitConverter convert:leftMargin value from:unit to:#inch).
709
b18e8c1d87e9 rightMargin
ca
parents: 707
diff changeset
  2361
            Printer rightMargin:(UnitConverter convert:rightMargin value from:unit to:#inch).
707
36d04c33b0a4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 702
diff changeset
  2362
            Printer bottomMargin:(UnitConverter convert:bottomMargin value from:unit to:#inch).
601
78a77af834fe more printer settings
Claus Gittinger <cg@exept.de>
parents: 600
diff changeset
  2363
        ].
702
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2364
        Printer supportsPostscript ifTrue:[
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2365
            Printer supportsColor:supportsColor value.
fdbfdaf9dc17 add printer setup: color
ca
parents: 700
diff changeset
  2366
        ].
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2367
    ].
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2368
    box destroy
362
d5d99cdda74c use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents: 359
diff changeset
  2369
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  2370
    "Modified: 9.9.1996 / 22:43:51 / stefan"
1047
44418428b4ed checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1045
diff changeset
  2371
    "Modified: 28.2.1997 / 14:00:13 / cg"
347
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2372
!
acfb4dcd3017 added printerSettings
Claus Gittinger <cg@exept.de>
parents: 345
diff changeset
  2373
853
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2374
restoreSettings
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2375
    "restore settings from a settings-file."
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2376
853
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2377
    "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
  2378
     which can be saved/restored with a single store/read."
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2379
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2380
    |fileName|
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2381
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2382
    fileName := Dialog 
855
16bdd6eca5a1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 854
diff changeset
  2383
        requestFileName:(resources string:'restore settings from:') 
853
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2384
        default:'settings.stx'
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2385
        ok:(resources string:'restore') 
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2386
        abort:(resources string:'cancel') 
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2387
        pattern:'*.stx'
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2388
        fromDirectory:nil.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2389
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2390
    (fileName isNil or:[fileName isEmpty]) ifTrue:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2391
        "/ canceled
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2392
        ^ self
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2393
    ].
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2394
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2395
    self withWaitCursorDo:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2396
        Smalltalk fileIn:fileName.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2397
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2398
        self reopenLauncher.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2399
    ].
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2400
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2401
    "Modified: 8.1.1997 / 14:53:52 / cg"
853
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2402
!
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2403
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2404
saveSettings
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2405
    "save settings to a settings-file."
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2406
853
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2407
    "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
  2408
     which can be saved/restored with a single store/read."
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2409
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2410
    |s screen fileName|
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2411
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2412
    fileName := Dialog 
855
16bdd6eca5a1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 854
diff changeset
  2413
        requestFileName:(resources string:'save settings in:') 
853
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2414
        default:'settings.stx'
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2415
        ok:(resources string:'save') 
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2416
        abort:(resources string:'cancel') 
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2417
        pattern:'*.stx'
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2418
        fromDirectory:nil.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2419
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2420
    (fileName isNil or:[fileName isEmpty]) ifTrue:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2421
        "/ canceled
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2422
        ^ self
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2423
    ].
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2424
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2425
    s := fileName asFilename writeStream.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2426
    s isNil ifTrue:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2427
        self warn:'cannot write the ''' , fileName , ''' file'.
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
    s nextPutLine:'"/ ST/X saved settings';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2432
      nextPutLine:'"/ DO NOT MODIFY MANUALLY';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2433
      nextPutLine:'"/';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2434
      nextPutLine:'"/ this file was automatically generated by the';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2435
      nextPutLine:'"/ ''save settings'' function of the Launcher';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2436
      nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2437
    s cr.
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
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2440
    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
  2441
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2442
    s cr.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2443
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2444
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2445
    s nextPutLine:'"/ Display settings:'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2446
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2447
    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
  2448
    s nextPutLine:'Display displayName = ' , (Display displayName storeString) , ' ifTrue:['.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2449
      screen := Screen current.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2450
      screen fixColors notNil ifTrue:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2451
        s nextPutLine:'  Image flushDeviceImages.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2452
        s nextPutLine:'  Color colorAllocationFailSignal catch:['.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2453
        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
  2454
        s nextPutLine:'  ].'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2455
      ] ifFalse:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2456
        s nextPutLine:'  Display releaseFixColors.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2457
      ].
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2458
      s nextPutLine:'  Display hasColors: ' , (screen hasColors storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2459
      s nextPutLine:'  Display widthInMillimeter: ' , (screen widthInMillimeter storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2460
      s nextPutLine:'  Display heightInMillimeter: ' , (screen heightInMillimeter storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2461
      s nextPutLine:'  Display supportsDeepIcons: ' , (screen supportsDeepIcons storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2462
      s nextPutLine:'  Image ditherAlgorithm: ' , (Image ditherAlgorithm storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2463
      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
  2464
    s nextPutLine:'].'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2465
    s cr.
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:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2468
    s nextPutLine:'"/ Compiler settings:'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2469
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2470
    s nextPutLine:'Compiler warnSTXSpecials: ' , (Compiler warnSTXSpecials storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2471
      nextPutLine:'Compiler warnUnderscoreInIdentifier: ' , (Compiler warnUnderscoreInIdentifier storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2472
      nextPutLine:'Compiler warnOldStyleAssignment: ' , (Compiler warnOldStyleAssignment storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2473
      nextPutLine:'Compiler warnCommonMistakes: ' , (Compiler warnCommonMistakes storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2474
      nextPutLine:'Compiler allowUnderscoreInIdentifier: ' , (Compiler allowUnderscoreInIdentifier storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2475
      nextPutLine:'Compiler arraysAreImmutable: ' , (Compiler arraysAreImmutable storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2476
      nextPutLine:'Compiler lineNumberInfo: ' , (Compiler lineNumberInfo storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2477
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2478
      nextPutLine:'Compiler foldConstants: ' , (Compiler foldConstants storeString) , '.';
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
      nextPutLine:'Compiler stcCompilationIncludes: ' , (Compiler stcCompilationIncludes storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2481
      nextPutLine:'Compiler stcCompilationDefines: ' , (Compiler stcCompilationDefines storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2482
      nextPutLine:'Compiler stcCompilationOptions: ' , (Compiler stcCompilationOptions storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2483
      nextPutLine:'Compiler ccCompilationOptions: ' , (Compiler ccCompilationOptions storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2484
      nextPutLine:'Compiler ccPath: ' , (Compiler ccPath storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2485
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2486
      nextPutLine:'ObjectMemory justInTimeCompilation: ' , (ObjectMemory justInTimeCompilation storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2487
      nextPutLine:'ObjectMemory fullSingleStepSupport: ' , (ObjectMemory fullSingleStepSupport storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2488
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2489
    HistoryManager isActive ifTrue:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2490
        s nextPutLine:'HistoryManager activate.'.
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:'HistoryManager deactivate.'.
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
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2495
    ObjectFileLoader notNil ifTrue:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2496
        s nextPutLine:'ObjectFileLoader searchedLibraries: ' , (ObjectFileLoader searchedLibraries storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2497
        s nextPutLine:'ObjectFileLoader libPath: ' , (ObjectFileLoader libPath storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2498
    ].
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2499
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2500
    s nextPutLine:'Class catchMethodRedefinitions: ' , (Class catchMethodRedefinitions storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2501
    s nextPutLine:'ClassCategoryReader sourceMode: ' , (ClassCategoryReader sourceMode storeString) , '.'.
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 cr.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2504
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2505
    s nextPutLine:'"/ Info & Debug Messages:'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2506
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2507
    s nextPutLine:'ObjectMemory infoPrinting: ' , (ObjectMemory infoPrinting storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2508
      nextPutLine:'ObjectMemory debugPrinting: ' , (ObjectMemory debugPrinting storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2509
      nextPutLine:'Object infoPrinting: ' , (Object infoPrinting storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2510
      nextPutLine:'DeviceWorkstation errorPrinting: ' , (DeviceWorkstation errorPrinting storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2511
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2512
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2513
    s cr.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2514
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2515
    s nextPutLine:'"/ Misc settings:'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2516
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2517
    s nextPutLine:'Class keepMethodHistory: ' , (Class methodHistory notNil storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2518
      nextPutLine:'Smalltalk logDoits: ' , (Smalltalk logDoits storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2519
      nextPutLine:'Autoload compileLazy: ' , (Autoload compileLazy storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2520
      nextPutLine:'Smalltalk loadBinaries: ' , (Smalltalk loadBinaries storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2521
      nextPutLine:'StandardSystemView includeHostNameInLabel: ' , (StandardSystemView includeHostNameInLabel storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2522
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2523
      "/ 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
  2524
      nextPutLine:'"/ Class updateChanges: ' , (Class updatingChanges storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2525
      nextPutLine:'"/ ObjectMemory nameForChanges: ' , (ObjectMemory nameForChanges storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2526
974
8c16159d71a7 save those new settings
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  2527
      nextPutLine:'StandardSystemView returnFocusWhenClosingModalBoxes: ' , (StandardSystemView returnFocusWhenClosingModalBoxes storeString) , '.';
8c16159d71a7 save those new settings
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  2528
      nextPutLine:'StandardSystemView takeFocusWhenMapped: ' , (StandardSystemView takeFocusWhenMapped storeString) , '.';
853
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2529
      nextPutLine:'MenuView showAcceleratorKeys: ' , (MenuView showAcceleratorKeys storeString) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2530
      nextPutLine:'Class tryLocalSourceFirst: ' , (Class tryLocalSourceFirst storeString) , '.'.
915
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2531
    (Exception emergencyHandler == Launcher notifyingEmergencyHandler) ifTrue:[
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2532
        s nextPutLine:'Exception emergencyHandler:(Launcher notifyingEmergencyHandler).'.
dcfcb87a48a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
  2533
    ].
853
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
    s cr.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2536
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2537
    s nextPutLine:'"/ Printer settings:'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2538
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2539
    s nextPutLine:'Printer := ' , (Printer name) , '.';
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2540
      nextPutLine:'Printer printCommand: ' , (Printer printCommand storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2541
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2542
    Printer supportsPageSizes ifTrue:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2543
        s nextPutLine:'Printer pageFormat: ' , (Printer pageFormat storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2544
        s nextPutLine:'Printer landscape: ' , (Printer landscape storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2545
    ].
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2546
    Printer supportsMargins ifTrue:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2547
        s nextPutLine:'Printer topMargin: ' , (Printer topMargin storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2548
        s nextPutLine:'Printer leftMargin: ' , (Printer leftMargin storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2549
        s nextPutLine:'Printer rightMargin: ' , (Printer rightMargin storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2550
        s nextPutLine:'Printer bottomMargin: ' , (Printer bottomMargin storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2551
    ].
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2552
    Printer supportsPostscript ifTrue:[
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2553
        s nextPutLine:'Printer supportsColor: ' , (Printer supportsColor storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2554
    ].
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2555
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2556
    s cr.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2557
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2558
    s nextPutLine:'"/ Font settings:'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2559
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2560
    s nextPutLine:'View defaultFont: ' , (View defaultFont storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2561
    s nextPutLine:'Label defaultFont: ' , (Label defaultFont storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2562
    s nextPutLine:'Button defaultFont: ' , (Button defaultFont storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2563
    s nextPutLine:'Toggle defaultFont: ' , (Toggle defaultFont storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2564
    s nextPutLine:'SelectionInListView defaultFont: ' , (SelectionInListView defaultFont storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2565
    s nextPutLine:'MenuView defaultFont: ' , (MenuView defaultFont storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2566
    s nextPutLine:'PullDownMenu defaultFont: ' , (PullDownMenu defaultFont storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2567
    s nextPutLine:'TextView defaultFont: ' , (TextView defaultFont storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2568
    s nextPutLine:'EditTextView defaultFont: ' , (EditTextView defaultFont storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2569
    s nextPutLine:'CodeView defaultFont: ' , (CodeView defaultFont storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2570
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2571
    s cr.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2572
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2573
    s nextPutLine:'"/ Language setting:'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2574
    s nextPutLine:'"/'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2575
    s nextPutLine:'Smalltalk language: ' , (Smalltalk language storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2576
    s nextPutLine:'Smalltalk languageTerritory: ' , (Smalltalk languageTerritory storeString) , '.'.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2577
    s close.
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2578
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2579
    "
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2580
     Transcript topView application saveSettings
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2581
    "
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2582
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2583
    "Modified: 8.1.1997 / 14:54:00 / cg"
853
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2584
!
70c241a0bafc added save/restore settings
Claus Gittinger <cg@exept.de>
parents: 845
diff changeset
  2585
968
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2586
sourceAndDebuggerSettings
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2587
    "open a dialog on misc other settings"
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2588
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2589
    |box check logDoits updChanges changeFileName
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2590
     loadBinaries compileLazy useManager hasManager 
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2591
     repository repositoryHolder localSourceFirst 
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2592
     sourceCacheDir cacheEntry
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2593
     component localCheck oldIndent nm fn manager
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2594
     keepMethodHistory showErrorNotifier showVerboseStack|
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2595
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2596
    "/ 
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2597
    "/ extract relevant system settings ...
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2598
    "/
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2599
    keepMethodHistory := Class methodHistory notNil asValue.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2600
    logDoits := Smalltalk logDoits asValue.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2601
    updChanges := Class updatingChanges asValue.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2602
    changeFileName := ObjectMemory nameForChanges asValue.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2603
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2604
    hasManager := AbstractSourceCodeManager notNil
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2605
                  and:[AbstractSourceCodeManager isLoaded].
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2606
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2607
    hasManager ifTrue:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2608
        useManager := (manager := Smalltalk at:#SourceCodeManager) notNil asValue.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2609
        localSourceFirst := Class tryLocalSourceFirst asValue.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2610
        manager notNil ifTrue:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2611
            repository := manager repositoryName.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2612
            repository notNil ifTrue:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2613
                repositoryHolder := repository asValue
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2614
            ]
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2615
        ].
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2616
    ] ifFalse:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2617
        useManager := false.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2618
        localSourceFirst := false
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2619
    ].
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2620
    showErrorNotifier := (Exception emergencyHandler == Launcher notifyingEmergencyHandler) asValue.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2621
    showVerboseStack := (DebugView defaultVerboseBacktrace ? false) asValue.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2622
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2623
    sourceCacheDir := nil asValue.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2624
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2625
    loadBinaries := Smalltalk loadBinaries asValue.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2626
    compileLazy := Autoload compileLazy asValue.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2627
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2628
    "/
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2629
    "/ create a box on those values ...
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2630
    "/
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2631
    box := DialogBox new.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2632
    box label:(resources string:'Source & Debugger settings').
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2633
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2634
    box addCheckBox:(resources string:'remember changed methods (for previous method in browser)') on:keepMethodHistory.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2635
    box addCheckBox:(resources string:'log compiles in changes file') on:updChanges.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2636
    box addCheckBox:(resources string:'log doIts in changes file') on:logDoits.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2637
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2638
    component := box 
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2639
                    addLabelledInputField:(resources string:'change file name:')
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2640
                    adjust:#right
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2641
                    on:changeFileName 
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2642
                    tabable:true
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2643
                    separateAtX:0.4.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2644
    component immediateAccept:true; acceptOnLeave:false.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2645
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2646
"/    y := box yPosition.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2647
"/    component := box addTextLabel:(resources string:'change file name:').
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2648
"/    component width:0.5; adjust:#right; borderWidth:0.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2649
"/    box yPosition:y.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2650
"/    component := box addInputFieldOn:changeFileName tabable:true.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2651
"/    component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2652
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2653
    box addHorizontalLine.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2654
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2655
    box addCheckBox:(resources string:'lazy compilation when autoloading') on:compileLazy.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2656
    check := box addCheckBox:(resources string:'if present, load binary objects when autoloading') on:loadBinaries.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2657
    ObjectFileLoader isNil ifTrue:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2658
        loadBinaries value:false.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2659
        check disable
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2660
    ].
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2661
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2662
    hasManager ifTrue:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2663
        check := box addCheckBox:(resources string:'sourcecode from sourcecode management') on:useManager.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2664
        oldIndent := box leftIndent.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2665
        box leftIndent:30.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2666
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2667
        repositoryHolder notNil ifTrue:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2668
            component := box 
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2669
                            addLabelledInputField:(resources string:'repository:')
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2670
                            adjust:#right
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2671
                            on:repositoryHolder 
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2672
                            tabable:true
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2673
                            separateAtX:0.4.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2674
            component immediateAccept:true; acceptOnLeave:false.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2675
        ].
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2676
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2677
        localCheck := box addCheckBox:(resources string:'if present, use local source (suppress checkout)') on:localSourceFirst.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2678
        localCheck enableChannel:useManager.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2679
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2680
        cacheEntry := box 
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2681
                        addLabelledInputField:(resources string:'source cache dir:')
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2682
                        adjust:#right
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2683
                        on:sourceCacheDir 
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2684
                        tabable:true
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2685
                        separateAtX:0.4.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2686
        cacheEntry immediateAccept:true; acceptOnLeave:false.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2687
        box leftIndent:oldIndent.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2688
        cacheEntry enableChannel:useManager.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2689
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2690
        (AbstractSourceCodeManager isNil 
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2691
        or:[AbstractSourceCodeManager defaultManager isNil]) ifTrue:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2692
            useManager value:false.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2693
            cacheEntry disable.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2694
            check disable.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2695
            localCheck enable.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2696
        ] ifFalse:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2697
            sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName).
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2698
        ].
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2699
    ].
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2700
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2701
    box addHorizontalLine.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2702
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2703
    box addCheckBox:(resources string:'show error notifier before opening debugger') on:showErrorNotifier.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2704
    box addCheckBox:(resources string:'verbose backtrace by default in debugger') on:showVerboseStack.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2705
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2706
    box 
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2707
        addHelpButtonFor:'Launcher/sourceSettings.html';
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2708
        addAbortButton; 
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2709
        addOkButton.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2710
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2711
    "/
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2712
    "/ show the box ...
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2713
    "/
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2714
    box open.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2715
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2716
    "/
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2717
    "/ update system settings
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2718
    "/
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2719
    box accepted ifTrue:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2720
        Class keepMethodHistory:keepMethodHistory value.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2721
        Smalltalk logDoits:logDoits value.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2722
        Class updateChanges:updChanges value.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2723
        Autoload compileLazy:compileLazy value.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2724
        Smalltalk loadBinaries:loadBinaries value.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2725
        ObjectMemory nameForChanges:changeFileName value.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2726
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2727
        (hasManager and:[useManager value]) ifTrue:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2728
            manager isNil ifTrue:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2729
                Smalltalk at:#SourceCodeManager put:(AbstractSourceCodeManager defaultManager).
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2730
                manager := Smalltalk at:#SourceCodeManager.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2731
            ].
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2732
            Class tryLocalSourceFirst:(localSourceFirst value).
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2733
            nm := sourceCacheDir value.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2734
            (fn := nm asFilename) exists ifFalse:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2735
                (self confirm:(nm , ' does not exists\create ?' withCRs)) ifTrue:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2736
                    fn makeDirectory; 
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2737
                       makeReadableForAll;
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2738
                       makeWritableForAll;
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2739
                       makeExecutableForAll.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2740
                ]
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2741
            ].
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2742
            (fn exists 
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2743
            and:[fn isDirectory
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2744
            and:[fn isReadable
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2745
            and:[fn isWritable]]]) ifTrue:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2746
                AbstractSourceCodeManager cacheDirectoryName:(sourceCacheDir value).
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2747
            ].
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2748
            repositoryHolder notNil ifTrue:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2749
                manager repositoryName:repositoryHolder value.
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2750
                manager initialize
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2751
            ].
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2752
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2753
            showErrorNotifier value ifFalse:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2754
                Exception emergencyHandler:nil
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2755
            ] ifTrue:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2756
                Exception emergencyHandler:(Launcher notifyingEmergencyHandler)
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2757
            ].
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2758
            DebugView defaultVerboseBacktrace:(showVerboseStack value).
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2759
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2760
        ] ifFalse:[
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2761
            Smalltalk at:#SourceCodeManager put:nil
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2762
        ]
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2763
    ].
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2764
    box destroy
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2765
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2766
    "Modified: 9.9.1996 / 22:43:36 / stefan"
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2767
    "Modified: 11.1.1997 / 12:21:43 / cg"
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2768
    "Created: 17.1.1997 / 17:39:33 / cg"
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2769
!
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  2770
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2771
viewStyleSetting 
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2772
    "open a dialog on viewStyle related settings"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2773
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2774
    |listOfStyles resourceDir dir box 
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2775
     list listView scrView infoLabel infoForwarder newStyle|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2776
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2777
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2778
     search resources directory for a list of .style files ...
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2779
    "
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2780
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2781
    resourceDir := Smalltalk getSystemFileName:'resources'.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2782
    resourceDir isNil ifTrue:[
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2783
        self warn:'no styles found (missing ''resources'' directory)'.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2784
        ^ self
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2785
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2786
    dir := FileDirectory directoryNamed:resourceDir.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2787
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2788
    listOfStyles := dir select:[:aFileName | aFileName endsWith:'.style'].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2789
    listOfStyles := listOfStyles collect:[:aFileName | aFileName copyWithoutLast:6].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2790
    listOfStyles sort.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2791
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2792
"/ old code: used a standard ListSelectionBox
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2793
"/ changed to intercept selection and add info-output.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2794
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2795
"/    box := ListSelectionBox title:(resources string:'STYLE_MSG') withCRs.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2796
"/    box label:(resources string:'Style selection').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2797
"/    box list:listOfStyles.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2798
"/    box initialText:View defaultStyle.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2799
"/    box selectAction:[:newStyle |
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2800
"/    ].    
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2801
"/    box action:[:newStyle |
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2802
"/        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
  2803
"/            transcript showCR:'change style to ' , newStyle , ' ...'.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2804
"/            View defaultStyle:newStyle asSymbol.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2805
"/        ]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2806
"/    ].    
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2807
"/    box showAtPointer
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2808
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2809
"/ new code: build box 'by 'hand'
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2810
"/
596
ad53df643d7e added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 595
diff changeset
  2811
    infoForwarder := [
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2812
                        |nm sheet comment|
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2813
                        nm := list selection.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2814
                        sheet := ViewStyle fromFile:(nm , '.style').
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2815
                        comment := sheet at:#comment ifAbsent:''.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2816
                        infoLabel label:comment withCRs asStringCollection
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2817
                       ].
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
    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
  2820
    list onChangeSend:#value to:infoForwarder.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2821
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2822
    box := Dialog new.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2823
    box label:(resources string:'Style selection').
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2824
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2825
    (box addTextLabel:(resources string:'STYLE_MSG') withCRs) adjust:#left.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2826
    listView := SelectionInListView on:list.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2827
    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
  2828
    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
  2829
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2830
    box addVerticalSpace.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2831
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2832
    (infoLabel := box addTextLabel:'\\' withCRs) adjust:#centerLeft.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2833
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2834
    box addAbortButton; addOkButton.
568
58d7e4157f23 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 566
diff changeset
  2835
    list selection:(View defaultStyle).
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2836
342
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2837
    box stickAtBottomWithVariableHeight:scrView.
d4edf4483817 use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  2838
    box stickAtBottomWithFixHeight:infoLabel.
582
aca73c710a3b use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
  2839
    box open.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2840
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2841
    box accepted ifTrue:[
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2842
        newStyle := list selection.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2843
        newStyle notNil ifTrue:[
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2844
            self withWaitCursorDo:[
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  2845
                transcript showCR:'change style to ' , newStyle , ' ...'.
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2846
                View defaultStyle:newStyle asSymbol.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2847
            ].
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2848
            self reopenLauncher.
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2849
        ]
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  2850
    ].
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  2851
    box destroy
549
4ed344b70424 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 538
diff changeset
  2852
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2853
    "Modified: 8.1.1997 / 14:54:08 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2854
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2855
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  2856
!Launcher methodsFor:'actions - tools'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2857
954
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
  2858
browseAllBreakAndTracePoints
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
  2859
    "open a browser showing all breakPointed/traced methods
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
  2860
     (but, to get rid of them, there is also a menu itme to remove them all)"
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
  2861
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
  2862
    |methods|
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
  2863
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
  2864
    methods :=  WrappedMethod allInstances.
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
  2865
    SystemBrowser browseMethods:methods title:'all breakPointed/traced methods'
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
  2866
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
  2867
    "Modified: 14.1.1997 / 12:51:17 / cg"
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
  2868
    "Created: 14.1.1997 / 12:55:23 / cg"
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
  2869
!
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
  2870
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2871
compressingGarbageCollect
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2872
    "perform a compressing garbageCollect"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2873
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2874
    ObjectMemory verboseGarbageCollect
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2875
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2876
    "Created: 12.5.1996 / 15:30:15 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2877
    "Modified: 8.1.1997 / 14:54:21 / cg"
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2878
!
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2879
1051
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  2880
deIconifyAllWindows
1056
6c695f6eb923 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1055
diff changeset
  2881
    |setOfViews|
6c695f6eb923 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1055
diff changeset
  2882
6c695f6eb923 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1055
diff changeset
  2883
    setOfViews := Project current views asIdentitySet.
6c695f6eb923 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1055
diff changeset
  2884
    setOfViews addAll:(Project defaultProject views).
6c695f6eb923 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1055
diff changeset
  2885
6c695f6eb923 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1055
diff changeset
  2886
    setOfViews do:[:aTopView |
6c695f6eb923 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1055
diff changeset
  2887
        aTopView device == Screen current ifTrue:[
6c695f6eb923 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1055
diff changeset
  2888
            aTopView expand
1055
41df6ada2df7 dont deiconify debuggers (i.e. only walk over current project
Claus Gittinger <cg@exept.de>
parents: 1051
diff changeset
  2889
        ].
41df6ada2df7 dont deiconify debuggers (i.e. only walk over current project
Claus Gittinger <cg@exept.de>
parents: 1051
diff changeset
  2890
    ].
41df6ada2df7 dont deiconify debuggers (i.e. only walk over current project
Claus Gittinger <cg@exept.de>
parents: 1051
diff changeset
  2891
1051
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  2892
    "
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  2893
     Transcript topView application deIconifyAllWindows
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  2894
    "
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  2895
1056
6c695f6eb923 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1055
diff changeset
  2896
    "Modified: 3.3.1997 / 14:13:24 / cg"
1051
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  2897
!
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  2898
815
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2899
findAndDestroyWindow
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2900
    "find a window (by name) and destroy it"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2901
815
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2902
    |v|
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2903
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2904
    v := self findWindow.
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2905
    v notNil ifTrue:[
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2906
        v destroy.
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2907
    ].
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2908
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2909
    "Created: 28.10.1996 / 14:39:23 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2910
    "Modified: 8.1.1997 / 14:54:52 / cg"
815
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2911
!
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2912
765
9dafe5b26f77 moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents: 760
diff changeset
  2913
findAndRaiseWindow
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2914
    "find a window (by name) and raise it"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2915
815
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2916
    |v|
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2917
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2918
    v := self findWindow.
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2919
    v notNil ifTrue:[
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2920
        v raiseDeiconified.
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2921
    ].
573e5b6001f6 added find&destroy
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
  2922
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2923
    "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
  2924
!
9dafe5b26f77 moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents: 760
diff changeset
  2925
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2926
fullScreenHardcopy
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2927
    "after a second (to allow redraw of views under menu ...),
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2928
     save the contents of the whole screen."
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2929
738
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2930
    Processor 
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2931
        addTimedBlock:[
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2932
                        self 
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2933
                            saveScreenImage:(Image fromScreen) 
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2934
                            defaultName:'screen'
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2935
                      ] 
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2936
        afterSeconds:1
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2937
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2938
    "Modified: 23.9.1996 / 14:36:14 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2939
!
99
claus
parents: 98
diff changeset
  2940
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2941
garbageCollect
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2942
    "perform a non-compressing garbageCollect"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2943
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2944
    ObjectMemory reclaimSymbols
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2945
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2946
    "Created: 12.5.1996 / 15:28:03 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2947
    "Modified: 8.1.1997 / 14:54:29 / cg"
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2948
!
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2949
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2950
globalGarbageCollect
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2951
    "perform a non-compressing garbageCollect"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2952
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2953
    ObjectMemory reclaimSymbols
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2954
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2955
    "Created: 12.5.1996 / 15:28:13 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2956
    "Modified: 8.1.1997 / 14:54:36 / cg"
537
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2957
!
9af64613ec8c added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents: 536
diff changeset
  2958
1051
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  2959
iconifyAllWindows
1056
6c695f6eb923 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1055
diff changeset
  2960
    |setOfViews|
6c695f6eb923 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1055
diff changeset
  2961
6c695f6eb923 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1055
diff changeset
  2962
    setOfViews := Project current views asIdentitySet.
6c695f6eb923 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1055
diff changeset
  2963
    setOfViews addAll:(Project defaultProject views).
6c695f6eb923 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1055
diff changeset
  2964
6c695f6eb923 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1055
diff changeset
  2965
    setOfViews do:[:aTopView |
6c695f6eb923 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1055
diff changeset
  2966
        aTopView device == Screen current ifTrue:[
6c695f6eb923 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1055
diff changeset
  2967
            aTopView collapse
1051
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  2968
        ]
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  2969
    ]
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  2970
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  2971
    "Created: 1.3.1997 / 20:10:58 / cg"
1056
6c695f6eb923 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1055
diff changeset
  2972
    "Modified: 3.3.1997 / 14:13:11 / cg"
1051
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  2973
!
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  2974
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2975
removeAllBreakAndTracePoints
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2976
    "remove all break- and trace points"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2977
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2978
    MessageTracer cleanup
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2979
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  2980
    "Modified: 8.1.1997 / 14:55:27 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2981
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2982
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2983
screenHardcopy
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2984
    "after a second (to allow redraw of views under menu ...),
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2985
     let user specify a rectangular area on the screen
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2986
     and save its contents."
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2987
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2988
    |area|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  2989
738
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2990
    Processor 
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2991
        addTimedBlock:[
1032
75221671d7db when doing an area-hardcopy: wait till no button is pressed.
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
  2992
                        [Screen current leftButtonPressed] whileTrue:[Processor yield].
75221671d7db when doing an area-hardcopy: wait till no button is pressed.
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
  2993
738
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2994
                        area := Rectangle fromUser.
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2995
                        (area width > 0 and:[area height > 0]) ifTrue:[
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2996
                            self saveScreenImage:(Image fromScreen:area) defaultName:'hardcopy'
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2997
                        ]
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2998
                      ] 
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  2999
        afterSeconds:1
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  3000
1032
75221671d7db when doing an area-hardcopy: wait till no button is pressed.
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
  3001
    "Modified: 13.2.1997 / 16:02:35 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3002
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3003
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3004
startEventMonitor
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3005
    "open an eventMonitor view"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3006
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3007
    EventMonitor open
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3008
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3009
    "Modified: 8.1.1997 / 14:55:40 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3010
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3011
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3012
startFullWindowTreeView
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3013
    "open a windowTree view (on all views)"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3014
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3015
    WindowTreeView open
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3016
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3017
    "Modified: 8.1.1997 / 14:56:04 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3018
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3019
1020
238307b5882f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1008
diff changeset
  3020
startLatencyMonitor
238307b5882f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1008
diff changeset
  3021
    "open an interruptLatencyMonitor view"
238307b5882f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1008
diff changeset
  3022
238307b5882f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1008
diff changeset
  3023
    InterruptLatencyMonitor notNil ifTrue:[
238307b5882f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1008
diff changeset
  3024
        Autoload autoloadFailedSignal catch:[
238307b5882f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1008
diff changeset
  3025
            InterruptLatencyMonitor autoload.
238307b5882f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1008
diff changeset
  3026
        ].
238307b5882f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1008
diff changeset
  3027
        InterruptLatencyMonitor isLoaded ifTrue:[
238307b5882f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1008
diff changeset
  3028
            InterruptLatencyMonitor open.
238307b5882f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1008
diff changeset
  3029
            ^ self.
238307b5882f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1008
diff changeset
  3030
        ]
238307b5882f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1008
diff changeset
  3031
    ].
238307b5882f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1008
diff changeset
  3032
    self warn:'sorry - the irq latency monitor is only available
238307b5882f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1008
diff changeset
  3033
in the full commercial release'.
238307b5882f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1008
diff changeset
  3034
238307b5882f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1008
diff changeset
  3035
    "Modified: 31.1.1997 / 16:45:54 / cg"
238307b5882f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1008
diff changeset
  3036
!
238307b5882f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1008
diff changeset
  3037
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3038
startMemoryMonitor
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3039
    "open a memoryMonitor view"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3040
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3041
    MemoryMonitor open
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3042
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3043
    "Modified: 8.1.1997 / 14:56:14 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3044
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3045
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3046
startMemoryUsageView
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3047
    "open a memoryUsage view"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3048
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3049
    MemoryUsageView open
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3050
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3051
    "Modified: 8.1.1997 / 14:56:21 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3052
!
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
startProcessMonitor
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3055
    "open a processMonitor view"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3056
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3057
    ProcessMonitor open
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3058
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3059
    "Modified: 8.1.1997 / 14:56:27 / cg"
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
997
0edcba8790fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 974
diff changeset
  3062
startSemaphoreMonitor
0edcba8790fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 974
diff changeset
  3063
    "open a semaphoreMonitor view"
0edcba8790fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 974
diff changeset
  3064
0edcba8790fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 974
diff changeset
  3065
    SemaphoreMonitor open
0edcba8790fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 974
diff changeset
  3066
0edcba8790fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 974
diff changeset
  3067
    "Modified: 8.1.1997 / 14:56:27 / cg"
0edcba8790fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 974
diff changeset
  3068
    "Created: 24.1.1997 / 23:48:45 / cg"
0edcba8790fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 974
diff changeset
  3069
!
0edcba8790fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 974
diff changeset
  3070
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3071
startStopEventTrace
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3072
    "start/stop event tracing for a particular view"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3073
503
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  3074
    |v wg|
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3075
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3076
    v := Screen current viewFromUser.
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3077
    v notNil ifTrue:[
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3078
        v := v topView.
503
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  3079
        wg := v windowGroup.
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  3080
        wg notNil ifTrue:[
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  3081
            "/
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  3082
            "/ toggle eventTrace in its windowGroup
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  3083
            "/
94b826e911b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 500
diff changeset
  3084
            wg traceEvents:(wg preEventHook isNil)
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3085
        ]
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3086
    ]
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3087
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3088
    "Created: 7.3.1996 / 14:44:22 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3089
    "Modified: 8.1.1997 / 14:56:44 / cg"
434
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3090
!
17d3ef307bc5 added per-view eventTracing
Claus Gittinger <cg@exept.de>
parents: 427
diff changeset
  3091
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3092
startWindowTreeView
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3093
    "open a windowTree view (on a topView)"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3094
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3095
    |v|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3096
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3097
    v := self pickAView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3098
    v notNil ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3099
        WindowTreeView openOn:v topView
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3100
    ]
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3101
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3102
    "Modified: 8.1.1997 / 14:55:59 / cg"
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
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3105
viewDestroy
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3106
    "let user pick a view and destroy it.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3107
     Even allow destroying non-smalltalk views
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3108
     (also for views which I forgot due to some error)"
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3109
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3110
    |device p v id|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3111
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3112
    (Delay forSeconds:1) wait.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3113
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3114
    device := Screen current.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3115
    p :=  device pointFromUser.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3116
    id := device viewIdFromPoint:p.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3117
    v := device viewFromId:id.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3118
    v notNil ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3119
        v topView destroy.
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3120
        ^ self
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3121
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3122
    id = device rootView id ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3123
        ^ self
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3124
    ].
298
d1212fc486b9 message string changed
Claus Gittinger <cg@exept.de>
parents: 281
diff changeset
  3125
    (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
  3126
    ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3127
        device destroyView:nil withId:id
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3128
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3129
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3130
    "Modified: 18.9.1995 / 23:13:32 / claus"
298
d1212fc486b9 message string changed
Claus Gittinger <cg@exept.de>
parents: 281
diff changeset
  3131
    "Modified: 14.12.1995 / 22:02:26 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3132
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3133
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3134
viewHardcopy
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3135
    "after a second (to allow redraw of views under menu ...),
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3136
     let user specify a view and save its contents."
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3137
738
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  3138
    Processor 
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  3139
        addTimedBlock:[
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  3140
                        |v|
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  3141
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  3142
                        v := Screen current viewFromUser.
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  3143
                        v notNil ifTrue:[
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  3144
                            self saveScreenImage:(Image fromView:(v topView)) defaultName:'hardcopy'
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  3145
                        ]
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  3146
                      ] 
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  3147
        afterSeconds:1
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  3148
e1fa8a2b8bc1 reformatted
Claus Gittinger <cg@exept.de>
parents: 737
diff changeset
  3149
    "Modified: 23.9.1996 / 14:36:48 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3150
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3151
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3152
viewInspect
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3153
    "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
  3154
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3155
    |v|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3156
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3157
    v := self pickAView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3158
    v notNil ifTrue:[
226
4b050498fe46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
  3159
"/        v topView inspect
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3160
        v inspect
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3161
    ]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3162
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3163
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3164
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  3165
!Launcher methodsFor:'change & update'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3166
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3167
update:something with:aParameter from:changedObject
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3168
    "care for project changes & update my infoView"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3169
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3170
    ((something == #currentProject)
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3171
    or:[changedObject == Project]) ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3172
        self changed:#info.
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3173
        ^ self
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3174
    ].
921
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
    "Modified: 8.1.1997 / 14:57:07 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3177
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3178
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  3179
!Launcher methodsFor:'dynamic menus'!
658
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3180
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3181
addMenu:name withItems:items actions:actions
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3182
    "dynamically add a new (user-)menu to the menu panel.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3183
     This allows applications to install items for themself
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3184
     dynamically in the launcher."
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3185
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3186
    |subMenu|
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3187
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3188
    myMenu add:name selector:(name asSymbol) before:#help.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3189
    subMenu := MenuView forMenu:myMenu.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3190
    subMenu labels:items.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3191
    subMenu actions:actions.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3192
    myMenu at:name putMenu:subMenu
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3193
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3194
    "
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3195
     |launcher actionBlocks|
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3196
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3197
     actionBlocks := Array new:3.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3198
     actionBlocks at:1 put:[Transcript showCR:'foo'].
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3199
     actionBlocks at:2 put:[Transcript showCR:'bar'].
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3200
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3201
     launcher := Transcript topView application.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3202
     launcher 
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3203
        addMenu:'misc' 
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3204
        withItems:#('foo' 'bar')
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3205
        actions:actionBlocks
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3206
    "
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3207
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3208
    "
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3209
     |launcher actionBlocks|
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3210
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3211
     actionBlocks := Array new:3.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3212
     actionBlocks at:1 put:[RDoItServer startServer].
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3213
     actionBlocks at:2 put:[RDoItServer killServer].
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3214
                
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3215
     launcher := Transcript topView application.
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3216
     launcher 
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3217
        addMenu:'misc' 
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3218
        withItems:#('start rdoit server' 'stop rdoit server')
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3219
        actions:actionBlocks
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3220
    "
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3221
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3222
    "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
  3223
!
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3224
668
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3225
menuAt:nameSymbol
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3226
    "return a menu by name"
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3227
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3228
    ^ myMenu subMenuAt:nameSymbol
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3229
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3230
    "
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3231
     |launcher demoMenu|
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3232
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3233
     launcher := Transcript topView application.
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3234
     demoMenu := launcher menuAt:#demos.
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3235
     demoMenu
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3236
        addLabels:#('-' 'fooBar')
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3237
        selectors:#(nil fooBar).
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3238
     demoMenu actionAt:#fooBar put:[Transcript showCR:'fooBar']
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3239
    "
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3240
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3241
    "Created: 11.7.1996 / 15:35:13 / cg"
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3242
    "Modified: 11.7.1996 / 15:42:25 / cg"
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3243
!
6da85ce16fde checkin from browser
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
  3244
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3245
removeMenu:name
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3246
    "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
  3247
     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
  3248
     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
  3249
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3250
    myMenu remove:name 
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3251
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3252
    "
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3253
     |launcher actionBlocks|
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3254
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3255
     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
  3256
     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
  3257
     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
  3258
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3259
     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
  3260
     launcher 
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3261
        addMenu:'misc' 
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3262
        withItems:#('foo' 'bar')
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3263
        actions:actionBlocks.
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3264
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3265
     Delay waitForSeconds:10.
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3266
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3267
     launcher removeMenu:'misc'
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3268
    "
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3269
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3270
    "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
  3271
    "Modified: 5.7.1996 / 11:54:36 / cg"
658
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3272
! !
39ffd3412779 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 638
diff changeset
  3273
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  3274
!Launcher methodsFor:'help'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3275
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3276
helpTextFor:aComponent
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3277
    "activeHelp interface: return some help text for a component"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3278
399
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  3279
    |sel s buttons|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3280
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3281
    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
  3282
        s := 'TRANSCRIPT_HELP'
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3283
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3284
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3285
    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
  3286
        s := 'INFOVIEW_HELP'
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3287
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3288
399
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  3289
    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
  3290
    (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
  3291
        "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
  3292
        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
  3293
        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
  3294
            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
  3295
        ].
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  3296
        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
  3297
            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
  3298
        ].
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  3299
        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
  3300
            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
  3301
        ].
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3302
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3303
    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
  3304
        ^ resources string:s
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3305
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3306
    ^ nil
399
c75f23ad674c handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents: 398
diff changeset
  3307
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3308
    "Modified: 8.1.1997 / 14:57:34 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3309
! !
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3310
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  3311
!Launcher methodsFor:'infoview update'!
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3312
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3313
info
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3314
    "update the infoView from the current project"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3315
893
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3316
    |project projectName projectDir packageName defNameSpace msg args|
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3317
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3318
    (Project isNil or:[(project := Project current) isNil]) ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3319
        projectName := '* none *'.
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3320
        projectDir := '.'.
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3321
        packageName := '* none *'.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3322
    ] ifFalse:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3323
        projectName := project name.
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3324
        projectDir := project directory.
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3325
        packageName := project packageName.
891
26ac48ced53b show the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 864
diff changeset
  3326
        defNameSpace := project defaultNameSpace.
26ac48ced53b show the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 864
diff changeset
  3327
    ].
26ac48ced53b show the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 864
diff changeset
  3328
    defNameSpace isNil ifTrue:[
26ac48ced53b show the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 864
diff changeset
  3329
        defNameSpace := Smalltalk.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3330
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3331
893
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3332
    defNameSpace == Smalltalk ifTrue:[
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3333
        msg := 'project: ''%1''  fileOut to: ''%3''  package: ''%2'''.
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3334
        args := Array 
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3335
                    with:projectName
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3336
                    with:packageName 
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3337
                    with:(projectDir contractTo:30).
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3338
    ] ifFalse:[
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3339
        msg := 'project: ''%1''  fileOut to: ''%3''  package: ''%2''  nameSpace: %4'.
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3340
        args := Array 
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3341
                        with:projectName
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  3342
                        with:packageName 
891
26ac48ced53b show the default nameSpace
Claus Gittinger <cg@exept.de>
parents: 864
diff changeset
  3343
                        with:(projectDir contractTo:30)
893
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3344
                        with:defNameSpace name.
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3345
    ].
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3346
        
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3347
    ^ resources string:msg withArgs:args
39307a122c30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
  3348
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3349
    "Modified: 8.1.1997 / 14:57:47 / cg"
319
a39350103cb2 forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
  3350
!
a39350103cb2 forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
  3351
a39350103cb2 forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
  3352
showActivity:someMessage
500
6824f44e589b commentary
Claus Gittinger <cg@exept.de>
parents: 499
diff changeset
  3353
    "some activityNotification to be forwarded to the user;
6824f44e589b commentary
Claus Gittinger <cg@exept.de>
parents: 499
diff changeset
  3354
     show it in the transcript here."
6824f44e589b commentary
Claus Gittinger <cg@exept.de>
parents: 499
diff changeset
  3355
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  3356
    transcript showCR:someMessage; endEntry
319
a39350103cb2 forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
  3357
a39350103cb2 forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
  3358
    "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
  3359
    "Modified: 5.7.1996 / 13:13:15 / cg"
99
claus
parents: 98
diff changeset
  3360
! !
claus
parents: 98
diff changeset
  3361
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3362
!Launcher methodsFor:'initialize - menus'!
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3363
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3364
disableDangerousMenuItemsInRemoteLauncher
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3365
    "if I am a remote launcher (multidisplay operation),
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3366
     disable menus which are dangerous or affect common state. 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3367
     These operations have to
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3368
     be performed on the main screen."
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3369
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3370
    isMainLauncher ifFalse:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3371
        (myMenu menuAt:#file) disableAll:#(snapshot snapshotAndExit objectModuleDialog exit).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3372
        (myMenu menuAt:#projects) disableAll.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3373
        (myMenu menuAt:#settings) disableAll.
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
    "Created: 5.7.1996 / 17:00:50 / cg"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3377
    "Modified: 5.7.1996 / 17:01:30 / cg"
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
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3380
setupAboutMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3381
    "setup the about- pulldown menu"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3382
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3383
    myMenu at:#about 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3384
           putLabels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3385
                                        'about Smalltalk/X ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3386
                                        '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3387
                                        'licence conditions'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3388
                                       ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3389
           selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3390
                                        #about 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3391
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3392
                                        #showLicenceConditions 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3393
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3394
           receiver:self.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3395
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3396
    "Created: 8.1.1997 / 14:03:20 / cg"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3397
    "Modified: 8.1.1997 / 14:04:19 / cg"
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
setupClassesMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3401
    "setup the classes- pulldown menu"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3402
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3403
    myMenu at:#classes 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3404
           putLabels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3405
                                        'system browser'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3406
                                        'class browser ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3407
                                        'full class browser ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3408
                                        'class hierarchy browser ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3409
                                        'class tree'
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
                                        'implementors ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3412
                                        'senders ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3413
                                        'resource ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3414
                                        '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3415
                                        'change browser'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3416
                                        ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3417
           selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3418
                                        #startSystemBrowser 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3419
                                        #startClassBrowser 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3420
                                        #startFullClassBrowser 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3421
                                        #startClassHierarchyBrowser 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3422
                                        #startClassTreeView 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3423
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3424
                                        #browseImplementors 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3425
                                        #browseSenders 
954
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
  3426
                                        #browseResources
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3427
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3428
                                        #startChangesBrowser 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3429
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3430
           receiver:self.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3431
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3432
    JavaBrowser notNil ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3433
        (myMenu subMenuAt:#classes)
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3434
            addLabels:(resources array:#('-' 'java browser'))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3435
            selectors:#(nil startJavaBrowser)
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3436
            after:#startClassTreeView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3437
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3438
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3439
    "Created: 8.1.1997 / 14:05:44 / cg"
954
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
  3440
    "Modified: 14.1.1997 / 12:55:02 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3441
!
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3442
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3443
setupDemoMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3444
    "setup the demo- pulldown menu"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3445
1041
71b26a9298a0 menu resource
Claus Gittinger <cg@exept.de>
parents: 1039
diff changeset
  3446
    <resource: #menu>
71b26a9298a0 menu resource
Claus Gittinger <cg@exept.de>
parents: 1039
diff changeset
  3447
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3448
    |m|
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3449
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3450
    myMenu at:#demos 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3451
           putLabels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3452
                                        'goodies'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3453
                                        'games'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3454
                                        'geometric designs'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3455
                                        'simple animations'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3456
                                        '3D graphics'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3457
                                        'graphic editors'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3458
                                       ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3459
           selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3460
                                        goodies
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3461
                                        games
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3462
                                        geometricDesigns
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3463
                                        simpleAnimations
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3464
                                        #'3Dgraphics'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3465
                                        #graphicEditors
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
           receiver:self.
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
     only to show two different ways of defining a popUpMenu,
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3471
     we use labels:selectors:receiver: here:
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3472
    "
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3473
    m := myMenu menuAt:#demos.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3474
    m subMenuAt:#games
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3475
      put:(PopUpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3476
                labels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3477
                                           'Tetris'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3478
                                           'Tic Tac Toe'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3479
                                           'Tic Tac Toe (2 players)'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3480
                                         ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3481
                selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3482
                                           startTetris
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3483
                                           startTicTacToe
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3484
                                           startTicTacToe2
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3485
                           )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3486
                receiver:self).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3487
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
     and labels:selector:args:receiver: here:
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3490
    "
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3491
    m subMenuAt:#geometricDesigns
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3492
      put:(PopUpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3493
                labels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3494
                                           'Pen demo'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3495
                                           'Commander demo'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3496
                                           '-'     
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3497
                                           'Fractal plants demo'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3498
                                           'Fractal patterns demo'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3499
                                           'more fractal patterns demo'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3500
                                         ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3501
                selector:#openDemo:
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3502
                args:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3503
                                           PenDemo
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3504
                                           CommanderDemo
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3505
                                           nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3506
                                           FractalPlantsDemo
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3507
                                           FractalPatternsDemo
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3508
                                           ArmchairUniverseDemo
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3509
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3510
                receiver:self).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3511
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3512
    m subMenuAt:#simpleAnimations 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3513
      put:(PopUpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3514
                labels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3515
                                           'Animation'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3516
                                           'Globe demo'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3517
                                         ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3518
                selector:#openDemo:
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3519
                args:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3520
                                           Animation
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3521
                                           GlobeDemo
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3522
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3523
                receiver:self).
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
    m subMenuAt:#'3Dgraphics' 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3526
      put:(PopUpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3527
                labels:(resources 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3528
                            array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3529
                                'plane'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3530
                                'tetra'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3531
                                'cube (wireframe)'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3532
                                'cube (solid)'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3533
                                'sphere (wireframe)'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3534
                                'doughnut (wireframe)'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3535
                                'planet'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3536
                                'teapot'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3537
                                'logo'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3538
                                'rubics cube'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3539
                                'x/y graph'
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
                                'cube (light)'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3542
                                'cube (light & texture)'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3543
                                'sphere (light)'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3544
                                'colored octahedron'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3545
                             ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3546
                selector:#openDemo:
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3547
                args:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3548
                                GLPlaneDemoView2
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3549
                                GLTetraDemoView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3550
                                GLWireCubeDemoView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3551
                                GLCubeDemoView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3552
                                GLWireSphereDemoView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3553
                                GLDoughnutDemoView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3554
                                GLPlanetDemoView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3555
                                GLTeapotDemo
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3556
                                Logo3DView1
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3557
                                RubicsCubeView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3558
                                GLXYGraph
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3559
                                nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3560
                                GLCubeDemoView2
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3561
                                GLBrickCubeDemoView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3562
                                GLSphereDemoView2
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3563
                                GLOctaHedronDemoView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3564
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3565
                receiver:self).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3566
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3567
    m subMenuAt:#graphicEditors 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3568
      put:(PopUpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3569
                labels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3570
                                           'DrawTool'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3571
                                           'LogicTool'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3572
                                           'Paint Demo'
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
                selector:#openDemo:
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3575
                args:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3576
                                           DrawTool
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3577
                                           LogicTool
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3578
                                           ColorDrawDemo3
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3579
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3580
                receiver:self).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3581
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3582
    m subMenuAt:#goodies 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3583
      put:(PopUpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3584
                labels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3585
                                        'clock'
1005
847233aa3840 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1002
diff changeset
  3586
                                        'digital clock'
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3587
                                        'calendar'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3588
                                        'calculator'
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
                                        'mail tool'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3591
                                        'news tool'
1105
eff690a9d837 added ftpTool to goodies menu
Claus Gittinger <cg@exept.de>
parents: 1057
diff changeset
  3592
                                        'ftp tool'
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3593
                                        ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3594
                selector:#openDemo:
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3595
                args:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3596
                                        Clock 
1005
847233aa3840 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1002
diff changeset
  3597
                                        DigitalClockView 
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3598
                                        Calendar
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3599
                                        CalculatorView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3600
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3601
                                        MailView 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3602
                                        NewsView
1105
eff690a9d837 added ftpTool to goodies menu
Claus Gittinger <cg@exept.de>
parents: 1057
diff changeset
  3603
                                        FTPTool
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3604
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3605
                receiver:self).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3606
1105
eff690a9d837 added ftpTool to goodies menu
Claus Gittinger <cg@exept.de>
parents: 1057
diff changeset
  3607
    "Modified: 28.3.1997 / 22:45:12 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3608
!
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
setupFileMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3611
    "setup the file- pulldown menu"
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
    |l s|
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3614
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3615
    l := #(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3616
                'file browser'
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
                'modules ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3619
                '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3620
                'snapshot ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3621
                'snapshot & exit ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3622
                'exit smalltalk ...'
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
    s := #(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3625
                #startFileBrowser
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3626
                nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3627
                #objectModuleDialog 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3628
                nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3629
                #snapshot
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3630
                #snapshotAndExit
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3631
                #exit
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3632
         ).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3633
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3634
    myMenu at:#file
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3635
           putLabels:(resources array:l)
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3636
           selectors:s
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3637
           receiver:self.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3638
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3639
    "Created: 8.1.1997 / 14:04:15 / cg"
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
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3642
setupHelpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3643
    "setup the help- pulldown menu"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3644
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3645
    |l s|
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3646
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3647
    ActiveHelp notNil ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3648
        l := #(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3649
                'what''s new'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3650
                'index'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3651
                '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3652
                'ST/X online documentation'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3653
                'class documentation'
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
                'print documentation ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3656
                '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3657
                'active help \c'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3658
              ).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3659
        s := #(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3660
                #startWhatsNewDocumentation
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3661
                #startDocumentationIndex
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3662
                nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3663
                #startDocumentationTool
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3664
                #startClassDocumentation
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3665
                nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3666
                #showBookPrintDocument
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3667
                nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3668
                #toggleActiveHelp:
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
    ] ifFalse:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3671
        l := #(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3672
                'what''s new'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3673
                'index'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3674
                '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3675
                'ST/X online documentation'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3676
                'class documentation'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3677
                '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3678
                'print documentation ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3679
              ).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3680
        s := #(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3681
                #startWhatsNewDocumentation
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3682
                #startDocumentationIndex
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3683
                nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3684
                #startDocumentationTool
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3685
                #startClassDocumentation
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3686
                nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3687
                #showBookPrintDocument
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3688
              )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3689
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3690
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3691
    myMenu at:#help 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3692
           putLabels:(resources array:l)
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3693
           selectors:s
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3694
           receiver:self.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3695
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3696
    (ActiveHelp notNil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3697
    and:[ActiveHelp isActive]) ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3698
        (myMenu menuAt:#help) checkToggleAt:#toggleActiveHelp: put:true
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3699
    ].
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
    "Created: 8.1.1997 / 14:08:09 / cg"
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
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3704
setupMainMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3705
    "setup the pulldown menus main items.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3706
     Extracted into a separate method, to allow subclasses to
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3707
     add their own entries"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3708
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3709
    |l s icon|
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3710
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3711
    myMenu labels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3712
                                     about
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3713
                                     file
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3714
                                     classes
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3715
                                     tools
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3716
                                     projects
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3717
                                     settings
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3718
                                     demos
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3719
                                     help)).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3720
    "
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3721
     if there is a bitmap, change 'about' to the ST/X icon
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3722
    "
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3723
    icon := self class smallAboutIcon.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3724
    icon notNil ifTrue:[
951
fa1c5d066f58 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 943
diff changeset
  3725
"/        icon := icon on:device.
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3726
        myMenu labels at:1 put:icon.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3727
        myMenu height:(myMenu height max:(icon height + (View viewSpacing * 2)))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3728
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3729
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3730
    myMenu selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3731
                                     #about
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3732
                                     #file
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3733
                                     #classes 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3734
                                     #tools 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3735
                                     #projects 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3736
                                     #settings
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3737
                                     #demos
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3738
                                     #help).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3739
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3740
    "Created: 8.1.1997 / 13:58:50 / cg"
951
fa1c5d066f58 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 943
diff changeset
  3741
    "Modified: 13.1.1997 / 23:33:09 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3742
!
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3743
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3744
setupMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3745
    "setup the pulldown menu"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3746
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3747
    |mainItems|
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3748
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3749
    self setupMainMenu.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3750
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3751
    mainItems := myMenu selectors.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3752
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3753
    (mainItems includes:#about) ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3754
        "/ if not redefined without an about-menu ...
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3755
        self setupAboutMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3756
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3757
    (mainItems includes:#file) ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3758
        "/ if not redefined without a file-menu ...
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3759
        self setupFileMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3760
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3761
    (mainItems includes:#classes) ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3762
        "/ if not redefined without a classes-menu ...
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3763
        self setupClassesMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3764
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3765
    (mainItems includes:#projects) ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3766
        "/ if not redefined without a projects-menu ...
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3767
        self setupProjectsMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3768
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3769
    (mainItems includes:#settings) ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3770
        "/ if not redefined without a settings-menu ...
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3771
        self setupSettingsMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3772
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3773
    (mainItems includes:#tools) ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3774
        "/ if not redefined without a tools-menu ...
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3775
        self setupToolsMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3776
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3777
    (mainItems includes:#demos) ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3778
        "/ if not redefined without a demos-menu ...
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3779
        self setupDemoMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3780
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3781
    (mainItems includes:#help) ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3782
        "/ if not redefined without a help-menu ...
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3783
        self setupHelpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3784
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3785
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3786
    self disableDangerousMenuItemsInRemoteLauncher
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3787
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3788
    "Modified: 8.1.1997 / 14:09:47 / cg"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3789
!
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3790
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3791
setupProjectsMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3792
    "setup the projects- pulldown menu"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3793
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3794
    myMenu at:#projects 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3795
           putLabels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3796
                                        'new project'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3797
                                        '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3798
                                        'select project ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3799
                                        ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3800
           selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3801
                                        #newProject 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3802
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3803
                                        #selectProject 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3804
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3805
           receiver:self.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3806
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3807
    "Created: 8.1.1997 / 14:06:18 / cg"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3808
!
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3809
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3810
setupSettingsMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3811
    "setup the settings- pulldown menu"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3812
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3813
    myMenu at:#settings 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3814
           putLabels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3815
                                        'language ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3816
                                        'show keyboard mappings ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3817
                                        'view style ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3818
                                        'fonts ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3819
                                        'printer ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3820
                                        'messages ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3821
                                        'compilation ...'
968
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  3822
                                        'source & debugger ...'
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3823
                                        'object memory ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3824
                                        'screen ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3825
                                        'misc ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3826
                                        '='
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3827
                                        'save settings ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3828
                                        'restore settings ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3829
                                        ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3830
           selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3831
                                        #languageSetting 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3832
                                        #keyboardSetting 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3833
                                        #viewStyleSetting 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3834
                                        #fontSettings 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3835
                                        #printerSettings 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3836
                                        #messageSettings 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3837
                                        #compilerSettings 
968
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  3838
                                        #sourceAndDebuggerSettings 
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3839
                                        #memorySettings 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3840
                                        #displaySettings 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3841
                                        #miscSettings
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3842
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3843
                                        #saveSettings 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3844
                                        #restoreSettings 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3845
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3846
           receiver:self.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3847
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3848
    "Created: 8.1.1997 / 14:07:00 / cg"
968
1c8c87307720 splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
  3849
    "Modified: 17.1.1997 / 17:40:00 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3850
!
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3851
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3852
setupToolsMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3853
    "setup the tools- pulldown menu"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3854
1041
71b26a9298a0 menu resource
Claus Gittinger <cg@exept.de>
parents: 1039
diff changeset
  3855
    <resource: #menu>
71b26a9298a0 menu resource
Claus Gittinger <cg@exept.de>
parents: 1039
diff changeset
  3856
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3857
    |m|
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3858
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3859
    myMenu at:#tools 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3860
           putLabels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3861
                                        'workspace'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3862
                                        '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3863
                                        'monitors'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3864
                                        '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3865
                                        'views'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3866
                                        '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3867
                                        'hardcopy'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3868
                                        '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3869
                                        'misc'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3870
                                        ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3871
           selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3872
                                        #startWorkspace 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3873
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3874
                                        #monitors
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3875
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3876
                                        #views
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3877
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3878
                                        #hardcopy 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3879
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3880
                                        #misc 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3881
                      )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3882
           receiver:self.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3883
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3884
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3885
    m := myMenu menuAt:#tools.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3886
    m subMenuAt:#monitors 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3887
      put:(PopUpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3888
                labels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3889
                                           'process'
997
0edcba8790fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 974
diff changeset
  3890
                                           'semaphores'
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3891
                                           'memory'
1020
238307b5882f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1008
diff changeset
  3892
                                           'irq latency'
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3893
                                           'event view'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3894
                                           'event trace'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3895
                                           '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3896
                                           'memory usage'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3897
                                         ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3898
                selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3899
                                        #startProcessMonitor
997
0edcba8790fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 974
diff changeset
  3900
                                        #startSemaphoreMonitor 
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3901
                                        #startMemoryMonitor 
1020
238307b5882f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1008
diff changeset
  3902
                                        #startLatencyMonitor 
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3903
                                        #startEventMonitor 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3904
                                        #startStopEventTrace
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3905
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3906
                                        #startMemoryUsageView 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3907
                           )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3908
                receiver:self).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3909
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3910
    m subMenuAt:#views 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3911
      put:(PopUpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3912
                labels:(resources array:#(
1051
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  3913
                                           'iconify all'
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  3914
                                           'de-iconify all'
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  3915
                                           '-'
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3916
                                           'find & raise ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3917
                                           '-'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3918
                                           'view tree (all views)'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3919
                                           'view tree'
922
c72dae45cf15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 921
diff changeset
  3920
                                           '-'
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3921
                                           'select & inspect view'
922
c72dae45cf15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 921
diff changeset
  3922
                                           '-'
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3923
                                           'select & destroy view'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3924
                                           'find & destroy ...'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3925
                                         ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3926
                selectors:#(
1051
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  3927
                                        #iconifyAllWindows
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  3928
                                        #deIconifyAllWindows
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  3929
                                        nil
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3930
                                        #findAndRaiseWindow 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3931
                                        nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3932
                                        #startFullWindowTreeView 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3933
                                        #startWindowTreeView 
922
c72dae45cf15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 921
diff changeset
  3934
                                        nil
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3935
                                        #viewInspect 
922
c72dae45cf15 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 921
diff changeset
  3936
                                        nil
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3937
                                        #viewDestroy 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3938
                                        #findAndDestroyWindow 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3939
                           )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3940
                receiver:self).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3941
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3942
    m subMenuAt:#misc 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3943
      put:(PopUpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3944
                labels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3945
                                           'garbage collect'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3946
                                           'garbage collect & compress'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3947
                                           '-'
954
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
  3948
                                           'find all break/trace points'
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3949
                                           'remove all break/trace points'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3950
                                         ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3951
                selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3952
                                        #garbageCollect
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3953
                                        #compressingGarbageCollect
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3954
                                        nil
954
664cb25ee914 added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents: 951
diff changeset
  3955
                                        #browseAllBreakAndTracePoints                                        
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3956
                                        #removeAllBreakAndTracePoints                                        
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3957
                           )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3958
                receiver:self).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3959
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3960
    m subMenuAt:#hardcopy 
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3961
      put:(PopUpMenu
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3962
                labels:(resources array:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3963
                                           'screen'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3964
                                           'area'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3965
                                           'view'
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3966
                                         ))
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3967
                selectors:#(
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3968
                                        #fullScreenHardcopy
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3969
                                        #screenHardcopy
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3970
                                        #viewHardcopy
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3971
                           )
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3972
                receiver:self).
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3973
1051
5d05a5307a7a added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents: 1048
diff changeset
  3974
    "Modified: 1.3.1997 / 20:25:30 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3975
! !
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  3976
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  3977
!Launcher methodsFor:'initialize / release'!
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  3978
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3979
addTopViewsToCurrentProject
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3980
    "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
  3981
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3982
    ^ self
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3983
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3984
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3985
buttonPanelSpec
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3986
    "return a spec for the buttons in the panel;
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3987
     entries consists of selector and bitmap-filename.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3988
     nil selectors are taken as separators (see setupButtonPanel)"
98
claus
parents: 96
diff changeset
  3989
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3990
    ^ #(
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3991
        #(startSystemBrowser 'SBrowser32x32.xbm')
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3992
        #(startFileBrowser   'FBrowser32x32.xbm')
238
523cc1f36b1d release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents: 233
diff changeset
  3993
"/        #(startWorkspace      'Workspace32x32.xbm')
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3994
        #(nil nil)
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  3995
        #(startChangesBrowser 'CBrowser32x32.xbm')
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3996
"/        #(nil nil)
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3997
"/        #(nil nil)
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3998
"/        #(startDocumentationTool 'book11.ico')
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  3999
     )
230
6be247b9d815 workspace button
Claus Gittinger <cg@exept.de>
parents: 228
diff changeset
  4000
6be247b9d815 workspace button
Claus Gittinger <cg@exept.de>
parents: 228
diff changeset
  4001
    "Created: 4.12.1995 / 20:16:18 / cg"
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  4002
    "Modified: 19.4.1996 / 16:37:46 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4003
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4004
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4005
closeDownViews
1024
45312357e157 use #removeIdentical
Claus Gittinger <cg@exept.de>
parents: 1020
diff changeset
  4006
    OpenLaunchers removeIdentical:self ifAbsent:nil.
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4007
    super closeDownViews.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4008
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4009
    "Created: 5.7.1996 / 13:33:36 / cg"
1024
45312357e157 use #removeIdentical
Claus Gittinger <cg@exept.de>
parents: 1020
diff changeset
  4010
    "Modified: 1.2.1997 / 12:07:53 / cg"
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4011
!
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4012
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4013
closeRequest
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4014
    (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
  4015
        super closeRequest
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4016
    ]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4017
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4018
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4019
focusSequence
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4020
    ^ (Array with:myMenu) 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4021
      , 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4022
      (buttonPanel subViews select:[:element | element isKindOf:Button])
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4023
"/      , (Array with:Transcript)
98
claus
parents: 96
diff changeset
  4024
!
claus
parents: 96
diff changeset
  4025
93
claus
parents: 92
diff changeset
  4026
openInterface
98
claus
parents: 96
diff changeset
  4027
    "sent by my superclass to open up my interface"
93
claus
parents: 92
diff changeset
  4028
951
fa1c5d066f58 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 943
diff changeset
  4029
    |top icn w sz|
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4030
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4031
    "/ 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
  4032
    "/ 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
  4033
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4034
    Transcript notNil ifTrue:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4035
        Transcript ~~ Stderr ifTrue:[
662
b5efd05fa256 use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents: 661
diff changeset
  4036
            isMainLauncher := (Transcript graphicsDevice == device).
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4037
        ] ifFalse:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4038
            isMainLauncher := true
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4039
        ]
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4040
    ] ifFalse:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4041
        isMainLauncher := true
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4042
    ].
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4043
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4044
    top := StandardSystemView onDevice:device.
205
e3952eceab14 set iconLabel
Claus Gittinger <cg@exept.de>
parents: 192
diff changeset
  4045
    top label:'Smalltalk/X'; iconLabel:'ST/X Launcher'.
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4046
    top extent:(400@300 ).
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4047
615
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  4048
    icn := self class aboutIcon.
686
3dd40eb33b09 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 679
diff changeset
  4049
    icn notNil ifTrue:[
951
fa1c5d066f58 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 943
diff changeset
  4050
        icn := icn magnifiedTo:(sz := device preferredIconSize).
686
3dd40eb33b09 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 679
diff changeset
  4051
    ].
616
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  4052
951
fa1c5d066f58 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 943
diff changeset
  4053
    (device supportsDeepIcons not
fa1c5d066f58 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 943
diff changeset
  4054
    and:[device supportsIconViews
fa1c5d066f58 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 943
diff changeset
  4055
    and:[device depth > 1]]) ifTrue:[    
616
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  4056
        w := View extent:sz. 
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  4057
        w viewBackground:icn.
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  4058
        top iconView:w
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  4059
    ] ifFalse:[
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  4060
        top icon:icn.
ae2685e7d843 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
  4061
    ].
615
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  4062
951
fa1c5d066f58 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 943
diff changeset
  4063
"/    device supportsDeepIcons ifTrue:[
615
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  4064
"/        icn := self class aboutIcon.
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  4065
"/        icn notNil ifTrue:[
951
fa1c5d066f58 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 943
diff changeset
  4066
"/            icn := icn magnifiedTo:(sz := device preferredIconSize).
615
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  4067
"/            icn := Depth8Image fromImage:icn.
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  4068
"/            top icon:icn
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  4069
"/        ].
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  4070
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  4071
"/    ] ifFalse:[
951
fa1c5d066f58 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 943
diff changeset
  4072
"/        device supportsIconViews ifTrue:[
615
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  4073
"/            icn := self class aboutIcon.
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  4074
"/            icn notNil ifTrue:[
951
fa1c5d066f58 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 943
diff changeset
  4075
"/                icn := icn magnifiedTo:(sz := device preferredIconSize).
615
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  4076
"/                w := View extent:sz. 
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  4077
"/                w viewBackground:icn.
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  4078
"/                top iconView:w
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  4079
"/            ].
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  4080
"/        ]
ed4432c4d5c0 cleanup icon code
Claus Gittinger <cg@exept.de>
parents: 614
diff changeset
  4081
"/    ].
92
claus
parents: 91
diff changeset
  4082
93
claus
parents: 92
diff changeset
  4083
    self setupViewsIn:top.
98
claus
parents: 96
diff changeset
  4084
claus
parents: 96
diff changeset
  4085
    top application:self.   
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4086
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4087
    "
92
claus
parents: 91
diff changeset
  4088
     open with higher prio to allow interaction even while things
claus
parents: 91
diff changeset
  4089
     are running ...
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4090
    "
92
claus
parents: 91
diff changeset
  4091
    top openWithPriority:(Processor userSchedulingPriority + 1).
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  4092
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4093
    OpenLaunchers isNil ifTrue:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4094
        OpenLaunchers := OrderedCollection new.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4095
    ].
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4096
    OpenLaunchers add:self.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4097
951
fa1c5d066f58 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 943
diff changeset
  4098
    "Modified: 13.1.1997 / 23:30:22 / cg"
93
claus
parents: 92
diff changeset
  4099
!
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4100
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4101
release
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4102
    infoProcess notNil ifTrue:[
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4103
        infoProcess terminate.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4104
        infoProcess := nil.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4105
    ].
1024
45312357e157 use #removeIdentical
Claus Gittinger <cg@exept.de>
parents: 1020
diff changeset
  4106
    OpenLaunchers removeIdentical:self ifAbsent:nil.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4107
    super release
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4108
1024
45312357e157 use #removeIdentical
Claus Gittinger <cg@exept.de>
parents: 1020
diff changeset
  4109
    "Modified: 1.2.1997 / 12:07:56 / cg"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4110
!
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4111
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4112
restarted
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4113
    "image restart - since WindowGroup recreates the process with
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
  4114
     the default priority, we have to raise the prio again.
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
  4115
     Mhmh - this looks like a bug to me ...
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
  4116
     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
  4117
     be reset to normal."
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4118
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4119
    Processor activeProcess priority:(Processor userSchedulingPriority + 1).
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
  4120
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4121
    super restarted
600
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
  4122
7c4fa93d814a cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
  4123
    "Modified: 1.6.1996 / 16:58:25 / cg"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4124
!
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4125
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4126
saveAndTerminateRequest
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4127
    "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
  4128
     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
  4129
     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
  4130
     we are already prepared for this ;-)"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4131
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4132
    self snapshot.
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4133
    super saveAndTerminateRequest
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4134
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4135
    "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
  4136
    "Modified: 5.7.1996 / 13:08:55 / cg"
103
claus
parents: 102
diff changeset
  4137
!
claus
parents: 102
diff changeset
  4138
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4139
setupButtonPanelIn:aTopView
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4140
    "create the buttonPanel"
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4141
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  4142
    |spc mh buttonSize|
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4143
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4144
    spc := View viewSpacing // 2.
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4145
    buttonPanel := HorizontalPanelView in:aTopView.
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4146
    buttonPanel level:-1; borderWidth:0.
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4147
    buttonPanel horizontalLayout:#leftSpace.
1106
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4148
"/    buttonPanel verticalLayout:#centerSpace.
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4149
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  4150
    buttonSize := self class buttonImageSize.
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  4151
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  4152
    "/
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  4153
    "/ the buttonSpec is a collection of:
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  4154
    "/   #( selector  iconFileName )
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  4155
    "/ or:
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  4156
    "/   #( selector  (className iconQuerySelector) )
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  4157
    "/ or"
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  4158
    "/   #( nil )
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  4159
    "/
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  4160
    self buttonPanelSpec do:[:entry |
1106
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4161
        |sel b sep img iconSpec v|
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4162
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  4163
        sel := entry at:1.
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  4164
        sel isNil ifTrue:[
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  4165
            sep := View in:buttonPanel.
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  4166
            sep extent:32@1; borderWidth:0.
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  4167
        ] ifFalse:[
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  4168
            iconSpec := entry at:2.
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  4169
            iconSpec isArray ifTrue:[
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  4170
                img := (Smalltalk classNamed:(iconSpec at:1)) perform:(iconSpec at:2).
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  4171
            ] ifFalse:[
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  4172
                img := Image fromFile:iconSpec.
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  4173
            ].
591
b06ede2544fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 590
diff changeset
  4174
            (img notNil and:[buttonSize notNil]) ifTrue:[
b06ede2544fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 590
diff changeset
  4175
                img extent ~= buttonSize ifTrue:[
b06ede2544fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 590
diff changeset
  4176
                    img := img magnifiedTo:buttonSize       
b06ede2544fb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 590
diff changeset
  4177
                ]
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  4178
            ].
1106
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4179
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4180
            b := Button new.
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  4181
            b form:img.
1106
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4182
            b model:self; changeMessage:sel.
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4183
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4184
            b styleSheet name = 'win95' ifTrue:[
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4185
                v := View in:buttonPanel.
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4186
                v addSubView:b.
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4187
                v level:-1.
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4188
                b passiveLevel:1; activeLevel:-1.
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4189
                v extent:(b preferredExtent 
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4190
                          + b borderWidth + b borderWidth 
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4191
                          + b margin + b margin 
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4192
                          + v margin + v margin).
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4193
                v preferredExtent:v extent.
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4194
                b origin:(v margin asPoint).
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4195
                b enteredBackgroundColor:(Color grey:80).
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4196
            ] ifFalse:[
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4197
                buttonPanel addSubView:b.
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4198
            ].
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  4199
        ]
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4200
    ].
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4201
100
claus
parents: 99
diff changeset
  4202
    mh := myMenu height.
claus
parents: 99
diff changeset
  4203
    buttonPanel origin:0.0 @ (mh + spc)
368
16b400bb820d allow redefinition of the buttonImage size
ca
parents: 364
diff changeset
  4204
                corner:(1.0 @ (mh + spc + buttonPanel preferredExtent y)).
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4205
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4206
    buttonPanel leftInset:spc; rightInset:spc.
490
b11f789fa391 java browser support
Claus Gittinger <cg@exept.de>
parents: 483
diff changeset
  4207
1106
650465f9b173 read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents: 1105
diff changeset
  4208
    "Modified: 29.3.1997 / 12:37:39 / cg"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4209
!
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4210
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4211
setupInfoViewIn:topView 
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4212
    "create the infoView"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4213
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4214
    |spc halfSpc|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4215
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4216
    spc := View viewSpacing.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4217
    infoView := Label label:'' in:topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4218
    infoView adjust:#left; borderWidth:0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4219
    infoView level:-1.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4220
    transcript superView bottomInset:(infoView height + spc).
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  4221
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4222
    infoView is3D ifTrue:[
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4223
        halfSpc := spc // 2.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4224
    ] ifFalse:[
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4225
        halfSpc := 0
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4226
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4227
    infoView topInset:(infoView height negated - spc + transcript borderWidth);
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4228
             bottomInset:halfSpc;
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4229
             leftInset:halfSpc; 
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4230
             rightInset:halfSpc.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4231
    infoView origin:0.0 @ 1.0 corner:1.0 @ 1.0.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4232
    infoView model:self; aspect:#info; labelMessage:#info.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4233
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4234
    Project notNil ifTrue:[
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4235
        Project addDependent:self.
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4236
    ]
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4237
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4238
    "
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4239
     Launcher open
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4240
    "
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4241
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4242
    "Modified: 9.9.1996 / 22:44:15 / stefan"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4243
    "Modified: 8.1.1997 / 14:58:22 / cg"
93
claus
parents: 92
diff changeset
  4244
!
claus
parents: 92
diff changeset
  4245
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4246
setupOtherViewsIn:aTopView
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4247
    "a hook - allows redefinition in your personal subclass.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4248
     For example, add a clock:"
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4249
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4250
"
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4251
    |sz clock space halfSpace|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4252
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4253
    sz := buttonPanel innerHeight - (buttonPanel level abs*2).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4254
    space := View viewSpacing.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4255
    halfSpace := space // 2.
93
claus
parents: 92
diff changeset
  4256
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4257
    buttonPanel rightInset:sz+(space  * 2).
93
claus
parents: 92
diff changeset
  4258
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4259
    clock := ClockView in:buttonPanel topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4260
    clock borderWidth:1.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4261
    clock showSeconds:false.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4262
    clock extent:(sz @ sz).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4263
    clock origin:(1.0 @ (buttonPanel origin y + halfSpace)).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4264
    clock leftInset:sz negated - 2 - halfSpace.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4265
    clock rightInset:halfSpace.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4266
    clock level:1.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4267
"
93
claus
parents: 92
diff changeset
  4268
!
claus
parents: 92
diff changeset
  4269
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4270
setupTranscriptIn:aView 
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4271
    "create the transcript view"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4272
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4273
    |v launcher|
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4274
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4275
    "/ 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
  4276
    "/ if so, do not close the real launcher.
107
claus
parents: 106
diff changeset
  4277
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4278
    (Transcript notNil and:[Transcript ~~ Stderr]) ifTrue:[
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4279
        isMainLauncher ifTrue:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4280
            launcher := Transcript topView application
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4281
        ] ifFalse:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4282
            launcher := self class current.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4283
        ].
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4284
        launcher notNil ifTrue:[
662
b5efd05fa256 use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents: 661
diff changeset
  4285
            launcher window graphicsDevice == device ifTrue:[
1024
45312357e157 use #removeIdentical
Claus Gittinger <cg@exept.de>
parents: 1020
diff changeset
  4286
                OpenLaunchers removeIdentical:launcher ifAbsent:nil.
661
8171aa84ae17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 660
diff changeset
  4287
                launcher window destroy.
8171aa84ae17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 660
diff changeset
  4288
            ]
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4289
        ]
110
claus
parents: 109
diff changeset
  4290
    ].
claus
parents: 109
diff changeset
  4291
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4292
    v := HVScrollableView 
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4293
                for:TextCollector
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4294
                miniScrollerH:true 
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4295
                miniScrollerV:false 
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4296
                in:aView.
93
claus
parents: 92
diff changeset
  4297
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4298
    v origin:(0.0 @ (buttonPanel corner y + View viewSpacing)) 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4299
      corner:(1.0 @ 1.0).
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4300
    transcript := v scrolledView.
660
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4301
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4302
    isMainLauncher ifTrue:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4303
        transcript beTranscript.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4304
    ] ifFalse:[
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4305
        transcript showCR:'**************** Notice ***********************'.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4306
        transcript showCR:'**       this is NOT the Transcript          **'.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4307
        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
  4308
        transcript showCR:'**                                           **'.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4309
        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
  4310
        transcript showCR:'***********************************************'.
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4311
    ]
cb5a90c05873 in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents: 659
diff changeset
  4312
1024
45312357e157 use #removeIdentical
Claus Gittinger <cg@exept.de>
parents: 1020
diff changeset
  4313
    "Modified: 1.2.1997 / 12:08:01 / cg"
94
claus
parents: 93
diff changeset
  4314
!
claus
parents: 93
diff changeset
  4315
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4316
setupViewsIn:topView 
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4317
    "create the pulldown menu, buttonPanel and transcript view"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4318
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4319
    |tFont|
131
claus
parents: 128
diff changeset
  4320
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4321
    topView model:self.
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4322
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4323
    myMenu := PullDownMenu in:topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4324
    myMenu origin:0.0 @ 0.0 corner:(1.0 @ myMenu height).
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4325
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4326
    self setupMenu.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4327
    self setupButtonPanelIn:topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4328
    self setupTranscriptIn:topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4329
    self setupInfoViewIn:topView.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4330
    self setupOtherViewsIn:topView.
118
claus
parents: 117
diff changeset
  4331
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4332
    tFont := transcript font.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4333
    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
  4334
                    @ 
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4335
                    ((tFont height) * 20).
118
claus
parents: 117
diff changeset
  4336
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4337
    "
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4338
     Launcher open
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4339
    "
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4340
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4341
    "Modified: 9.9.1996 / 22:44:31 / stefan"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4342
! !
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4343
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4344
!Launcher methodsFor:'private'!
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4345
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4346
findWindow
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4347
    "a helper for find & destroy and find & raise operations;
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4348
     let user choose a view and return it; return nil on cancel"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4349
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4350
    |knownTopViews nameList box|
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4351
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4352
    knownTopViews := IdentitySet new.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4353
    Screen allScreens do:[:aScreen |
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4354
        aScreen knownViews do:[:aView |
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4355
            aView notNil ifTrue:[
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4356
                knownTopViews add:aView topView
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4357
            ]
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4358
        ]
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4359
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4360
1057
1335864656a1 also offer debuggers in find & raise / find & destroy.
Claus Gittinger <cg@exept.de>
parents: 1056
diff changeset
  4361
    knownTopViews := knownTopViews select:[:aView |
1335864656a1 also offer debuggers in find & raise / find & destroy.
Claus Gittinger <cg@exept.de>
parents: 1056
diff changeset
  4362
                        |wg|
1335864656a1 also offer debuggers in find & raise / find & destroy.
Claus Gittinger <cg@exept.de>
parents: 1056
diff changeset
  4363
1335864656a1 also offer debuggers in find & raise / find & destroy.
Claus Gittinger <cg@exept.de>
parents: 1056
diff changeset
  4364
                        (aView isKindOf:DebugView) ifTrue:[
1335864656a1 also offer debuggers in find & raise / find & destroy.
Claus Gittinger <cg@exept.de>
parents: 1056
diff changeset
  4365
                            "/ although modal, show it.
1335864656a1 also offer debuggers in find & raise / find & destroy.
Claus Gittinger <cg@exept.de>
parents: 1056
diff changeset
  4366
                            aView realized
1335864656a1 also offer debuggers in find & raise / find & destroy.
Claus Gittinger <cg@exept.de>
parents: 1056
diff changeset
  4367
                        ] ifFalse:[
1335864656a1 also offer debuggers in find & raise / find & destroy.
Claus Gittinger <cg@exept.de>
parents: 1056
diff changeset
  4368
                            wg := aView windowGroup.
1335864656a1 also offer debuggers in find & raise / find & destroy.
Claus Gittinger <cg@exept.de>
parents: 1056
diff changeset
  4369
                            (wg notNil and:[wg isModal not]).
1335864656a1 also offer debuggers in find & raise / find & destroy.
Claus Gittinger <cg@exept.de>
parents: 1056
diff changeset
  4370
                        ]
1335864656a1 also offer debuggers in find & raise / find & destroy.
Claus Gittinger <cg@exept.de>
parents: 1056
diff changeset
  4371
                     ].
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4372
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4373
    knownTopViews := knownTopViews asOrderedCollection.
1108
75a3e4f9a21a care for non-labeled views in #findWindow
Claus Gittinger <cg@exept.de>
parents: 1106
diff changeset
  4374
    knownTopViews sort:[:v1 :v2 | |l1 l2|
75a3e4f9a21a care for non-labeled views in #findWindow
Claus Gittinger <cg@exept.de>
parents: 1106
diff changeset
  4375
                                l1 := v1 label ? 'aView'.
75a3e4f9a21a care for non-labeled views in #findWindow
Claus Gittinger <cg@exept.de>
parents: 1106
diff changeset
  4376
                                l2 := v2 label ? 'aView'.
75a3e4f9a21a care for non-labeled views in #findWindow
Claus Gittinger <cg@exept.de>
parents: 1106
diff changeset
  4377
                                l1 < l2
75a3e4f9a21a care for non-labeled views in #findWindow
Claus Gittinger <cg@exept.de>
parents: 1106
diff changeset
  4378
                       ].
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4379
    nameList := knownTopViews collect:[:v | 
1108
75a3e4f9a21a care for non-labeled views in #findWindow
Claus Gittinger <cg@exept.de>
parents: 1106
diff changeset
  4380
                                        |isDead wg p l|
75a3e4f9a21a care for non-labeled views in #findWindow
Claus Gittinger <cg@exept.de>
parents: 1106
diff changeset
  4381
75a3e4f9a21a care for non-labeled views in #findWindow
Claus Gittinger <cg@exept.de>
parents: 1106
diff changeset
  4382
                                        l := v label ? 'aView'.
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4383
                                        ((wg := v windowGroup) notNil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4384
                                        and:[(p := wg process) notNil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4385
                                        and:[p state ~~ #dead]]) ifTrue:[
1108
75a3e4f9a21a care for non-labeled views in #findWindow
Claus Gittinger <cg@exept.de>
parents: 1106
diff changeset
  4386
                                            l  
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4387
                                        ] ifFalse:[
1108
75a3e4f9a21a care for non-labeled views in #findWindow
Claus Gittinger <cg@exept.de>
parents: 1106
diff changeset
  4388
                                            l , ' (dead ?)'
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4389
                                        ]
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4390
                                      ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4391
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4392
    box := ListSelectionBox new.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4393
    box noEnterField.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4394
    box list:nameList.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4395
    box label:(resources string:'view selection').
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4396
    box title:(resources string:'select a view to raise deiconified:') withCRs.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4397
    box action:[:selection |
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4398
        |v|
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4399
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4400
        v := knownTopViews at:box selectionIndex.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4401
        box destroy.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4402
        ^ v
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4403
    ].
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4404
    box extent:400@300.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4405
    box showAtPointer.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4406
    ^ nil
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4407
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4408
    "Created: 28.10.1996 / 14:38:41 / cg"
1108
75a3e4f9a21a care for non-labeled views in #findWindow
Claus Gittinger <cg@exept.de>
parents: 1106
diff changeset
  4409
    "Modified: 1.4.1997 / 13:57:56 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4410
!
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4411
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4412
fontBoxForEncoding:encodingMatch
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4413
    "open a fontBox, showing fonts which match some encoding
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4414
     (used when changing to japanese ...)"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4415
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  4416
    |box y b
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4417
     labelDef buttonDef listDef menuDef textDef
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4418
     models labels allOfThem filter|
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4419
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4420
    encodingMatch notNil ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4421
        filter := [:f | f encoding notNil 
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4422
                        and:[encodingMatch match:f encoding]].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4423
    ].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4424
        
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4425
    models := OrderedCollection new.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4426
    labels := OrderedCollection new.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4427
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4428
    models add:(allOfThem := nil asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4429
    models add:(labelDef := Label defaultFont asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4430
    models add:(buttonDef := Button defaultFont asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4431
    models add:(listDef := SelectionInListView defaultFont asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4432
    models add:(menuDef := MenuView defaultFont asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4433
    models add:(textDef := TextView defaultFont asValue).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4434
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4435
    box := Dialog new.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4436
    box label:(resources string:'Font settings').
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4437
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4438
    models
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4439
    with:(resources array:#('all' 'labels' 'buttons' 'lists' 'menus' 'edit text'))
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4440
    do:[:model :title |
427
3ad00ff692b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 421
diff changeset
  4441
        |y2 lbl f i|
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4442
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4443
        f := model value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4444
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4445
        (box addTextLabel:title) adjust:#left.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4446
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4447
        y := box yPosition.
631
76013574eb04 Settings.Fonts menu: Add ... to Change button labels.
Stefan Vogel <sv@exept.de>
parents: 630
diff changeset
  4448
        b := box addComponent:(Button label:(resources string:'change ...')) tabable:true.
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4449
        b relativeExtent:nil; extent:(b preferredExtent).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4450
        y2 := box yPosition.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4451
        box yPosition:y.
427
3ad00ff692b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 421
diff changeset
  4452
        i := box leftIndent.
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4453
        box leftIndent:(b widthIncludingBorder + View viewSpacing).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4454
        (lbl := box addTextLabel:'')
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4455
            adjust:#left;
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4456
            font:(model value);
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4457
            labelChannel:(BlockValue 
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4458
                            with:[:v | |f|
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4459
                                f := v value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4460
                                f isNil ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4461
                                    ''
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4462
                                ] ifFalse:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4463
                                    f userFriendlyName
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4464
                                ]
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4465
                            ]
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4466
                            argument:model).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4467
        labels add:lbl.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4468
427
3ad00ff692b2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 421
diff changeset
  4469
        box leftIndent:i.
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4470
        box yPosition:(box yPosition max:y2).
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4471
        box addVerticalSpace.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4472
        box addHorizontalLine.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4473
        box addVerticalSpace.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4474
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4475
        b action:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4476
            |f|
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4477
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4478
            f := FontPanel 
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4479
                fontFromUserInitial:(model value) 
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4480
                              title:(resources string:'font for %1' with:title)
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4481
                             filter:filter.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4482
            f notNil ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4483
                model == allOfThem ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4484
                    models do:[:m | m value:f].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4485
                    labels do:[:l | l font:f]
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4486
                ] ifFalse:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4487
                    model value:f.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4488
                    lbl font:f.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4489
                ].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4490
            ]
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4491
        ].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4492
        model == allOfThem ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4493
            box addVerticalSpace
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4494
        ]
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4495
    ].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4496
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4497
    box addAbortButton; addOkButton.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4498
    (box addButton:(Button label:(resources string:'defaults')) before:nil)
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4499
        action:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4500
            "/ fetch defaults
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4501
            View updateAllStyleCaches.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4502
            labelDef value: Label defaultFont.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4503
            buttonDef value: Button defaultFont.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4504
            listDef value: SelectionInListView defaultFont.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4505
            menuDef value: MenuView defaultFont.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4506
            textDef value: TextView defaultFont.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4507
        ].
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4508
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4509
    box open.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4510
    box accepted ifTrue:[
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4511
        Label defaultFont:labelDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4512
        Button defaultFont:buttonDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4513
        Toggle defaultFont:buttonDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4514
        SelectionInListView defaultFont:listDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4515
        MenuView defaultFont:menuDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4516
        PullDownMenu defaultFont:menuDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4517
        TextView defaultFont:textDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4518
        EditTextView defaultFont:textDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4519
        CodeView defaultFont:textDef value.
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4520
    ].
592
5a03a69bc5a3 oops - menuAction is now called with arg if there is one
Claus Gittinger <cg@exept.de>
parents: 591
diff changeset
  4521
    box destroy.
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4522
    ^ box accepted
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4523
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4524
    "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
  4525
    "Modified: 17.6.1996 / 13:38:48 / stefan"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4526
    "Modified: 8.1.1997 / 14:59:11 / cg"
406
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4527
!
d0caca90e889 better font settings
Claus Gittinger <cg@exept.de>
parents: 404
diff changeset
  4528
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4529
openApplication:className nameSpace:aNameSpace
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4530
    "open some application, given the classes name.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4531
     Look for it in Smalltalk and the given nameSpace"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4532
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4533
    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
  4534
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4535
    "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
  4536
!
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4537
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4538
openApplication:className nameSpace:aNameSpace with:aSelector
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4539
    "open some application, given the classes name.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4540
     Look for it in Smalltalk and the given nameSpace"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4541
920
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4542
    |cls|
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4543
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4544
    cls := Smalltalk at:className asSymbol.
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4545
    cls isNil ifTrue:[
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4546
        "/ look if its in the nameSpace
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4547
        aNameSpace notNil ifTrue:[
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4548
            cls := aNameSpace at:className asSymbol
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4549
        ]
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4550
    ].
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4551
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4552
    cls isNil ifTrue:[
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4553
        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
  4554
    ] ifFalse:[
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4555
        Autoload autoloadFailedSignal handle:[:ex |
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4556
            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
  4557
        ] do:[
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4558
            cls perform:aSelector
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4559
        ]
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4560
    ]
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4561
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4562
    "Created: 8.1.1997 / 12:52:13 / cg"
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4563
    "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
  4564
!
2b66e8759af5 look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  4565
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4566
pickAView
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4567
    "let user pick a view and return it"
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4568
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4569
    |v|
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4570
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4571
    (Delay forSeconds:1) wait.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4572
    v := Screen current viewFromUser.
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4573
    v isNil ifTrue:[
864
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  4574
        self warn:'sorry, this is not a smalltalk view'.
6ea7ea821b44 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 860
diff changeset
  4575
        ^ nil
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4576
    ].
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4577
    ^ v
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4578
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4579
    "Modified: 8.1.1997 / 14:59:57 / cg"
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4580
!
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4581
106
claus
parents: 105
diff changeset
  4582
reopenLauncher
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4583
    "reopen a new launcher.
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4584
     for now (since style & language settings currently do
106
claus
parents: 105
diff changeset
  4585
     not affect living views ...)"
claus
parents: 105
diff changeset
  4586
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 740
diff changeset
  4587
    |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
  4588
777
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  4589
"/ 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
  4590
"/ 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
  4591
"/ proper texts in the dialogs).
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  4592
"/
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  4593
"/    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
  4594
"/    enc := MenuView defaultFont encoding.
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  4595
"/    (fontPref match:enc) ifFalse:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  4596
"/        (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
  4597
"/        ifTrue:[
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  4598
"/            self fontBoxForEncoding:fontPref
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  4599
"/        ]
f00fc8691802 check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
  4600
"/    ].
106
claus
parents: 105
diff changeset
  4601
659
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4602
    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
  4603
    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
  4604
    newLauncher window waitUntilVisible.
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4605
    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
  4606
921
0189f3d732e2 commenting & restructuring
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  4607
    "Modified: 8.1.1997 / 15:00:15 / cg"
106
claus
parents: 105
diff changeset
  4608
!
claus
parents: 105
diff changeset
  4609
100
claus
parents: 99
diff changeset
  4610
saveAllViews
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4611
    "tell each topview that we are going to terminate and give it chance
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4612
     to save its contents."
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4613
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4614
    ObjectMemory changed:#aboutToExit
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4615
!
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4616
93
claus
parents: 92
diff changeset
  4617
saveScreenImage:anImage defaultName:defaultName
claus
parents: 92
diff changeset
  4618
    "save an image into a file 
claus
parents: 92
diff changeset
  4619
     - ask user for filename using a fileSelectionBox."
claus
parents: 92
diff changeset
  4620
claus
parents: 92
diff changeset
  4621
    |fileName|
claus
parents: 92
diff changeset
  4622
claus
parents: 92
diff changeset
  4623
    fileName := Dialog
382
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  4624
                    requestFileName:(resources string:'save image in:')
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  4625
                    default:(defaultName , '.tiff')
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  4626
                    ok:(resources string:'save')
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  4627
                    abort:(resources string:'cancel')
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  4628
                    pattern:'*.tiff'.
93
claus
parents: 92
diff changeset
  4629
claus
parents: 92
diff changeset
  4630
    fileName notNil ifTrue:[
382
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  4631
        anImage saveOn:fileName
93
claus
parents: 92
diff changeset
  4632
    ].
382
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  4633
894cc35095fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
  4634
    "Modified: 21.2.1996 / 13:09:28 / cg"
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4635
! !
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4636
715
476b5b4d0dd0 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 711
diff changeset
  4637
!Launcher methodsFor:'queries'!
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  4638
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4639
processName
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4640
    "for monitors only - my name"
142
claus
parents: 140
diff changeset
  4641
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4642
    ^ '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
  4643
!
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4644
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4645
transcript
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4646
    "my transcript"
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4647
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4648
    ^ transcript
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4649
324b82dad016 access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
  4650
    "Created: 5.7.1996 / 13:04:36 / cg"
90
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  4651
! !
60d0bb749a1c *** empty log message ***
claus
parents: 89
diff changeset
  4652
760
39e3f920b233 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 743
diff changeset
  4653
!Launcher class methodsFor:'documentation'!
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4654
219
379dfea373d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  4655
version
1108
75a3e4f9a21a care for non-labeled views in #findWindow
Claus Gittinger <cg@exept.de>
parents: 1106
diff changeset
  4656
    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.260 1997-04-01 12:55:24 cg Exp $'
86
11b4ce85104e Initial revision
claus
parents:
diff changeset
  4657
! !