Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 2299 Details for
Bug 22621
[Dialogs] Order of dialog buttons is wrong on MacOS X
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Revised code
patch2.txt (text/plain), 1.40 KB, created by
Andre Weinand
on 2002-11-01 11:37:46 EST
(
hide
)
Description:
Revised code
Filename:
MIME Type:
Creator:
Andre Weinand
Created:
2002-11-01 11:37:46 EST
Size:
1.40 KB
patch
obsolete
>Index: src/org/eclipse/jface/dialogs/Dialog.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jface/src/org/eclipse/jface/dialogs/Dialog.java,v >retrieving revision 1.3 >diff -u -r1.3 Dialog.java >--- src/org/eclipse/jface/dialogs/Dialog.java 24 Oct 2002 13:35:18 -0000 1.3 >+++ src/org/eclipse/jface/dialogs/Dialog.java 1 Nov 2002 16:36:01 -0000 >@@ -479,6 +479,37 @@ > newShell.setFont(JFaceResources.getDialogFont()); > } > >+/* >+ * @see Window.initializeBounds() >+ */ >+protected void initializeBounds() { >+ String platform= SWT.getPlatform(); >+ if ("carbon".equals(platform)) { //$NON-NLS-1$ >+ // On Mac OS X the default button must be the right-most button >+ Shell shell= getShell(); >+ if (shell != null) { >+ Button defaultButton= shell.getDefaultButton(); >+ if (defaultButton != null && isContained(buttonBar, defaultButton)) >+ defaultButton.moveBelow(null); >+ } >+ } >+ super.initializeBounds(); >+} >+ >+/** >+ * Returns true if the given Control c is a direct or indirect child of >+ * container. >+ */ >+private boolean isContained(Control container, Control c) { >+ Composite parent; >+ while ((parent= c.getParent()) != null) { >+ if (parent == container) >+ return true; >+ c= parent; >+ } >+ return false; >+} >+ > /** > * The <code>Dialog</code> implementation of this <code>Window</code> method > * creates and lays out the top level composite for the dialog, and
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 22621
:
2295
| 2299