bugGNUstep - Bugs: bug #25471, NSOpenPanel doesn't disable OK...

Group
 
 

bug #25471: NSOpenPanel doesn't disable OK button

Submitter:  Doug Simons <theeggcamefirst>
Submitted:  Mon 02 Feb 2009 11:37:40 PM UTC
   
 
Category:  Gui/AppKit Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  gcasa
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 18 Jun 2010 10:55:29 AM UTC, comment #3: 

can this case be considered solved?

Riccardo Mottola <rmottola>
Group Member
Mon 16 Feb 2009 03:15:25 AM UTC, comment #2: 

I have tested and applied this patch.   Please test and provide any feedback you feel necessary.

Gregory John Casamento <gcasa>
Group administrator
Fri 13 Feb 2009 06:35:45 PM UTC, comment #1: 

I made the following changes to my local copy of NSOpenPanel, which fixes the problem. Someone more familiar with the code should probably take a look before committing these. In particular, I didn't change the branch where multiple files are selected. Ideally, that should only enable the OK button if at least one appropriate file is selected (in the case of selecting folders, it doesn't make sense to only allow selecting folders with the correct extension, but OK should only be enabled when at least one of the folders selected in the last column has the correct extension).

Index: NSOpenPanel.m
===================================================================
--- NSOpenPanel.m (revision 27760)
+++ NSOpenPanel.m (working copy)
@@ -127,7 +127,7 @@
      {
        [self _selectCellName: [[_form cellAtIndex: 0] stringValue]];
        //       [_form selectTextAtIndex: 0];
-       [_okButton setEnabled: YES];
+       [_okButton setEnabled: [self _shouldShowExtension:[[_browser path] pathExtension]]];
      }
  }
       else
@@ -152,7 +152,7 @@
        [_form setNeedsDisplay: YES];
      }
 
-   [_okButton setEnabled: YES];
+   [_okButton setEnabled: [self _shouldShowExtension:[[_browser path] pathExtension]]];
  }
     }
 }


Doug Simons <theeggcamefirst>
Mon 02 Feb 2009 11:37:40 PM UTC, original submission:  

Currently the OK butto in the OpenPanel is always enabled. It should be disabled except when an acceptable file (as specified by the file types array) is selected.

Doug Simons <theeggcamefirst>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rmottola (Posted a comment)
  • -email is unavailable- added by gcasa (Posted a comment)
  • -email is unavailable- added by theeggcamefirst (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-01-15 rmottola Open/ClosedIn Test Closed
    2009-02-16 gcasa StatusNone Fixed
        Assigned toNone gcasa
        Open/ClosedOpen In Test

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code