AbstractLauncherApplication.st
changeset 3077 6b8aa1dc38a3
parent 3054 43a0f825bdb0
child 3078 588bfe79efca
--- a/AbstractLauncherApplication.st	Wed Aug 15 16:19:06 2001 +0200
+++ b/AbstractLauncherApplication.st	Wed Aug 15 16:46:15 2001 +0200
@@ -3157,11 +3157,11 @@
 miscSettingsFor:requestor
     "open a dialog on misc other settings"
 
-    |box check shadows takeFocus focusFollowsMouse returnFocus  
+    |box pos pos2 check butt shadows takeFocus focusFollowsMouse returnFocus  
      hostNameInLabel showAccelerators 
      preemptive dynamicPrios hostNameInLabelHolder resources y
      activateOnClick opaqueVariablePanelResize opaqueTableColumnResize currentUserPrefs
-     beepEnabled|
+     beepEnabled newWindowLabelFormat|
 
     resources := requestor class classResources.
     currentUserPrefs := UserPreferences current.
@@ -3195,7 +3195,24 @@
     box addCheckBox:(resources string:'Beeper enabled') on:beepEnabled.
     box addCheckBox:(resources string:'Boxes return focus to previously active view') on:returnFocus.
     box addCheckBox:(resources string:'Views catch focus when mapped') on:takeFocus.
-    box addCheckBox:(resources string:'Hostname in window labels') on:hostNameInLabelHolder.
+    pos := box yPosition.
+    check := box addCheckBox:(resources string:'Hostname in window labels') on:hostNameInLabelHolder.
+    check width:0.6.
+    pos2 := box yPosition.
+    box yPosition:pos.
+    butt := box addComponent:(Button label:(resources string:'Format...') 
+               action:[
+                       |newFormat|
+
+                       newFormat := Dialog request:'WindowLabel Format\%1 is label; %2 is hostname:' withCRs initialAnswer:StandardSystemView windowLabelFormat.
+                       newFormat size > 0 ifTrue:[
+                           newWindowLabelFormat := newFormat
+                       ].
+                      ]).
+    box makeTabable:butt.
+    butt left:0.6; width:0.4.
+    box yPosition:(box yPosition max:pos2).
+
     box addCheckBox:(resources string:'Show accelerator keys in menus') on:showAccelerators.
     box addCheckBox:(resources string:'Raise & activate windows on click') on:activateOnClick.
     box addCheckBox:(resources string:'Focus follows mouse') on:focusFollowsMouse.
@@ -3225,8 +3242,12 @@
     "/
     box accepted ifTrue:[
         PopUpView shadows:shadows value.
-        hostNameInLabelHolder value ~~ hostNameInLabel ifTrue:[ 
+        (hostNameInLabelHolder value ~= hostNameInLabel 
+        or:[newWindowLabelFormat ~= StandardSystemView windowLabelFormat]) ifTrue:[ 
             StandardSystemView includeHostNameInLabel:hostNameInLabelHolder value.
+            newWindowLabelFormat notNil ifTrue:[
+                StandardSystemView windowLabelFormat:newWindowLabelFormat
+            ].
 
             Screen allScreens do:[:aDisplay |
                 aDisplay allViewsDo:[:aView |
@@ -6433,5 +6454,5 @@
 !AbstractLauncherApplication class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.151 2001-07-24 08:13:08 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.152 2001-08-15 14:46:15 cg Exp $'
 ! !