Community
Participate
Working Groups
I need to set the cancel button as the default button in a dialog. But in MacOS, they end up out of order [OK, Cancel] instead of the traditional Mac style of [Cancel, OK]. I think the problem lies in Dialog.initializeBounds(). It appears that there is code there that sets the default button as the right most button. Unfortunately, if the default button is the cancel button, the Apple User Interface Guidelines are violated. A suggested fix would be to set the default button as the right most button if the current criteria is met and its id != IDialogConstants.CANCEL_ID. It would be super cool if when the only two buttons were OK and cancel with cancel being the default, if the OK button was moved as the right most button to comply with the User Interface Guidelines. But I figured this would probably be a more complicated fix.
Changing OS from Mac OS to Mac OS X as per bug 185991
How about a bugday for y'all
relevant section in Apple HIG: http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGWindows/chapter_18_section_7.html#//apple_ref/doc/uid/20000961-BABCAJID
Created attachment 90549 [details] fix fixes the two-button case
The "more than two buttons" case is a little more complicated: 1 - buttons affecting the contents of the dialog should be left-aligned to the right of Help 2- buttons closing the dialog should be right-aligned 3 - buttons closing the dialog but resulting in a loss of data should be right-aligned but indented by 24 pixels from the others see full discussion in the link posted above @@ WizardDialog therefore should look like this: [Help][< Back][Next >].....[Cancel][Finish] Save Resource dialog (shown if you try to close a modified editor) should look like this: [No]<24px>[Cancel][Yes] @@ a quick-fix would be: - right align the first two buttons - left align the rest a more elaborate version would use the IDs in IDialogConstants to resolve the alignment: right-aligned: OK_ID CANCEL_ID YES_ID YES_TO_ALL_ID RETRY_ID PROCEED_ID OPEN_ID CLOSE_ID FINISH_ID SKIP_ID STOP_ID right-aligned after pixel indent: NO_ID ABORT_ID IGNORE_ID NO_TO_ALL_ID left-aligned: DETAILS_ID BACK_ID NEXT_ID HELP_ID SELECT_ALL_ID DESELECT_ALL_ID SELECT_TYPES_ID One problem with this scheme: Some (e.g. Yes/No) are dependent on the question asked whether they are "destructive" so the above would depend on either a positive or negative question style: "Save changes?" vs. "Abort changes?"
Kim, wasn't this fixed recently or no?
Bug 279297 is for the general problem with a default button that is not the default dismissal button (on Mac and GTK). The "24 pixels" and the "left alignment" rules from comment 5 are Mac-specific, and I don't think that it's worth for us to spend time on this.
I'm keeping this bug open since it has a fix and specific examples for handling more complicated situations on the Mac. Bug 279297 handles the more general issue in the dialog framework.
Prakash is now responsible for watching bug in the [Mac] component area.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.