Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 179451

Summary: Plug-In Validation failed dialog has wrong button order
Product: [Eclipse Project] PDE Reporter: Martin Probst <mail>
Component: UIAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: darin.eclipse, markus.kell.r
Version: 3.3   
Target Milestone: 3.6 M2   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Bug Depends on: 184284    
Bug Blocks:    

Description Martin Probst CLA 2007-03-27 04:31:21 EDT
The plug-in validation dialog that is shown when you try running a plug-in with a wrong configuration, so that some plugins need to be deactivated, has a wrong button order. It's [ OK, Cancel ] but should be [ Cancel, OK ] on the Mac.
Comment 1 Brian Bauman CLA 2007-03-27 13:03:02 EDT
I can look into this one
Comment 2 Brian Bauman CLA 2007-03-29 16:22:43 EDT
Martin, unfortunately I don't have very much Mac experience.  The problem lies in the fact that the default button seems to always appear on the right side.  For this dialog, we set the cancel button as defualt (since the user probably does not want to run if it won't launch successfully).  

What is the mac standard of practice, the right most button is the OK/affirm button, or the right most button is the default button?  

Also, would it appears more Mac friendly if we had the buttons appear as [Proceed, Abort] with Abort being the default button?
Comment 3 Martin Probst CLA 2007-03-29 16:36:30 EDT
Apple User Interface Guidelines to the rescue :-)
http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGWindows/chapter_17_section_6.html#//apple_ref/doc/uid/20000961-BABCAJID

To summarize: the "do this" button should always be the right one, the cancel should always be left. And they should be named properly.
Comment 4 Markus Keller CLA 2009-06-11 08:46:19 EDT
Bug 279297 is for the general problem with a default button that is not the
default dismissal button (on Mac and GTK).

But the real problem here is that the Cancel button is the default button. That would only make sense if clicking OK would lead to disasters like a huge loss of work. For a simple confirmation dialog, OK should be the default -- and this already solves this bug.

Fix in PluginStatusDialog.createButtonsForButtonBar(Composite):

    createButton(parent, IDialogConstants.CANCEL_ID,
            IDialogConstants.CANCEL_LABEL, false);
                                           ^^^^^
Comment 5 Markus Keller CLA 2009-06-11 08:54:12 EDT
(In reply to comment #2)
> For this dialog, we set the cancel button as defualt (since the user probably
> does not want to run if it won't launch successfully).  

Most of the time when I get this dialog, it's because I launch with an 1.4 VM, but the launch target contains plug-ins that require 1.5 or 1.6. In that situation, it *would* launch successfully, but there's no keyboard shortcut for OK.
Comment 6 Curtis Windatt CLA 2009-08-18 11:47:11 EDT
Fixed in HEAD.  The cancel button is now added first and it not set as the default.  This should fix the Mac issue and makes it more consistent on other OS's.  Now when the dialog comes up I can press enter to continue or escape to cancel as I would with other dialogs.
Comment 7 Markus Keller CLA 2009-08-18 13:08:50 EDT
> Fixed in HEAD.  The cancel button is now added first and it not set as the
> default.  This should fix the Mac issue and makes it more consistent on other
> OS's.

Sorry, that's wrong. The buttons have to be created in Windows order (OK, Cancel), and Dialog.initializeBounds() takes care of reordering on Mac and GTK.

In HEAD, the buttons are now wrongly ordered on Windows. You should revert the reversal...
Comment 8 Curtis Windatt CLA 2009-08-18 14:25:31 EDT
Corrected the ordering, I didn't realize the order gets corrected on GTK but not windows.  I'll try it out on the Mac shortly.
Comment 9 Curtis Windatt CLA 2009-08-18 15:09:49 EDT
Works correctly on the Mac.