[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #25471] NSOpenPanel doesn't disable OK button
From: |
Doug Simons |
Subject: |
[bug #25471] NSOpenPanel doesn't disable OK button |
Date: |
Fri, 13 Feb 2009 18:35:46 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1 |
Follow-up Comment #1, bug #25471 (project gnustep):
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]]];
}
}
}
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?25471>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/