care for styleSheets right-to-left button order.
authorClaus Gittinger <cg@exept.de>
Sat, 06 Mar 1999 02:59:15 +0100
changeset 1760 631f902aaabe
parent 1759 ceec9f2dd1f9
child 1761 e35b524d6d64
care for styleSheets right-to-left button order.
DialogBox.st
EnterBox2.st
YesNoBox.st
--- a/DialogBox.st	Sat Mar 06 02:28:50 1999 +0100
+++ b/DialogBox.st	Sat Mar 06 02:59:15 1999 +0100
@@ -3930,17 +3930,23 @@
 
     helpButton := Button label:(resources string:'help').
     helpButton action:[
-	self withWaitCursorDo:[HTMLDocumentView openFullOnHelpFile:pathToHelpText]].
-    ^ self addButton:helpButton before:nil.
+        self withWaitCursorDo:[HTMLDocumentView openFullOnHelpFile:pathToHelpText]
+    ].
+    (styleSheet at:'dialogBox.okAtLeft') ifTrue:[
+        self addButton:helpButton after:nil.
+    ] ifFalse:[
+        self addButton:helpButton before:nil.
+    ].
+    ^ helpButton
 
     "
      |box|
 
      box := DialogBox new.
      box 
-	addHelpButtonFor:'Launcher/compilerSettings.html';
-	addAbortButton; 
-	addOkButton.
+        addHelpButtonFor:'Launcher/compilerSettings.html';
+        addAbortButton; 
+        addOkButton.
 
      box open
     "
@@ -3975,7 +3981,12 @@
 
     okButton := aButton.
     aButton model:self; change:#okPressed.
-    ^ self addButton:aButton.
+    (styleSheet at:'dialogBox.okAtLeft') ifTrue:[
+        self addButton:aButton before:nil.
+    ] ifFalse:[
+        self addButton:aButton after:nil.
+    ].
+    ^ aButton.
 
     "
      |dialog b|
@@ -5894,6 +5905,6 @@
 !DialogBox class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.128 1999-03-06 01:28:50 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.129 1999-03-06 01:58:55 cg Exp $'
 ! !
 DialogBox initialize!
--- a/EnterBox2.st	Sat Mar 06 02:28:50 1999 +0100
+++ b/EnterBox2.st	Sat Mar 06 02:59:15 1999 +0100
@@ -77,7 +77,7 @@
 !
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/EnterBox2.st,v 1.18 1997-01-16 21:01:27 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/EnterBox2.st,v 1.19 1999-03-06 01:59:15 cg Exp $'
 ! !
 
 !EnterBox2 methodsFor:'accessing'!
@@ -115,8 +115,12 @@
     "
      add a second ok-button (a return button)
     "
-
-    okButton2 := self addButton:(Button okButton).
+    okButton2 := Button okButton.
+    (styleSheet at:'dialogBox.okAtLeft') ifTrue:[
+        buttonPanel addSubView:okButton2 before:okButton.
+    ] ifFalse:[
+        buttonPanel addSubView:okButton2 after:okButton.
+    ].
     okButton2 model:self; change:#ok2Pressed.
 
     "
--- a/YesNoBox.st	Sat Mar 06 02:28:50 1999 +0100
+++ b/YesNoBox.st	Sat Mar 06 02:59:15 1999 +0100
@@ -320,6 +320,8 @@
 !YesNoBox methodsFor:'initialization'!
 
 initialize
+    <resource: #style (#'dialogBox.okAtLeft')>
+
     super initialize.
 
     label := resources string:'Choose'.
@@ -330,7 +332,11 @@
     okButton label:(resources string:'yes').
 
     abortButton := Button abortButton.
-    buttonPanel addSubView:abortButton before:okButton.
+    (styleSheet at:'dialogBox.okAtLeft') ifTrue:[
+        buttonPanel addSubView:abortButton after:okButton.
+    ] ifFalse:[
+        buttonPanel addSubView:abortButton before:okButton.
+    ].
     abortButton label:(resources string:'no').
     abortButton height:(okButton height).
     abortButton model:self; change:#noPressed
@@ -422,5 +428,5 @@
 !YesNoBox class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/YesNoBox.st,v 1.39 1997-10-28 20:02:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/YesNoBox.st,v 1.40 1999-03-06 01:58:19 cg Exp $'
 ! !