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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #25471: NSOpenPanel doesn't disable OK button

Submitted by:  Doug Simons <theeggcamefirst>
Submitted on:  Mon 02 Feb 2009 11:37:40 PM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Gregory John Casamento <gcasa>
Open/Closed: Closed

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

can this case be considered solved?

Riccardo Mottola <rmottola>
Project 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>
Project AdministratorIn charge of this item.
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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 15 Jan 2013 10:18:11 PM UTCrmottolaOpen/ClosedIn Test=>Closed
    Mon 16 Feb 2009 03:15:25 AM UTCgcasaStatusNone=>Fixed
      Assigned toNone=>gcasa
      Open/ClosedOpen=>In Test

    Back to the top


    Powered by Savane 3.1-cleanup1