Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8019280

[macosx] CFileDialog selection button on choose directory mode should read " Choose "

    Details

      Description

      FULL PRODUCT VERSION :
      jdk7u15-b02

      ADDITIONAL OS VERSION INFORMATION :
      Mac OSX 10.7.x
      Mac OSX 10.8.x

      A DESCRIPTION OF THE PROBLEM :
      The OpenJDK implementation of CFileDialog for mac is inconsistent with how Apple's implementation would show the selection button when the dialog was set to choose directories.

      The correct caption on the selection button should be " Choose " , not " Open " according to Mac OSX UI guidelines.



      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      open a FileDialog with chooseDirectory flags on, see that the button reads " Open " (which makes no sense to a regular user)

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      FileDialog directory selection button should read " Choose " , not Open.
      ACTUAL -
      FileDialog selection button reads " Open " on directory selection mode.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Please Include a similar fix. We just recompiled the JDK with this fix to solve the issue for our user base.

      diff -r 92ccf8f59530 src/macosx/native/sun/awt/CFileDialog.m
      --- a/src/macosx/native/sun/awt/CFileDialog.mWed Jan 30 02:01:24 2013 +0000
      +++ b/src/macosx/native/sun/awt/CFileDialog.mMon Feb 04 19:00:35 2013 -0500
      @@ -113,6 +113,16 @@
                   [openPanel setCanChooseFiles:YES];
                   [openPanel setCanChooseDirectories:fChooseDirectories];
                   [openPanel setCanCreateDirectories:YES];
      +
      + if (fChooseDirectories) {
      + NSString *buttonPrompt = NSLocalizedString(@ " Choose " , @ " Choose " );
      +
      + if (buttonPrompt == nil) {
      + buttonPrompt = @ " Choose " ;
      +}
      +
      + [openPanel setPrompt:buttonPrompt];
      + }
               }
       
               [thePanel setDelegate:self];

        Attachments

          Activity

            People

            • Assignee:
              aniyogi Avik Niyogi (Inactive)
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: